Package org.openstreetmap.josm.io
Class AbstractParser
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.openstreetmap.josm.io.AbstractParser
- All Implemented Interfaces:
ContentHandler,DTDHandler,EntityResolver,ErrorHandler
- Direct Known Subclasses:
OsmChangesetContentParser.Parser,OsmHistoryReader.Parser
Base class of
OsmChangesetContentParser and OsmHistoryReader internal parsers.- Since:
- 6201
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected HistoryOsmPrimitivethe current primitive to be readprotected Locatorprivate Map<RelationMemberData,RelationMemberData> protected booleanif true, replace user information in input by anonymous user -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final HistoryOsmPrimitivecreatePrimitive(Attributes atts, OsmPrimitiveType type) protected final booleandoStartElement(String qName, Attributes atts) protected final DoublegetAttributeDouble(Attributes attr, String name) protected final LonggetAttributeLong(Attributes attr, String name) protected booleangetMandatoryAttributeBoolean(Attributes attr, String name) protected final longgetMandatoryAttributeLong(Attributes attr, String name) protected final StringgetMandatoryAttributeString(Attributes attr, String name) protected voidhandleMember(Attributes atts) protected final voidprotected final voidhandleTag(Attributes atts) voidsetDocumentLocator(Locator locator) protected final voidstartNode(Attributes atts) protected final voidstartRelation(Attributes atts) protected final voidstartWay(Attributes atts) protected abstract voidthrowException(String message) protected abstract voidthrowException(String message, Exception e) Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warningMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandler
declaration
-
Field Details
-
currentPrimitive
the current primitive to be read -
locator
-
useAnonymousUser
if true, replace user information in input by anonymous user -
memberCache
-
-
Constructor Details
-
AbstractParser
public AbstractParser()
-
-
Method Details
-
setDocumentLocator
- Specified by:
setDocumentLocatorin interfaceContentHandler- Overrides:
setDocumentLocatorin classDefaultHandler
-
throwException
- Throws:
SAXException
-
throwException
- Throws:
SAXException
-
getMandatoryAttributeLong
- Throws:
SAXException
-
getAttributeLong
- Throws:
SAXException
-
getAttributeDouble
- Throws:
SAXException
-
getMandatoryAttributeString
protected final String getMandatoryAttributeString(Attributes attr, String name) throws SAXException - Throws:
SAXException
-
getMandatoryAttributeBoolean
- Throws:
SAXException
-
createPrimitive
protected final HistoryOsmPrimitive createPrimitive(Attributes atts, OsmPrimitiveType type) throws SAXException - Throws:
SAXException
-
startNode
- Throws:
SAXException
-
startWay
- Throws:
SAXException
-
startRelation
- Throws:
SAXException
-
handleTag
- Throws:
SAXException
-
handleNodeReference
- Throws:
SAXException
-
handleMember
- Throws:
SAXException
-
doStartElement
- Throws:
SAXException
-