org.openstreetmap.osmosis.core.xml.common
Interface ElementProcessor

All Known Implementing Classes:
BaseElementProcessor, BoundElementProcessor, BoundElementProcessor, ChangeSourceElementProcessor, ChangeSourceElementProcessor, DummyElementProcessor, EntityElementProcessor, EntityElementProcessor, NodeElementProcessor, NodeElementProcessor, OsmElementProcessor, OsmElementProcessor, RelationElementProcessor, RelationElementProcessor, RelationMemberElementProcessor, RelationMemberElementProcessor, SourceElementProcessor, SourceElementProcessor, TagElementProcessor, TagElementProcessor, WayElementProcessor, WayElementProcessor, WayNodeElementProcessor, WayNodeElementProcessor

public interface ElementProcessor

An element processor provides a handler for processing a specific xml element within a document. It provides a state pattern approach to processing nested xml structures.

Author:
Brett Henderson

Method Summary
 void begin(org.xml.sax.Attributes attributes)
          Initialises the element processor with attributes for a new element to be processed.
 void end()
          Finalises processing for the element processor, this is called when the end of an element is reached.
 ElementProcessor getChild(java.lang.String uri, java.lang.String localName, java.lang.String qName)
          Retrieves the appropriate child element processor for the newly encountered nested element.
 ElementProcessor getParent()
          Returns the parent element processor.
 

Method Detail

begin

void begin(org.xml.sax.Attributes attributes)
Initialises the element processor with attributes for a new element to be processed.

Parameters:
attributes - The attributes of the new element.

getChild

ElementProcessor getChild(java.lang.String uri,
                          java.lang.String localName,
                          java.lang.String qName)
Retrieves the appropriate child element processor for the newly encountered nested element.

Parameters:
uri - The element uri.
localName - The element localName.
qName - The element qName.
Returns:
The appropriate element processor for the nested element.

getParent

ElementProcessor getParent()
Returns the parent element processor.

Returns:
The parent element processor.

end

void end()
Finalises processing for the element processor, this is called when the end of an element is reached.