Examples of RelationContainer


Examples of org.openstreetmap.osmosis.core.container.v0_6.RelationContainer

          if (reader.getLocalName().equals(ELEMENT_NAME_NODE)) {
            sink.process(new NodeContainer(readNode()));
          } else if (reader.getLocalName().equals(ELEMENT_NAME_WAY)) {
            sink.process(new WayContainer(readWay()));
          } else if (reader.getLocalName().equals(ELEMENT_NAME_RELATION)) {
            sink.process(new RelationContainer(readRelation()));
          } else {
            readUnknownElement();
          }
        }
View Full Code Here

Examples of org.openstreetmap.osmosis.core.container.v0_6.RelationContainer

      buildRelationMembers(osmRelation, relation.getMemidsList(), relation.getRolesSidList(),
          relation.getTypesList(), fieldDecoder);

      // Add the bound object to the results.
      decodedEntities.add(new RelationContainer(osmRelation));
    }
  }
View Full Code Here

Examples of org.openstreetmap.osmosis.core.container.v0_6.RelationContainer

 
  /**
   * {@inheritDoc}
   */
  public void end() {
    getSink().process(new RelationContainer(relation));
  }
View Full Code Here

Examples of org.openstreetmap.osmosis.core.container.v0_6.RelationContainer

                        getUser(info), info.getChangeset(), tags), nodes);
            } else {
                tmp = new Relation(new CommonEntityData(id, NOVERSION, NODATE, OsmUser.NONE,
                        NOCHANGESET, tags), nodes);
            }
            sink.process(new RelationContainer(tmp));
        }
    }
View Full Code Here

Examples of org.openstreetmap.osmosis.core.container.v0_6.RelationContainer

   
    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

Examples of org.openstreetmap.osmosis.core.container.v0_6.RelationContainer

   
    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

Examples of org.openstreetmap.osmosis.core.container.v0_6.RelationContainer

   * @param relationContainer
   *            Relation to be sent.
   */
  private void emitRelation(RelationContainer relationContainer) {
      if (clipIncompleteEntities) {
        RelationContainer filteredRelationContainer;
        Relation filteredRelation;
       
        filteredRelationContainer = relationContainer.getWriteableInstance();
        filteredRelation = filteredRelationContainer.getEntity();
       
        // Remove members for entities that are unavailable.
        for (Iterator<RelationMember> i = filteredRelation.getMembers().iterator(); i.hasNext();) {
          RelationMember member = i.next();
          EntityType memberType;
View Full Code Here

Examples of org.openstreetmap.osmosis.core.container.v0_6.RelationContainer

    private void pumpRelationsToSink() {
      ReleasableIterator<RelationContainer> i = allRelations.iterate();
     
      try {
        while (i.hasNext()) {
        RelationContainer relationContainer = i.next();
        if (availableRelations.get(relationContainer.getEntity().getId())) {
          emitRelation(relationContainer);
        }
      }
       
      } finally {
View Full Code Here

Examples of org.openstreetmap.osmosis.core.container.v0_6.RelationContainer

      }
      if (wayIds.hasNext()) {
        return new WayContainer(getWay(wayIds.next()));
      }
      if (relationIds.hasNext()) {
        return new RelationContainer(getRelation(relationIds.next()));
      }
     
      throw new NoSuchElementException();
    }
View Full Code Here

Examples of org.openstreetmap.osmosis.core.container.v0_6.RelationContainer

    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
TOP
Copyright © 2018 www.massapi.com. 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.