public final class GpxPreparser extends DefaultHandler
| Constructor and Description |
|---|
GpxPreparser()
Initializing of the pre-parser.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getTotalRte()
Gives the total number of routes contained in the GPX file.
|
int |
getTotalRtept()
Gives the total number of routepoints contained in the GPX file.
|
int |
getTotalTrk()
Gives the total number of tracks contained in the GPX file.
|
int |
getTotalTrkpt()
Gives the total number of trackpoints contained in the GPX file.
|
int |
getTotalTrkseg()
Gives the total number of track segments contained in the GPX file.
|
int |
getTotalWpt()
Gives the total number of waypoints contained in the GPX file.
|
String |
getVersion()
Gives the version of the gpx file.
|
boolean |
read(File inputFile)
Reads the document and pre-parses it.
|
void |
startElement(String uri,
String localName,
String qName,
Attributes attributes)
Fires whenever an XML start markup is encountered.
|
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warningpublic GpxPreparser()
public boolean read(File inputFile) throws SAXException, IOException
inputFile - the file to readSAXExceptionIOExceptionpublic void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
startElement in interface ContentHandlerstartElement in class DefaultHandleruri - 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)SAXException - Any SAX exception, possibly wrapping another
exceptionpublic String getVersion()
public int getTotalWpt()
public int getTotalRte()
public int getTotalRtept()
public int getTotalTrk()
public int getTotalTrkseg()
public int getTotalTrkpt()
Copyright © 2019 CNRS. All rights reserved.