Exemple #1
0
        public void ParseDistributionAndRoutingTag()
        {
            VmDistributionAndRoutingTagParser dAndR = new VmDistributionAndRoutingTagParser(_value);

            VmPlannedRoute plannedRoute =
                VmAirportData.Default.AirportInputData.PlannedRoutes.GetPlannedRoute(
                    dAndR.GetDayOfMonth(),
                    dAndR.GetNationalRoutingIndex());

            String origin = UNKNOWN_LOCATION;
            String destination = UNKNOWN_LOCATION;
            String transfer = UNKNOWN_LOCATION;

            if( plannedRoute != null )
            {
                origin = plannedRoute.CarrierOriginAirportCode;
                destination = plannedRoute.CarrierDestinationAirportCode;
                transfer = plannedRoute.TransferAirportCode;
            }
            Type = US_DOMESTIC;
            OriginCountryCode = "US";
            OriginAirportCode = origin;
            DestinationCountryCode = "US";
            DestinationAirportCode = destination;
            TransferLocation = transfer;
            Kilograms = dAndR.GetKilograms();
            RequiresSpecialValidation = true;
            Value = _value.Substring(0,10);
        }
 public void MapRouteIndexNumberToTransferLocation(VmTag tag, String transferLocation)
 {
     VmDistributionAndRoutingTagParser dAndRParser = new VmDistributionAndRoutingTagParser(tag.Value);
     String routeIndexNumber = dAndRParser.GetNationalRoutingIndex();
     _routeIndexToDestinationMappings[routeIndexNumber] = transferLocation;
 }
        //# __________ PROTOCOL :: PUBLIC (PLANNED ROUTE CLOSE OUT) __________ #//
        public VmPlannedRouteCloseOut GetPlannedRouteCloseOut(VmTag tag)
        {
            if( ! tag.IsUsDomestic() ) return null;

            VmDistributionAndRoutingTagParser dAndR = new VmDistributionAndRoutingTagParser(tag.Value);
            return
                GetPlannedRouteCloseOut(
                    dAndR.GetDayOfMonth(),
                    dAndR.GetNationalRoutingIndex());
        }
 public String GetRouteIndexMapping(VmTag tag)
 {
     VmDistributionAndRoutingTagParser dAndRParser = new VmDistributionAndRoutingTagParser(tag.Value);
     String routeIndexNumber = dAndRParser.GetNationalRoutingIndex();
     return GetRouteIndexMapping(routeIndexNumber);
 }