Class EntityElementProcessor
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
- All Implemented Interfaces:
ElementProcessor
- Direct Known Subclasses:
NodeElementProcessor,RelationElementProcessor,WayElementProcessor
Provides common element processor functionality for all entity processors.
-
Constructor Summary
ConstructorsConstructorDescriptionEntityElementProcessor(BaseElementProcessor parentProcessor, org.openstreetmap.osmosis.core.task.v0_6.Sink sink, boolean enableDateParsing) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected longbuildChangesetId(String rawChangesetId) Parses a changeset id based on the provided attribute value.protected org.openstreetmap.osmosis.core.domain.v0_6.OsmUserCreates a user instance appropriate to the arguments.Methods inherited from class org.openstreetmap.osmosis.xml.v0_6.impl.SourceElementProcessor
getSinkMethods inherited from class org.openstreetmap.osmosis.xml.common.BaseElementProcessor
createTimestampContainer, getChild, getParentMethods 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
-
EntityElementProcessor
public EntityElementProcessor(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
-
buildUser
protected org.openstreetmap.osmosis.core.domain.v0_6.OsmUser buildUser(String rawUserId, String rawUserName) Creates a user instance appropriate to the arguments. This includes identifying the case where no user is available.- Parameters:
rawUserId- The value of the user id attribute.rawUserName- The value of the user name attribute.- Returns:
- The appropriate user instance.
-
buildChangesetId
Parses a changeset id based on the provided attribute value. If no attribute is available it will be defaulted to 0.- Parameters:
rawChangesetId- The raw changeset id attribute value.- Returns:
- The parsed changeset id.
-