Package org.openstreetmap.osmosis.core.domain.v0_6

Examples of org.openstreetmap.osmosis.core.domain.v0_6.WayNode


  }

  @Test
  public void process() {
    // Setup
    Entity entityMocked = mock(Entity.class);
    when(entityMocked.getType()).thenReturn(EntityType.Node);

    EntityContainer entityContainerMocked = mock(EntityContainer.class);
    when(entityContainerMocked.getEntity()).thenReturn(entityMocked);

    // Action
View Full Code Here


    LOG.fine("initialize() with metadata: " + metadata.toString());
  }

  @Override
  public void process(EntityContainer entityContainer) {
    Entity entity = entityContainer.getEntity();
    EntityType type = entity.getType();
    workerPool.submit(entity);
    entityCounter.increment(type);
  }
View Full Code Here

    this.newTypeNotification = new AtomicReference<Worker.NewTypeNotification>();
  }

  @Override
  public void run() {
    Entity entity = null;
    EntityBuffer entityBuffer = null;
    NewTypeNotification notification = null;
    while (running || !taskQueue.isEmpty()) {
      try {
        // Check if a NewTypeNotification was triggered
View Full Code Here

   * {@inheritDoc}
   */
  @Override
  public List<ChangeContainer> next() {
    List<ChangeContainer> changeList;
    Entity peekEntity;
    long currentId;
    EntityType currentEntityType;
   
    // Get the next change from the underlying stream.
    peekEntity = sourceIterator.peekNext().getEntityContainer().getEntity();
    currentId = peekEntity.getId();
    currentEntityType = peekEntity.getType();
   
    // Loop until all history values for the current element are exhausted.
    changeList = new ArrayList<ChangeContainer>();
    while (sourceIterator.hasNext()) {
      ChangeContainer tmpChangeContainer = sourceIterator.peekNext();
View Full Code Here

 
  /**
   * {@inheritDoc}
   */
  public void process(EntityContainer entityContainer) {
    Entity entity;
   
    entity = entityContainer.getEntity();
   
    if (progressTracker.updateRequired()) {
      LOG.info(
          prefix
          + "Processing " + entity.getType() + " " + entity.getId() + ", "
          + progressTracker.getObjectsPerSecond() + " objects/second.");
    }
   
    sink.process(entityContainer);
  }
View Full Code Here

  }

  @Override
  public void process(EntityContainer entityContainer) {
    Entity entity = entityContainer.getEntity();
    EntityType type = entity.getType();
    workerPool.submit(entity);
    entityCounter.increment(type);
  }
View Full Code Here

  @Override
  public List<ChangeContainer> next() {
    List<ChangeContainer> changeList;
    Entity peekEntity;
    long currentId;
    EntityType currentEntityType;
   
    // Get the next change from the underlying stream.
    peekEntity = sourceIterator.peekNext().getEntityContainer().getEntity();
    currentId = peekEntity.getId();
    currentEntityType = peekEntity.getType();
   
    // Loop until all history values for the current element are exhausted.
    changeList = new ArrayList<ChangeContainer>();
    while (sourceIterator.hasNext()) {
      ChangeContainer tmpChangeContainer = sourceIterator.peekNext();
     
      // Break out of the loop when we reach the next entity in the stream.
      if (currentId != tmpChangeContainer.getEntityContainer().getEntity().getId()
        || !currentEntityType.equals(tmpChangeContainer.getEntityContainer().getEntity().getType())) {
        break;
      }
     
      // We want the value that we have already peeked from the iterator, so remove it from the iterator.
      sourceIterator.next();
View Full Code Here

    Relation relation;
   
    relation = relationContainer.getEntity();
   
    for (RelationMember relationMember : relation.getMembers()) {
      EntityType memberType;
     
      memberType = relationMember.getMemberType();
     
      if (EntityType.Node.equals(memberType)) {
        if (!nodeBitSet.get(relationMember.getMemberId())) {
View Full Code Here

    for (Way way : waysById.values()) {
     
      List<WayNode> origWayNodes = way.getWayNodes();
      List<OSMNode> wayNodes = new ArrayList<OSMNode>(origWayNodes.size());
      for (WayNode origWayNode : origWayNodes) {
        Node origNode = nodesById.get(origWayNode.getNodeId());
        if (origNode != null) {
          wayNodes.add(nodeMap.get(origNode));
        }
      }
     
View Full Code Here

    for (Way way : waysById.values()) {
     
      List<WayNode> origWayNodes = way.getWayNodes();
      List<OwnNode> wayNodes = new ArrayList<OwnNode>(origWayNodes.size());
      for (WayNode origWayNode : origWayNodes) {
        Node origNode = nodesById.get(origWayNode.getNodeId());
        wayNodes.add(nodeMap.get(origNode));
      }
     
      OwnWay ownWay = new OwnWay(tagGroupForEntity(way), wayNodes);
     
View Full Code Here

TOP

Related Classes of org.openstreetmap.osmosis.core.domain.v0_6.WayNode

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.