Class 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.
  • 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

      protected long buildChangesetId(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.