|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectus.zuercher.gpx2map.data.GpxParser
public class GpxParser
GpxParser parses GPX files and provides accessors for the
tracks, way-points, and routes
contained in them.
| Field Summary | |
|---|---|
private GpxContentHandler |
contentHandler
Content handler used to perform the parsing. |
private List<Throwable> |
errors
Errors encountered durig parsing. |
private File |
gpxFile
GPX file location. |
private URL |
gpxUrl
GPX URL. |
| Constructor Summary | |
|---|---|
GpxParser()
Constructs a new GpxParser with no file or URL. |
|
GpxParser(File gpxFile)
Constructs a new GpxParser for the given file. |
|
GpxParser(URL gpxUrl)
Constructs a new GpxParser for the given URL. |
|
| Method Summary | |
|---|---|
List<Throwable> |
getErrors()
Returns the GPX parsing error list. |
List<Route> |
getRoutes()
Returns the list of routes from the GPX data. |
List<Track> |
getTracks()
Returns the list of tracks from the GPX data. |
List<WayPoint> |
getWayPoints()
Returns the list of way-points from the GPX data. |
boolean |
parse()
Parses the configured GPX file. |
void |
setGpxFile(File gpxFile)
Change the parsing target to the given file. |
void |
setGpxUrl(URL gpxUrl)
Change the parsing target to the given URL. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private File gpxFile
private URL gpxUrl
private List<Throwable> errors
private GpxContentHandler contentHandler
| Constructor Detail |
|---|
public GpxParser()
public GpxParser(File gpxFile)
gpxFile - GPX file location.public GpxParser(URL gpxUrl)
gpxUrl - GPX URL.| Method Detail |
|---|
public void setGpxFile(File gpxFile)
gpxFile - GPX file location.public void setGpxUrl(URL gpxUrl)
gpxUrl - GPX URL.public boolean parse()
getErrors() for a list of errors. On parsing success, see
getTracks(), getWayPoints(), and getRoutes()
for GPX data.
NullPointerException - if the GPX file or URL is not set.public List<Throwable> getErrors()
public List<Track> getTracks()
public List<WayPoint> getWayPoints()
public List<Route> getRoutes()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||