void process(GpxType gpxType, ParserContext<GpxRoute> context) { if (gpxType == null || !VERSION.equals(gpxType.getVersion())) return; boolean hasSpeedInMeterPerSecondInsteadOfKilometerPerHour = gpxType.getCreator() != null && ("GPSTracker".equals(gpxType.getCreator()) || "nl.sogeti.android.gpstracker".equals(gpxType.getCreator()) || gpxType.getCreator().contains("TrekBuddy") || gpxType.getCreator().contains("BikeNav")); GpxRoute wayPointsAsRoute = extractWayPoints(gpxType, hasSpeedInMeterPerSecondInsteadOfKilometerPerHour); if (wayPointsAsRoute != null) context.appendRoute(wayPointsAsRoute); context.appendRoutes(extractRoutes(gpxType, hasSpeedInMeterPerSecondInsteadOfKilometerPerHour)); context.appendRoutes(extractTracks(gpxType, hasSpeedInMeterPerSecondInsteadOfKilometerPerHour)); }