Package com.lbslocal.cc.objects.v3.route

Examples of com.lbslocal.cc.objects.v3.route.RouteStop


    return coordsRet;
  }

  public RouteInfo getRoute(RouteStop[] rs, RouteOptions ro, int idLicenca) throws Exception {
    iniDate = System.currentTimeMillis();
    RouteProximityInfo rpi = new RouteProximityInfo();
    RouteInfo ri = new RouteInfo();

    try {

      Validation("getRoute", idLicenca, rs, ro);

      RouteProximityOptions routeOptions = new RouteProximityOptions();

      routeOptions.setLanguage(ro.getLanguage());
      routeOptions.setRouteDetails(new RouteDetails());
      routeOptions.getRouteDetails().setDescriptionType(ro.getRouteDetails().getDescriptionType());
      routeOptions.getRouteDetails().setOptimizeRoute(ro.getRouteDetails().isOptimizeRoute());
      routeOptions.getRouteDetails().setPoiRoute(ro.getRouteDetails().getPoiRoute());
      routeOptions.getRouteDetails().setRouteType(ro.getRouteDetails().getRouteType());

      if (ro.getRouteLine() != null) {
        routeOptions.setRouteLine(new RouteLine[ro.getRouteLine().length]);

        for (int x = 0; x < ro.getRouteLine().length; x++) {
          routeOptions.getRouteLine()[x] = new RouteLine();
          routeOptions.getRouteLine()[x].setRGB(ro.getRouteLine()[x].getRGB());
          routeOptions.getRouteLine()[x].setTransparency(ro.getRouteLine()[x].getTransparency());
          routeOptions.getRouteLine()[x].setWidth(ro.getRouteLine()[x].getWidth());
        }
      }

      routeOptions.setVehicle(new Vehicle());
      routeOptions.getVehicle().setAverageConsumption(ro.getVehicle().getAverageConsumption());
      routeOptions.getVehicle().setAverageSpeed(ro.getVehicle().getAverageSpeed());
      routeOptions.getVehicle().setFuelPrice(ro.getVehicle().getFuelPrice());
      routeOptions.getVehicle().setTankCapacity(ro.getVehicle().getTankCapacity());
      routeOptions.getVehicle().setTollFeeCat(ro.getVehicle().getTollFeeCat());
      CommonRoute r = new CommonRoute(_maquina, _server, _port, _output, _dns, _dataSource, _dataSourceMapa);
      rpi = r.getRoute(idLicenca, rs, routeOptions, CommonRoute._getRoute);
     
      ri.setMapInfo(new MapInfo());
      ri.getMapInfo().setExtent(new Extent());
      ri.getMapInfo().getExtent().setXMax(rpi.getMapInfo().getExtent().getXMax());
      ri.getMapInfo().getExtent().setXMin(rpi.getMapInfo().getExtent().getXMin());
      ri.getMapInfo().getExtent().setYMax(rpi.getMapInfo().getExtent().getYMax());
      ri.getMapInfo().getExtent().setYMin(rpi.getMapInfo().getExtent().getYMin());
      ri.getMapInfo().setUrl(rpi.getMapInfo().getUrl());

      ri.setRoadType(new RoadType());
      ri.setRoadType(rpi.getRoadType());

      ri.setRouteId(rpi.getRouteId());
      if (rpi.getRouteSummary() != null) {
        ri.setRouteSummary(new RouteSummary[rpi.getRouteSummary().length]);

        for (int x = 0; x < rpi.getRouteSummary().length; x++) {
          ri.getRouteSummary()[x] = new RouteSummary();
          ri.getRouteSummary()[x].setDescription(rpi.getRouteSummary()[x].getDescription());
          ri.getRouteSummary()[x].setDistance(rpi.getRouteSummary()[x].getDistance());
          ri.getRouteSummary()[x].setPoint(new Point());
          ri.getRouteSummary()[x].setPoint(rpi.getRouteSummary()[x].getPoint());
        }
      }
      ri.setRouteTotals(new RouteTotals());
      ri.setRouteTotals(rpi.getRouteTotals());
      double totalTime = 0;
      if (rpi.getSegDescription() != null) {
        ri.setSegDescription(new SegmentDescription[rpi.getSegDescription().length]);

        for (int x = 0; x < rpi.getSegDescription().length; x++) {
          ri.getSegDescription()[x] = new SegmentDescription();
          ri.getSegDescription()[x].setCity(new City());
          ri.getSegDescription()[x].getCity().setName(rpi.getSegDescription()[x].getCity().getName());
          ri.getSegDescription()[x].getCity().setState(rpi.getSegDescription()[x].getCity().getState());

          ri.getSegDescription()[x].setCommand(rpi.getSegDescription()[x].getCommand());
          ri.getSegDescription()[x].setCumulativeDistance(rpi.getSegDescription()[x].getCumulativeDistance());
          ri.getSegDescription()[x].setDescription(rpi.getSegDescription()[x].getDescription());
          ri.getSegDescription()[x].setDistance(rpi.getSegDescription()[x].getDistance());
          ri.getSegDescription()[x].setPoint(new Point());
          ri.getSegDescription()[x].getPoint().setX(rpi.getSegDescription()[x].getPoint().getX());
          ri.getSegDescription()[x].getPoint().setY(rpi.getSegDescription()[x].getPoint().getY());
          ri.getSegDescription()[x].setPoiRoute(rpi.getSegDescription()[x].getPoiRoute());

          ri.getSegDescription()[x].setTime(rpi.getSegDescription()[x].getTime());
         
          if (!rpi.getSegDescription()[x].getTime().equals(""))
            totalTime += Double.parseDouble(rpi.getSegDescription()[x].getTime().substring(0,rpi.getSegDescription()[x].getTime().indexOf(' ')));
         
//          String teste="";
//          if (!ri.getSegDescription()[x].getFullCoords().equals(""))
//            teste = convertFromDecarta(7, ri.getSegDescription()[x].getFullCoords());
         
          int z = 0;

          if (rpi.getSegDescription()[x].getPoiRouteDetails() != null) {
            ri.getSegDescription()[x].setPoiRouteDetails(new POIDetails[rpi.getSegDescription()[x].getPoiRouteDetails().length]);

            for (z = 0; z < rpi.getSegDescription()[x].getPoiRouteDetails().length; z++) {
              ri.getSegDescription()[x].getPoiRouteDetails()[z] = new POIDetails();
              ri.getSegDescription()[x].getPoiRouteDetails()[z].setAddressInfo(rpi.getSegDescription()[x].getPoiRouteDetails()[z]
                  .getAddressInfo());
              ri.getSegDescription()[x].getPoiRouteDetails()[z].setClientID(rpi.getSegDescription()[x].getPoiRouteDetails()[z]
                  .getClientID());
              ri.getSegDescription()[x].getPoiRouteDetails()[z].setName(rpi.getSegDescription()[x].getPoiRouteDetails()[z].getName());
              ri.getSegDescription()[x].getPoiRouteDetails()[z].setPoint(new Point());
              ri.getSegDescription()[x].getPoiRouteDetails()[z].getPoint().setX(
                  rpi.getSegDescription()[x].getPoiRouteDetails()[z].getPoint().getX());
              ri.getSegDescription()[x].getPoiRouteDetails()[z].getPoint().setY(
                  rpi.getSegDescription()[x].getPoiRouteDetails()[z].getPoint().getY());
              ri.getSegDescription()[x].getPoiRouteDetails()[z].setSource(rpi.getSegDescription()[x].getPoiRouteDetails()[z]
                  .getSource());
            }
          }

          ri.getSegDescription()[x].setRoadType(rpi.getSegDescription()[x].getRoadType());
          ri.getSegDescription()[x].setTollFee(rpi.getSegDescription()[x].getTollFee());

          if (!Functions.IsNullOrEmpty(rpi.getSegDescription()[x].getTollFeeDetails().getAddress())) {
            ri.getSegDescription()[x].setTollFeeDetails(new TollFeeDetails());
            ri.getSegDescription()[x].getTollFeeDetails().setAddress(rpi.getSegDescription()[x].getTollFeeDetails().getAddress());
            ri.getSegDescription()[x].getTollFeeDetails().setConcession(rpi.getSegDescription()[x].getTollFeeDetails().getConcession());
            ri.getSegDescription()[x].getTollFeeDetails().setDirection(rpi.getSegDescription()[x].getTollFeeDetails().getDirection());
            ri.getSegDescription()[x].getTollFeeDetails().setName(rpi.getSegDescription()[x].getTollFeeDetails().getName());
            ri.getSegDescription()[x].getTollFeeDetails().setPhone(rpi.getSegDescription()[x].getTollFeeDetails().getPhone());
            ri.getSegDescription()[x].getTollFeeDetails().setPrice(rpi.getSegDescription()[x].getTollFeeDetails().getPrice());
            ri.getSegDescription()[x].getTollFeeDetails().setPricePerAxle(
                rpi.getSegDescription()[x].getTollFeeDetails().getPricePerAxle());
            ri.getSegDescription()[x].getTollFeeDetails().setState(rpi.getSegDescription()[x].getTollFeeDetails().getState());
          }
        }
      }
      ri.getRouteTotals().setTotalTime(CommonRoute.getTotalTime(totalTime));
      Functions.gravarLogUnique(idLicenca, CommonRoute._getRoute, rs.length, iniDate, 0);
View Full Code Here


   */
  public RouteInfo getRouteWithMap(RouteStop[] rs, RouteOptions ro, MapOptions mo, int idLicenca) throws Exception {
    iniDate = System.currentTimeMillis();

    RouteInfo ri = new RouteInfo();
    RouteProximityInfo rpi = new RouteProximityInfo();

    try {
      Validation("getRouteWithMap", idLicenca, rs, ro);
      RouteProximityOptions routeOptions = new RouteProximityOptions();

      routeOptions.setLanguage(ro.getLanguage());
      routeOptions.setRouteDetails(new RouteDetails());
      routeOptions.getRouteDetails().setDescriptionType(ro.getRouteDetails().getDescriptionType());
      routeOptions.getRouteDetails().setOptimizeRoute(ro.getRouteDetails().isOptimizeRoute());
      routeOptions.getRouteDetails().setPoiRoute(ro.getRouteDetails().getPoiRoute());
      routeOptions.getRouteDetails().setRouteType(ro.getRouteDetails().getRouteType());

      if (ro.getRouteLine() != null) {
        routeOptions.setRouteLine(new RouteLine[ro.getRouteLine().length]);

        for (int x = 0; x < ro.getRouteLine().length; x++) {
          routeOptions.getRouteLine()[x] = new RouteLine();
          routeOptions.getRouteLine()[x].setRGB(ro.getRouteLine()[x].getRGB());
          routeOptions.getRouteLine()[x].setTransparency(ro.getRouteLine()[x].getTransparency());
          routeOptions.getRouteLine()[x].setWidth(ro.getRouteLine()[x].getWidth());
        }
      }

      routeOptions.setVehicle(new Vehicle());
      routeOptions.getVehicle().setAverageConsumption(ro.getVehicle().getAverageConsumption());
      routeOptions.getVehicle().setAverageSpeed(ro.getVehicle().getAverageSpeed());
      routeOptions.getVehicle().setFuelPrice(ro.getVehicle().getFuelPrice());
      routeOptions.getVehicle().setTankCapacity(ro.getVehicle().getTankCapacity());
      routeOptions.getVehicle().setTollFeeCat(ro.getVehicle().getTollFeeCat());

      CommonRoute r = new CommonRoute(_maquina, _server, _port, _output, _dns, _dataSource, _dataSourceMapa);
      rpi = r.getRouteWithMap(idLicenca, CommonRoute._getRouteWithMap, rs, routeOptions, mo);

      ri.setMapInfo(new MapInfo());
      ri.getMapInfo().setExtent(new Extent());
      ri.getMapInfo().getExtent().setXMax(rpi.getMapInfo().getExtent().getXMax());
      ri.getMapInfo().getExtent().setXMin(rpi.getMapInfo().getExtent().getXMin());
      ri.getMapInfo().getExtent().setYMax(rpi.getMapInfo().getExtent().getYMax());
      ri.getMapInfo().getExtent().setYMin(rpi.getMapInfo().getExtent().getYMin());
      ri.getMapInfo().setUrl(rpi.getMapInfo().getUrl());

      ri.setRoadType(new RoadType());
      ri.setRoadType(rpi.getRoadType());

      ri.setRouteId(rpi.getRouteId());

      if (rpi.getRouteSummary() != null) {
        ri.setRouteSummary(new RouteSummary[rpi.getRouteSummary().length]);

        for (int x = 0; x < rpi.getRouteSummary().length; x++) {
          ri.getRouteSummary()[x] = new RouteSummary();
          ri.getRouteSummary()[x].setDescription(rpi.getRouteSummary()[x].getDescription());
          ri.getRouteSummary()[x].setDistance(rpi.getRouteSummary()[x].getDistance());
          ri.getRouteSummary()[x].setPoint(new Point());
          ri.getRouteSummary()[x].setPoint(rpi.getRouteSummary()[x].getPoint());
        }
      }

      ri.setRouteTotals(new RouteTotals());
      ri.setRouteTotals(rpi.getRouteTotals());

      if (rpi.getSegDescription() != null) {
        ri.setSegDescription(new SegmentDescription[rpi.getSegDescription().length]);

        for (int x = 0; x < rpi.getSegDescription().length; x++) {
          ri.getSegDescription()[x] = new SegmentDescription();
          ri.getSegDescription()[x].setCity(new City());
          ri.getSegDescription()[x].getCity().setName(rpi.getSegDescription()[x].getCity().getName());
          ri.getSegDescription()[x].getCity().setState(rpi.getSegDescription()[x].getCity().getState());

          ri.getSegDescription()[x].setCommand(rpi.getSegDescription()[x].getCommand());
          ri.getSegDescription()[x].setCumulativeDistance(rpi.getSegDescription()[x].getCumulativeDistance());
          ri.getSegDescription()[x].setDescription(rpi.getSegDescription()[x].getDescription());
          ri.getSegDescription()[x].setDistance(rpi.getSegDescription()[x].getDistance());
          ri.getSegDescription()[x].setPoint(new Point());
          ri.getSegDescription()[x].getPoint().setX(rpi.getSegDescription()[x].getPoint().getX());
          ri.getSegDescription()[x].getPoint().setY(rpi.getSegDescription()[x].getPoint().getY());
          ri.getSegDescription()[x].setPoiRoute(rpi.getSegDescription()[x].getPoiRoute());

          int z = 0;

          if (rpi.getSegDescription()[x].getPoiRouteDetails() != null) {
            ri.getSegDescription()[x].setPoiRouteDetails(new POIDetails[rpi.getSegDescription()[x].getPoiRouteDetails().length]);

            for (z = 0; z < rpi.getSegDescription()[x].getPoiRouteDetails().length; z++) {
              ri.getSegDescription()[x].getPoiRouteDetails()[z] = new POIDetails();
              ri.getSegDescription()[x].getPoiRouteDetails()[z].setAddressInfo(rpi.getSegDescription()[x].getPoiRouteDetails()[z]
                  .getAddressInfo());
              ri.getSegDescription()[x].getPoiRouteDetails()[z].setClientID(rpi.getSegDescription()[x].getPoiRouteDetails()[z]
                  .getClientID());
              ri.getSegDescription()[x].getPoiRouteDetails()[z].setName(rpi.getSegDescription()[x].getPoiRouteDetails()[z].getName());
              ri.getSegDescription()[x].getPoiRouteDetails()[z].setPoint(new Point());
              ri.getSegDescription()[x].getPoiRouteDetails()[z].getPoint().setX(
                  rpi.getSegDescription()[x].getPoiRouteDetails()[z].getPoint().getX());
              ri.getSegDescription()[x].getPoiRouteDetails()[z].getPoint().setY(
                  rpi.getSegDescription()[x].getPoiRouteDetails()[z].getPoint().getY());
              ri.getSegDescription()[x].getPoiRouteDetails()[z].setSource(rpi.getSegDescription()[x].getPoiRouteDetails()[z]
                  .getSource());
            }
          }

          ri.getSegDescription()[x].setRoadType(rpi.getSegDescription()[x].getRoadType());
          ri.getSegDescription()[x].setTollFee(rpi.getSegDescription()[x].getTollFee());

          if (!Functions.IsNullOrEmpty(rpi.getSegDescription()[x].getTollFeeDetails().getAddress())) {
            ri.getSegDescription()[x].setTollFeeDetails(new TollFeeDetails());
            ri.getSegDescription()[x].getTollFeeDetails().setAddress(rpi.getSegDescription()[x].getTollFeeDetails().getAddress());
            ri.getSegDescription()[x].getTollFeeDetails().setConcession(rpi.getSegDescription()[x].getTollFeeDetails().getConcession());
            ri.getSegDescription()[x].getTollFeeDetails().setDirection(rpi.getSegDescription()[x].getTollFeeDetails().getDirection());
            ri.getSegDescription()[x].getTollFeeDetails().setName(rpi.getSegDescription()[x].getTollFeeDetails().getName());
            ri.getSegDescription()[x].getTollFeeDetails().setPhone(rpi.getSegDescription()[x].getTollFeeDetails().getPhone());
            ri.getSegDescription()[x].getTollFeeDetails().setPrice(rpi.getSegDescription()[x].getTollFeeDetails().getPrice());
            ri.getSegDescription()[x].getTollFeeDetails().setPricePerAxle(
                rpi.getSegDescription()[x].getTollFeeDetails().getPricePerAxle());
            ri.getSegDescription()[x].getTollFeeDetails().setState(rpi.getSegDescription()[x].getTollFeeDetails().getState());
          }
        }
      }

      Functions.gravarLogUnique(idLicenca, CommonRoute._getRouteWithMap, rs.length, iniDate, 0);
View Full Code Here

    try {

      Validation("getRoute", idLicenca, rs, ro);

      RouteProximityOptions routeOptions = new RouteProximityOptions();

      routeOptions.setLanguage(ro.getLanguage());
      routeOptions.setRouteDetails(new RouteDetails());
      routeOptions.getRouteDetails().setDescriptionType(ro.getRouteDetails().getDescriptionType());
      routeOptions.getRouteDetails().setOptimizeRoute(ro.getRouteDetails().isOptimizeRoute());
      routeOptions.getRouteDetails().setPoiRoute(ro.getRouteDetails().getPoiRoute());
      routeOptions.getRouteDetails().setRouteType(ro.getRouteDetails().getRouteType());

      if (ro.getRouteLine() != null) {
        routeOptions.setRouteLine(new RouteLine[ro.getRouteLine().length]);

        for (int x = 0; x < ro.getRouteLine().length; x++) {
          routeOptions.getRouteLine()[x] = new RouteLine();
          routeOptions.getRouteLine()[x].setRGB(ro.getRouteLine()[x].getRGB());
          routeOptions.getRouteLine()[x].setTransparency(ro.getRouteLine()[x].getTransparency());
          routeOptions.getRouteLine()[x].setWidth(ro.getRouteLine()[x].getWidth());
        }
      }

      routeOptions.setVehicle(new Vehicle());
      routeOptions.getVehicle().setAverageConsumption(ro.getVehicle().getAverageConsumption());
      routeOptions.getVehicle().setAverageSpeed(ro.getVehicle().getAverageSpeed());
      routeOptions.getVehicle().setFuelPrice(ro.getVehicle().getFuelPrice());
      routeOptions.getVehicle().setTankCapacity(ro.getVehicle().getTankCapacity());
      routeOptions.getVehicle().setTollFeeCat(ro.getVehicle().getTollFeeCat());
      CommonRoute r = new CommonRoute(_maquina, _server, _port, _output, _dns, _dataSource, _dataSourceMapa);
      rpi = r.getRoute(idLicenca, rs, routeOptions, CommonRoute._getRoute);
     
      ri.setMapInfo(new MapInfo());
      ri.getMapInfo().setExtent(new Extent());
View Full Code Here

    RouteSummary[] routeSummary = new RouteSummary[0];

    try {
      Validation("getRouteSummary", idLicenca, rs, ro);
      RouteProximityOptions routeOptions = new RouteProximityOptions();

      routeOptions.setLanguage(ro.getLanguage());
      routeOptions.setRouteDetails(new RouteDetails());
      routeOptions.getRouteDetails().setDescriptionType(ro.getRouteDetails().getDescriptionType());
      routeOptions.getRouteDetails().setOptimizeRoute(ro.getRouteDetails().isOptimizeRoute());
      routeOptions.getRouteDetails().setPoiRoute(ro.getRouteDetails().getPoiRoute());
      routeOptions.getRouteDetails().setRouteType(ro.getRouteDetails().getRouteType());

      if (ro.getRouteLine() != null) {
        routeOptions.setRouteLine(new RouteLine[ro.getRouteLine().length]);

        for (int x = 0; x < ro.getRouteLine().length; x++) {
          routeOptions.getRouteLine()[x] = new RouteLine();
          routeOptions.getRouteLine()[x].setRGB(ro.getRouteLine()[x].getRGB());
          routeOptions.getRouteLine()[x].setTransparency(ro.getRouteLine()[x].getTransparency());
          routeOptions.getRouteLine()[x].setWidth(ro.getRouteLine()[x].getWidth());
        }
      }

      routeOptions.setVehicle(new Vehicle());
      routeOptions.getVehicle().setAverageConsumption(ro.getVehicle().getAverageConsumption());
      routeOptions.getVehicle().setAverageSpeed(ro.getVehicle().getAverageSpeed());
      routeOptions.getVehicle().setFuelPrice(ro.getVehicle().getFuelPrice());
      routeOptions.getVehicle().setTankCapacity(ro.getVehicle().getTankCapacity());
      routeOptions.getVehicle().setTollFeeCat(ro.getVehicle().getTollFeeCat());

      CommonRoute r = new CommonRoute(_maquina, _server, _port, _output, _dns, _dataSource, _dataSourceMapa);
      routeSummary = r.getRouteSummary(idLicenca, rs, routeOptions, CommonRoute._getRouteSummary);

      Functions.gravarLogUnique(idLicenca, CommonRoute._getRouteSummary, rs.length, iniDate, 0);
View Full Code Here

    SegmentDescription[] segDescription = new SegmentDescription[0];

    try {
      Validation("getRouteDescription", idLicenca, rs, ro);
      RouteProximityOptions routeOptions = new RouteProximityOptions();

      routeOptions.setLanguage(ro.getLanguage());
      routeOptions.setRouteDetails(new RouteDetails());
      routeOptions.getRouteDetails().setDescriptionType(ro.getRouteDetails().getDescriptionType());
      routeOptions.getRouteDetails().setOptimizeRoute(ro.getRouteDetails().isOptimizeRoute());
      routeOptions.getRouteDetails().setPoiRoute(ro.getRouteDetails().getPoiRoute());
      routeOptions.getRouteDetails().setRouteType(ro.getRouteDetails().getRouteType());

      if (ro.getRouteLine() != null) {
        routeOptions.setRouteLine(new RouteLine[ro.getRouteLine().length]);

        for (int x = 0; x < ro.getRouteLine().length; x++) {
          routeOptions.getRouteLine()[x] = new RouteLine();
          routeOptions.getRouteLine()[x].setRGB(ro.getRouteLine()[x].getRGB());
          routeOptions.getRouteLine()[x].setTransparency(ro.getRouteLine()[x].getTransparency());
          routeOptions.getRouteLine()[x].setWidth(ro.getRouteLine()[x].getWidth());
        }
      }

      routeOptions.setVehicle(new Vehicle());
      routeOptions.getVehicle().setAverageConsumption(ro.getVehicle().getAverageConsumption());
      routeOptions.getVehicle().setAverageSpeed(ro.getVehicle().getAverageSpeed());
      routeOptions.getVehicle().setFuelPrice(ro.getVehicle().getFuelPrice());
      routeOptions.getVehicle().setTankCapacity(ro.getVehicle().getTankCapacity());
      routeOptions.getVehicle().setTollFeeCat(ro.getVehicle().getTollFeeCat());

      CommonRoute r = new CommonRoute(_maquina, _server, _port, _output, _dns, _dataSource, _dataSourceMapa);
      segDescription = r.getRouteDescription(idLicenca, rs, routeOptions, CommonRoute._getRouteDescription);

      Functions.gravarLogUnique(idLicenca, CommonRoute._getRouteDescription, rs.length, iniDate, 0);
View Full Code Here

    RouteTotals rt = new RouteTotals();

    try {
      Validation("getRouteTotals", idLicenca, rs, ro);
      RouteProximityOptions routeOptions = new RouteProximityOptions();

      routeOptions.setLanguage(ro.getLanguage());
      routeOptions.setRouteDetails(new RouteDetails());
      routeOptions.getRouteDetails().setDescriptionType(ro.getRouteDetails().getDescriptionType());
      routeOptions.getRouteDetails().setOptimizeRoute(ro.getRouteDetails().isOptimizeRoute());
      routeOptions.getRouteDetails().setPoiRoute(ro.getRouteDetails().getPoiRoute());
      routeOptions.getRouteDetails().setRouteType(ro.getRouteDetails().getRouteType());

      if (ro.getRouteLine() != null) {
        routeOptions.setRouteLine(new RouteLine[ro.getRouteLine().length]);

        for (int x = 0; x < ro.getRouteLine().length; x++) {
          routeOptions.getRouteLine()[x] = new RouteLine();
          routeOptions.getRouteLine()[x].setRGB(ro.getRouteLine()[x].getRGB());
          routeOptions.getRouteLine()[x].setTransparency(ro.getRouteLine()[x].getTransparency());
          routeOptions.getRouteLine()[x].setWidth(ro.getRouteLine()[x].getWidth());
        }
      }

      routeOptions.setVehicle(new Vehicle());
      routeOptions.getVehicle().setAverageConsumption(ro.getVehicle().getAverageConsumption());
      routeOptions.getVehicle().setAverageSpeed(ro.getVehicle().getAverageSpeed());
      routeOptions.getVehicle().setFuelPrice(ro.getVehicle().getFuelPrice());
      routeOptions.getVehicle().setTankCapacity(ro.getVehicle().getTankCapacity());
      routeOptions.getVehicle().setTollFeeCat(ro.getVehicle().getTollFeeCat());

      CommonRoute r = new CommonRoute(_maquina, _server, _port, _output, _dns, _dataSource, _dataSourceMapa);
      rt = r.getRouteTotals(idLicenca, rs, routeOptions, CommonRoute._getRouteTotals);

      Functions.gravarLogUnique(idLicenca, CommonRoute._getRouteTotals, rs.length, iniDate, 0);
View Full Code Here

        RouteStop[] rs = new RouteStop[2];
        rs[0] = ra[i].getOrigin();
        rs[1] = ra[i].getDest();
      }

      RouteProximityOptions routeOptions = new RouteProximityOptions();

      routeOptions.setLanguage(ro.getLanguage());
      routeOptions.setRouteDetails(new RouteDetails());
      routeOptions.getRouteDetails().setDescriptionType(ro.getRouteDetails().getDescriptionType());
      routeOptions.getRouteDetails().setOptimizeRoute(ro.getRouteDetails().isOptimizeRoute());
      routeOptions.getRouteDetails().setPoiRoute(ro.getRouteDetails().getPoiRoute());
      routeOptions.getRouteDetails().setRouteType(ro.getRouteDetails().getRouteType());

      if (ro.getRouteLine() != null) {
        routeOptions.setRouteLine(new RouteLine[ro.getRouteLine().length]);

        for (int x = 0; x < ro.getRouteLine().length; x++) {
          routeOptions.getRouteLine()[x] = new RouteLine();
          routeOptions.getRouteLine()[x].setRGB(ro.getRouteLine()[x].getRGB());
          routeOptions.getRouteLine()[x].setTransparency(ro.getRouteLine()[x].getTransparency());
          routeOptions.getRouteLine()[x].setWidth(ro.getRouteLine()[x].getWidth());
        }
      }

      routeOptions.setVehicle(new Vehicle());
      routeOptions.getVehicle().setAverageConsumption(ro.getVehicle().getAverageConsumption());
      routeOptions.getVehicle().setAverageSpeed(ro.getVehicle().getAverageSpeed());
      routeOptions.getVehicle().setFuelPrice(ro.getVehicle().getFuelPrice());
      routeOptions.getVehicle().setTankCapacity(ro.getVehicle().getTankCapacity());
      routeOptions.getVehicle().setTollFeeCat(ro.getVehicle().getTollFeeCat());

      CommonRoute r = new CommonRoute(_maquina, _server, _port, _output, _dns, _dataSource, _dataSourceMapa);
      rt = r.getRouteTotalsBatch(idLicenca, ra, routeOptions);

      Functions.gravarLogUnique(idLicenca, CommonRoute._getRouteTotals, ra.length, iniDate, 0);
View Full Code Here

    RouteInfo ri = new RouteInfo();
    RouteProximityInfo rpi = new RouteProximityInfo();

    try {
      Validation("getRouteWithMap", idLicenca, rs, ro);
      RouteProximityOptions routeOptions = new RouteProximityOptions();

      routeOptions.setLanguage(ro.getLanguage());
      routeOptions.setRouteDetails(new RouteDetails());
      routeOptions.getRouteDetails().setDescriptionType(ro.getRouteDetails().getDescriptionType());
      routeOptions.getRouteDetails().setOptimizeRoute(ro.getRouteDetails().isOptimizeRoute());
      routeOptions.getRouteDetails().setPoiRoute(ro.getRouteDetails().getPoiRoute());
      routeOptions.getRouteDetails().setRouteType(ro.getRouteDetails().getRouteType());

      if (ro.getRouteLine() != null) {
        routeOptions.setRouteLine(new RouteLine[ro.getRouteLine().length]);

        for (int x = 0; x < ro.getRouteLine().length; x++) {
          routeOptions.getRouteLine()[x] = new RouteLine();
          routeOptions.getRouteLine()[x].setRGB(ro.getRouteLine()[x].getRGB());
          routeOptions.getRouteLine()[x].setTransparency(ro.getRouteLine()[x].getTransparency());
          routeOptions.getRouteLine()[x].setWidth(ro.getRouteLine()[x].getWidth());
        }
      }

      routeOptions.setVehicle(new Vehicle());
      routeOptions.getVehicle().setAverageConsumption(ro.getVehicle().getAverageConsumption());
      routeOptions.getVehicle().setAverageSpeed(ro.getVehicle().getAverageSpeed());
      routeOptions.getVehicle().setFuelPrice(ro.getVehicle().getFuelPrice());
      routeOptions.getVehicle().setTankCapacity(ro.getVehicle().getTankCapacity());
      routeOptions.getVehicle().setTollFeeCat(ro.getVehicle().getTollFeeCat());

      CommonRoute r = new CommonRoute(_maquina, _server, _port, _output, _dns, _dataSource, _dataSourceMapa);
      rpi = r.getRouteWithMap(idLicenca, CommonRoute._getRouteWithMap, rs, routeOptions, mo);

      ri.setMapInfo(new MapInfo());
View Full Code Here

          List<RouteStop> rsList = new ArrayList<RouteStop>();

          for (int x = 0; x < routeStopFile.length; x++) {
            if (routeStopFile[x].toUpperCase().indexOf("POINT") >= 0) {
              RouteStop rsAux = new RouteStop();
              rsAux.setPoint(new Point());
              rsAux.getPoint().setX(
                  Double.parseDouble(routeStopFile[x]
                      .substring(routeStopFile[x].indexOf("'"),
                          routeStopFile[x].indexOf("y") - (routeStopFile[x].indexOf("'") + 2)).replace("'", "")
                      .replace("/", "").replace(">", "")));
              rsAux.getPoint().setY(
                  Double.parseDouble(routeStopFile[x].substring(routeStopFile[x].indexOf("y") + 3).replace("'", "")
                      .replace("/", "").replace(">", "")));
              rsList.add(rsAux);
            }
          }
View Full Code Here

        routeStopDependencyObjects[0] = cr.new ObjectsHelper();
        routeStopDependencyObjects[0].object = new Point();
        routeStopDependencyObjects[0].alias = "point";
       
        routeStopDependencyObjects[1] = cr.new ObjectsHelper();
        routeStopDependencyObjects[1].object = new RouteStop();
        routeStopDependencyObjects[1].alias = "RouteStop";
       
        routeStopDependencyObjects[2] = cr.new ObjectsHelper();
        routeStopDependencyObjects[2].object = new RouteStop[0];
        routeStopDependencyObjects[2].alias = "rs";
View Full Code Here

TOP

Related Classes of com.lbslocal.cc.objects.v3.route.RouteStop

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.