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

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


    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


    if (entityContainer.getEntity().getType() == EntityType.Bound) {
      if (newBound == null) {
        // Just returning won't pass the entity downstream
        return;
      } else {
        sink.process(new BoundContainer(newBound));
      }
    } else {
      if (newBound != null) {
        sink.process(new BoundContainer(newBound));
      }
      sink.process(entityContainer);
    }
  }
View Full Code Here

    @Override
    public void run() {
      try {
        sink.initialize(Collections.<String, Object>emptyMap());
        if (publishBound) {
          sink.process(new BoundContainer(bound));
        }
        sink.process(new NodeContainer(createNode()));
        sink.complete();
      } finally {
        sink.release();
View Full Code Here

  @Override
  public void complete() {
    objects.complete();

    if (nodesSeen) {
      sink.process(new BoundContainer(new Bound(right, left, top, bottom, this.origin)));
    }

    ReleasableIterator<EntityContainer> iter = null;

    try {
View Full Code Here

          new SchemaVersionValidator(loginCredentials, preferences)
                  .validateVersion(ApidbVersionConstants.SCHEMA_MIGRATIONS);
         
          entityDao = new AllEntityDao(dbCtx.getJdbcTemplate());
         
          sink.process(new BoundContainer(new Bound("Osmosis " + OsmosisConstants.VERSION)));
          reader = entityDao.getCurrent();
          try {
            while (reader.hasNext()) {
              sink.process(reader.next());
            }
View Full Code Here

    bounds.add(new Bound("Osmosis " + OsmosisConstants.VERSION));
   
    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>(
View Full Code Here

    // Create iterators for the selected records for each of the entity types.
    LOG.finer("Iterating over results.");
    resultSets = new ArrayList<ReleasableIterator<EntityContainer>>();
    resultSets.add(
        new UpcastIterator<EntityContainer, BoundContainer>(
            new BoundContainerIterator(new ReleasableAdaptorForIterator<Bound>(bounds.iterator()))));
    resultSets.add(
        new UpcastIterator<EntityContainer, NodeContainer>(
            new NodeContainerIterator(nodeDao.iterate("bbox_"))));
    resultSets.add(
        new UpcastIterator<EntityContainer, WayContainer>(
View Full Code Here

    bounds.add(new Bound("Osmosis " + OsmosisConstants.VERSION));
   
    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>(
View Full Code Here

      // Create iterators for the selected records for each of the entity types.
      LOG.finer("Iterating over results.");
      resultSets = new ArrayList<ReleasableIterator<EntityContainer>>();
      resultSets.add(
          new UpcastIterator<EntityContainer, BoundContainer>(
              new BoundContainerIterator(new ReleasableAdaptorForIterator<Bound>(bounds.iterator()))));
      resultSets.add(
          new UpcastIterator<EntityContainer, NodeContainer>(
              new NodeContainerIterator(new NodeReader(dbCtx, "box_node_list"))));
      resultSets.add(
          new UpcastIterator<EntityContainer, WayContainer>(
View Full Code Here

                ChangeAction action = diff.changeType().equals(ChangeType.ADDED) ? ChangeAction.Create
                        : diff.changeType().equals(ChangeType.MODIFIED) ? ChangeAction.Modify
                                : ChangeAction.Delete;

                return new ChangeContainer(container, action);

            }

        };
        return Iterators.transform(iterator, function);
View Full Code Here

TOP

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

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.