Package slash.navigation.gopal.binding3

Examples of slash.navigation.gopal.binding3.Tour


    }

    private Tour.Options createOptions(GoPalRoute route) {
        Tour.Options options = route.getOptions(Tour.Options.class);
        if (options == null) {
            options = new ObjectFactory().createTourOptions();
            options.setType((short) preferences.getInt(VERSION_PREFIX + "type", 3)); // Fahrzeugtyp: 0=PKW 1=Fussgaenger 2=Fahrrad 3=Motorrad
            options.setMode((short) preferences.getInt(VERSION_PREFIX + "mode", 2)); // Art der Route: 0=kurz 1=schnell 2=Oekonomisch
            options.setFerries((short) preferences.getInt(VERSION_PREFIX + "ferries", 1)); // Faehren: 0=meiden 1=verwenden
            options.setMotorWays((short) preferences.getInt(VERSION_PREFIX + "motorWays", 0)); // Autobahn: 0=meiden 1=verwenden
            options.setTollRoad((short) preferences.getInt(VERSION_PREFIX + "tollRoad", 1)); // Mautstrassen: 0=meiden 1=verwenden
View Full Code Here


        }
        return options;
    }

    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());
View Full Code Here

        }
        return new GoPalRoute(this, null, tour.getOptions(), positions);
    }

    public void read(InputStream source, CompactCalendar startDate, ParserContext<GoPalRoute> context) throws Exception {
        Tour tour = unmarshal3(source);
        context.appendRoute(process(tour));
    }
View Full Code Here

        return options;
    }

    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;
    }
View Full Code Here

        }
        return new GoPalRoute(this, null, tour.getRouteOptions(), positions);
    }

    public void read(InputStream source, CompactCalendar startDate, ParserContext<GoPalRoute> context) throws Exception {
        Tour tour = unmarshal5(source);
        context.appendRoute(process(tour));
    }
View Full Code Here

        return destination;
    }

    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;
    }
View Full Code Here

        }
        return new GoPalRoute(this, null, tour.getRouteOptions(), positions);
    }

    public void read(InputStream source, CompactCalendar startDate, ParserContext<GoPalRoute> context) throws Exception {
        Tour tour = unmarshal5(source);
        GoPalRoute process = process(tour);
        if (process != null)
            context.appendRoute(process);
    }
View Full Code Here

        return destination;
    }

    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;
    }
View Full Code Here

TOP

Related Classes of slash.navigation.gopal.binding3.Tour

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.