org.openstreetmap.josm.io
Class OsmChangesetContentParser

java.lang.Object
  extended by org.openstreetmap.josm.io.OsmChangesetContentParser

public class OsmChangesetContentParser
extends java.lang.Object

Parser for OSM changeset content.


Nested Class Summary
private  class OsmChangesetContentParser.Parser
           
 
Field Summary
private  ChangesetDataSet data
           
private  org.xml.sax.InputSource source
           
 
Constructor Summary
OsmChangesetContentParser(java.io.InputStream source)
          Create a parser
OsmChangesetContentParser(java.lang.String source)
           
 
Method Summary
 ChangesetDataSet parse()
          Parses the content from the input source
 ChangesetDataSet parse(ProgressMonitor progressMonitor)
          Parses the content
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

source

private org.xml.sax.InputSource source

data

private ChangesetDataSet data
Constructor Detail

OsmChangesetContentParser

public OsmChangesetContentParser(java.io.InputStream source)
                          throws java.io.UnsupportedEncodingException
Create a parser

Parameters:
source - the input stream with the changeset content as XML document. Must not be null.
Throws:
java.lang.IllegalArgumentException - thrown if source is null.
java.io.UnsupportedEncodingException

OsmChangesetContentParser

public OsmChangesetContentParser(java.lang.String source)
Method Detail

parse

public ChangesetDataSet parse(ProgressMonitor progressMonitor)
                       throws OsmDataParsingException
Parses the content

Parameters:
progressMonitor - the progress monitor. Set to NullProgressMonitor.INSTANCE if null
Returns:
the parsed data
Throws:
OsmDataParsingException - thrown if something went wrong. Check for chained exceptions.

parse

public ChangesetDataSet parse()
                       throws OsmDataParsingException
Parses the content from the input source

Returns:
the parsed data
Throws:
OsmDataParsingException - thrown if something went wrong. Check for chained exceptions.


JOSM