Exemple #1
0
        //##################################################
        //# static
        //##################################################//
        public static bool IsValid(String physicalTag)
        {
            if( ! IsProperLength(physicalTag) ) return false;

            VmS9TagParser o = new VmS9TagParser(physicalTag);
            return o.IsValid();
        }
Exemple #2
0
 public void ParseUpuS9Tag()
 {
     VmS9TagParser s9 = new VmS9TagParser(_value);
     Type = UPU;
     OriginCountryCode = s9.GetOriginCountryCode();
     OriginAirportCode = s9.GetOriginLocationCode();
     DestinationCountryCode = s9.GetDestinationCountryCode();
     DestinationAirportCode = s9.GetDestinationLocationCode();
     TransferLocation = DestinationAirportCode;
     String weightString = s9.GetWeight();
     Kilograms = (double)JwUtility.ParseFloat(weightString, 0) / 10;
 }
 //# __________ PROTOCOL :: PUBLIC __________ #//
 public VmLocationToDestinationMappingResult GetLocationByDispatchDestination(VmTag tag)
 {
     if( tag.IsUpu() )
     {
         VmS9TagParser s9 = new VmS9TagParser(tag.Value);
         return UpuDispatchDestinationMapping.GetMappedLocationCode(
             s9.GetDestinationCountryCode(),
             s9.GetDestinationLocationCode(),
             s9.GetDestinationOfficeOfExchangeQualifier());
     }
     else if( tag.IsJourneyId() )
     {
         VmJourneyIdParser journeyId = new VmJourneyIdParser(tag.Value);
         return UpuDispatchDestinationMapping.GetMappedLocationCode(
             null,
             journeyId.GetDestinationAirportCode(),
             null);
     }
     else if( tag.IsUsDomestic() )
     {
         String locationCode = (VmProperties.Default.ShouldUsePlannedRouteTransferAirportAsDestination() )
             ? tag.TransferLocation
             : tag.DestinationAirportCode;
         return new VmLocationToDestinationMappingResult(locationCode);
     }
     else
     {
         return new VmLocationToDestinationMappingResult(tag.DestinationAirportCode);
     }
 }