Package org.openstreetmap.josm.io
Class OsmHistoryReader
- java.lang.Object
-
- org.openstreetmap.josm.io.OsmHistoryReader
-
public class OsmHistoryReader extends Object
Parser for OSM history data. It is slightly different fromOsmReader
because we don't build an internal graph ofOsmPrimitive
s. We use objects derived fromHistoryOsmPrimitive
instead and we keep the data in a dedicatedHistoryDataSet
.- Since:
- 1670
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
OsmHistoryReader.Parser
-
Field Summary
Fields Modifier and Type Field Description private HistoryDataSet
data
private InputStream
in
-
Constructor Summary
Constructors Constructor Description OsmHistoryReader(InputStream source)
Constructs a newOsmHistoryReader
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HistoryDataSet
parse(ProgressMonitor progressMonitor)
Parses the content.
-
-
-
Field Detail
-
in
private final InputStream in
-
data
private final HistoryDataSet data
-
-
Constructor Detail
-
OsmHistoryReader
public OsmHistoryReader(InputStream source)
Constructs a newOsmHistoryReader
.- Parameters:
source
- the input stream with the history content as XML document. Must not be null.- Throws:
IllegalArgumentException
- if source isnull
.
-
-
Method Detail
-
parse
public HistoryDataSet parse(ProgressMonitor progressMonitor) throws SAXException, IOException
Parses the content.- Parameters:
progressMonitor
- the progress monitor. Set toNullProgressMonitor.INSTANCE
if null- Returns:
- the parsed data
- Throws:
SAXException
- If any SAX errors occur during processing.IOException
- If any IO errors occur.
-
-