Package slash.navigation.gopal.binding5

Examples of slash.navigation.gopal.binding5.Tour$Destination$SideStreet


        }
        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

    }

    private Tour.RouteOptions createRouteOptions(GoPalRoute route) {
        Tour.RouteOptions options = route.getOptions(Tour.RouteOptions.class);
        if (options == null) {
            ObjectFactory objectFactory = new ObjectFactory();
            options = objectFactory.createTourRouteOptions();

            Tour.RouteOptions.NaviMode naviMode = objectFactory.createTourRouteOptionsNaviMode();
            naviMode.setValue(preferences.get(VERSION_PREFIX + "naviMode", "motorbike")); // bicycle, car, motorbike, pedestrian
            options.setNaviMode(naviMode);
            Tour.RouteOptions.OptimizationMode optimizationMode = objectFactory.createTourRouteOptionsOptimizationMode();
            optimizationMode.setValue(preferences.get(VERSION_PREFIX + "optimizationMode", "short")); // fast, short
            options.setOptimizationMode(optimizationMode);
            Tour.RouteOptions.TTIBypass bypass = objectFactory.createTourRouteOptionsTTIBypass();
            bypass.setCalculation(preferences.get(VERSION_PREFIX + "ttiBypass", "automatic")); // automatic, disabled, manual
            bypass.setMode("avoid");
            options.setTTIBypass(bypass);

            Tour.RouteOptions.RoadUsageTypes usageTypes = objectFactory.createTourRouteOptionsRoadUsageTypes();
            Tour.RouteOptions.RoadUsageTypes.CarTrains carTrains = objectFactory.createTourRouteOptionsRoadUsageTypesCarTrains();
            carTrains.setMode(preferences.get(VERSION_PREFIX + "carTrains", "use")); // avoid, use, prohibit
            usageTypes.setCarTrains(carTrains);
            Tour.RouteOptions.RoadUsageTypes.Ferries ferries = objectFactory.createTourRouteOptionsRoadUsageTypesFerries();
            ferries.setMode(preferences.get(VERSION_PREFIX + "ferries", "avoid")); // avoid, use, prohibit
            usageTypes.setFerries(ferries);
            Tour.RouteOptions.RoadUsageTypes.IPDRoads ipdRoads = objectFactory.createTourRouteOptionsRoadUsageTypesIPDRoads();
            ipdRoads.setMode(preferences.get(VERSION_PREFIX + "ipdRoads", "use")); // avoid, use, prohibit
            usageTypes.setIPDRoads(ipdRoads);
            Tour.RouteOptions.RoadUsageTypes.MotorWays motorWays = objectFactory.createTourRouteOptionsRoadUsageTypesMotorWays();
            motorWays.setMode(preferences.get(VERSION_PREFIX + "motorWays", "avoid")); // avoid, use, prohibit
            usageTypes.setMotorWays(motorWays);
            Tour.RouteOptions.RoadUsageTypes.SeasonalRestrictedRoads seasonalRestrictedRoads = objectFactory.createTourRouteOptionsRoadUsageTypesSeasonalRestrictedRoads();
            seasonalRestrictedRoads.setMode(preferences.get(VERSION_PREFIX + "seasonalRestrictedRoads", "use")); // avoid, use, prohibit
            usageTypes.setSeasonalRestrictedRoads(seasonalRestrictedRoads);
            Tour.RouteOptions.RoadUsageTypes.SpecialChargeRoads specialChargeRoads = objectFactory.createTourRouteOptionsRoadUsageTypesSpecialChargeRoads();
            specialChargeRoads.setMode(preferences.get(VERSION_PREFIX + "specialChargeRoads", "avoid")); // avoid, use, prohibit
            usageTypes.setSpecialChargeRoads(specialChargeRoads);
            Tour.RouteOptions.RoadUsageTypes.TimeRestrictedRoads timeRestrictedRoads = objectFactory.createTourRouteOptionsRoadUsageTypesTimeRestrictedRoads();
            timeRestrictedRoads.setMode(preferences.get(VERSION_PREFIX + "timeRestrictedRoads", "use")); // avoid, use, prohibit
            usageTypes.setTimeRestrictedRoads(timeRestrictedRoads);
            Tour.RouteOptions.RoadUsageTypes.TollRoads tollRoads = objectFactory.createTourRouteOptionsRoadUsageTypesTollRoads();
            tollRoads.setMode(preferences.get(VERSION_PREFIX + "tollRoads", "avoid")); // avoid, use, prohibit
            usageTypes.setTollRoads(tollRoads);
            Tour.RouteOptions.RoadUsageTypes.TrafficFlowInfo trafficFlowInfo = objectFactory.createTourRouteOptionsRoadUsageTypesTrafficFlowInfo();
            trafficFlowInfo.setMode(preferences.get(VERSION_PREFIX + "trafficFlowInfo", "use")); // avoid, use, prohibit
            usageTypes.setTrafficFlowInfo(trafficFlowInfo);
            Tour.RouteOptions.RoadUsageTypes.Tunnels tunnels = objectFactory.createTourRouteOptionsRoadUsageTypesTunnels();
            tunnels.setMode(preferences.get(VERSION_PREFIX + "tunnels", "use")); // avoid, use, prohibit
            usageTypes.setTunnels(tunnels);
            Tour.RouteOptions.RoadUsageTypes.UnpavedRoads unpavedRoads = objectFactory.createTourRouteOptionsRoadUsageTypesUnpavedRoads();
            unpavedRoads.setMode(preferences.get(VERSION_PREFIX + "unpavedRoads", "avoid")); // avoid, use, prohibit
            usageTypes.setUnpavedRoads(unpavedRoads);
            options.setRoadUsageTypes(usageTypes);

            Tour.RouteOptions.TravelSpeeds travelSpeeds = objectFactory.createTourRouteOptionsTravelSpeeds();
            Tour.RouteOptions.TravelSpeeds.Bicycle bicycle = objectFactory.createTourRouteOptionsTravelSpeedsBicycle();
            bicycle.setSpeed(formatSpeed(preferences.getDouble(VERSION_PREFIX + "bicycleSpeed", 14.4))); // Km/h
            bicycle.setUnit(ROUTE_OPTIONS_SPEED_UNIT);
            travelSpeeds.setBicycle(bicycle);
            Tour.RouteOptions.TravelSpeeds.Pedestrian pedestrian = objectFactory.createTourRouteOptionsTravelSpeedsPedestrian();
            pedestrian.setSpeed(formatSpeed(preferences.getDouble(VERSION_PREFIX + "pedestrianSpeed", 3.6))); // Km/h
            pedestrian.setUnit(ROUTE_OPTIONS_SPEED_UNIT);
            travelSpeeds.setPedestrian(pedestrian);
            Tour.RouteOptions.TravelSpeeds.Vehicle vehicle = objectFactory.createTourRouteOptionsTravelSpeedsVehicle();
            vehicle.setSpeed(formatSpeed(preferences.getDouble(VERSION_PREFIX + "vehicleSpeed", 80.0))); // Km/h
            vehicle.setUnit(ROUTE_OPTIONS_SPEED_UNIT);
            Tour.RouteOptions.TravelSpeeds.Vehicle.MotorWay motorWay = objectFactory.createTourRouteOptionsTravelSpeedsVehicleMotorWay();
            motorWay.setSpeed(formatSpeed(preferences.getDouble(VERSION_PREFIX + "vehicleSpeedMotorWay", 120.0))); // Km/h
            motorWay.setUnit(ROUTE_OPTIONS_SPEED_UNIT);
            vehicle.setMotorWay(motorWay);
            Tour.RouteOptions.TravelSpeeds.Vehicle.PedestrianArea pedestrianArea = objectFactory.createTourRouteOptionsTravelSpeedsVehiclePedestrianArea();
            pedestrianArea.setSpeed(formatSpeed(preferences.getDouble(VERSION_PREFIX + "vehicleSpeedPedestrianArea", 7.2))); // Km/h
            pedestrianArea.setUnit(ROUTE_OPTIONS_SPEED_UNIT);
            vehicle.setPedestrianArea(pedestrianArea);
            travelSpeeds.setVehicle(vehicle);
            options.setTravelSpeeds(travelSpeeds);
View Full Code Here

        }
        return options;
    }

    private Tour.Start createStart(GoPalPosition position) {
        ObjectFactory objectFactory = new ObjectFactory();
        Tour.Start start = objectFactory.createTourStart();
        Tour.Start.Coordinates coordinates = objectFactory.createTourStartCoordinates();
        if (position.getX() != null)
            coordinates.setMercatorx(position.getX());
        if (position.getY() != null)
            coordinates.setMercatory(position.getY());
        if (position.getLongitude() != null)
            coordinates.setLongitude(formatPosition(position.getLongitude()));
        if (position.getLatitude() != null)
            coordinates.setLatitude(formatPosition(position.getLatitude()));
        start.setCoordinates(coordinates);

        Tour.Start.City city = objectFactory.createTourStartCity();
        city.setName(position.getCity());
        city.setSuburb(position.getSuburb());
        start.setCity(city);
        Tour.Start.Country country = objectFactory.createTourStartCountry();
        if (position.getCountry() != null)
            country.setCode(position.getCountry());
        start.setCountry(country);
        Tour.Start.State state = objectFactory.createTourStartState();
        if (position.getState() != null)
            state.setName(position.getState());
        start.setState(state);
        Tour.Start.HouseNumber houseNumber = objectFactory.createTourStartHouseNumber();
        if (position.getHouseNumber() != null) {
            houseNumber.setValue(position.getHouseNumber());
            houseNumber.setType("middle_of_street");
        }
        start.setHouseNumber(houseNumber);
        Tour.Start.Street street = objectFactory.createTourStartStreet();
        street.setName(position.getStreet());
        if (position.getHouseNumber() != null)
            street.setHouseNumberAvailable("no");
        start.setStreet(street);
        Tour.Start.SideStreet sideStreet = objectFactory.createTourStartSideStreet();
        sideStreet.setName(position.getSideStreet());
        start.setSideStreet(sideStreet);
        Tour.Start.Zip zip = objectFactory.createTourStartZip();
        zip.setCode(position.getZipCode());
        start.setZip(zip);
        return start;
    }
View Full Code Here

        start.setZip(zip);
        return start;
    }

    private Tour.Destination createDestination(GoPalPosition position) {
        ObjectFactory objectFactory = new ObjectFactory();
        Tour.Destination destination = objectFactory.createTourDestination();
        Tour.Destination.Coordinates coordinates = objectFactory.createTourDestinationCoordinates();
        if (position.getX() != null)
            coordinates.setMercatorx(position.getX());
        if (position.getY() != null)
            coordinates.setMercatory(position.getY());
        if (position.getLongitude() != null)
            coordinates.setLongitude(formatPosition(position.getLongitude()));
        if (position.getLatitude() != null)
            coordinates.setLatitude(formatPosition(position.getLatitude()));
        destination.setCoordinates(coordinates);

        Tour.Destination.City city = objectFactory.createTourDestinationCity();
        city.setName(position.getCity());
        city.setSuburb(position.getSuburb());
        destination.setCity(city);
        Tour.Destination.Country country = objectFactory.createTourDestinationCountry();
        if (position.getCountry() != null)
            country.setCode(position.getCountry());
        destination.setCountry(country);
        Tour.Destination.State state = objectFactory.createTourDestinationState();
        if (position.getState() != null)
            state.setName(position.getState());
        destination.setState(state);
        Tour.Destination.HouseNumber houseNumber = objectFactory.createTourDestinationHouseNumber();
        if (position.getHouseNumber() != null) {
            houseNumber.setValue(position.getHouseNumber());
            houseNumber.setType("middle_of_street");
        }
        destination.setHouseNumber(houseNumber);
        Tour.Destination.Street street = objectFactory.createTourDestinationStreet();
        street.setName(position.getStreet());
        if (position.getHouseNumber() != null)
            street.setHouseNumberAvailable("no");
        destination.setStreet(street);
        Tour.Destination.SideStreet sideStreet = objectFactory.createTourDestinationSideStreet();
        sideStreet.setName(position.getSideStreet());
        destination.setSideStreet(sideStreet);
        Tour.Destination.Zip zip = objectFactory.createTourDestinationZip();
        zip.setCode(position.getZipCode());
        destination.setZip(zip);
        return destination;
    }
View Full Code Here

        destination.setZip(zip);
        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);
View Full Code Here

    }

    private Tour.RouteOptions createRouteOptions(GoPalRoute route) {
        Tour.RouteOptions options = route.getOptions(Tour.RouteOptions.class);
        if (options == null) {
            ObjectFactory objectFactory = new ObjectFactory();
            options = objectFactory.createTourRouteOptions();

            Tour.RouteOptions.NaviMode naviMode = objectFactory.createTourRouteOptionsNaviMode();
            naviMode.setValue(preferences.get(VERSION_PREFIX + "naviMode", "motorbike")); // bicycle, car, motorbike, pedestrian
            options.setNaviMode(naviMode);
            Tour.RouteOptions.OptimizationMode optimizationMode = objectFactory.createTourRouteOptionsOptimizationMode();
            optimizationMode.setValue(preferences.get(VERSION_PREFIX + "optimizationMode", "short")); // fast, short
            options.setOptimizationMode(optimizationMode);
            Tour.RouteOptions.TTIBypass bypass = objectFactory.createTourRouteOptionsTTIBypass();
            bypass.setCalculation(preferences.get(VERSION_PREFIX + "ttiBypass", "automatic")); // automatic, disabled, manual
            bypass.setMode("avoid");
            options.setTTIBypass(bypass);

            Tour.RouteOptions.RoadUsageTypes usageTypes = objectFactory.createTourRouteOptionsRoadUsageTypes();
            Tour.RouteOptions.RoadUsageTypes.CarTrains carTrains = objectFactory.createTourRouteOptionsRoadUsageTypesCarTrains();
            carTrains.setMode(preferences.get(VERSION_PREFIX + "carTrains", "use")); // avoid, use, prohibit
            usageTypes.setCarTrains(carTrains);
            Tour.RouteOptions.RoadUsageTypes.Ferries ferries = objectFactory.createTourRouteOptionsRoadUsageTypesFerries();
            ferries.setMode(preferences.get(VERSION_PREFIX + "ferries", "avoid")); // avoid, use, prohibit
            usageTypes.setFerries(ferries);
            Tour.RouteOptions.RoadUsageTypes.IPDRoads ipdRoads = objectFactory.createTourRouteOptionsRoadUsageTypesIPDRoads();
            ipdRoads.setMode(preferences.get(VERSION_PREFIX + "ipdRoads", "use")); // avoid, use, prohibit
            usageTypes.setIPDRoads(ipdRoads);
            Tour.RouteOptions.RoadUsageTypes.MotorWays motorWays = objectFactory.createTourRouteOptionsRoadUsageTypesMotorWays();
            motorWays.setMode(preferences.get(VERSION_PREFIX + "motorWays", "avoid")); // avoid, use, prohibit
            usageTypes.setMotorWays(motorWays);
            Tour.RouteOptions.RoadUsageTypes.SeasonalRestrictedRoads seasonalRestrictedRoads = objectFactory.createTourRouteOptionsRoadUsageTypesSeasonalRestrictedRoads();
            seasonalRestrictedRoads.setMode(preferences.get(VERSION_PREFIX + "seasonalRestrictedRoads", "use")); // avoid, use, prohibit
            usageTypes.setSeasonalRestrictedRoads(seasonalRestrictedRoads);
            Tour.RouteOptions.RoadUsageTypes.SpecialChargeRoads specialChargeRoads = objectFactory.createTourRouteOptionsRoadUsageTypesSpecialChargeRoads();
            specialChargeRoads.setMode(preferences.get(VERSION_PREFIX + "specialChargeRoads", "avoid")); // avoid, use, prohibit
            usageTypes.setSpecialChargeRoads(specialChargeRoads);
            Tour.RouteOptions.RoadUsageTypes.TimeRestrictedRoads timeRestrictedRoads = objectFactory.createTourRouteOptionsRoadUsageTypesTimeRestrictedRoads();
            timeRestrictedRoads.setMode(preferences.get(VERSION_PREFIX + "timeRestrictedRoads", "use")); // avoid, use, prohibit
            usageTypes.setTimeRestrictedRoads(timeRestrictedRoads);
            Tour.RouteOptions.RoadUsageTypes.TollRoads tollRoads = objectFactory.createTourRouteOptionsRoadUsageTypesTollRoads();
            tollRoads.setMode(preferences.get(VERSION_PREFIX + "tollRoads", "avoid")); // avoid, use, prohibit
            usageTypes.setTollRoads(tollRoads);
            Tour.RouteOptions.RoadUsageTypes.TrafficFlowInfo trafficFlowInfo = objectFactory.createTourRouteOptionsRoadUsageTypesTrafficFlowInfo();
            trafficFlowInfo.setMode(preferences.get(VERSION_PREFIX + "trafficFlowInfo", "use")); // avoid, use, prohibit
            usageTypes.setTrafficFlowInfo(trafficFlowInfo);
            Tour.RouteOptions.RoadUsageTypes.Tunnels tunnels = objectFactory.createTourRouteOptionsRoadUsageTypesTunnels();
            tunnels.setMode(preferences.get(VERSION_PREFIX + "tunnels", "use")); // avoid, use, prohibit
            usageTypes.setTunnels(tunnels);
            Tour.RouteOptions.RoadUsageTypes.UnpavedRoads unpavedRoads = objectFactory.createTourRouteOptionsRoadUsageTypesUnpavedRoads();
            unpavedRoads.setMode(preferences.get(VERSION_PREFIX + "unpavedRoads", "avoid")); // avoid, use, prohibit
            usageTypes.setUnpavedRoads(unpavedRoads);
            options.setRoadUsageTypes(usageTypes);

            Tour.RouteOptions.TravelSpeeds travelSpeeds = objectFactory.createTourRouteOptionsTravelSpeeds();
            Tour.RouteOptions.TravelSpeeds.Bicycle bicycle = objectFactory.createTourRouteOptionsTravelSpeedsBicycle();
            bicycle.setSpeed(formatSpeed(preferences.getDouble(VERSION_PREFIX + "bicycleSpeed", 14.4))); // Km/h
            bicycle.setUnit(ROUTE_OPTIONS_SPEED_UNIT);
            travelSpeeds.setBicycle(bicycle);
            Tour.RouteOptions.TravelSpeeds.Pedestrian pedestrian = objectFactory.createTourRouteOptionsTravelSpeedsPedestrian();
            pedestrian.setSpeed(formatSpeed(preferences.getDouble(VERSION_PREFIX + "pedestrianSpeed", 3.6))); // Km/h
            pedestrian.setUnit(ROUTE_OPTIONS_SPEED_UNIT);
            travelSpeeds.setPedestrian(pedestrian);
            Tour.RouteOptions.TravelSpeeds.Vehicle vehicle = objectFactory.createTourRouteOptionsTravelSpeedsVehicle();
            vehicle.setSpeed(formatSpeed(preferences.getDouble(VERSION_PREFIX + "vehicleSpeed", 80.0))); // Km/h
            vehicle.setUnit(ROUTE_OPTIONS_SPEED_UNIT);
            Tour.RouteOptions.TravelSpeeds.Vehicle.MotorWay motorWay = objectFactory.createTourRouteOptionsTravelSpeedsVehicleMotorWay();
            motorWay.setSpeed(formatSpeed(preferences.getDouble(VERSION_PREFIX + "vehicleSpeedMotorWay", 120.0))); // Km/h
            motorWay.setUnit(ROUTE_OPTIONS_SPEED_UNIT);
            vehicle.setMotorWay(motorWay);
            Tour.RouteOptions.TravelSpeeds.Vehicle.PedestrianArea pedestrianArea = objectFactory.createTourRouteOptionsTravelSpeedsVehiclePedestrianArea();
            pedestrianArea.setSpeed(formatSpeed(preferences.getDouble(VERSION_PREFIX + "vehicleSpeedPedestrianArea", 7.2))); // Km/h
            pedestrianArea.setUnit(ROUTE_OPTIONS_SPEED_UNIT);
            vehicle.setPedestrianArea(pedestrianArea);
            travelSpeeds.setVehicle(vehicle);
            options.setTravelSpeeds(travelSpeeds);
View Full Code Here

        }
        return (short)49;
    }

    private Tour.Start createStart(GoPalPosition position) {
        ObjectFactory objectFactory = new ObjectFactory();
        Tour.Start start = objectFactory.createTourStart();
        Tour.Start.Coordinates coordinates = objectFactory.createTourStartCoordinates();
        if (position.getX() != null)
            coordinates.setMercatorx(position.getX());
        if (position.getY() != null)
            coordinates.setMercatory(position.getY());
        if (position.getLongitude() != null)
            coordinates.setLongitude(formatPosition(position.getLongitude()));
        if (position.getLatitude() != null)
            coordinates.setLatitude(formatPosition(position.getLatitude()));
        start.setCoordinates(coordinates);

        Tour.Start.City city = objectFactory.createTourStartCity();
        city.setName(position.getCity());
        city.setSuburb(position.getSuburb());
        start.setCity(city);
        Tour.Start.Country country = objectFactory.createTourStartCountry();
        country.setCode(formatCountry(position));
        start.setCountry(country);
        Tour.Start.State state = objectFactory.createTourStartState();
        if (position.getState() != null)
            state.setName(position.getState());
        start.setState(state);
        Tour.Start.HouseNumber houseNumber = objectFactory.createTourStartHouseNumber();
        if (position.getHouseNumber() != null) {
            houseNumber.setValue(position.getHouseNumber());
            houseNumber.setType("middle_of_street");
        }
        start.setHouseNumber(houseNumber);
        Tour.Start.Street street = objectFactory.createTourStartStreet();
        street.setName(position.getStreet());
        if (position.getHouseNumber() != null)
            street.setHouseNumberAvailable("no");
        start.setStreet(street);
        Tour.Start.SideStreet sideStreet = objectFactory.createTourStartSideStreet();
        sideStreet.setName(position.getSideStreet());
        start.setSideStreet(sideStreet);
        Tour.Start.Zip zip = objectFactory.createTourStartZip();
        zip.setCode(position.getZipCode());
        start.setZip(zip);
        return start;
    }
View Full Code Here

        start.setZip(zip);
        return start;
    }

    private Tour.Destination createDestination(GoPalPosition position) {
        ObjectFactory objectFactory = new ObjectFactory();
        Tour.Destination destination = objectFactory.createTourDestination();
        Tour.Destination.Coordinates coordinates = objectFactory.createTourDestinationCoordinates();
        if (position.getX() != null)
            coordinates.setMercatorx(position.getX());
        if (position.getY() != null)
            coordinates.setMercatory(position.getY());
        if (position.getLongitude() != null)
            coordinates.setLongitude(formatPosition(position.getLongitude()));
        if (position.getLatitude() != null)
            coordinates.setLatitude(formatPosition(position.getLatitude()));
        destination.setCoordinates(coordinates);

        Tour.Destination.City city = objectFactory.createTourDestinationCity();
        city.setName(position.getCity());
        city.setSuburb(position.getSuburb());
        destination.setCity(city);
        Tour.Destination.Country country = objectFactory.createTourDestinationCountry();
        country.setCode(formatCountry(position));
        destination.setCountry(country);
        Tour.Destination.State state = objectFactory.createTourDestinationState();
        if (position.getState() != null)
            state.setName(position.getState());
        destination.setState(state);
        Tour.Destination.HouseNumber houseNumber = objectFactory.createTourDestinationHouseNumber();
        if (position.getHouseNumber() != null) {
            houseNumber.setValue(position.getHouseNumber());
            houseNumber.setType("middle_of_street");
        }
        destination.setHouseNumber(houseNumber);
        Tour.Destination.Street street = objectFactory.createTourDestinationStreet();
        street.setName(position.getStreet());
        if (position.getHouseNumber() != null)
            street.setHouseNumberAvailable("no");
        destination.setStreet(street);
        Tour.Destination.SideStreet sideStreet = objectFactory.createTourDestinationSideStreet();
        sideStreet.setName(position.getSideStreet());
        destination.setSideStreet(sideStreet);
        Tour.Destination.Zip zip = objectFactory.createTourDestinationZip();
        zip.setCode(position.getZipCode());
        destination.setZip(zip);
        return destination;
    }
View Full Code Here

        destination.setZip(zip);
        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);
View Full Code Here

TOP

Related Classes of slash.navigation.gopal.binding5.Tour$Destination$SideStreet

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.