states.push(currentState);
currentState = State.metadata;
} else if (qName.equals("wpt")) {
states.push(currentState);
currentState = State.wpt;
currentWayPoint = new WayPoint(parseLatLon(atts));
} else if (qName.equals("rte")) {
states.push(currentState);
currentState = State.rte;
currentRoute = new GpxRoute();
} else if (qName.equals("trk")) {
states.push(currentState);
currentState = State.trk;
currentTrack = new ArrayList<Collection<WayPoint>>();
currentTrackAttr = new HashMap<String, Object>();
} else if (qName.equals("extensions")) {
states.push(currentState);
currentState = State.ext;
} else if (qName.equals("gpx")
&& atts.getValue("creator") != null
&& atts.getValue("creator").startsWith(
"Nokia Sports Tracker")) {
nokiaSportsTrackerBug = true;
}
break;
case author:
if (qName.equals("link")) {
states.push(currentState);
currentState = State.link;
currentLink = new GpxLink(atts.getValue("href"));
} else if (qName.equals("email")) {
currentData.attr.put(GpxData.META_AUTHOR_EMAIL, atts
.getValue("id")
+ "@" + atts.getValue("domain"));
}
break;
case trk:
if (qName.equals("trkseg")) {
states.push(currentState);
currentState = State.trkseg;
currentTrackSeg = new ArrayList<WayPoint>();
} else if (qName.equals("link")) {
states.push(currentState);
currentState = State.link;
currentLink = new GpxLink(atts.getValue("href"));
} else if (qName.equals("extensions")) {
states.push(currentState);
currentState = State.ext;
}
break;
case metadata:
if (qName.equals("author")) {
states.push(currentState);
currentState = State.author;
} else if (qName.equals("extensions")) {
states.push(currentState);
currentState = State.ext;
} else if (qName.equals("copyright")) {
states.push(currentState);
currentState = State.copyright;
currentData.attr.put(GpxData.META_COPYRIGHT_AUTHOR, atts
.getValue("author"));
} else if (qName.equals("link")) {
states.push(currentState);
currentState = State.link;
currentLink = new GpxLink(atts.getValue("href"));
}
break;
case trkseg:
if (qName.equals("trkpt")) {
states.push(currentState);
currentState = State.wpt;
currentWayPoint = new WayPoint(parseLatLon(atts));
}
break;
case wpt:
if (qName.equals("link")) {
states.push(currentState);
currentState = State.link;
currentLink = new GpxLink(atts.getValue("href"));
} else if (qName.equals("extensions")) {
states.push(currentState);
currentState = State.ext;
}
break;
case rte:
if (qName.equals("link")) {
states.push(currentState);
currentState = State.link;
currentLink = new GpxLink(atts.getValue("href"));
} else if (qName.equals("rtept")) {
states.push(currentState);
currentState = State.wpt;
currentWayPoint = new WayPoint(parseLatLon(atts));
} else if (qName.equals("extensions")) {
states.push(currentState);
currentState = State.ext;
}
break;