Class DummyElementProcessor

java.lang.Object
org.openstreetmap.osmosis.xml.common.BaseElementProcessor
org.openstreetmap.osmosis.xml.common.DummyElementProcessor
All Implemented Interfaces:
ElementProcessor

public class DummyElementProcessor extends BaseElementProcessor
Provides a no-op implementation of an element processor. This implementation is provided to allow nested elements to be ignored if they are not required.
  • Constructor Details

    • DummyElementProcessor

      public DummyElementProcessor(BaseElementProcessor parentProcessor)
      Creates a new instance.
      Parameters:
      parentProcessor - The parent of this element processor.
  • Method Details

    • begin

      public void begin(Attributes attributes)
      This implementation does not do any processing.
      Parameters:
      attributes - The attributes of the new element.
    • getChild

      public ElementProcessor getChild(String uri, String localName, String qName)
      This implementation returns itself and increments an internal counter. The corresponding getParent method decrements the counter and when it reaches zero returns the true parent of this instance.
      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:
      This instance.
    • getParent

      public ElementProcessor getParent()
      This implementation decrements an internal counter, if the counter reaches zero the true parent is returned, else this instance is returned.
      Specified by:
      getParent in interface ElementProcessor
      Overrides:
      getParent in class BaseElementProcessor
      Returns:
      The element processor for the parent of the current element.
    • end

      public void end()
      This implementation does not do any processing.