Package org.cedj.geekseek.web.rest.core

Examples of org.cedj.geekseek.web.rest.core.ResourceMetadata$Relation


  /**
   * Test processing a Relation.
   */
  @Test
  public final void testProcess8() {
    Relation testRelation;
   
    testRelation = new Relation(new CommonEntityData(3456, 0, new Date(), new OsmUser(12, "OsmosisTest"), 0));
    testRelation.getMembers().add(new RelationMember(1234, EntityType.Node, "role1"));
    testRelation.getTags().add(new Tag("test_key1", "test_value1"));
   
    testOsmWriter.process(new RelationContainer(testRelation));
    // Nothing to assert; just expect no exception
  }
View Full Code Here


      int selectionCount;
     
      selectionCount = 0;
     
      while (i.hasNext()) {
        Relation relation = i.next().getEntity();
        long relationId = relation.getId();
       
        // Only examine available relations.
        if (availableRelations.get(relationId)) {
          // Select the child if it hasn't already been selected.
          for (RelationMember member : relation.getMembers()) {
            if (member.getMemberType().equals(EntityType.Relation)) {
              long memberId = member.getMemberId();
             
              if (!availableRelations.get(memberId)) {
                availableRelations.set(memberId);
View Full Code Here

  /**
   * Test processing a Bound after a Relation.
   */
  @Test(expected = OsmosisRuntimeException.class)
  public final void testProcess9() {
    Relation testRelation;
   
    testRelation = new Relation(new CommonEntityData(3456, 0, new Date(), new OsmUser(12, "OsmosisTest"), 0));
    testRelation.getMembers().add(new RelationMember(1234, EntityType.Node, "role1"));
    testRelation.getTags().add(new Tag("test_key1", "test_value1"));
   
    testOsmWriter.process(new RelationContainer(testRelation));
    testOsmWriter.process(new BoundContainer(new Bound("source")));
  }
View Full Code Here

  private void selectChildNonRelationsPass() {
    ReleasableIterator<RelationContainer> i = allRelations.iterate();
   
    try {
      while (i.hasNext()) {
        Relation relation = i.next().getEntity();
        long relationId = relation.getId();
       
        // Only examine available relations.
        if (availableRelations.get(relationId)) {
          // Select the member if it hasn't already been selected.
          for (RelationMember member : relation.getMembers()) {
            switch (member.getMemberType()) {
            case Node:
              availableNodes.set(member.getMemberId());
              break;
            case Way:
View Full Code Here

      new Way(new CommonEntityData(2202, 0, new Date(), user, 0, tags), new ArrayList<WayNode>());
    residentialWayContainer = new WayContainer(residentialWay);

    tags = Arrays.asList(new Tag("Dkey", "Dvalue"));
    testRelation =
      new Relation(new CommonEntityData(3301, 0, new Date(), user, 0, tags), new ArrayList<RelationMember>());
    testRelationContainer = new RelationContainer(testRelation);
  }
View Full Code Here

   * @param scr
   *            Maintains the mapping between classes and their identifiers
   *            within the store.
   */
  public RelationContainer(StoreReader sr, StoreClassRegister scr) {
    relation = new Relation(sr, scr);
  }
View Full Code Here

TOP

Related Classes of org.cedj.geekseek.web.rest.core.ResourceMetadata$Relation

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.