Package org.h2gis.functions.io.gpx.model
Class GpxParserRte
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.h2gis.functions.io.gpx.model.AbstractGpxParser
org.h2gis.functions.io.gpx.model.AbstractGpxParserRte
org.h2gis.functions.io.gpx.model.GpxParserRte
- All Implemented Interfaces:
ContentHandler,DTDHandler,EntityResolver,ErrorHandler
Specific parser for routes. It will be call each time a rte markup is
found. It is for the 1.1 version
- Author:
- Antonin
-
Constructor Summary
ConstructorsConstructorDescriptionGpxParserRte(XMLReader reader, GpxParser parent) Create a new specific parser. -
Method Summary
Modifier and TypeMethodDescriptionvoidendElement(String uri, String localName, String qName) Fires whenever an XML end markup is encountered.voidstartElement(String uri, String localName, String qName, Attributes attributes) Fires whenever an XML start markup is encountered.Methods inherited from class org.h2gis.functions.io.gpx.model.AbstractGpxParserRte
initialise, isPoint, setParent, setRteListMethods inherited from class org.h2gis.functions.io.gpx.model.AbstractGpxParser
characters, getContentBuffer, getCurrentElement, getCurrentLine, getCurrentPoint, getCurrentSegment, getElementNames, getGeometryFactory, getReader, getRtePreparedStmt, getRteptPreparedStmt, getTrkPointsPreparedStmt, getTrkPreparedStmt, getTrkSegmentsPreparedStmt, getWptPreparedStmt, isSpecificElement, setContentBuffer, setCurrentElement, setCurrentLine, setCurrentPoint, setCurrentSegment, setElementNames, setReader, setRtePreparedStmt, setRteptPreparedStmt, setSpecificElement, setTrkPointsPreparedStmt, setTrkPreparedStmt, setTrkSegmentsPreparedStmt, setWptPreparedStmtMethods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, 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
-
Constructor Details
-
GpxParserRte
Create a new specific parser. It has in memory the default parser, the contentBuffer, the elementNames, the currentLine and the rteID.- Parameters:
reader- The XMLReader used in the default classparent- The parser used in the default class
-
-
Method Details
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException Fires whenever an XML start markup is encountered. It creates a new routePoint when a rtept markup is encountered. It saves informations about link in currentPoint or currentLine.- Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classAbstractGpxParserRte- Parameters:
uri- URI of the local elementlocalName- Name of the local element (without prefix)qName- qName of the local element (with prefix)attributes- Attributes of the local element (contained in the markup)- Throws:
SAXException- Any SAX exception, possibly wrapping another exception
-
endElement
Fires whenever an XML end markup is encountered. It catches attributes of routePoints or routes and saves them in corresponding values[].- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classAbstractGpxParserRte- Parameters:
uri- URI of the local elementlocalName- Name of the local element (without prefix)qName- qName of the local element (with prefix)- Throws:
SAXException- Any SAX exception, possibly wrapping another exception
-