Class XmlChangeUploader

java.lang.Object
org.openstreetmap.osmosis.xml.v0_6.XmlChangeUploader
All Implemented Interfaces:
AutoCloseable, org.openstreetmap.osmosis.core.lifecycle.Closeable, org.openstreetmap.osmosis.core.lifecycle.Completable, org.openstreetmap.osmosis.core.task.common.Task, org.openstreetmap.osmosis.core.task.v0_6.ChangeSink, org.openstreetmap.osmosis.core.task.v0_6.Initializable

public class XmlChangeUploader extends Object implements org.openstreetmap.osmosis.core.task.v0_6.ChangeSink
An OSM change sink for uploading all data to an OpenStreetMap server.
  • Constructor Details

    • XmlChangeUploader

      public XmlChangeUploader(String aBaseURL, String aUserName, String aPassword, String aComment)
      Creates a new instance. The baseURL defaults to the production API.
      Parameters:
      aBaseURL - may be null
      aUserName - the user-name to use
      aPassword - the password to use
      aComment - the comment to set in the changeset
  • Method Details

    • initialize

      protected final void initialize() throws IOException
      Open the changeset if it is not yet open.
      Throws:
      IOException - if we cannot contact the server.
    • initialize

      public void initialize(Map<String,Object> metaData)
      Specified by:
      initialize in interface org.openstreetmap.osmosis.core.task.v0_6.Initializable
    • process

      public final void process(org.openstreetmap.osmosis.core.container.v0_6.ChangeContainer changeContainer)
      Specified by:
      process in interface org.openstreetmap.osmosis.core.task.v0_6.ChangeSink
    • complete

      public final void complete()
      close the changeset on the server.
      Specified by:
      complete in interface org.openstreetmap.osmosis.core.lifecycle.Completable
    • close

      public final void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface org.openstreetmap.osmosis.core.lifecycle.Closeable