Class RelationElementProcessor
java.lang.Object
org.openstreetmap.osmosis.xml.common.BaseElementProcessor
org.openstreetmap.osmosis.xml.v0_6.impl.SourceElementProcessor
org.openstreetmap.osmosis.xml.v0_6.impl.EntityElementProcessor
org.openstreetmap.osmosis.xml.v0_6.impl.RelationElementProcessor
- All Implemented Interfaces:
ElementProcessor,RelationMemberListener,TagListener
public class RelationElementProcessor
extends EntityElementProcessor
implements TagListener, RelationMemberListener
Provides an element processor implementation for a relation.
-
Constructor Summary
ConstructorsConstructorDescriptionRelationElementProcessor(BaseElementProcessor parentProcessor, org.openstreetmap.osmosis.core.task.v0_6.Sink sink, boolean enableDateParsing) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidbegin(Attributes attributes) Initialises the element processor with attributes for a new element to be processed.voidend()Finalises processing for the element processor, this is called when the end of an element is reached.Retrieves the appropriate child element processor for the newly encountered nested element.voidprocessRelationMember(org.openstreetmap.osmosis.core.domain.v0_6.RelationMember relationMember) This is called by child element processors when a way node object is encountered.voidprocessTag(org.openstreetmap.osmosis.core.domain.v0_6.Tag tag) This is called by child element processors when a tag object is encountered.Methods inherited from class org.openstreetmap.osmosis.xml.v0_6.impl.EntityElementProcessor
buildChangesetId, buildUserMethods inherited from class org.openstreetmap.osmosis.xml.v0_6.impl.SourceElementProcessor
getSinkMethods inherited from class org.openstreetmap.osmosis.xml.common.BaseElementProcessor
createTimestampContainer, getParent
-
Constructor Details
-
RelationElementProcessor
public RelationElementProcessor(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.
-
-
Method Details
-
begin
Initialises the element processor with attributes for a new element to be processed.- Specified by:
beginin interfaceElementProcessor- Parameters:
attributes- The attributes of the new element.
-
getChild
Retrieves the appropriate child element processor for the newly encountered nested element.- Specified by:
getChildin interfaceElementProcessor- Overrides:
getChildin classBaseElementProcessor- 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:
endin interfaceElementProcessor
-
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:
processTagin interfaceTagListener- Parameters:
tag- The tag to be processed.
-
processRelationMember
public void processRelationMember(org.openstreetmap.osmosis.core.domain.v0_6.RelationMember relationMember) This is called by child element processors when a way node object is encountered.- Specified by:
processRelationMemberin interfaceRelationMemberListener- Parameters:
relationMember- The wayNode to be processed.
-