Package org.openstreetmap.josm.io
Class OsmChangeReader
- java.lang.Object
-
- org.openstreetmap.josm.io.AbstractReader
-
- org.openstreetmap.josm.io.OsmReader
-
- org.openstreetmap.josm.io.OsmChangeReader
-
public class OsmChangeReader extends OsmReader
Reader for OsmChange file format.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openstreetmap.josm.io.OsmReader
OsmReader.Options
-
Nested classes/interfaces inherited from class org.openstreetmap.josm.io.AbstractReader
AbstractReader.BinaryParserWorker, AbstractReader.CommonReader, AbstractReader.NodeReader, AbstractReader.ParserWorker, AbstractReader.RelationReader, AbstractReader.WayReader
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String[]ACTIONSList of possible actions.protected NoteDatanoteData-
Fields inherited from class org.openstreetmap.josm.io.AbstractReader
cancel, ds, externalIdMap, relations, uploadChangeset, ways
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedOsmChangeReader()constructor (for private and subclasses use only)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description NoteDatagetNoteData()Replies the parsed notes data.private voidparseCommon(java.lang.String action)static DataSetparseDataSet(java.io.InputStream source, ProgressMonitor progressMonitor)Parse the given input source and return the dataset.static Pair<DataSet,NoteData>parseDataSetAndNotes(java.io.InputStream source, ProgressMonitor progressMonitor)Parse the given input source and return the dataset and notes, if any (OsmAnd extends the osmChange format by adding notes).private voidparseNote()private voidparseOsmChange()protected voidparseRoot()-
Methods inherited from class org.openstreetmap.josm.io.OsmReader
doParseDataSet, jumpToEnd, jumpToEnd, parse, parseDataSet, parseNode, parseRelation, parseUnknown, parseUnknown, parseWay, setParser, throwException, throwException, throwException
-
Methods inherited from class org.openstreetmap.josm.io.AbstractReader
buildPrimitive, callPostProcessors, deregisterPostprocessor, doParseDataSet, doParseDataSet, getDataSet, getLong, parseAction, parseBounds, parseChangeset, parseChangeset, parseDownloadPolicy, parseId, parseLocked, parseNode, parseNode, parseRelation, parseRelationMember, parseRelationMember, parseTag, parseTimestamp, parseUploadPolicy, parseUser, parseUser, parseVersion, parseVersion, parseVersion, parseVisible, parseWay, prepareDataSet, processChangesetAfterParsing, processNodesAfterParsing, processRelationsAfterParsing, processWaysAfterParsing, registerPostprocessor
-
-
-
-
Constructor Detail
-
OsmChangeReader
protected OsmChangeReader()
constructor (for private and subclasses use only)
-
-
Method Detail
-
parseRoot
protected void parseRoot() throws javax.xml.stream.XMLStreamException
-
parseOsmChange
private void parseOsmChange() throws javax.xml.stream.XMLStreamException
- Throws:
javax.xml.stream.XMLStreamException
-
parseCommon
private void parseCommon(java.lang.String action) throws javax.xml.stream.XMLStreamException
- Throws:
javax.xml.stream.XMLStreamException
-
parseNote
private void parseNote() throws javax.xml.stream.XMLStreamException
- Throws:
javax.xml.stream.XMLStreamException
-
getNoteData
public final NoteData getNoteData()
Replies the parsed notes data.- Returns:
- the parsed notes data
- Since:
- 14101
-
parseDataSet
public static DataSet parseDataSet(java.io.InputStream source, ProgressMonitor progressMonitor) throws IllegalDataException
Parse the given input source and return the dataset.- Parameters:
source- the source input stream. Must not benull.progressMonitor- the progress monitor. Ifnull,NullProgressMonitor.INSTANCEis assumed- Returns:
- the dataset with the parsed data
- Throws:
IllegalDataException- if the an error was found while parsing the data from the sourcejava.lang.IllegalArgumentException- if source isnull
-
parseDataSetAndNotes
public static Pair<DataSet,NoteData> parseDataSetAndNotes(java.io.InputStream source, ProgressMonitor progressMonitor) throws IllegalDataException
Parse the given input source and return the dataset and notes, if any (OsmAnd extends the osmChange format by adding notes).- Parameters:
source- the source input stream. Must not benull.progressMonitor- the progress monitor. Ifnull,NullProgressMonitor.INSTANCEis assumed- Returns:
- the dataset with the parsed data
- Throws:
IllegalDataException- if the an error was found while parsing the data from the sourcejava.lang.IllegalArgumentException- if source isnull- Since:
- 14101
-
-