use of slash.navigation.gopal.binding5.Tour in project RouteConverter by cpesch.
the class GoPal3RouteFormat method createGoPal.
private Tour createGoPal(GoPalRoute route, int startIndex, int endIndex) {
ObjectFactory objectFactory = new ObjectFactory();
Tour tour = objectFactory.createTour();
tour.setOptions(createOptions(route));
for (int i = startIndex; i < endIndex; i++) {
GoPalPosition position = route.getPosition(i);
Tour.Dest dest = objectFactory.createTourDest();
if (position.getX() != null)
dest.setLongitude(position.getX());
if (position.getY() != null)
dest.setLatitude(position.getY());
dest.setCity(position.getCity());
if (position.getCountry() != null)
dest.setCountry(position.getCountry());
if (position.getHouseNumber() != null)
dest.setHouse(position.getHouseNumber());
dest.setStreet(position.getStreet());
dest.setZip(position.getZipCode());
if (i == startIndex)
dest.setStartPos((short) 1);
tour.getDest().add(dest);
}
return tour;
}
use of slash.navigation.gopal.binding5.Tour in project RouteConverter by cpesch.
the class GoPal5RouteFormat method createGoPal.
private Tour createGoPal(GoPalRoute route, int startIndex, int endIndex) {
ObjectFactory objectFactory = new ObjectFactory();
Tour tour = objectFactory.createTour();
tour.setRouteOptions(createRouteOptions(route));
for (int i = startIndex; i < endIndex; i++) {
GoPalPosition position = route.getPosition(i);
if (i == startIndex) {
tour.setStart(createStart(position));
} else {
tour.getDestination().add(createDestination(position));
}
}
return tour;
}
use of slash.navigation.gopal.binding5.Tour in project RouteConverter by cpesch.
the class GoPal3RouteFormat method read.
public void read(InputStream source, ParserContext<GoPalRoute> context) throws IOException {
Tour tour = unmarshal3(source);
context.appendRoute(process(tour));
}
use of slash.navigation.gopal.binding5.Tour in project RouteConverter by cpesch.
the class GoPal5RouteFormat method read.
public void read(InputStream source, ParserContext<GoPalRoute> context) throws IOException {
Tour tour = unmarshal5(source);
context.appendRoute(process(tour));
}
use of slash.navigation.gopal.binding5.Tour in project RouteConverter by cpesch.
the class GoPal7RouteFormat method createGoPal.
private Tour createGoPal(GoPalRoute route, int startIndex, int endIndex) {
ObjectFactory objectFactory = new ObjectFactory();
Tour tour = objectFactory.createTour();
tour.setRouteOptions(createRouteOptions(route));
for (int i = startIndex; i < endIndex; i++) {
GoPalPosition position = route.getPosition(i);
if (i == startIndex) {
tour.setStart(createStart(position));
} else {
tour.getDestination().add(createDestination(position));
}
}
return tour;
}
Aggregations