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 Summary
ConstructorsConstructorDescriptionXmlChangeUploader(String aBaseURL, String aUserName, String aPassword, String aComment) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidclose()final voidcomplete()close the changeset on the server.protected final voidOpen the changeset if it is not yet open.voidinitialize(Map<String, Object> metaData) final voidprocess(org.openstreetmap.osmosis.core.container.v0_6.ChangeContainer changeContainer)
-
Constructor Details
-
XmlChangeUploader
Creates a new instance. The baseURL defaults to the production API.- Parameters:
aBaseURL- may be nullaUserName- the user-name to useaPassword- the password to useaComment- the comment to set in the changeset
-
-
Method Details
-
initialize
Open the changeset if it is not yet open.- Throws:
IOException- if we cannot contact the server.
-
initialize
- Specified by:
initializein interfaceorg.openstreetmap.osmosis.core.task.v0_6.Initializable
-
process
public final void process(org.openstreetmap.osmosis.core.container.v0_6.ChangeContainer changeContainer) - Specified by:
processin interfaceorg.openstreetmap.osmosis.core.task.v0_6.ChangeSink
-
complete
public final void complete()close the changeset on the server.- Specified by:
completein interfaceorg.openstreetmap.osmosis.core.lifecycle.Completable
-
close
public final void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceorg.openstreetmap.osmosis.core.lifecycle.Closeable
-