//################################################## //# static //##################################################// public static bool IsValid(String physicalTag) { if( ! IsProperLength(physicalTag) || ! HasProperQualifier(physicalTag) ) return false; VmJourneyIdParser o = new VmJourneyIdParser(physicalTag); return o.IsValid(); }
public void ParseJourneyId() { VmJourneyIdParser parser = new VmJourneyIdParser(_value); Type = JOURNEY_ID; OriginCountryCode = "??"; OriginAirportCode = UNKNOWN_LOCATION; DestinationCountryCode = "??"; DestinationAirportCode = parser.GetDestinationAirportCode(); TransferLocation = DestinationAirportCode; Kilograms = 0; }
//# __________ 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); } }