Package org.openstreetmap.josm.io
Class OsmChangesetContentParser
- java.lang.Object
-
- org.openstreetmap.josm.io.OsmChangesetContentParser
-
public class OsmChangesetContentParser extends java.lang.Object
Parser for OSM changeset content.- Since:
- 2688
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
OsmChangesetContentParser.Parser
-
Field Summary
Fields Modifier and Type Field Description private ChangesetDataSet
data
private org.xml.sax.InputSource
source
-
Constructor Summary
Constructors Constructor Description OsmChangesetContentParser(java.io.InputStream source)
Constructs a newOsmChangesetContentParser
.OsmChangesetContentParser(java.lang.String source)
Constructs a newOsmChangesetContentParser
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChangesetDataSet
parse()
Parses the content from the input sourceChangesetDataSet
parse(ProgressMonitor progressMonitor)
Parses the content.ChangesetDataSet
parse(ProgressMonitor progressMonitor, boolean useAnonymousUser)
Parses the content.
-
-
-
Field Detail
-
source
private final org.xml.sax.InputSource source
-
data
private final ChangesetDataSet data
-
-
Constructor Detail
-
OsmChangesetContentParser
public OsmChangesetContentParser(java.io.InputStream source)
Constructs a newOsmChangesetContentParser
.- Parameters:
source
- the input stream with the changeset content as XML document. Must not be null.- Throws:
java.lang.IllegalArgumentException
- if source isnull
.
-
OsmChangesetContentParser
public OsmChangesetContentParser(java.lang.String source)
Constructs a newOsmChangesetContentParser
.- Parameters:
source
- the input stream with the changeset content as XML document. Must not be null.- Throws:
java.lang.IllegalArgumentException
- if source isnull
.
-
-
Method Detail
-
parse
public ChangesetDataSet parse(ProgressMonitor progressMonitor) throws XmlParsingException
Parses the content.- Parameters:
progressMonitor
- the progress monitor. Set toNullProgressMonitor.INSTANCE
if null- Returns:
- the parsed data
- Throws:
XmlParsingException
- if something went wrong. Check for chained exceptions.
-
parse
public ChangesetDataSet parse(ProgressMonitor progressMonitor, boolean useAnonymousUser) throws XmlParsingException
Parses the content.- Parameters:
progressMonitor
- the progress monitor. Set toNullProgressMonitor.INSTANCE
if nulluseAnonymousUser
- if true, replace all user information with the anonymous user- Returns:
- the parsed data
- Throws:
XmlParsingException
- if something went wrong. Check for chained exceptions.- Since:
- 14946
-
parse
public ChangesetDataSet parse() throws XmlParsingException
Parses the content from the input source- Returns:
- the parsed data
- Throws:
XmlParsingException
- if something went wrong. Check for chained exceptions.
-
-