Package org.openstreetmap.osmosis.core.container.v0_6

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


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


        action = ChangeAction.Modify;
      }
     
      // Create a change record which data derived from the
      // replication sequence number itself.
      ChangeContainer change = new ChangeContainer(new NodeContainer(new Node(new CommonEntityData(10,
          (int) state.getSequenceNumber(), new Date(state.getSequenceNumber() * 1000), new OsmUser(11,
              "test"), state.getSequenceNumber() * 2), state.getSequenceNumber() * 3,
          state.getSequenceNumber() * 4)), action);
     
      // Send the record downstream.
View Full Code Here

              getUser(info), info.getChangeset(), tags), latf, lonf);
        } else {
          tmp = new Node(new CommonEntityData(id, NOVERSION, NODATE, OsmUser.NONE,
              NOCHANGESET, tags), latf, lonf);
        }
        sink.process(new NodeContainer(tmp));

      }
    }
View Full Code Here

              tmp = new Node(new CommonEntityData(id, version, date, user, changeset, tags), latf, lonf);
            } else {
                tmp = new Node(new CommonEntityData(id, NOVERSION, NODATE, OsmUser.NONE,
                        NOCHANGESET, tags), latf, lonf);
            }
            sink.process(new NodeContainer(tmp));
        }
    }
View Full Code Here

  /**
   * Test processing a Bound after a Node.
   */
  @Test(expected = OsmosisRuntimeException.class)
  public final void testProcess4() {
    testOsmWriter.process(new NodeContainer(
        new Node(
            new CommonEntityData(1234, 0, new Date(), new OsmUser(12, "OsmosisTest"), 0,
                new ArrayList<Tag>()),
            20, 20)));
    testOsmWriter.process(new BoundContainer(new Bound("source")));
View Full Code Here

    private void pumpNodesToSink() {
      ReleasableIterator<NodeContainer> i = allNodes.iterate();
     
      try {
        while (i.hasNext()) {
        NodeContainer nodeContainer = i.next();
        if (availableNodes.get(nodeContainer.getEntity().getId())) {
          emitNode(nodeContainer);
        }
      }
       
      } finally {
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    public EntityContainer next() {
      if (nodeIds.hasNext()) {
        return new NodeContainer(getNode(nodeIds.next()));
      }
      if (wayIds.hasNext()) {
        return new WayContainer(getWay(wayIds.next()));
      }
      if (relationIds.hasNext()) {
View Full Code Here

   
    user = new OsmUser(12, "OsmosisTest");
     
    tags = Arrays.asList(new Tag("amenity", "bank"), new Tag("Akey", "Avalue"));
    amenityNode = new Node(new CommonEntityData(1101, 0, new Date(), user, 0, tags), 1, 2);
    amenityNodeContainer = new NodeContainer(amenityNode);

    tags = new ArrayList<Tag>();
    taglessNode = new Node(new CommonEntityData(1102, 0, new Date(), user, 0, tags), 3, 4);
    taglessNodeContainer = new NodeContainer(taglessNode);

    tags = Arrays.asList(new Tag("highway", "motorway"), new Tag("Bkey", "Bvalue"));
    motorwayWay = new Way(new CommonEntityData(2201, 0, new Date(), user, 0, tags), new ArrayList<WayNode>());
    motorwayWayContainer = new WayContainer(motorwayWay);
View Full Code Here

    private Node node;
    private NodeContainer nodeContainer;

    public Writer() {
      node = new Node(new CommonEntityData(1, 2, new Date(), OsmUser.NONE, 3), 10, 10);
      nodeContainer = new NodeContainer(node);
    }
View Full Code Here

    sources = new ArrayList<ReleasableIterator<EntityContainer>>();
   
    sources.add(new UpcastIterator<EntityContainer, BoundContainer>(
        new BoundContainerIterator(new ReleasableAdaptorForIterator<Bound>(bounds.iterator()))));
    sources.add(new UpcastIterator<EntityContainer, NodeContainer>(
        new NodeContainerIterator(nodeDao.iterate())));
    sources.add(new UpcastIterator<EntityContainer, WayContainer>(
        new WayContainerIterator(wayDao.iterate())));
    sources.add(new UpcastIterator<EntityContainer, RelationContainer>(
        new RelationContainerIterator(relationDao.iterate())));
   
View Full Code Here

TOP

Related Classes of org.openstreetmap.osmosis.core.container.v0_6.NodeContainer

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.