Package org.openstreetmap.josm.io
Class OsmChangesetParser.Parser
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.openstreetmap.josm.io.OsmChangesetParser.Parser
-
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
- Enclosing class:
- OsmChangesetParser
private class OsmChangesetParser.Parser extends DefaultHandler
-
-
Field Summary
Fields Modifier and Type Field Description private ChangesetDiscussionComment
comment
The current commentprivate Changeset
current
The current changesetprivate Locator
locator
private StringBuilder
text
The current comment text
-
Constructor Summary
Constructors Modifier Constructor Description private
Parser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
characters(char[] ch, int start, int length)
protected User
createUser(Attributes atts)
void
endElement(String uri, String localName, String qName)
protected void
parseChangesetAttributes(Attributes atts)
private void
parseCommentAttributes(Attributes atts)
private int
parseNumericAttribute(String value, int minAllowed)
void
setDocumentLocator(Locator locator)
void
startElement(String namespaceURI, String localName, String qName, Attributes atts)
protected void
throwException(String msg)
-
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
-
-
-
-
Field Detail
-
comment
private ChangesetDiscussionComment comment
The current comment
-
text
private StringBuilder text
The current comment text
-
-
Constructor Detail
-
Parser
private Parser()
-
-
Method Detail
-
setDocumentLocator
public void setDocumentLocator(Locator locator)
- Specified by:
setDocumentLocator
in interfaceContentHandler
- Overrides:
setDocumentLocator
in classDefaultHandler
-
throwException
protected void throwException(String msg) throws XmlParsingException
- Throws:
XmlParsingException
-
parseChangesetAttributes
protected void parseChangesetAttributes(Attributes atts) throws XmlParsingException
- Throws:
XmlParsingException
-
parseCommentAttributes
private void parseCommentAttributes(Attributes atts) throws XmlParsingException
- Throws:
XmlParsingException
-
parseNumericAttribute
private int parseNumericAttribute(String value, int minAllowed) throws XmlParsingException
- Throws:
XmlParsingException
-
startElement
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException
- Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
- Throws:
SAXException
-
characters
public void characters(char[] ch, int start, int length) throws SAXException
- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classDefaultHandler
- Throws:
SAXException
-
endElement
public void endElement(String uri, String localName, String qName) throws SAXException
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
- Throws:
SAXException
-
createUser
protected User createUser(Attributes atts) throws XmlParsingException
- Throws:
XmlParsingException
-
-