Package slash.navigation.gopal.binding5

Examples of slash.navigation.gopal.binding5.ObjectFactory


    private transient ObjectFactory objectFactory = new ObjectFactory();
 
    public BusinessLifeCycleManagerV3Impl(RegistryService registry) {
        super(registry);
        if(objectFactory == null)
          objectFactory = new ObjectFactory();
    }
View Full Code Here


      UDDISubscriptionPortType subscriptionService = transport.getUDDISubscriptionService();
      List<org.uddi.sub_v3.Subscription> subscriptions = subscriptionService.getSubscriptions(authToken);
      for (org.uddi.sub_v3.Subscription subscription : subscriptions) {
        String expiresAfter = null;
        if (subscription.getExpiresAfter()!=null) expiresAfter = subscription.getExpiresAfter().toString();
        String rawFilter = JAXBMarshaller.marshallToString(new ObjectFactory().createSubscriptionFilter(subscription.getSubscriptionFilter()), "org.uddi.sub_v3");
        Subscription modelSubscription = new Subscription(
            (subscription.getBindingKey()==null)?"":subscription.getBindingKey(),
            subscription.isBrief(),
            expiresAfter,
            subscription.getMaxEntities(),
View Full Code Here

      String authToken = (String) session.getAttribute("token-" + clerk.getName());
      subscriptionService.saveSubscription(authToken, subscriptionHolder);
      subscription = subscriptionHolder.value.get(0);
      String expiresAfter = null;
      if (subscription.getExpiresAfter()!=null) expiresAfter = subscription.getExpiresAfter().toString();
      String rawFilter = JAXBMarshaller.marshallToString(new ObjectFactory().createSubscriptionFilter(subscription.getSubscriptionFilter()), "org.uddi.sub_v3");
      Subscription savedModelSubscription = new Subscription(
          (subscription.getBindingKey()==null)?"":subscription.getBindingKey(),
          subscription.isBrief(),
          expiresAfter,
          subscription.getMaxEntities(),
View Full Code Here

    } else {
      modelSubscription.setBrief(new Boolean(false));
    }
     
    try {
      String rawFilter = JAXBMarshaller.marshallToString(new ObjectFactory().createSubscriptionFilter(apiSubscription.getSubscriptionFilter()), "org.uddi.sub_v3");
      logger.debug("marshalled subscription filter:  " + rawFilter);
      modelSubscription.setSubscriptionFilter(rawFilter);

    } catch (JAXBException e) {
      logger.error("JAXBException while marshalling subscription filter", e);
View Full Code Here

    } else {
      modelSubscription.setBrief(new Boolean(false));
    }
     
   
    String rawFilter = JAXBMarshaller.marshallToString(new ObjectFactory().createSubscriptionFilter(apiSubscription.getSubscriptionFilter()), "org.uddi.sub_v3");
    logger.debug("marshalled subscription filter:  " + rawFilter);
    modelSubscription.setSubscriptionFilter(rawFilter);
   
  }
View Full Code Here

    } else {
      modelSubscription.setBrief(new Boolean(false));
    }
     
    try {
      String rawFilter = JAXBMarshaller.marshallToString(new ObjectFactory().createSubscriptionFilter(apiSubscription.getSubscriptionFilter()), "org.uddi.sub_v3");
      logger.debug("marshalled subscription filter:  " + rawFilter);
      modelSubscription.setSubscriptionFilter(rawFilter);

    } catch (JAXBException e) {
      logger.error("JAXBException while marshalling subscription filter", e);
View Full Code Here

                } else {
                        modelSubscription.setBrief(Boolean.FALSE);
                }


                String rawFilter = JAXBMarshaller.marshallToString(new ObjectFactory().createSubscriptionFilter(apiSubscription.getSubscriptionFilter()), "org.uddi.sub_v3");
                logger.debug("marshalled subscription filter:  " + rawFilter);
                modelSubscription.setSubscriptionFilter(rawFilter);

        }
View Full Code Here

    } else {
      modelSubscription.setBrief(new Boolean(false));
    }
     
   
    String rawFilter = JAXBMarshaller.marshallToString(new ObjectFactory().createSubscriptionFilter(apiSubscription.getSubscriptionFilter()), "org.uddi.sub_v3");
    logger.debug("marshalled subscription filter:  " + rawFilter);
    modelSubscription.setSubscriptionFilter(rawFilter);
   
  }
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

TOP

Related Classes of slash.navigation.gopal.binding5.ObjectFactory

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.