Class NodeElementProcessor

All Implemented Interfaces:
ElementProcessor, TagListener

public class NodeElementProcessor extends EntityElementProcessor implements TagListener
Provides an element processor implementation for a node.
  • Constructor Details

    • NodeElementProcessor

      public NodeElementProcessor(BaseElementProcessor parentProcessor, org.openstreetmap.osmosis.core.task.v0_6.Sink sink, boolean enableDateParsing)
      Creates a new instance.
      Parameters:
      parentProcessor - The parent of this element processor.
      sink - The sink for receiving processed data.
      enableDateParsing - If true, dates will be parsed from xml data, else the current date will be used thus saving parsing time.
    • NodeElementProcessor

      public NodeElementProcessor(BaseElementProcessor parentProcessor, org.openstreetmap.osmosis.core.task.v0_6.Sink sink, boolean enableDateParsing, boolean coordinatesRequired)
      Creates a new instance.
      Parameters:
      parentProcessor - The parent of this element processor.
      sink - The sink for receiving processed data.
      enableDateParsing - If true, dates will be parsed from xml data, else the current date will be used thus saving parsing time.
      coordinatesRequired - If true, nodes without lat and lon attributes set will cause an exception.
  • Method Details

    • begin

      public void begin(Attributes attributes)
      Initialises the element processor with attributes for a new element to be processed.
      Specified by:
      begin in interface ElementProcessor
      Parameters:
      attributes - The attributes of the new element.
    • getChild

      public ElementProcessor getChild(String uri, String localName, String qName)
      Retrieves the appropriate child element processor for the newly encountered nested element.
      Specified by:
      getChild in interface ElementProcessor
      Overrides:
      getChild in class BaseElementProcessor
      Parameters:
      uri - The element uri.
      localName - The element localName.
      qName - The element qName.
      Returns:
      The appropriate element processor for the nested element.
    • end

      public void end()
      Finalises processing for the element processor, this is called when the end of an element is reached.
      Specified by:
      end in interface ElementProcessor
    • processTag

      public void processTag(org.openstreetmap.osmosis.core.domain.v0_6.Tag tag)
      This is called by child element processors when a tag object is encountered.
      Specified by:
      processTag in interface TagListener
      Parameters:
      tag - The tag to be processed.