public static bool IsValid(String physicalTag)
        {
            if( ! IsValidLength(physicalTag) ) return false;

            VmDistributionAndRoutingTagParser o = new VmDistributionAndRoutingTagParser(physicalTag);
            return o.IsValid();
        }
Example #2
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);
        }
Example #3
0
 public JwDate InferTagDate(VmTag tag)
 {
     VmDistributionAndRoutingTagParser dAndR = new VmDistributionAndRoutingTagParser(tag.Value);
     int dayOfMonthIndex = dAndR.GetDayOfMonth();
     return InferTagDate(dayOfMonthIndex);
 }
Example #4
0
        //# __________ 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 static bool IsConforming12CharacterDistributionAndRoutingTag(String physicalTag)
 {
     if( physicalTag.Length != 12 ) return false;
     VmDistributionAndRoutingTagParser o = new VmDistributionAndRoutingTagParser(physicalTag);
     return o.IsConforming();
 }
 public void MapRouteIndexNumberToTransferLocation(VmTag tag, String transferLocation)
 {
     VmDistributionAndRoutingTagParser dAndRParser = new VmDistributionAndRoutingTagParser(tag.Value);
     String routeIndexNumber = dAndRParser.GetNationalRoutingIndex();
     _routeIndexToDestinationMappings[routeIndexNumber] = transferLocation;
 }
 public String GetRouteIndexMapping(VmTag tag)
 {
     VmDistributionAndRoutingTagParser dAndRParser = new VmDistributionAndRoutingTagParser(tag.Value);
     String routeIndexNumber = dAndRParser.GetNationalRoutingIndex();
     return GetRouteIndexMapping(routeIndexNumber);
 }