Package synalp.commons.derivations

Examples of synalp.commons.derivations.GornAddress


    {
      Node foot = entry.getTree().getFoot();
      if (foot != null && foot.hasCategory(category))
      {
        Node anchor = entry.getTree().getMainAnchor();
        GornAddress footAddress = GornAddress.getAddress(foot, entry.getTree());
        GornAddress anchorAddress = GornAddress.getAddress(anchor, entry.getTree());
        boolean leftOf = footAddress.isLeftOf(anchorAddress);
        if (footType == FootType.LEFT && leftOf)
          ret.add(entry);
        if (footType == FootType.RIGHT && !leftOf)
          ret.add(entry);
View Full Code Here


    n1.addChild(n2);
    n1.addChild(n3);

    // 0:root ( 0.0:n1 ( 0.0.0:n2 0.0.1:n3 ) )

    assertNull(tree.getNode(new GornAddress(0, 1)));
    assertNotNull(tree.getNode(new GornAddress(0, 0, 0)));
  }
View Full Code Here

    n1.addChild(n2);
    n1.addChild(n3);

    // 0:root ( 0.0:n1 ( 0.0.0:n2 0.0.1:n3 ) )

    assertEquals(GornAddress.getAddress(n1, tree), new GornAddress(0, 0));
    assertEquals(GornAddress.getAddress(n2, tree), new GornAddress(0, 0, 0));
    assertEquals(GornAddress.getAddress(n3, tree), new GornAddress(0, 0, 1));
  }
View Full Code Here

   * Test address leftOf method.
   */
  @Test
  public void testLeftOf()
  {
    assertTrue(new GornAddress(0, 0, 1).isLeftOf(new GornAddress(0, 0, 2)));
  }
View Full Code Here

TOP

Related Classes of synalp.commons.derivations.GornAddress

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.