currentTrackAttr = new HashMap<>();
break;
case "extensions":
states.push(currentState);
currentState = State.ext;
currentExtensions = new Extensions();
break;
case "gpx":
if (atts.getValue("creator") != null && atts.getValue("creator").startsWith("Nokia Sports Tracker")) {
nokiaSportsTrackerBug = true;
}
}
break;
case metadata:
switch (localName) {
case "author":
states.push(currentState);
currentState = State.author;
break;
case "extensions":
states.push(currentState);
currentState = State.ext;
currentExtensions = new Extensions();
break;
case "copyright":
states.push(currentState);
currentState = State.copyright;
data.attr.put(META_COPYRIGHT_AUTHOR, atts.getValue("author"));
break;
case "link":
states.push(currentState);
currentState = State.link;
currentLink = new GpxLink(atts.getValue("href"));
}
break;
case author:
switch (localName) {
case "link":
states.push(currentState);
currentState = State.link;
currentLink = new GpxLink(atts.getValue("href"));
break;
case "email":
data.attr.put(META_AUTHOR_EMAIL, atts.getValue("id") + "@" + atts.getValue("domain"));
}
break;
case trk:
switch (localName) {
case "trkseg":
states.push(currentState);
currentState = State.trkseg;
currentTrackSeg = new ArrayList<>();
break;
case "link":
states.push(currentState);
currentState = State.link;
currentLink = new GpxLink(atts.getValue("href"));
break;
case "extensions":
states.push(currentState);
currentState = State.ext;
currentExtensions = new Extensions();
}
break;
case trkseg:
if ("trkpt".equals(localName)) {
states.push(currentState);
currentState = State.wpt;
currentWayPoint = new WayPoint(parseLatLon(atts));
}
break;
case wpt:
switch (localName) {
case "link":
states.push(currentState);
currentState = State.link;
currentLink = new GpxLink(atts.getValue("href"));
break;
case "extensions":
states.push(currentState);
currentState = State.ext;
currentExtensions = new Extensions();
break;
}
break;
case rte:
switch (localName) {
case "link":
states.push(currentState);
currentState = State.link;
currentLink = new GpxLink(atts.getValue("href"));
break;
case "rtept":
states.push(currentState);
currentState = State.wpt;
currentWayPoint = new WayPoint(parseLatLon(atts));
break;
case "extensions":
states.push(currentState);
currentState = State.ext;
currentExtensions = new Extensions();
break;
}
break;
}
accumulator.setLength(0);