|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
org.openstreetmap.osmosis.core.xml.v0_5.impl.OsmHandler
public class OsmHandler
This class is a SAX default handler for processing OSM XML files. It utilises a tree of element processors to extract the data from the xml structure.
Constructor Summary | |
---|---|
OsmHandler(Sink osmSink,
boolean enableDateParsing)
Creates a new instance. |
Method Summary | |
---|---|
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
Ends processing of the current element. |
void |
error(org.xml.sax.SAXParseException e)
Called by the SAX parser when an error occurs. |
void |
setDocumentLocator(org.xml.sax.Locator documentLocator)
Sets the document locator which is used to report the position in the file when errors occur. |
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
Begins processing of a new element. |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
---|
characters, endDocument, endPrefixMapping, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OsmHandler(Sink osmSink, boolean enableDateParsing)
osmSink
- The new osmSink to write data to.enableDateParsing
- If true, dates will be parsed from xml data, else the current
date will be used thus saving parsing time.Method Detail |
---|
public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
uri
- The uri.localName
- The localName.qName
- The qName.attributes
- The attributes.
org.xml.sax.SAXException
- if an exception occurs during parsing.public void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
uri
- The uri.localName
- The localName.qName
- The qName.
org.xml.sax.SAXException
- if an exception occurs during parsing.public void setDocumentLocator(org.xml.sax.Locator documentLocator)
setDocumentLocator
in interface org.xml.sax.ContentHandler
setDocumentLocator
in class org.xml.sax.helpers.DefaultHandler
documentLocator
- The document locator.public void error(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
error
in interface org.xml.sax.ErrorHandler
error
in class org.xml.sax.helpers.DefaultHandler
e
- The exception that occurred.
org.xml.sax.SAXException
- if the error reporting throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |