org.openstreetmap.osmosis.core.xml.v0_6.impl
Class EntityElementProcessor
java.lang.Object
org.openstreetmap.osmosis.core.xml.common.BaseElementProcessor
org.openstreetmap.osmosis.core.xml.v0_6.impl.SourceElementProcessor
org.openstreetmap.osmosis.core.xml.v0_6.impl.EntityElementProcessor
- All Implemented Interfaces:
- ElementProcessor
- Direct Known Subclasses:
- NodeElementProcessor, RelationElementProcessor, WayElementProcessor
public abstract class EntityElementProcessor
- extends SourceElementProcessor
Provides common element processor functionality for all entity processors.
- Author:
- Brett Henderson
Method Summary |
protected long |
buildChangesetId(java.lang.String rawChangesetId)
Parses a changeset id based on the provided attribute value. |
protected OsmUser |
buildUser(java.lang.String rawUserId,
java.lang.String rawUserName)
Creates a user instance appropriate to the arguments. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EntityElementProcessor
public EntityElementProcessor(BaseElementProcessor parentProcessor,
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.
buildUser
protected OsmUser buildUser(java.lang.String rawUserId,
java.lang.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
protected long buildChangesetId(java.lang.String rawChangesetId)
- 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.