Class BaseElementProcessor
java.lang.Object
org.openstreetmap.osmosis.xml.common.BaseElementProcessor
- All Implemented Interfaces:
ElementProcessor
- Direct Known Subclasses:
ChangeSourceElementProcessor,DummyElementProcessor,RelationMemberElementProcessor,SourceElementProcessor,TagElementProcessor,WayNodeElementProcessor
Provides common functionality shared by element processor implementations.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseElementProcessor(BaseElementProcessor parentProcessor, boolean enableDateParsing) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.openstreetmap.osmosis.core.domain.common.TimestampContainerParses a date using the standard osm date format.This implementation returns a dummy element processor as the child which ignores all nested xml elements.Returns the parent element processor.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.openstreetmap.osmosis.xml.common.ElementProcessor
begin, end
-
Constructor Details
-
BaseElementProcessor
Creates a new instance.- Parameters:
parentProcessor- The parent of this element processor.enableDateParsing- If true, dates will be parsed from xml data, else the current date will be used thus saving parsing time.
-
-
Method Details
-
getChild
This implementation returns a dummy element processor as the child which ignores all nested xml elements. Sub-classes wishing to handle child elements must override this method and delegate to this method for xml elements they don't care about.- Specified by:
getChildin interfaceElementProcessor- Parameters:
uri- The element uri.localName- The element localName.qName- The element qName.- Returns:
- A dummy element processor.
-
getParent
Returns the parent element processor.- Specified by:
getParentin interfaceElementProcessor- Returns:
- The parent element processor.
-
createTimestampContainer
protected org.openstreetmap.osmosis.core.domain.common.TimestampContainer createTimestampContainer(String data) Parses a date using the standard osm date format.- Parameters:
data- The date string to be parsed.- Returns:
- The parsed date (if dateparsing is enabled).
-