From e023e674020f1a435f7b8c8b9276704f576ea6e5 Mon Sep 17 00:00:00 2001 From: CGantert345 <57003061+CGantert345@users.noreply.github.com> Date: Mon, 29 Mar 2021 14:08:45 +0200 Subject: structure change 1 --- .../ticket/api/asn/omv1/BerthDetailData.java | 78 ++ .../barcode/ticket/api/asn/omv1/BerthTypeType.java | 41 + .../api/asn/omv1/CarCarriageReservationData.java | 735 ++++++++++++++ .../ticket/api/asn/omv1/CardReferenceType.java | 183 ++++ .../barcode/ticket/api/asn/omv1/CodeTableType.java | 40 + .../api/asn/omv1/CompartmentDetailsType.java | 136 +++ .../ticket/api/asn/omv1/CompartmentGenderType.java | 42 + .../api/asn/omv1/CompartmentPositionType.java | 38 + .../ticket/api/asn/omv1/ConfirmationTypeType.java | 42 + .../barcode/ticket/api/asn/omv1/ControlData.java | 200 ++++ .../ticket/api/asn/omv1/CountermarkData.java | 574 +++++++++++ .../ticket/api/asn/omv1/CustomerCardData.java | 296 ++++++ .../ticket/api/asn/omv1/CustomerStatusType.java | 93 ++ .../ticket/api/asn/omv1/DelayConfirmation.java | 339 +++++++ .../ticket/api/asn/omv1/DeltaCoordinates.java | 58 ++ .../barcode/ticket/api/asn/omv1/DocumentData.java | 57 ++ .../barcode/ticket/api/asn/omv1/ExtensionData.java | 59 ++ .../barcode/ticket/api/asn/omv1/FIPTicketData.java | 347 +++++++ .../barcode/ticket/api/asn/omv1/GenderType.java | 42 + .../api/asn/omv1/GeoCoordinateSystemType.java | 38 + .../ticket/api/asn/omv1/GeoCoordinateType.java | 144 +++ .../barcode/ticket/api/asn/omv1/GeoUnitType.java | 40 + .../api/asn/omv1/HemisphereLatitudeType.java | 37 + .../api/asn/omv1/HemisphereLongitudeType.java | 36 + .../api/asn/omv1/IncludedOpenTicketType.java | 425 +++++++++ .../barcode/ticket/api/asn/omv1/IssuingData.java | 361 +++++++ .../uic/barcode/ticket/api/asn/omv1/LineType.java | 185 ++++ .../uic/barcode/ticket/api/asn/omv1/LinkMode.java | 39 + .../ticket/api/asn/omv1/LoadingDeckType.java | 38 + .../api/asn/omv1/LuggageRestrictionType.java | 88 ++ .../ticket/api/asn/omv1/OpenTicketData.java | 695 ++++++++++++++ .../ticket/api/asn/omv1/ParkingGroundData.java | 364 +++++++ .../uic/barcode/ticket/api/asn/omv1/PassData.java | 1005 ++++++++++++++++++++ .../barcode/ticket/api/asn/omv1/PassengerType.java | 46 + .../barcode/ticket/api/asn/omv1/PlacesType.java | 131 +++ .../barcode/ticket/api/asn/omv1/PolygoneType.java | 58 ++ .../barcode/ticket/api/asn/omv1/PriceTypeType.java | 39 + .../ticket/api/asn/omv1/RegionalValidityType.java | 100 ++ .../ticket/api/asn/omv1/RegisteredLuggageType.java | 80 ++ .../ticket/api/asn/omv1/ReservationData.java | 711 ++++++++++++++ .../api/asn/omv1/ReturnRouteDescriptionType.java | 150 +++ .../barcode/ticket/api/asn/omv1/RoofRackType.java | 46 + .../ticket/api/asn/omv1/RouteSectionType.java | 136 +++ .../api/asn/omv1/SequenceOfActivatedDays.java | 26 + .../api/asn/omv1/SequenceOfBerthDetailData.java | 10 + .../api/asn/omv1/SequenceOfCardReferenceType.java | 10 + .../ticket/api/asn/omv1/SequenceOfCarrierIA5.java | 13 + .../ticket/api/asn/omv1/SequenceOfCarrierNum.java | 28 + .../ticket/api/asn/omv1/SequenceOfCountries.java | 27 + .../api/asn/omv1/SequenceOfCustomerStatusType.java | 11 + .../api/asn/omv1/SequenceOfDeltaCoordinates.java | 10 + .../api/asn/omv1/SequenceOfDocumentData.java | 10 + .../api/asn/omv1/SequenceOfExtensionData.java | 10 + .../asn/omv1/SequenceOfIncludedOpenTicketType.java | 10 + .../ticket/api/asn/omv1/SequenceOfPlaceNum.java | 28 + .../asn/omv1/SequenceOfRegionalValidityType.java | 10 + .../asn/omv1/SequenceOfRegisteredLuggageType.java | 10 + .../api/asn/omv1/SequenceOfServiceBrands.java | 26 + .../ticket/api/asn/omv1/SequenceOfTariffType.java | 10 + .../api/asn/omv1/SequenceOfTicketLinkType.java | 10 + .../ticket/api/asn/omv1/SequenceOfTravelerId.java | 26 + .../api/asn/omv1/SequenceOfTravelerType.java | 10 + .../ticket/api/asn/omv1/SequenceOfVatDetail.java | 10 + .../api/asn/omv1/SequenceOfViaStationType.java | 10 + .../ticket/api/asn/omv1/SeriesDetailType.java | 75 ++ .../barcode/ticket/api/asn/omv1/ServiceType.java | 38 + .../ticket/api/asn/omv1/StationPassageData.java | 387 ++++++++ .../barcode/ticket/api/asn/omv1/TariffType.java | 207 ++++ .../ticket/api/asn/omv1/TicketDetailData.java | 190 ++++ .../ticket/api/asn/omv1/TicketLinkType.java | 156 +++ .../barcode/ticket/api/asn/omv1/TicketType.java | 41 + .../barcode/ticket/api/asn/omv1/TimeRangeType.java | 59 ++ .../uic/barcode/ticket/api/asn/omv1/TokenType.java | 92 ++ .../barcode/ticket/api/asn/omv1/TrainLinkType.java | 185 ++++ .../ticket/api/asn/omv1/TravelClassType.java | 45 + .../barcode/ticket/api/asn/omv1/TravelerData.java | 83 ++ .../barcode/ticket/api/asn/omv1/TravelerType.java | 322 +++++++ .../ticket/api/asn/omv1/UicRailTicketData.java | 115 +++ .../api/asn/omv1/ValidityPeriodDetailType.java | 73 ++ .../ticket/api/asn/omv1/ValidityPeriodType.java | 165 ++++ .../barcode/ticket/api/asn/omv1/VatDetailType.java | 87 ++ .../ticket/api/asn/omv1/ViaStationType.java | 181 ++++ .../barcode/ticket/api/asn/omv1/VoucherData.java | 316 ++++++ .../uic/barcode/ticket/api/asn/omv1/ZoneType.java | 182 ++++ .../ticket/api/asn/omv2/BerthDetailData.java | 79 ++ .../barcode/ticket/api/asn/omv2/BerthTypeType.java | 41 + .../api/asn/omv2/CarCarriageReservationData.java | 734 ++++++++++++++ .../ticket/api/asn/omv2/CardReferenceType.java | 182 ++++ .../barcode/ticket/api/asn/omv2/CodeTableType.java | 40 + .../api/asn/omv2/CompartmentDetailsType.java | 136 +++ .../ticket/api/asn/omv2/CompartmentGenderType.java | 42 + .../api/asn/omv2/CompartmentPositionType.java | 38 + .../ticket/api/asn/omv2/ConfirmationTypeType.java | 42 + .../barcode/ticket/api/asn/omv2/ControlData.java | 200 ++++ .../ticket/api/asn/omv2/CountermarkData.java | 578 +++++++++++ .../ticket/api/asn/omv2/CustomerCardData.java | 297 ++++++ .../ticket/api/asn/omv2/CustomerStatusType.java | 93 ++ .../ticket/api/asn/omv2/DelayConfirmation.java | 339 +++++++ .../ticket/api/asn/omv2/DeltaCoordinates.java | 58 ++ .../barcode/ticket/api/asn/omv2/DocumentData.java | 61 ++ .../barcode/ticket/api/asn/omv2/ExtensionData.java | 64 ++ .../barcode/ticket/api/asn/omv2/FIPTicketData.java | 338 +++++++ .../barcode/ticket/api/asn/omv2/GenderType.java | 42 + .../api/asn/omv2/GeoCoordinateSystemType.java | 38 + .../ticket/api/asn/omv2/GeoCoordinateType.java | 144 +++ .../barcode/ticket/api/asn/omv2/GeoUnitType.java | 40 + .../api/asn/omv2/HemisphereLatitudeType.java | 37 + .../api/asn/omv2/HemisphereLongitudeType.java | 36 + .../api/asn/omv2/IncludedOpenTicketType.java | 449 +++++++++ .../barcode/ticket/api/asn/omv2/IssuingData.java | 360 +++++++ .../uic/barcode/ticket/api/asn/omv2/LineType.java | 185 ++++ .../uic/barcode/ticket/api/asn/omv2/LinkMode.java | 39 + .../ticket/api/asn/omv2/LoadingDeckType.java | 38 + .../api/asn/omv2/LuggageRestrictionType.java | 88 ++ .../ticket/api/asn/omv2/OpenTicketData.java | 678 +++++++++++++ .../ticket/api/asn/omv2/ParkingGroundData.java | 364 +++++++ .../uic/barcode/ticket/api/asn/omv2/PassData.java | 594 ++++++++++++ .../barcode/ticket/api/asn/omv2/PassengerType.java | 46 + .../barcode/ticket/api/asn/omv2/PlacesType.java | 131 +++ .../barcode/ticket/api/asn/omv2/PolygoneType.java | 58 ++ .../barcode/ticket/api/asn/omv2/PriceTypeType.java | 39 + .../ticket/api/asn/omv2/RegionalValidityType.java | 100 ++ .../ticket/api/asn/omv2/RegisteredLuggageType.java | 80 ++ .../ticket/api/asn/omv2/ReservationData.java | 711 ++++++++++++++ .../api/asn/omv2/ReturnRouteDescriptionType.java | 150 +++ .../barcode/ticket/api/asn/omv2/RoofRackType.java | 46 + .../ticket/api/asn/omv2/RouteSectionType.java | 136 +++ .../api/asn/omv2/SequenceOfActivatedDays.java | 26 + .../api/asn/omv2/SequenceOfBerthDetailData.java | 10 + .../api/asn/omv2/SequenceOfCardReferenceType.java | 10 + .../ticket/api/asn/omv2/SequenceOfCarrierIA5.java | 13 + .../ticket/api/asn/omv2/SequenceOfCarrierNum.java | 28 + .../ticket/api/asn/omv2/SequenceOfCountries.java | 27 + .../api/asn/omv2/SequenceOfCustomerStatusType.java | 11 + .../api/asn/omv2/SequenceOfDeltaCoordinates.java | 10 + .../api/asn/omv2/SequenceOfDocumentData.java | 10 + .../api/asn/omv2/SequenceOfExtensionData.java | 10 + .../asn/omv2/SequenceOfIncludedOpenTicketType.java | 10 + .../ticket/api/asn/omv2/SequenceOfPlaceNum.java | 28 + .../asn/omv2/SequenceOfRegionalValidityType.java | 10 + .../asn/omv2/SequenceOfRegisteredLuggageType.java | 10 + .../api/asn/omv2/SequenceOfServiceBrands.java | 26 + .../ticket/api/asn/omv2/SequenceOfTariffType.java | 10 + .../api/asn/omv2/SequenceOfTicketLinkType.java | 10 + .../api/asn/omv2/SequenceOfTransportTypes.java | 26 + .../ticket/api/asn/omv2/SequenceOfTravelerId.java | 26 + .../api/asn/omv2/SequenceOfTravelerType.java | 10 + .../ticket/api/asn/omv2/SequenceOfVatDetail.java | 10 + .../api/asn/omv2/SequenceOfViaStationType.java | 10 + .../ticket/api/asn/omv2/SeriesDetailType.java | 75 ++ .../barcode/ticket/api/asn/omv2/ServiceType.java | 38 + .../ticket/api/asn/omv2/StationPassageData.java | 387 ++++++++ .../barcode/ticket/api/asn/omv2/TariffType.java | 206 ++++ .../ticket/api/asn/omv2/TicketDetailData.java | 190 ++++ .../ticket/api/asn/omv2/TicketLinkType.java | 156 +++ .../barcode/ticket/api/asn/omv2/TicketType.java | 41 + .../barcode/ticket/api/asn/omv2/TimeRangeType.java | 59 ++ .../uic/barcode/ticket/api/asn/omv2/TokenType.java | 92 ++ .../barcode/ticket/api/asn/omv2/TrainLinkType.java | 185 ++++ .../ticket/api/asn/omv2/TravelClassType.java | 50 + .../barcode/ticket/api/asn/omv2/TravelerData.java | 82 ++ .../barcode/ticket/api/asn/omv2/TravelerType.java | 322 +++++++ .../ticket/api/asn/omv2/UicRailTicketData.java | 115 +++ .../api/asn/omv2/ValidityPeriodDetailType.java | 73 ++ .../ticket/api/asn/omv2/ValidityPeriodType.java | 165 ++++ .../barcode/ticket/api/asn/omv2/VatDetailType.java | 87 ++ .../ticket/api/asn/omv2/ViaStationType.java | 181 ++++ .../barcode/ticket/api/asn/omv2/VoucherData.java | 316 ++++++ .../uic/barcode/ticket/api/asn/omv2/ZoneType.java | 182 ++++ .../org/uic/barcode/ticket/api/asn/package.html | 7 + 170 files changed, 23047 insertions(+) create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/BerthDetailData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/BerthTypeType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/CarCarriageReservationData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/CardReferenceType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/CodeTableType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/CompartmentDetailsType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/CompartmentGenderType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/CompartmentPositionType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/ConfirmationTypeType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/ControlData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/CountermarkData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/CustomerCardData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/CustomerStatusType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/DelayConfirmation.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/DeltaCoordinates.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/DocumentData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/ExtensionData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/FIPTicketData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/GenderType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/GeoCoordinateSystemType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/GeoCoordinateType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/GeoUnitType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/HemisphereLatitudeType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/HemisphereLongitudeType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/IncludedOpenTicketType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/IssuingData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/LineType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/LinkMode.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/LoadingDeckType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/LuggageRestrictionType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/OpenTicketData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/ParkingGroundData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/PassData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/PassengerType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/PlacesType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/PolygoneType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/PriceTypeType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/RegionalValidityType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/RegisteredLuggageType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/ReservationData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/ReturnRouteDescriptionType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/RoofRackType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/RouteSectionType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfActivatedDays.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfBerthDetailData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCardReferenceType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCarrierIA5.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCarrierNum.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCountries.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCustomerStatusType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfDeltaCoordinates.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfDocumentData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfExtensionData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfIncludedOpenTicketType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfPlaceNum.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfRegionalValidityType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfRegisteredLuggageType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfServiceBrands.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfTariffType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfTicketLinkType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfTravelerId.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfTravelerType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfVatDetail.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfViaStationType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/SeriesDetailType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/ServiceType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/StationPassageData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/TariffType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/TicketDetailData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/TicketLinkType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/TicketType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/TimeRangeType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/TokenType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/TrainLinkType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/TravelClassType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/TravelerData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/TravelerType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/UicRailTicketData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/ValidityPeriodDetailType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/ValidityPeriodType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/VatDetailType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/ViaStationType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/VoucherData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv1/ZoneType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/BerthDetailData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/BerthTypeType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/CarCarriageReservationData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/CardReferenceType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/CodeTableType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/CompartmentDetailsType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/CompartmentGenderType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/CompartmentPositionType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/ConfirmationTypeType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/ControlData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/CountermarkData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/CustomerCardData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/CustomerStatusType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/DelayConfirmation.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/DeltaCoordinates.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/DocumentData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/ExtensionData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/FIPTicketData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/GenderType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/GeoCoordinateSystemType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/GeoCoordinateType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/GeoUnitType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/HemisphereLatitudeType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/HemisphereLongitudeType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/IncludedOpenTicketType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/IssuingData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/LineType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/LinkMode.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/LoadingDeckType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/LuggageRestrictionType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/OpenTicketData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/ParkingGroundData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/PassData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/PassengerType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/PlacesType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/PolygoneType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/PriceTypeType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/RegionalValidityType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/RegisteredLuggageType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/ReservationData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/ReturnRouteDescriptionType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/RoofRackType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/RouteSectionType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfActivatedDays.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfBerthDetailData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfCardReferenceType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfCarrierIA5.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfCarrierNum.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfCountries.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfCustomerStatusType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfDeltaCoordinates.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfDocumentData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfExtensionData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfIncludedOpenTicketType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfPlaceNum.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfRegionalValidityType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfRegisteredLuggageType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfServiceBrands.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfTariffType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfTicketLinkType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfTransportTypes.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfTravelerId.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfTravelerType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfVatDetail.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfViaStationType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/SeriesDetailType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/ServiceType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/StationPassageData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/TariffType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/TicketDetailData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/TicketLinkType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/TicketType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/TimeRangeType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/TokenType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/TrainLinkType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/TravelClassType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/TravelerData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/TravelerType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/UicRailTicketData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/ValidityPeriodDetailType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/ValidityPeriodType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/VatDetailType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/ViaStationType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/VoucherData.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/omv2/ZoneType.java create mode 100644 src/main/java/org/uic/barcode/ticket/api/asn/package.html (limited to 'src/main/java/org/uic/barcode/ticket/api/asn') diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/BerthDetailData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/BerthDetailData.java new file mode 100644 index 0000000..94feb61 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/BerthDetailData.java @@ -0,0 +1,78 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.Sequence; + + +@Sequence +@HasExtensionMarker +public class BerthDetailData extends Object { + public BerthDetailData() {} + + @FieldOrder(order = 0) + public BerthTypeType berthType; + + @FieldOrder(order = 1) + @IntRange(minValue=1, maxValue=999) + public Long numberOfBerths; + + @FieldOrder(order = 2) + @Asn1Default(value="family") + @Asn1Optional public CompartmentGenderType gender; + + + public BerthTypeType getBerthType() { + return this.berthType; + } + + public Long getNumberOfBerths() { + return this.numberOfBerths; + } + + public CompartmentGenderType getGender() { + + if (gender == null){ + return CompartmentGenderType.family; + } else { + return this.gender; + } + } + + public void setBerthType(BerthTypeType berthType) { + + this.berthType = berthType; + } + + public void setNumberOfBerths(Long numberOfBerths) { + this.numberOfBerths = numberOfBerths; + } + + public void setGender(CompartmentGenderType gender) { + this.gender = gender; + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/BerthTypeType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/BerthTypeType.java new file mode 100644 index 0000000..14470a6 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/BerthTypeType.java @@ -0,0 +1,41 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +public enum BerthTypeType { + single("single"), + special("special"), + double_("double_"), + t2("t2"), + t3("t3"), + t4("t4"); + + + public String text; + + BerthTypeType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CarCarriageReservationData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CarCarriageReservationData.java new file mode 100644 index 0000000..1eb0533 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CarCarriageReservationData.java @@ -0,0 +1,735 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Calendar; +import java.util.Date; +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.asn1.datatypesimpl.SequenceOfStringIA5; +import org.uic.barcode.ticket.api.asn.omv1.SequenceOfCarrierNum; +import org.uic.barcode.ticket.api.utils.DateTimeUtils; + + + +@Sequence +@HasExtensionMarker +public class CarCarriageReservationData extends Object { + public CarCarriageReservationData() { + } + + @FieldOrder(order = 0) + @Asn1Optional public Asn1BigInteger trainNum; + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String trainIA5; + + @FieldOrder(order = 2) + @IntRange(minValue=-1,maxValue=370) + @Asn1Default(value="0") + @Asn1Optional public Long beginLoadingDate; + + @FieldOrder(order = 3) + @IntRange(minValue=0,maxValue=1440) + @Asn1Optional public Long beginLoadingTime; + + @FieldOrder(order = 4) + @IntRange(minValue=0,maxValue=1440) + @Asn1Optional public Long endLoadingTime; + + @FieldOrder(order = 5) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long loadingUTCOffset; + + @FieldOrder(order = 6) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String referenceIA5; + + @FieldOrder(order = 7) + @Asn1Optional public Asn1BigInteger referenceNum; + + @FieldOrder(order = 8) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long productOwnerNum; + + @FieldOrder(order = 9) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productOwnerIA5; + + @FieldOrder(order = 10) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long productIdNum; + + @FieldOrder(order = 11) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productIdIA5; + + @FieldOrder(order = 12) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long serviceBrand; + + @FieldOrder(order = 13) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String serviceBrandAbrUTF8; + + @FieldOrder(order = 14) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String serviceBrandNameUTF8; + + @FieldOrder(order = 15) + @Asn1Default("stationUICReservation") + @Asn1Optional public CodeTableType stationCodeTable; + + @FieldOrder(order = 16) + @IntRange(minValue=1,maxValue=9999999) + @Asn1Optional public Long fromStationNum; + + @FieldOrder(order = 17) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String fromStationIA5; + + @FieldOrder(order = 18) + @IntRange(minValue=1,maxValue=9999999) + @Asn1Optional public Long toStationNum; + + @FieldOrder(order = 19) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String toStationIA5; + + @FieldOrder(order = 20) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String fromStationNameUTF8; + + @FieldOrder(order = 21) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String toStationNameUTF8; + + @FieldOrder(order = 22) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String coach; + + @FieldOrder(order = 23) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String place; + + @FieldOrder(order = 24) + @Asn1Optional public CompartmentDetailsType compartmentDetails; + + @FieldOrder(order = 25) + @RestrictedString(CharacterRestriction.IA5String) + public String numberPlate; + + @FieldOrder(order = 26) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String trailerPlate; + + @FieldOrder(order = 27) + @IntRange(minValue=0,maxValue=9) + public Long carCategory; + + @FieldOrder(order = 28) + @IntRange(minValue=0,maxValue=6) + @Asn1Optional public Long boatCategory; + + @FieldOrder(order = 29) + public Boolean textileRoof = false; + + @FieldOrder(order = 30) + @Asn1Default(value ="norack") + @Asn1Optional public RoofRackType roofRackType; + + @FieldOrder(order = 31) + @IntRange(minValue=0,maxValue=99) + @Asn1Optional public Long roofRackHeight; + + @FieldOrder(order = 32) + @IntRange(minValue=0,maxValue=2) + @Asn1Optional public Long attachedBoats; + + @FieldOrder(order = 33) + @IntRange(minValue=0,maxValue=4) + @Asn1Optional public Long attachedBicycles; + + @FieldOrder(order = 34) + @IntRange(minValue=0,maxValue=5) + @Asn1Optional public Long attachedSurfboards; + + @FieldOrder(order = 35) + @IntRange(minValue=0,maxValue=999) + @Asn1Optional public Long loadingListEntry; + + @FieldOrder(order = 36) + @Asn1Default(value="upper") + @Asn1Optional public LoadingDeckType loadingDeck; + + @FieldOrder(order = 37) + @Asn1Optional public SequenceOfCarrierNum carrierNum; + + @FieldOrder(order = 38) + @Asn1Optional public SequenceOfStringIA5 carrierIA5; + + @FieldOrder(order = 39) + public TariffType tariff; + + @FieldOrder(order = 40) + @Asn1Default(value="travelPrice") + @Asn1Optional public PriceTypeType priceType; + + @FieldOrder(order = 41) + @Asn1Optional Asn1BigInteger price; + + @FieldOrder(order = 42) + @Asn1Optional SequenceOfVatDetail vatDetails; + + @FieldOrder(order = 43) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String infoText; + + @FieldOrder(order = 44) + @Asn1Optional public ExtensionData extension; + + public Long getTrainNum() { + if (this.trainNum == null) return null; + return Asn1BigInteger.toLong(this.trainNum); + } + + public String getTrainIA5() { + + return this.trainIA5; + } + + public Long getBeginLoadingDate() { + + return this.beginLoadingDate; + } + + public Long getBeginLoadingTime() { + + if (beginLoadingTime == null) return new Long(0); + return beginLoadingTime; + } + + public Long getEndLoadingTime() { + + return this.endLoadingTime; + } + + public String getReferenceIA5() { + + return this.referenceIA5; + } + + public Long getReferenceNum() { + return Asn1BigInteger.toLong(this.referenceNum); + } + + public Long getProductOwnerNum() { + + return this.productOwnerNum; + } + + public String getProductOwnerIA5() { + + return this.productOwnerIA5; + } + + public Long getProductIdNum() { + + return this.productIdNum; + } + + public String getProductIdIA5() { + + return this.productIdIA5; + } + + public Long getServiceBrand() { + + return this.serviceBrand; + } + + public String getServiceBrandAbrUTF8() { + + return this.serviceBrandAbrUTF8; + } + + public String getServiceBrandNameUTF8() { + + return this.serviceBrandNameUTF8; + } + + public CodeTableType getStationCodeTable() { + + if (stationCodeTable == null) { + return CodeTableType.stationUICReservation; + } + + return this.stationCodeTable; + } + + public Long getFromStationNum() { + + return this.fromStationNum; + } + + public String getFromStationIA5() { + + return this.fromStationIA5; + } + + public Long getToStationNum() { + + return this.toStationNum; + } + + public String getToStationIA5() { + + return this.toStationIA5; + } + + public String getFromStationNameUTF8() { + + return this.fromStationNameUTF8; + } + + public String getToStationNameUTF8() { + + return this.toStationNameUTF8; + } + + public String getCoach() { + + return this.coach; + } + + public String getPlace() { + + return this.place; + } + + public CompartmentDetailsType getCompartmentDetails() { + + return this.compartmentDetails; + } + + public String getNumberPlate() { + + return this.numberPlate; + } + + public String getTrailerPlate() { + + return this.trailerPlate; + } + + public Long getCarCategory() { + + return this.carCategory; + } + + public Long getBoatCategory() { + + return this.boatCategory; + } + + public Boolean getTextileRoof() { + + return this.textileRoof; + } + + public RoofRackType getRoofRackType() { + + if (this.roofRackType == null) return RoofRackType.norack; + return this.roofRackType; + } + + public Long getRoofRackHeight() { + + return this.roofRackHeight; + } + + public Long getAttachedBoats() { + + return this.attachedBoats; + } + + public Long getAttachedBicycles() { + + return this.attachedBicycles; + } + + public Long getAttachedSurfboards() { + + return this.attachedSurfboards; + } + + public Long getLoadingListEntry() { + + return this.loadingListEntry; + } + + public LoadingDeckType getLoadingDeck() { + + if (this.loadingDeck == null) return LoadingDeckType.upper; + return this.loadingDeck; + } + + public SequenceOfCarrierNum getCarrierNum() { + + return this.carrierNum; + } + + public SequenceOfStringIA5 getCarrierIA5() { + + return this.carrierIA5; + } + + public TariffType getTariff() { + + return this.tariff; + } + + public PriceTypeType getPriceType() { + if (this.priceType == null) return PriceTypeType.travelPrice; + return this.priceType; + } + + public String getInfoText() { + + return this.infoText; + } + + public ExtensionData getExtension() { + + return this.extension; + } + + public void setTrainNum(Long trainNum) { + + this.trainNum = new Asn1BigInteger(trainNum); + } + + public void setTrainIA5(String trainIA5) { + + this.trainIA5 = trainIA5; + } + + public void setBeginLoadingDate(Long beginLoadingDate) { + + this.beginLoadingDate = beginLoadingDate; + } + + public void setBeginLoadingTime(Long beginLoadingTime) { + + this.beginLoadingTime = beginLoadingTime; + } + + public void setEndLoadingTime(Long endLoadingTime) { + this.endLoadingTime = endLoadingTime; + } + + public void setReferenceIA5(String referenceIA5) { + + this.referenceIA5 = referenceIA5; + } + + public void setReferenceNum(Long referenceNum) { + + this.referenceNum = Asn1BigInteger.toAsn1(referenceNum); + } + + public void setProductOwnerNum(Long productOwnerNum) { + + this.productOwnerNum = productOwnerNum; + } + + public void setProductOwnerIA5(String productOwnerIA5) { + + this.productOwnerIA5 = productOwnerIA5; + } + + public void setProductIdNum(Long productIdNum) { + + this.productIdNum = productIdNum; + } + + public void setProductIdIA5(String productIdIA5) { + + this.productIdIA5 = productIdIA5; + } + + public void setServiceBrand(Long serviceBrand) { + + this.serviceBrand = serviceBrand; + } + + public void setServiceBrandAbrUTF8(String serviceBrandAbrUTF8) { + + this.serviceBrandAbrUTF8 = serviceBrandAbrUTF8; + } + + public void setServiceBrandNameUTF8(String serviceBrandNameUTF8) { + + this.serviceBrandNameUTF8 = serviceBrandNameUTF8; + } + + public void setStationCodeTable(CodeTableType stationCodeTable) { + + this.stationCodeTable = stationCodeTable; + } + + public void setFromStationNum(Long fromStationNum) { + + this.fromStationNum = fromStationNum; + } + + public void setFromStationIA5(String fromStationIA5) { + + this.fromStationIA5 = fromStationIA5; + } + + public void setToStationNum(Long toStationNum) { + + this.toStationNum = toStationNum; + } + + public void setToStationIA5(String toStationIA5) { + + this.toStationIA5 = toStationIA5; + } + + public void setFromStationNameUTF8(String fromStationNameUTF8) { + + this.fromStationNameUTF8 = fromStationNameUTF8; + } + + public void setToStationNameUTF8(String toStationNameUTF8) { + + this.toStationNameUTF8 = toStationNameUTF8; + } + + public void setCoach(String coach) { + + this.coach = coach; + } + + public void setPlace(String place) { + + this.place = place; + } + + public void setCompartmentDetails(CompartmentDetailsType compartmentDetails) { + + this.compartmentDetails = compartmentDetails; + } + + public void setNumberPlate(String numberPlate) { + + this.numberPlate = numberPlate; + } + + public void setTrailerPlate(String trailerPlate) { + + this.trailerPlate = trailerPlate; + } + + public void setCarCategory(Long carCategory) { + + this.carCategory = carCategory; + } + + public void setBoatCategory(Long boatCategory) { + + this.boatCategory = boatCategory; + } + + public void setTextileRoof(Boolean textileRoof) { + + this.textileRoof = textileRoof; + } + + public void setRoofRackType(RoofRackType roofRackType) { + + this.roofRackType = roofRackType; + } + + public void setRoofRackHeight(Long roofRackHeight) { + + this.roofRackHeight = roofRackHeight; + } + + public void setAttachedBoats(Long attachedBoats) { + + this.attachedBoats = attachedBoats; + } + + public void setAttachedBicycles(Long attachedBicycles) { + + this.attachedBicycles = attachedBicycles; + } + + public void setAttachedSurfboards(Long attachedSurfboards) { + + this.attachedSurfboards = attachedSurfboards; + } + + public void setLoadingListEntry(Long loadingListEntry) { + + this.loadingListEntry = loadingListEntry; + } + + public void setLoadingDeck(LoadingDeckType loadingDeck) { + + this.loadingDeck = loadingDeck; + } + + public void setCarrierNum(SequenceOfCarrierNum carrierNum) { + + this.carrierNum = carrierNum; + } + + public void setCarrierNum(List longs) { + if (longs == null || longs.isEmpty()) return; + this.carrierNum = new SequenceOfCarrierNum(longs); + } + + + public void setCarrierIA5(SequenceOfStringIA5 carrierIA5) { + + this.carrierIA5 = carrierIA5; + } + + public void setTariff(TariffType tariff) { + + this.tariff = tariff; + } + + public void setPriceType(PriceTypeType priceType) { + + this.priceType = priceType; + } + + public void setInfoText(String infoText) { + + this.infoText = infoText; + } + + public void setExtension(ExtensionData extension) { + + this.extension = extension; + } + + public Long getPrice() { + return Asn1BigInteger.toLong(price); + } + + public void setPrice(Long price) { + this.price = Asn1BigInteger.toAsn1(price); + } + + public SequenceOfVatDetail getVatDetails() { + return vatDetails; + } + + public void setVatDetails(SequenceOfVatDetail vatDetails) { + this.vatDetails = vatDetails; + } + + public void addVatDetail(VatDetailType vatDetail) { + if (this.vatDetails == null) { + this.vatDetails = new SequenceOfVatDetail(); + } + this.vatDetails.add(vatDetail); + } + + public void setLoadingDates (Date beginLoading, Date endLoading, Date issuingDate){ + + if (issuingDate == null || beginLoading == null) return; + + this.beginLoadingDate = DateTimeUtils.getDateDifference(issuingDate,beginLoading); + this.beginLoadingTime = DateTimeUtils.getTime(beginLoading); + + if (endLoading != null) { + this.endLoadingTime = DateTimeUtils.getTime(endLoading); + } + } + + public Date getBeginLoadingDate(Date issuingDate){ + + if (issuingDate == null) return null; + + if (this.beginLoadingDate == null) { + this.beginLoadingDate = 0L; + } + + return DateTimeUtils.getDate(issuingDate, this.beginLoadingDate, this.beginLoadingTime); + + } + + public Date getEndLoadingDate(Date issuingDate){ + + if (issuingDate == null) return null; + + if (this.beginLoadingDate == null) { + this.beginLoadingDate = 0L; + } + + if (this.endLoadingTime == null) { + return null; + } + + Date begin = DateTimeUtils.getDate(issuingDate, this.beginLoadingDate, this.beginLoadingTime); + Date end = DateTimeUtils.getDate(issuingDate, this.beginLoadingDate, this.endLoadingTime); + + //max one day difference assumed + if (end.before(begin)) { + Calendar cal = Calendar.getInstance(); + cal.clear(); + cal.setTime(end); + cal.add(Calendar.DAY_OF_YEAR,1); + return cal.getTime(); + } else { + return end; + } + + } + + public Long getLoadingUTCOffset() { + return loadingUTCOffset; + } + + public void setLoadingUTCOffset(Long loadingUTCOffset) { + this.loadingUTCOffset = loadingUTCOffset; + } + + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CardReferenceType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CardReferenceType.java new file mode 100644 index 0000000..a5a327c --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CardReferenceType.java @@ -0,0 +1,183 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.math.BigInteger; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; + + +@Sequence +@HasExtensionMarker +public class CardReferenceType extends Object { + public CardReferenceType() { + } + + @FieldOrder(order = 0) + @Asn1Optional public Asn1BigInteger cardIssuerNum; + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String cardIssuerIA5; + + @FieldOrder(order = 2) + @Asn1Optional public Asn1BigInteger cardIdNum; + + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String cardIdIA5; + + @FieldOrder(order = 4) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String cardName; + + @FieldOrder(order = 5) + @Asn1Optional public Asn1BigInteger cardType; + + @FieldOrder(order = 6) + @Asn1Optional public Asn1BigInteger leadingCardIdNum; + + @FieldOrder(order = 7) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String leadingCardIdIA5; + + @FieldOrder(order = 8) + @Asn1Optional public Asn1BigInteger trailingCardIdNum; + + @FieldOrder(order = 9) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String trailingCardIdIA5; + + + public Asn1BigInteger getCardIssuerNum() { + + return this.cardIssuerNum; + } + + public String getCardIssuerIA5() { + + return this.cardIssuerIA5; + } + + public Asn1BigInteger getCardIdNum() { + + return this.cardIdNum; + } + + public String getCardIdIA5() { + + return this.cardIdIA5; + } + + public String getCardName() { + + return this.cardName; + } + + public Asn1BigInteger getCardType() { + return this.cardType; + } + + public BigInteger getLeadingCardIdNum() { + if (leadingCardIdNum != null) { + return leadingCardIdNum.toBigInteger(); + } + return null; + } + + public String getLeadingCardIdIA5() { + + return this.leadingCardIdIA5; + } + + public Long getTrailingCardIdNum() { + + return Asn1BigInteger.toLong(this.trailingCardIdNum); + } + + public String getTrailingCardIdIA5() { + + return this.trailingCardIdIA5; + } + + public void setCardIssuerNum(Long cardIssuerNum) { + + this.cardIssuerNum = Asn1BigInteger.toAsn1(cardIssuerNum); + } + + public void setCardIssuerIA5(String cardIssuerIA5) { + + this.cardIssuerIA5 = cardIssuerIA5; + } + + public void setCardIdNum(Asn1BigInteger asn1BigInteger) { + + this.cardIdNum = asn1BigInteger; + } + + public void setCardIdNum(Long cardIdNum) { + + this.cardIdNum = new Asn1BigInteger(cardIdNum); + } + + public void setCardIdIA5(String cardIdIA5) { + + this.cardIdIA5 = cardIdIA5; + } + + public void setCardName(String cardName) { + + this.cardName = cardName; + } + + public void setCardType(Long cardType) { + + this.cardType = Asn1BigInteger.toAsn1(cardType); + } + + public void setLeadingCardIdNum(Long leadingCardIdNum) { + + this.leadingCardIdNum = Asn1BigInteger.toAsn1(leadingCardIdNum); + } + + public void setLeadingCardIdIA5(String leadingCardIdIA5) { + + this.leadingCardIdIA5 = leadingCardIdIA5; + } + + public void setTrailingCardIdNum(Long trailingCardIdNum) { + + this.trailingCardIdNum = Asn1BigInteger.toAsn1(trailingCardIdNum); + } + + public void setTrailingCardIdIA5(String trailingCardIdIA5) { + + this.trailingCardIdIA5 = trailingCardIdIA5; + } + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CodeTableType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CodeTableType.java new file mode 100644 index 0000000..61f7a75 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CodeTableType.java @@ -0,0 +1,40 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + + +public enum CodeTableType { + stationUIC("stationUIC"), + stationUICReservation("stationUICReservation"), + stationERA("stationERA"), + localCarrierStationCodeTable("localCarrierStationCodeTable"), + proprietaryIssuerStationCodeTable("proprietaryIssuerStationCodeTable"); + + public String text; + + CodeTableType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CompartmentDetailsType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CompartmentDetailsType.java new file mode 100644 index 0000000..cdec42b --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CompartmentDetailsType.java @@ -0,0 +1,136 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; + + +@Sequence +@HasExtensionMarker +public class CompartmentDetailsType extends Object { + public CompartmentDetailsType() { + } + + @FieldOrder(order = 0) + @IntRange(minValue=1,maxValue=99) + @Asn1Optional public Long coachType; + + @FieldOrder(order = 1) + @IntRange(minValue=1,maxValue=99) + @Asn1Optional public Long compartmentType; + + @FieldOrder(order = 2) + @IntRange(minValue=1,maxValue=99) + @Asn1Optional public Long specialAllocation; + + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String coachTypeDescr; + + @FieldOrder(order = 4) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String compartmentTypeDescr; + + @FieldOrder(order = 5) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String specialAllocationDescr; + + @FieldOrder(order = 6) + @Asn1Default(value="unspecified") + public CompartmentPositionType position; + + public Long getCoachType() { + + return this.coachType; + } + + public Long getCompartmentType() { + + return this.compartmentType; + } + + public Long getSpecialAllocation() { + + return this.specialAllocation; + } + + public String getCoachTypeDescr() { + + return this.coachTypeDescr; + } + + public String getCompartmentTypeDescr() { + + return this.compartmentTypeDescr; + } + + public String getSpecialAllocationDescr() { + + return this.specialAllocationDescr; + } + + public CompartmentPositionType getPosition() { + if (position == null) return CompartmentPositionType.unspecified; + return this.position; + } + + public void setCoachType(Long coachType) { + this.coachType = coachType; + } + + public void setCompartmentType(Long compartmentType) { + + this.compartmentType = compartmentType; + } + + public void setSpecialAllocation(Long specialAllocation) { + + this.specialAllocation = specialAllocation; + } + + public void setCoachTypeDescr(String coachTypeDescr) { + + this.coachTypeDescr = coachTypeDescr; + } + + public void setCompartmentTypeDescr(String compartmentTypeDescr) { + + this.compartmentTypeDescr = compartmentTypeDescr; + } + + public void setSpecialAllocationDescr(String specialAllocationDescr) { + + this.specialAllocationDescr = specialAllocationDescr; + } + + public void setPosition(CompartmentPositionType position) { + + this.position = position; + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CompartmentGenderType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CompartmentGenderType.java new file mode 100644 index 0000000..8499b6b --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CompartmentGenderType.java @@ -0,0 +1,42 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; + +@HasExtensionMarker +public enum CompartmentGenderType { + unspecified("unspecified"), + family("family"), + female("female"), + male("male"), + mixed("mixed"); + + public String text; + + CompartmentGenderType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } + +} \ No newline at end of file diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CompartmentPositionType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CompartmentPositionType.java new file mode 100644 index 0000000..c071dbb --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CompartmentPositionType.java @@ -0,0 +1,38 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + + +public enum CompartmentPositionType { + unspecified("unspecified"), + upperLevel("upperLevel"), + lowerLevel("lowerLevel"); + + public String text; + + CompartmentPositionType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ConfirmationTypeType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ConfirmationTypeType.java new file mode 100644 index 0000000..f77f784 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ConfirmationTypeType.java @@ -0,0 +1,42 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; + +@HasExtensionMarker +public enum ConfirmationTypeType { + trainDelayConfirmation ("trainDelayConfirmation"), + travelerDelayConfirmation ("travelerDelayConfirmation"), + trainLinkedTicketDelay ("trainLinkedTicketDelay"); + + + + public String text; + + ConfirmationTypeType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ControlData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ControlData.java new file mode 100644 index 0000000..d7dab8c --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ControlData.java @@ -0,0 +1,200 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; + + + +@Sequence +@HasExtensionMarker +public class ControlData extends Object { + public ControlData() { + } + + @FieldOrder(order = 0) + @Asn1Optional public SequenceOfCardReferenceType identificationByCardReference; + + @FieldOrder(order = 1) + public Boolean identificationByIdCard = false; + + @FieldOrder(order = 2) + public Boolean identificationByPassportId = false; + + @FieldOrder(order = 3) + @Asn1Optional public Asn1BigInteger identificationItem; + + @FieldOrder(order = 4) + public Boolean passportValidationRequired = false; + + @FieldOrder(order = 5) + public Boolean onlineValidationRequired = false; + + @FieldOrder(order = 6) + @IntRange(minValue=0,maxValue=99) + @Asn1Optional public Long randomDetailedValidationRequired; + + @FieldOrder(order = 7) + public Boolean ageCheckRequired = false; + + @FieldOrder(order = 8) + public Boolean reductionCardCheckRequired = false; + + @FieldOrder(order = 9) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String infoText; + + @FieldOrder(order = 10) + @Asn1Optional public SequenceOfTicketLinkType includedTickets; + + @FieldOrder(order = 11) + @Asn1Optional public ExtensionData extension; + + + + + public SequenceOfCardReferenceType getIdentificationByCardReference() { + + return this.identificationByCardReference; + } + + public Boolean getIdentificationByIdCard() { + + return this.identificationByIdCard; + } + + public Boolean getIdentificationByPassportId() { + + return this.identificationByPassportId; + } + + public Long getIdentificationItem() { + + return Asn1BigInteger.toLong(this.identificationItem); + } + + public Boolean getPassportValidationRequired() { + + return this.passportValidationRequired; + } + + public Boolean getOnlineValidationRequired() { + + return this.onlineValidationRequired; + } + + public Long getRandomDetailedValidationRequired() { + + return this.randomDetailedValidationRequired; + } + + public Boolean getAgeCheckRequired() { + + return this.ageCheckRequired; + } + + public Boolean getReductionCardCheckRequired() { + + return this.reductionCardCheckRequired; + } + + public String getInfoText() { + + return this.infoText; + } + + public SequenceOfTicketLinkType getIncludedTickets() { + + return this.includedTickets; + } + + public ExtensionData getExtension() { + + return this.extension; + } + + public void setIdentificationByCardReference(SequenceOfCardReferenceType identificationByCardReference) { + + this.identificationByCardReference = identificationByCardReference; + } + + public void setIdentificationByIdCard(Boolean identificationByIdCard) { + + this.identificationByIdCard = identificationByIdCard; + } + + public void setIdentificationByPassportId(Boolean identificationByPassportId) { + + this.identificationByPassportId = identificationByPassportId; + } + + public void setIdentificationItem(Long identificationItem) { + + this.identificationItem = Asn1BigInteger.toAsn1(identificationItem); + } + + public void setPassportValidationRequired(Boolean passportValidationRequired) { + + this.passportValidationRequired = passportValidationRequired; + } + + public void setOnlineValidationRequired(Boolean onlineValidationRequired) { + + this.onlineValidationRequired = onlineValidationRequired; + } + + public void setRandomDetailedValidationRequired(Long randomDetailedValidationRequired) { + this.randomDetailedValidationRequired = randomDetailedValidationRequired; + } + + public void setAgeCheckRequired(Boolean ageCheckRequired) { + this.ageCheckRequired = ageCheckRequired; + } + + public void setReductionCardCheckRequired(Boolean reductionCardCheckRequired) { + + this.reductionCardCheckRequired = reductionCardCheckRequired; + } + + public void setInfoText(String infoText) { + + this.infoText = infoText; + } + + public void setIncludedTickets(SequenceOfTicketLinkType includedTickets) { + + this.includedTickets = includedTickets; + } + + public void setExtension(ExtensionData extension) { + + this.extension = extension; + } + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CountermarkData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CountermarkData.java new file mode 100644 index 0000000..76625d4 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CountermarkData.java @@ -0,0 +1,574 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Date; +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.asn1.datatypesimpl.SequenceOfStringIA5; +import org.uic.barcode.ticket.api.utils.DateTimeUtils; + +@Sequence +@HasExtensionMarker +public class CountermarkData extends Object { + public CountermarkData() { + } + + @FieldOrder(order = 0) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String referenceIA5; + + @FieldOrder(order = 1) + @Asn1Optional public Asn1BigInteger referenceNum; + + @FieldOrder(order = 2) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long productOwnerNum; + + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productOwnerIA5; + + @FieldOrder(order = 4) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long productIdNum; + + @FieldOrder(order = 5) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productIdIA5; + + @FieldOrder(order = 6) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String ticketReferenceIA5; + + @FieldOrder(order = 7) + @Asn1Optional public Asn1BigInteger ticketReferenceNum; + + @FieldOrder(order = 8) + @IntRange(minValue=1,maxValue=200) + @Asn1Optional public Long numberOfCountermark; + + @FieldOrder(order = 9) + @IntRange(minValue=1,maxValue=200) + @Asn1Optional public Long totalOfCountermarks; + + @FieldOrder(order = 10) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String groupName; + + @FieldOrder(order = 11) + @Asn1Default("stationUIC") + @Asn1Optional public CodeTableType stationCodeTable; + + @FieldOrder(order = 12) + @IntRange(minValue=1,maxValue=9999999) + @Asn1Optional public Long fromStationNum; + + @FieldOrder(order = 13) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String fromStationIA5; + + @FieldOrder(order = 14) + @IntRange(minValue=1,maxValue=9999999) + @Asn1Optional public Long toStationNum; + + @FieldOrder(order = 15) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String toStationIA5; + + @FieldOrder(order = 16) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String fromStationNameUTF8; + + @FieldOrder(order = 17) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String toStationNameUTF8; + + @FieldOrder(order = 18) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String validRegionDesc; + + @FieldOrder(order = 19) + @Asn1Optional public SequenceOfRegionalValidityType validRegion; + + @FieldOrder(order = 20) + public Boolean returnIncluded = false; + + @FieldOrder(order = 21) + @Asn1Optional public ReturnRouteDescriptionType returnDescription; + + @FieldOrder(order = 22) + @IntRange(minValue=-1,maxValue=700) + @Asn1Optional public Long validFromDay; + + @FieldOrder(order = 22) + @IntRange(minValue=0,maxValue=1440) + @Asn1Optional public Long validFromTime; + + @FieldOrder(order = 23) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long validFromUTCOffset; + + @FieldOrder(order = 24) + @IntRange(minValue=0,maxValue=370) + @Asn1Optional public Long validUntilDay; + + @FieldOrder(order = 25) + @IntRange(minValue=0,maxValue=1440) + @Asn1Optional public Long validUntilTime; + + @FieldOrder(order = 26) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long validUntilUTCOffset; + + @FieldOrder(order = 27) + @Asn1Default(value="second") + @Asn1Optional public TravelClassType classCode; + + @FieldOrder(order = 28) + @Asn1Optional public SequenceOfCarrierNum carrierNum; + + @FieldOrder(order = 29) + @Asn1Optional public SequenceOfStringIA5 carrierIA5; + + @FieldOrder(order = 30) + @Asn1Optional public SequenceOfServiceBrands includedServiceBrands; + + @FieldOrder(order = 31) + @Asn1Optional public SequenceOfServiceBrands excludedServiceBrands; + + @FieldOrder(order = 32) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String infoText; + + @FieldOrder(order = 33) + @Asn1Optional public ExtensionData extension; + + public String getReferenceIA5() { + + return this.referenceIA5; + } + + public Long getReferenceNum() { + + return Asn1BigInteger.toLong(this.referenceNum); + } + + public Long getProductOwnerNum() { + + return this.productOwnerNum; + } + + public String getProductOwnerIA5() { + + return this.productOwnerIA5; + } + + public Long getProductIdNum() { + + return this.productIdNum; + } + + public String getProductIdIA5() { + + return this.productIdIA5; + } + + public String getTicketReferenceIA5() { + + return this.ticketReferenceIA5; + } + + public Long getTicketReferenceNum() { + + return Asn1BigInteger.toLong(this.ticketReferenceNum); + } + + public Long getNumberOfCountermark() { + + return this.numberOfCountermark; + } + + public Long getTotalOfCountermarks() { + + return this.totalOfCountermarks; + } + + public String getGroupName() { + + return this.groupName; + } + + public CodeTableType getStationCodeTable() { + + if (stationCodeTable == null) { + return CodeTableType.stationUIC; + } + + return this.stationCodeTable; + } + + public Long getFromStationNum() { + + return this.fromStationNum; + } + + public String getFromStationIA5() { + + return this.fromStationIA5; + } + + public Long getToStationNum() { + + return this.toStationNum; + } + + public String getToStationIA5() { + + return this.toStationIA5; + } + + public String getFromStationNameUTF8() { + + return this.fromStationNameUTF8; + } + + public String getToStationNameUTF8() { + + return this.toStationNameUTF8; + } + + public String getValidRegionDesc() { + + return this.validRegionDesc; + } + + public SequenceOfRegionalValidityType getValidRegion() { + + return this.validRegion; + } + + public Boolean getReturnIncluded() { + + return this.returnIncluded; + } + + public ReturnRouteDescriptionType getReturnDescription() { + + return this.returnDescription; + } + + public Long getValidFromDay() { + + return this.validFromDay; + } + + public Long getValidFromTime() { + + return this.validFromTime; + } + + public Long getValidUntilDay() { + + return this.validUntilDay; + } + + public Long getValidUntilTime() { + + return this.validUntilTime; + } + + public TravelClassType getClassCode() { + + if (classCode == null){ + return TravelClassType.second; + } + + return this.classCode; + } + + public SequenceOfCarrierNum getCarriersNum() { + + return this.carrierNum; + } + + public SequenceOfStringIA5 getCarriersIA5() { + + return this.carrierIA5; + } + + public SequenceOfServiceBrands getIncludedServiceBrands() { + + return this.includedServiceBrands; + } + + public SequenceOfServiceBrands getExcludedServiceBrands() { + + return this.excludedServiceBrands; + } + + public String getInfoText() { + + return this.infoText; + } + + public ExtensionData getExtension() { + + return this.extension; + } + + public void setReferenceIA5(String referenceIA5) { + + this.referenceIA5 = referenceIA5; + } + + public void setReferenceNum(Long referenceNum) { + + this.referenceNum = Asn1BigInteger.toAsn1(referenceNum); + } + + public void setProductOwnerNum(Long productOwnerNum) { + + this.productOwnerNum = productOwnerNum; + } + + public void setProductOwnerIA5(String productOwnerIA5) { + + this.productOwnerIA5 = productOwnerIA5; + } + + public void setProductIdNum(Long productIdNum) { + + this.productIdNum = productIdNum; + } + + public void setProductIdIA5(String productIdIA5) { + + this.productIdIA5 = productIdIA5; + } + + public void setTicketReferenceIA5(String ticketReferenceIA5) { + + this.ticketReferenceIA5 = ticketReferenceIA5; + } + + public void setTicketReferenceNum(Long ticketReferenceNum) { + + this.ticketReferenceNum = Asn1BigInteger.toAsn1(ticketReferenceNum); + } + + public void setNumberOfCountermark(Long numberOfCountermark) { + + this.numberOfCountermark = numberOfCountermark; + } + + public void setTotalOfCountermarks(Long totalOfCountermarks) { + + this.totalOfCountermarks = totalOfCountermarks; + } + + public void setGroupName(String groupName) { + + this.groupName = groupName; + } + + public void setStationCodeTable(CodeTableType stationCodeTable) { + + this.stationCodeTable = stationCodeTable; + } + + public void setFromStationNum(Long fromStationNum) { + + this.fromStationNum = fromStationNum; + } + + public void setFromStationIA5(String fromStationIA5) { + + this.fromStationIA5 = fromStationIA5; + } + + public void setToStationNum(Long toStationNum) { + + this.toStationNum = toStationNum; + } + + public void setToStationIA5(String toStationIA5) { + + this.toStationIA5 = toStationIA5; + } + + public void setFromStationNameUTF8(String fromStationNameUTF8) { + + this.fromStationNameUTF8 = fromStationNameUTF8; + } + + public void setToStationNameUTF8(String toStationNameUTF8) { + + this.toStationNameUTF8 = toStationNameUTF8; + } + + public void setValidRegionDesc(String validRegionDesc) { + + this.validRegionDesc = validRegionDesc; + } + + public void setValidRegion(SequenceOfRegionalValidityType validRegion) { + + this.validRegion = validRegion; + } + + public void setReturnIncluded(Boolean returnIncluded) { + + this.returnIncluded = returnIncluded; + } + + public void setReturnDescription(ReturnRouteDescriptionType returnDescription) { + + this.returnDescription = returnDescription; + } + + public void setValidFromDay(Long validFromDay) { + + this.validFromDay = validFromDay; + } + + public void setValidFromTime(Long validFromTime) { + + this.validFromTime = validFromTime; + } + + public void setValidUntilDay(Long validUntilDay) { + + this.validUntilDay = validUntilDay; + } + + public void setValidUntilTime(Long validUntilTime) { + + this.validUntilTime = validUntilTime; + } + + public void setClassCode(TravelClassType classCode) { + + this.classCode = classCode; + } + + public void setCarriersNum(SequenceOfCarrierNum carrierNum) { + + this.carrierNum = carrierNum; + } + + public void setCarriersNum(List longs) { + if (longs == null) return; + + this.carrierNum = new SequenceOfCarrierNum(); + this.carrierNum.addAll(longs); + } + + public void setCarriersIA5(SequenceOfStringIA5 carrierIA5) { + + this.carrierIA5 = carrierIA5; + } + + public void setIncludedServiceBrands(SequenceOfServiceBrands includedServiceBrands) { + + this.includedServiceBrands = includedServiceBrands; + } + + public void setExcludedServiceBrands(SequenceOfServiceBrands excludedServiceBrands) { + + this.excludedServiceBrands = excludedServiceBrands; + } + + public void setInfoText(String infoText) { + + this.infoText = infoText; + } + + public void setExtension(ExtensionData extension) { + + this.extension = extension; + } + + + public void setValidityDates (Date fromDate, Date untilDate, Date issuingDate){ + + if (issuingDate == null || fromDate == null) return; + + this.validFromDay = DateTimeUtils.getDateDifference(issuingDate,fromDate); + this.validFromTime = DateTimeUtils.getTime(fromDate); + + if (untilDate != null){ + this.validUntilDay = DateTimeUtils.getDateDifference(fromDate, untilDate); + this.validUntilTime = DateTimeUtils.getTime(untilDate); + } + + } + + public Date getValidFromDate(Date issuingDate){ + + return DateTimeUtils.getDate(issuingDate, this.validFromDay, this.validFromTime); + + } + + public Date getValidUntilDate(Date issuingDate){ + + if (issuingDate == null) return null; + + if (this.validFromDay == null) { + this.validFromDay = 0L; + } + + if (this.validUntilDay == null) { + return null; + } + + + return DateTimeUtils.getDate(issuingDate, this.validFromDay + this.validUntilDay, this.validUntilTime); + + } + + public Long getValidFromUTCOffset() { + return validFromUTCOffset; + } + + public void setValidFromUTCOffset(Long validFromUTCOffset) { + this.validFromUTCOffset = validFromUTCOffset; + } + + public Long getValidUntilUTCOffset() { + return validUntilUTCOffset; + } + + public void setValidUntilUTCOffset(Long validUntilUTCOffset) { + this.validUntilUTCOffset = validUntilUTCOffset; + } + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CustomerCardData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CustomerCardData.java new file mode 100644 index 0000000..d67f857 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CustomerCardData.java @@ -0,0 +1,296 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Calendar; +import java.util.Date; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.asn1.datatypesimpl.SequenceOfUnrestrictedLong; + +@Sequence +@HasExtensionMarker +public class CustomerCardData extends Object { + public CustomerCardData() { + } + + @FieldOrder(order = 0) + @Asn1Optional public TravelerType customer; + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String cardIdIA5; + + @FieldOrder(order = 2) + @Asn1Optional public Asn1BigInteger cardIdNum; + + @FieldOrder(order = 3) + @IntRange(minValue=2016,maxValue=2269) + @Asn1Optional public Long validFromYear; + + @FieldOrder(order = 4) + @IntRange(minValue=0,maxValue=700) + @Asn1Optional public Long validFromDay; + + @FieldOrder(order = 5) + @IntRange(minValue=0,maxValue=250) + @Asn1Optional public Long validUntilYear; + + @FieldOrder(order = 6) + @IntRange(minValue=0,maxValue=370) + @Asn1Optional public Long validUntilDay; + + @FieldOrder(order = 7) + @Asn1Optional public TravelClassType classCode; + + @FieldOrder(order = 8) + @IntRange(minValue=0,maxValue=1000) + @Asn1Optional public Long cardType; + + @FieldOrder(order = 9) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String cardTypeDescr; + + @FieldOrder(order = 10) + @Asn1Optional public Asn1BigInteger customerStatus; + + @FieldOrder(order = 11) + @Asn1Optional public String customerStatusDescr; + + @FieldOrder(order = 12) + @Asn1Optional public SequenceOfUnrestrictedLong includedServices; + + @FieldOrder(order = 13) + @Asn1Optional public ExtensionData extension; + + + + + public TravelerType getCustomer() { + + return this.customer; + } + + public String getCardIdIA5() { + + return this.cardIdIA5; + } + + public Asn1BigInteger getCardIdNum() { + + return this.cardIdNum; + } + + public Long getValidFromYear() { + + return this.validFromYear; + } + + public Long getValidFromDay() { + + return this.validFromDay; + } + + public Long getValidUntilYear() { + + return this.validUntilYear; + } + + public Long getValidUntilDay() { + + return this.validUntilDay; + } + + public TravelClassType getClassCode() { + + return this.classCode; + } + + public Long getCardType() { + + return this.cardType; + } + + public String getCardTypeDescr() { + + return this.cardTypeDescr; + } + + public Long getCustomerStatus() { + + return Asn1BigInteger.toLong(this.customerStatus); + } + + public String getCustomerStatusDescr() { + + return this.customerStatusDescr; + } + + public SequenceOfUnrestrictedLong getIncludedServices() { + + return this.includedServices; + } + + public ExtensionData getExtension() { + + return this.extension; + } + + public void setCustomer(TravelerType customer) { + + this.customer = customer; + } + + public void setCardIdIA5(String cardIdIA5) { + + this.cardIdIA5 = cardIdIA5; + } + + public void setCardIdNum(Asn1BigInteger cardIdNum) { + + this.cardIdNum = cardIdNum; + } + + public void setCardIdNum(Long cardIdNum) { + + this.cardIdNum = new Asn1BigInteger(cardIdNum); + } + + public void setValidFromYear(Long validFromYear) { + + this.validFromYear = validFromYear; + } + + public void setValidFromDay(Long validFromDay) { + + this.validFromDay = validFromDay; + } + + public void setValidUntilYear(Long validUntilYear) { + + this.validUntilYear = validUntilYear; + } + + public void setValidUntilDay(Long validUntilDay) { + + this.validUntilDay = validUntilDay; + } + + public void setClassCode(TravelClassType classCode) { + + this.classCode = classCode; + } + + public void setCardType(Long cardType) { + + this.cardType = cardType; + } + + public void setCardTypeDescr(String cardTypeDescr) { + + this.cardTypeDescr = cardTypeDescr; + } + + public void setCustomerStatus(Long customerStatus) { + + this.customerStatus = Asn1BigInteger.toAsn1(customerStatus); + } + + public void setCustomerStatusDescr(String customerStatusDescr) { + + this.customerStatusDescr = customerStatusDescr; + } + + public void setIncludedServices(SequenceOfUnrestrictedLong includedServices) { + + this.includedServices = includedServices; + } + + public void setExtension(ExtensionData extension) { + + this.extension = extension; + } + + public void setValidity (Date fromDate , Date untilDate){ + + Calendar fromCal = Calendar.getInstance(); + fromCal.clear(); + fromCal.setTime(fromDate); + + this.validFromYear = new Long( fromCal.get(Calendar.YEAR)); + this.validFromDay = new Long (fromCal.get(Calendar.DAY_OF_YEAR)); + + if (untilDate == null) return; + + Calendar untilCal = Calendar.getInstance(); + untilCal.clear(); + untilCal.setTime(untilDate); + + int untildays = untilCal.get(Calendar.DAY_OF_YEAR); + int yearDiff = untilCal.get(Calendar.YEAR) - fromCal.get(Calendar.YEAR); + + this.validUntilYear = new Long( yearDiff); + this.validUntilDay = new Long (untildays); + + } + + public Date getValidFromDate (){ + + if (this.validFromYear == null || this.validFromDay == null) return null; + + Calendar cal = Calendar.getInstance(); + cal.clear(); + //cal.setTimeZone(TimeZone.getTimeZone("UTC")); + cal.set(Calendar.YEAR, this.validFromYear.intValue()); + cal.set(Calendar.DAY_OF_YEAR, this.validFromDay.intValue()); + cal.set(Calendar.MINUTE,0); + cal.set(Calendar.HOUR_OF_DAY,0); + return cal.getTime(); + + } + + + public Date getValidUntilDate (){ + + if (this.validUntilYear == null || this.validUntilDay == null) return null; + + Calendar cal = Calendar.getInstance(); + cal.clear(); + //cal.setTimeZone(TimeZone.getTimeZone("UTC")); + cal.set(Calendar.YEAR, this.validFromYear.intValue()); + if (this.validUntilYear != null) { + cal.add(Calendar.YEAR, this.validUntilYear.intValue()); + } + cal.set(Calendar.DAY_OF_YEAR, this.validUntilDay.intValue()); + cal.set(Calendar.MINUTE,59); + cal.set(Calendar.HOUR_OF_DAY,23); + return cal.getTime(); + + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CustomerStatusType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CustomerStatusType.java new file mode 100644 index 0000000..48a5116 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CustomerStatusType.java @@ -0,0 +1,93 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; + + + +@Sequence +public class CustomerStatusType extends Object { + public CustomerStatusType() { + } + + @FieldOrder(order = 0) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long statusProviderNum; + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String statusProviderIA5; + + @FieldOrder(order = 2) + @Asn1Optional public Asn1BigInteger customerStatus; + + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String customerStatusDescr; + + public Long getStatusProviderNum() { + + return this.statusProviderNum; + } + + public String getStatusProviderIA5() { + + return this.statusProviderIA5; + } + + public Long getCustomerStatus() { + + return Asn1BigInteger.toLong(this.customerStatus); + } + + public String getCustomerStatusDescr() { + + return this.customerStatusDescr; + } + + public void setStatusProviderNum(Long statusProviderNum) { + + this.statusProviderNum = statusProviderNum; + } + + public void setStatusProviderIA5(String statusProviderIA5) { + + this.statusProviderIA5 = statusProviderIA5; + } + + public void setCustomerStatus(Long customerStatus) { + + this.customerStatus = Asn1BigInteger.toAsn1(customerStatus); + } + + public void setCustomerStatusDescr(String customerStatusDescr) { + + this.customerStatusDescr = customerStatusDescr; + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/DelayConfirmation.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/DelayConfirmation.java new file mode 100644 index 0000000..4f61ff3 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/DelayConfirmation.java @@ -0,0 +1,339 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import java.util.TimeZone; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; + + +@Sequence +@HasExtensionMarker +public class DelayConfirmation extends Object { + public DelayConfirmation() { + } + + @FieldOrder(order = 0) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String referenceIA5; + + @FieldOrder(order = 1) + @Asn1Optional public Asn1BigInteger referenceNum; + + @FieldOrder(order = 2) + @Asn1Optional public Asn1BigInteger trainNum; + + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String trainIA5; + + @FieldOrder(order = 4) + @IntRange(minValue=2016, maxValue=2269) + @Asn1Optional public Long plannedArrivalYear; + + @FieldOrder(order = 5) + @IntRange(minValue=1, maxValue=366) + @Asn1Optional public Long plannedArrivalDay; + + @FieldOrder(order = 6) + @IntRange(minValue=0, maxValue=1440) + @Asn1Optional public Long plannedArrivalTime; + + @FieldOrder(order = 7) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long departureUTCOffset; + + @FieldOrder(order = 8) + @Asn1Default(value="stationUIC") + @Asn1Optional public CodeTableType stationCodeTable; + + @FieldOrder(order = 9) + @IntRange(minValue=1, maxValue=9999999) + @Asn1Optional public Long stationNum; + + @FieldOrder(order = 10) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String stationIA5; + + @FieldOrder(order = 11) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String stationNameUTF8; + + @FieldOrder(order = 12) + @IntRange(minValue=0, maxValue=999, hasExtensionMarker=false) + @Asn1Optional public Long delay; + + @FieldOrder(order = 13) + @Asn1Optional public Boolean trainCancelled = false; + + @FieldOrder(order = 14) + @Asn1Default(value="travelerDelayConfirmation") + @Asn1Optional public ConfirmationTypeType confirmationType; + + @FieldOrder(order = 15) + @Asn1Optional public SequenceOfTicketLinkType affectedTickets; + + @FieldOrder(order = 16) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String infoText; + + @FieldOrder(order = 17) + @Asn1Optional public ExtensionData extension; + + + + public String getReferenceIA5() { + + return this.referenceIA5; + } + + public Asn1BigInteger getReferenceNum() { + + return this.referenceNum; + } + + public Long getTrainNum() { + + return Asn1BigInteger.toLong(this.trainNum); + } + + public String getTrainIA5() { + + return this.trainIA5; + } + + public Long getPlannedArrivalYear() { + + return this.plannedArrivalYear; + } + + public Long getPlannedArrivalDay() { + + return this.plannedArrivalDay; + } + + public Long getPlannedArrivalTime() { + + return this.plannedArrivalTime; + } + + public CodeTableType getStationCodeTable() { + + if (stationCodeTable == null){ + return CodeTableType.stationUIC; + } + return this.stationCodeTable; + } + + public Long getStationNum() { + + return this.stationNum; + } + + public String getStationIA5() { + + return this.stationIA5; + } + + public String getStationNameUTF8() { + + return this.stationNameUTF8; + } + + public Long getDelay() { + + return this.delay; + } + + public Boolean getTrainCancelled() { + + return this.trainCancelled; + } + + public ConfirmationTypeType getConfirmationType() { + + if (confirmationType == null){ + return ConfirmationTypeType.trainDelayConfirmation; + } + + return this.confirmationType; + } + + public List getAffectedTickets() { + + return this.affectedTickets; + } + + public String getInfoText() { + + return this.infoText; + } + + public ExtensionData getExtension() { + + return this.extension; + } + + public void setReferenceIA5(String referenceIA5) { + + this.referenceIA5 = referenceIA5; + } + + public void setReferenceNum(Asn1BigInteger referenceNum) { + this.referenceNum = referenceNum; + } + + public void setReferenceNum(Long referenceNum) { + this.referenceNum = Asn1BigInteger.toAsn1(referenceNum); + } + + public void setTrainNum(Asn1BigInteger trainNum) { + + this.trainNum = trainNum; + } + + public void setTrainIA5(String trainIA5) { + + this.trainIA5 = trainIA5; + } + + public void setPlannedArrivalYear(Long plannedArrivalYear) { + + this.plannedArrivalYear = plannedArrivalYear; + } + + public void setPlannedArrivalDay(Long plannedArrivalDay) { + + this.plannedArrivalDay = plannedArrivalDay; + } + + public void setPlannedArrivalTime(Long plannedArrivalTime) { + + this.plannedArrivalTime = plannedArrivalTime; + } + + public void setStationCodeTable(CodeTableType stationCodeTable) { + + this.stationCodeTable = stationCodeTable; + } + + public void setStationNum(Long stationNum) { + + this.stationNum = stationNum; + } + + public void setStationIA5(String stationIA5) { + + this.stationIA5 = stationIA5; + } + + public void setStationNameUTF8(String stationNameUTF8) { + + this.stationNameUTF8 = stationNameUTF8; + } + + public void setDelay(Long delay) { + + this.delay = delay; + } + + public void setTrainCancelled(Boolean trainCancelled) { + + this.trainCancelled = trainCancelled; + } + + public void setConfirmationType(ConfirmationTypeType confirmationType) { + + this.confirmationType = confirmationType; + } + + public void setAffectedTickets(SequenceOfTicketLinkType affectedTickets) { + + this.affectedTickets = affectedTickets; + } + + public void setInfoText(String infoText) { + + this.infoText = infoText; + } + + public void setExtension(ExtensionData extension) { + + this.extension = extension; + } + + public void setPlannedArrivalDate(Date date){ + + Calendar cal = Calendar.getInstance(); + cal.setTime(date); + + this.plannedArrivalYear = new Long( cal.get(Calendar.YEAR)); + this.plannedArrivalDay = new Long (cal.get(Calendar.DAY_OF_YEAR)); + int time = cal.get(Calendar.HOUR_OF_DAY) * 60 + cal.get(Calendar.MINUTE); + if (time > 0) { + this.plannedArrivalTime = new Long (time ); + } + + } + + public Date getPlannedArrivalDate() { + + if (this.plannedArrivalYear == null || this.plannedArrivalDay == null) return null; + + Calendar cal = Calendar.getInstance(); + cal.clear(); + cal.setTimeZone(TimeZone.getTimeZone("UTC")); + cal.set(Calendar.YEAR, this.plannedArrivalYear.intValue()); + cal.set(Calendar.DAY_OF_YEAR, this.plannedArrivalDay.intValue()); + + if (this.plannedArrivalTime != null) { + + int hours = this.plannedArrivalTime.intValue() / 60; + int minutes = this.plannedArrivalTime.intValue() % 60; + cal.set(Calendar.HOUR_OF_DAY, hours); + cal.set(Calendar.MINUTE,minutes); + + } + + return cal.getTime(); + } + + public Long getDepartureUTCOffset() { + return departureUTCOffset; + } + + public void setDepartureUTCOffset(Long departureUTCOffset) { + this.departureUTCOffset = departureUTCOffset; + } + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/DeltaCoordinates.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/DeltaCoordinates.java new file mode 100644 index 0000000..96ec0ff --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/DeltaCoordinates.java @@ -0,0 +1,58 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.Sequence; + +@Sequence +public class DeltaCoordinates extends Object { + public DeltaCoordinates() { + } + + @FieldOrder(order = 0) + public Asn1BigInteger longitude; + + @FieldOrder(order = 1) + public Asn1BigInteger latitude; + + + public Asn1BigInteger getLongitude() { + return this.longitude; + } + + public Asn1BigInteger getLatitude() { + + return this.latitude; + } + + public void setLongitude(Asn1BigInteger longitude) { + + this.longitude = longitude; + } + + public void setLatitude(Asn1BigInteger latitude) { + + this.latitude = latitude; + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/DocumentData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/DocumentData.java new file mode 100644 index 0000000..cc81d25 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/DocumentData.java @@ -0,0 +1,57 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.Sequence; + +@Sequence +@HasExtensionMarker +public class DocumentData extends Object { + public DocumentData() { + } + + @FieldOrder(order = 0) + @Asn1Optional public TokenType token; + + @FieldOrder(order = 1) + public TicketDetailData ticket; + + public TokenType getToken() { + return this.token; + } + + public TicketDetailData getTicket() { + return this.ticket; + } + + public void setToken(TokenType token) { + this.token = token; + } + + public void setTicket(TicketDetailData ticket) { + this.ticket = ticket; + } + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ExtensionData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ExtensionData.java new file mode 100644 index 0000000..6d2ca87 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ExtensionData.java @@ -0,0 +1,59 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.asn1.datatypesimpl.OctetString; + + +@Sequence +public class ExtensionData extends Object { + public ExtensionData() { + } + + @FieldOrder(order = 0) + @RestrictedString(CharacterRestriction.IA5String) + public String extensionId; + + @FieldOrder(order = 1) + public OctetString extensionData; + + public String getExtensionId() { + return this.extensionId; + } + + public byte[] getExtensionData() { + return extensionData.toByteArray(); + } + + public void setExtensionId(String extensionId) { + this.extensionId = extensionId; + } + + public void setExtensionData(byte[] extensionData) { + this.extensionData = new OctetString(extensionData); + } + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/FIPTicketData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/FIPTicketData.java new file mode 100644 index 0000000..bb0d273 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/FIPTicketData.java @@ -0,0 +1,347 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Date; +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.asn1.datatypesimpl.SequenceOfStringIA5; +import org.uic.barcode.ticket.api.utils.DateTimeUtils; + +@Sequence +@HasExtensionMarker +public class FIPTicketData extends Object { + public FIPTicketData() { + } + + @FieldOrder(order = 0) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String referenceIA5; + + @FieldOrder(order = 1) + @Asn1Optional public Asn1BigInteger referenceNum; + + @FieldOrder(order = 2) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long productOwnerNum; + + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productOwnerIA5; + + @FieldOrder(order = 4) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long productIdNum; + + @FieldOrder(order = 5) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productIdIA5; + + @FieldOrder(order = 6) + @IntRange(minValue=-1,maxValue=700) + @Asn1Optional public Long validFromDay; + + @FieldOrder(order = 7) + @IntRange(minValue=0,maxValue=370) + @Asn1Optional public Long validUntilDay; + + @FieldOrder(order = 8) + @Asn1Optional public SequenceOfActivatedDays activatedDay; + + @FieldOrder(order = 9) + @Asn1Optional public SequenceOfCarrierNum carrierNum; + + @FieldOrder(order = 10) + @Asn1Optional public SequenceOfStringIA5 carrierIA5; + + @FieldOrder(order = 11) + @IntRange(minValue=1,maxValue=200) + public Long numberOfTravelDays; + + @FieldOrder(order = 12) + public Boolean includesSupplements = false; + + @FieldOrder(order = 13) + @Asn1Default(value="second") + @Asn1Optional public TravelClassType classCode; + + @FieldOrder(order = 14) + @Asn1Optional public ExtensionData extension; + + public String getReferenceIA5() { + + return this.referenceIA5; + } + + public Asn1BigInteger getReferenceNum() { + + return this.referenceNum; + } + + public Long getProductOwnerNum() { + + return this.productOwnerNum; + } + + public String getProductOwnerIA5() { + + return this.productOwnerIA5; + } + + public Long getProductIdNum() { + + return this.productIdNum; + } + + public String getProductIdIA5() { + + return this.productIdIA5; + } + + public Long getValidFromDay() { + + return this.validFromDay; + } + + public Long getValidUntilDay() { + + return this.validUntilDay; + } + + public List getActivatedDay() { + + return this.activatedDay; + } + + public List getCarrierNum() { + + return this.carrierNum; + } + + public List getCarrierIA5() { + + return this.carrierIA5; + } + + public Long getNumberOfTravelDays() { + + return this.numberOfTravelDays; + } + + public Boolean getIncludesSupplements() { + + return this.includesSupplements; + } + + public TravelClassType getClassCode() { + if (classCode == null) return TravelClassType.second; + return this.classCode; + } + + public ExtensionData getExtension() { + + return this.extension; + } + + public void setReferenceIA5(String referenceIA5) { + + this.referenceIA5 = referenceIA5; + } + + public void setReferenceNum(Asn1BigInteger referenceNum) { + + this.referenceNum = referenceNum; + } + + public void setProductOwnerNum(Long productOwnerNum) { + + this.productOwnerNum = productOwnerNum; + } + + public void setProductOwnerIA5(String productOwnerIA5) { + + this.productOwnerIA5 = productOwnerIA5; + } + + public void setProductIdNum(Long productIdNum) { + + this.productIdNum = productIdNum; + } + + public void setProductIdIA5(String productIdIA5) { + + this.productIdIA5 = productIdIA5; + } + + public void setValidFromDay(Long validFromDay) { + + this.validFromDay = validFromDay; + } + + public void setValidUntilDay(Long validUntilDay) { + + this.validUntilDay = validUntilDay; + } + + public void setActivatedDay(SequenceOfActivatedDays activatedDay) { + + this.activatedDay = activatedDay; + } + + public void setCarrierNum(SequenceOfCarrierNum carrierNum) { + + this.carrierNum = carrierNum; + } + + public void setCarrierIA5(SequenceOfStringIA5 carrierIA5) { + + this.carrierIA5 = carrierIA5; + } + + public void setNumberOfTravelDays(Long numberOfTravelDays) { + + this.numberOfTravelDays = numberOfTravelDays; + } + + public void setIncludesSupplements(Boolean includesSupplements) { + + this.includesSupplements = includesSupplements; + } + + public void setClassCode(TravelClassType classCode) { + this.classCode = classCode; + } + + public void setExtension(ExtensionData extension) { + + this.extension = extension; + } + + public void setValidityDates (Date fromDate, Date untilDate, Date issuingDate){ + + if (issuingDate == null || fromDate == null) return; + + this.validFromDay = DateTimeUtils.getDateDifference(issuingDate,fromDate); + + if (untilDate != null){ + this.validUntilDay = DateTimeUtils.getDateDifference(fromDate, untilDate); + } + + } + + public Date getValidFromDate(Date issuingDate){ + return DateTimeUtils.getDate(issuingDate, this.validFromDay,0L); + } + + public Date getValidUntilDate(Date issuingDate){ + + if (issuingDate == null) return null; + if (this.validFromDay == null) { + this.validFromDay = 0L; + } + + if (this.validUntilDay == null) { + return null; + } + return DateTimeUtils.getDate(issuingDate, this.validFromDay + this.validUntilDay, 1439L); + } + + public void addActivatedDays(Collection days) { + if (days == null || days.isEmpty()) return; + if (this.activatedDay == null) { + this.activatedDay = new SequenceOfActivatedDays(); + } + for (Long l : days) { + this.activatedDay.add(l); + } + } + + /** + * Sets the activated days. + * + * @param dates the dates + * @param issuingDate the issuing date + * @param validFromDate the valid from date + */ + public void setActivatedDays(Collection dates, Date issuingDate, Date validFromDate){ + if (this.activatedDay != null) { + this.activatedDay.clear(); + } else { + this.activatedDay= new SequenceOfActivatedDays(); + } + long dateDif = 0L; + if (validFromDate != null) { + dateDif = DateTimeUtils.getDateDifference(issuingDate,validFromDate); + } + if (dates != null && !dates.isEmpty()) { + for (Date day : dates) { + this.addActivatedDay(issuingDate, dateDif, day); + } + } + } + + /** + * Adds the activated day. + * + * @param issuingDate the issuing date in UTC + * @param dateOffset the date offset to be added to the issuing date + * @param day the day to be added + */ + public void addActivatedDay(Date issuingDate, long dateOffset, Date day){ + Long vDiff = DateTimeUtils.getDateDifferenceLocal(this.getValidFromDate(issuingDate), day); + if (this.activatedDay == null) { + this.activatedDay = new SequenceOfActivatedDays(); + } + if (vDiff != null) { + this.activatedDay.add(vDiff); + } + } + + /** + * Gets the activated days. + * + * @param issuingDate the issuing date + * @return the activated days + */ + public Collection getActivatedDays(Date issuingDate) { + if (this.activatedDay == null) return null; + ArrayList dates = new ArrayList(); + for (Long diff: this.getActivatedDay()) { + Date day = DateTimeUtils.getDate(this.getValidFromDate(issuingDate), diff, null); + if (day != null) { + dates.add(day); + } + } + return dates; + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/GenderType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/GenderType.java new file mode 100644 index 0000000..f1e58ed --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/GenderType.java @@ -0,0 +1,42 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; + +@HasExtensionMarker +public enum GenderType { + unspecified("unspecified"), + female("female"), + male("male"), + other("other"); + + + public String text; + + GenderType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/GeoCoordinateSystemType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/GeoCoordinateSystemType.java new file mode 100644 index 0000000..804c038 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/GeoCoordinateSystemType.java @@ -0,0 +1,38 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + + +public enum GeoCoordinateSystemType { + wgs84("wgs84"), + grs80("grs80"); + + + public String text; + + GeoCoordinateSystemType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/GeoCoordinateType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/GeoCoordinateType.java new file mode 100644 index 0000000..931d486 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/GeoCoordinateType.java @@ -0,0 +1,144 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.Sequence; + +@Sequence +public class GeoCoordinateType extends Object { + public GeoCoordinateType() { + } + + @FieldOrder(order = 0) + @Asn1Default(value="milliDegree") + @Asn1Optional public GeoUnitType geoUnit; + + @FieldOrder(order = 1) + @Asn1Default(value="wgs84") + @Asn1Optional public GeoCoordinateSystemType coordinateSystem; + + @FieldOrder(order = 2) + @Asn1Default(value="north") + @Asn1Optional public HemisphereLongitudeType hemisphereLongitude; + + @FieldOrder(order = 3) + @Asn1Default(value="east") + @Asn1Optional public HemisphereLatitudeType hemisphereLatitude; + + @FieldOrder(order = 4) + public Asn1BigInteger longitude; + + @FieldOrder(order = 5) + public Asn1BigInteger latitude; + + @FieldOrder(order = 6) + @Asn1Optional public GeoUnitType accuracy; + + public GeoUnitType getGeoUnit() { + + if (geoUnit == null){ + return GeoUnitType.milliDegree; + } + return this.geoUnit; + } + + public GeoCoordinateSystemType getCoordinateSystem() { + + if (coordinateSystem == null) { + return GeoCoordinateSystemType.wgs84; + } + + return this.coordinateSystem; + } + + public HemisphereLongitudeType getHemisphereLongitude() { + + if (hemisphereLongitude == null){ + return HemisphereLongitudeType.north; + } + + return this.hemisphereLongitude; + } + + public HemisphereLatitudeType getHemisphereLatitude() { + + if (hemisphereLatitude == null) { + return HemisphereLatitudeType.east; + } + + return this.hemisphereLatitude; + } + + public Long getLongitude() { + + return Asn1BigInteger.toLong(this.longitude); + } + + public Long getLatitude() { + + return Asn1BigInteger.toLong(this.latitude); + } + + public GeoUnitType getAccuracy() { + + return this.accuracy; + } + + public void setGeoUnit(GeoUnitType geoUnit) { + + this.geoUnit = geoUnit; + } + + public void setCoordinateSystem(GeoCoordinateSystemType coordinateSystem) { + + this.coordinateSystem = coordinateSystem; + } + + public void setHemisphereLongitude(HemisphereLongitudeType hemisphereLongitude) { + + this.hemisphereLongitude = hemisphereLongitude; + } + + public void setHemisphereLatitude(HemisphereLatitudeType hemisphereLatitude) { + + this.hemisphereLatitude = hemisphereLatitude; + } + + public void setLongitude(Long longitude) { + + this.longitude = Asn1BigInteger.toAsn1(longitude); + } + + public void setLatitude(Long latitude) { + + this.latitude = Asn1BigInteger.toAsn1(latitude); + } + + public void setAccuracy(GeoUnitType accuracy) { + + this.accuracy = accuracy; + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/GeoUnitType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/GeoUnitType.java new file mode 100644 index 0000000..e864a70 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/GeoUnitType.java @@ -0,0 +1,40 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +public enum GeoUnitType { + microDegree("microDegree"), + tenthmilliDegree("tenthmilliDegree"), + milliDegree("milliDegree"), + centiDegree("centiDegree"), + deciDegree("deciDegree"); + + + public String text; + + GeoUnitType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/HemisphereLatitudeType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/HemisphereLatitudeType.java new file mode 100644 index 0000000..9bb3d7b --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/HemisphereLatitudeType.java @@ -0,0 +1,37 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +public enum HemisphereLatitudeType { + east("east"), + west("west"); + + + public String text; + + HemisphereLatitudeType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/HemisphereLongitudeType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/HemisphereLongitudeType.java new file mode 100644 index 0000000..1c5b310 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/HemisphereLongitudeType.java @@ -0,0 +1,36 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +public enum HemisphereLongitudeType { + north("north"), + south("south"); + + public String text; + + HemisphereLongitudeType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/IncludedOpenTicketType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/IncludedOpenTicketType.java new file mode 100644 index 0000000..a4b4049 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/IncludedOpenTicketType.java @@ -0,0 +1,425 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Date; +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.SizeRange; +import org.uic.barcode.asn1.datatypesimpl.SequenceOfStringIA5; +import org.uic.barcode.ticket.api.utils.DateTimeUtils; + +public class IncludedOpenTicketType extends Object { + public IncludedOpenTicketType() { + } + + @FieldOrder(order = 0) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long productOwnerNum; + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productOwnerIA5; + + @FieldOrder(order = 2) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long productIdNum; + + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productIdIA5; + + @FieldOrder(order = 4) + @Asn1Optional public Asn1BigInteger externalIssuerId; + + @FieldOrder(order = 5) + @Asn1Optional public Asn1BigInteger issuerAutorizationId; + + @FieldOrder(order = 6) + @Asn1Default("stationUIC") + @Asn1Optional public CodeTableType stationCodeTable; + + @FieldOrder(order = 7) + @Asn1Optional public SequenceOfRegionalValidityType validRegion; + + @FieldOrder(order = 8) + @IntRange(minValue=-1,maxValue=700) + @Asn1Optional public Long validFromDay; + + @FieldOrder(order = 9) + @IntRange(minValue=0,maxValue=1440) + @Asn1Optional public Long validFromTime; + + @FieldOrder(order = 10) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long validFromUTCOffset; + + @FieldOrder(order = 11) + @IntRange(minValue=0,maxValue=370) + @Asn1Optional public Long validUntilDay; + + @FieldOrder(order = 12) + @IntRange(minValue=0,maxValue=1440) + @Asn1Optional public Long validUntilTime; + + @FieldOrder(order = 13) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long validUntilUTCOffset; + + @FieldOrder(order = 14) + @Asn1Default(value="second") + @Asn1Optional public TravelClassType classCode; + + @FieldOrder(order = 15) + @SizeRange(minValue = 1, maxValue = 2) + @Asn1Optional public String serviceLevel; + + @FieldOrder(order = 16) + @Asn1Optional public SequenceOfCarrierNum includedCarriersNum; + + @FieldOrder(order = 17) + @Asn1Optional public SequenceOfStringIA5 includedCarriersIA5; + + @FieldOrder(order = 18) + @Asn1Optional public SequenceOfServiceBrands includedServiceBrands; + + @FieldOrder(order = 19) + @Asn1Optional public SequenceOfServiceBrands excludedServiceBrands; + + @FieldOrder(order = 20) + @Asn1Optional public SequenceOfTariffType tariffs; + + @FieldOrder(order = 21) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String infoText; + + @FieldOrder(order = 22) + @Asn1Optional public ExtensionData extension; + + public Long getProductOwnerNum() { + + return this.productOwnerNum; + } + + public String getProductOwnerIA5() { + + return this.productOwnerIA5; + } + + public Long getProductIdNum() { + + return this.productIdNum; + } + + public String getProductIdIA5() { + + return this.productIdIA5; + } + + public Long getExternalIssuerId() { + + return Asn1BigInteger.toLong(this.externalIssuerId); + } + + public Long getIssuerAutorizationId() { + + return Asn1BigInteger.toLong(this.issuerAutorizationId); + } + + public CodeTableType getStationCodeTable() { + + if (stationCodeTable == null) { + return CodeTableType.stationUIC; + } + + return this.stationCodeTable; + } + + public List getValidRegion() { + + return this.validRegion; + } + + public Long getValidFromDay() { + + return this.validFromDay; + } + + public Long getValidFromTime() { + + return this.validFromTime; + } + + public Long getValidUntilDay() { + + return this.validUntilDay; + } + + public Long getValidUntilTime() { + + return this.validUntilTime; + } + + public TravelClassType getClassCode() { + + if (classCode == null) { + return TravelClassType.second; + } + + return this.classCode; + } + + public String getServiceLevel() { + + return this.serviceLevel; + } + + public List getIncludedCarriersNum() { + + return this.includedCarriersNum; + } + + public List getIncludedCarriersIA5() { + + return this.includedCarriersIA5; + } + + public List getIncludedServiceBrands() { + + return this.includedServiceBrands; + } + + public List getExcludedServiceBrands() { + + return this.excludedServiceBrands; + } + + public List getTariffs() { + + return this.tariffs; + } + + public String getInfoText() { + + return this.infoText; + } + + public ExtensionData getExtension() { + + return this.extension; + } + + public void setProductOwnerNum(Long productOwnerNum) { + + this.productOwnerNum = productOwnerNum; + } + + public void setProductOwnerIA5(String productOwnerIA5) { + + this.productOwnerIA5 = productOwnerIA5; + } + + public void setProductIdNum(Long productIdNum) { + + this.productIdNum = productIdNum; + } + + public void setProductIdIA5(String productIdIA5) { + + this.productIdIA5 = productIdIA5; + } + + public void setExternalIssuerId(Long externalIssuerId) { + + this.externalIssuerId = Asn1BigInteger.toAsn1(externalIssuerId); + } + + public void setIssuerAutorizationId(Long issuerAutorizationId) { + + this.issuerAutorizationId = Asn1BigInteger.toAsn1(issuerAutorizationId); + } + + public void setStationCodeTable(CodeTableType stationCodeTable) { + + this.stationCodeTable = stationCodeTable; + } + + public void setValidRegion(SequenceOfRegionalValidityType validRegion) { + + this.validRegion = validRegion; + } + + public void setValidFromDay(Long validFromDay) { + + this.validFromDay = validFromDay; + } + + public void setValidFromTime(Long validFromTime) { + + this.validFromTime = validFromTime; + } + + public void setValidUntilDay(Long validUntilDay) { + + this.validUntilDay = validUntilDay; + } + + public void setValidUntilTime(Long validUntilTime) { + + this.validUntilTime = validUntilTime; + } + + public void setClassCode(TravelClassType classCode) { + + this.classCode = classCode; + } + + public void setServiceLevel(String serviceLevel) { + + this.serviceLevel = serviceLevel; + } + + public void setIncludedCarriersNum(SequenceOfCarrierNum includedCarriersNum) { + + this.includedCarriersNum = includedCarriersNum; + } + + public void setIncludedCarriersIA5(SequenceOfStringIA5 includedCarriersIA5) { + + this.includedCarriersIA5 = includedCarriersIA5; + } + + public void setIncludedServiceBrands(SequenceOfServiceBrands includedServiceBrands) { + + this.includedServiceBrands = includedServiceBrands; + } + + public void setExcludedServiceBrands(SequenceOfServiceBrands excludedServiceBrands) { + + this.excludedServiceBrands = excludedServiceBrands; + } + + public void setTariffs(SequenceOfTariffType tariffs) { + + this.tariffs = tariffs; + } + + public void setInfoText(String infoText) { + + this.infoText = infoText; + } + + public void setExtension(ExtensionData extension) { + + this.extension = extension; + } + + public void setValidityDates (Date fromDate, Date untilDate, Date issuingDate){ + + if (issuingDate == null || fromDate == null) return; + + this.validFromDay = DateTimeUtils.getDateDifference(issuingDate,fromDate); + this.validFromTime = DateTimeUtils.getTime(fromDate); + + + if (untilDate != null){ + this.validUntilDay = DateTimeUtils.getDateDifference(fromDate, untilDate); + this.validUntilTime = DateTimeUtils.getTime(untilDate); + } + + } + + public void setValidFromTimeZone(Date dateLocal, Date dateUTC ) { + // -- (UTC = local + offset * 15 Minutes) + this.validFromUTCOffset = new Long(dateLocal.getTime() - dateUTC.getTime()) / (1000 * 60 * 15); + } + + public void setValidUntilTimeZone(Date dateLocal, Date dateUTC ) { + // -- (UTC = local + offset * 15 Minutes) + this.validUntilUTCOffset = new Long(dateLocal.getTime() - dateUTC.getTime()) / (1000 * 60 * 15); + + if (this.validFromUTCOffset.longValue() == this.validUntilUTCOffset.longValue()) { + this.validUntilUTCOffset = null; + } + } + + + + public Date getValidFromDate(Date issuingDate){ + + return DateTimeUtils.getDate(issuingDate, this.validFromDay, this.validFromTime); + + } + + public Date getValidUntilDate(Date issuingDate){ + + if (issuingDate == null) return null; + + if (this.validFromDay == null) { + this.validFromDay = 0L; + } + + if (this.validUntilDay == null) { + return null; + } + + return DateTimeUtils.getDate(issuingDate, this.validFromDay + this.validUntilDay, this.validUntilTime); + + } + + public Date getUTCValidFromDate(Date issuingDate){ + return DateTimeUtils.getUTCDate(issuingDate, this.validFromDay, this.validFromTime, this.validFromUTCOffset); + } + + public Date getUTCValidUntilDate(Date issuingDate){ + if (this.validUntilUTCOffset == null) { + return DateTimeUtils.getUTCDate(issuingDate, this.validFromDay, this.validFromTime, this.validFromUTCOffset); + } else { + return DateTimeUtils.getUTCDate(issuingDate, this.validFromDay, this.validUntilTime, this.validFromUTCOffset); + } + } + + public Long getValidFromUTCOffset() { + return validFromUTCOffset; + } + + public void setValidFromUTCOffset(Long validFromUTCOffset) { + this.validFromUTCOffset = validFromUTCOffset; + } + + public Long getValidUntilUTCOffset() { + return validUntilUTCOffset; + } + + public void setValidUntilUTCOffset(Long validUntilUTCOffset) { + this.validUntilUTCOffset = validUntilUTCOffset; + } + + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/IssuingData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/IssuingData.java new file mode 100644 index 0000000..5f0e345 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/IssuingData.java @@ -0,0 +1,361 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Calendar; +import java.util.Date; +import java.util.TimeZone; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.FixedSize; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; + +@Sequence +@HasExtensionMarker +public class IssuingData extends Object { + public IssuingData() { + } + + @FieldOrder(order = 0) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long securityProviderNum; + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String securityProviderIA5; + + @FieldOrder(order = 2) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long issuerNum; + + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String issuerIA5; + + @FieldOrder(order = 4) + @IntRange(minValue=2016,maxValue=2269) + public Long issuingYear; + + @FieldOrder(order = 5) + @IntRange(minValue=1,maxValue=366) + public Long issuingDay; + + @FieldOrder(order = 6) + @IntRange(minValue=0,maxValue=1440) + @Asn1Optional public Long issuingTime; + + @FieldOrder(order = 7) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String issuerName; + + @FieldOrder(order = 8) + public Boolean specimen = false; + + @FieldOrder(order = 9) + public Boolean securePaperTicket = false; + + @FieldOrder(order = 10) + public Boolean activated = true; + + @FieldOrder(order = 11) + @FixedSize(3) + @Asn1Default(value="EUR") + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String currency; + + @FieldOrder(order = 12) + @IntRange(minValue=1,maxValue=3) + @Asn1Default(value="2") + @Asn1Optional public Long currencyFract; + + @FieldOrder(order = 13) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String issuerPNR; + + @FieldOrder(order = 14) + @Asn1Optional public ExtensionData extension; + + @FieldOrder(order = 15) + @Asn1Optional public Asn1BigInteger issuedOnTrainNum; + + @FieldOrder(order = 16) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String issuedOnTrainIA5; + + @FieldOrder(order = 17) + @Asn1Optional public Asn1BigInteger issuedOnLine; + + @FieldOrder(order = 18) + @Asn1Optional public GeoCoordinateType pointOfSale; + + + + + + + public Long getSecurityProviderNum() { + + return this.securityProviderNum; + } + + public String getSecurityProviderIA5() { + + return this.securityProviderIA5; + } + + public Long getIssuerNum() { + + return this.issuerNum; + } + + public String getIssuerIA5() { + + return this.issuerIA5; + } + + public Long getIssuingYear() { + + return this.issuingYear; + } + + public Long getIssuingDay() { + + return this.issuingDay; + } + + public Long getIssuingTime() { + + return this.issuingTime; + } + + public String getIssuerName() { + + return this.issuerName; + } + + public Boolean getSpecimen() { + + return this.specimen; + } + + public Boolean getSecurePaperTicket() { + + return this.securePaperTicket; + } + + public Boolean getActivated() { + + return this.activated; + } + + public String getCurrency() { + + if (currency == null || currency.length() == 0){ + return "EUR"; + } + + return this.currency; + } + + public Long getCurrencyFract() { + + if (currencyFract == null) { + return new Long(2); + } + return this.currencyFract; + } + + public String getIssuerPNR() { + + return this.issuerPNR; + } + + public ExtensionData getExtension() { + + return this.extension; + } + + public Long getIssuedOnTrainNum() { + + return Asn1BigInteger.toLong(issuedOnTrainNum); + } + + public String getIssuedOnTrainIA5() { + + return this.issuedOnTrainIA5; + } + + public Long getIssuedOnLine() { + + return Asn1BigInteger.toLong(issuedOnLine); + } + + public GeoCoordinateType getPointOfSale() { + + return this.pointOfSale; + } + + public void setSecurityProviderNum(Long securityProviderNum) { + + this.securityProviderNum = securityProviderNum; + } + + public void setSecurityProviderIA5(String securityProviderIA5) { + + this.securityProviderIA5 = securityProviderIA5; + } + + public void setIssuerNum(Long issuerNum) { + + this.issuerNum = issuerNum; + } + + public void setIssuerIA5(String issuerIA5) { + + this.issuerIA5 = issuerIA5; + } + + public void setIssuingYear(Long issuingYear) { + + this.issuingYear = issuingYear; + } + + public void setIssuingDay(Long issuingDay) { + + this.issuingDay = issuingDay; + } + + public void setIssuingTime(Long issuingTime) { + + this.issuingTime = issuingTime; + } + + public void setIssuerName(String issuerName) { + + this.issuerName = issuerName; + } + + public void setSpecimen(Boolean specimen) { + + this.specimen = specimen; + } + + public void setSecurePaperTicket(Boolean securePaperTicket) { + + this.securePaperTicket = securePaperTicket; + } + + public void setActivated(Boolean activated) { + + this.activated = activated; + } + + public void setCurrency(String currency) { + + this.currency = currency; + } + + public void setCurrencyFract(Long currencyFract) { + + this.currencyFract = currencyFract; + } + + public void setIssuerPNR(String issuerPNR) { + + this.issuerPNR = issuerPNR; + } + + public void setExtension(ExtensionData extension) { + + this.extension = extension; + } + + public void setIssuedOnTrainNum(Long issuedOnTrainNum) { + + this.issuedOnTrainNum = Asn1BigInteger.toAsn1(issuedOnTrainNum); + } + + public void setIssuedOnTrainIA5(String issuedOnTrainIA5) { + + this.issuedOnTrainIA5 = issuedOnTrainIA5; + } + + public void setIssuedOnLine(Long issuedOnLine) { + + this.issuedOnLine = Asn1BigInteger.toAsn1(issuedOnLine); + } + + public void setPointOfSale(GeoCoordinateType pointOfSale) { + + this.pointOfSale = pointOfSale; + } + + public void setIssuingDate(Date date){ + + if (date == null) { + date = Calendar.getInstance().getTime(); + } + + Calendar cal = Calendar.getInstance(); + cal.setTime(date); + + this.issuingYear = new Long( cal.get(Calendar.YEAR)); + this.issuingDay = new Long (cal.get(Calendar.DAY_OF_YEAR)); + int time = cal.get(Calendar.HOUR_OF_DAY) * 60 + cal.get(Calendar.MINUTE); + if (time > 0) { + this.issuingTime = new Long (time ); + } + + } + + public Date getIssuingDate() { + + if (this.issuingYear == null || this.issuingDay == null) return null; + + Calendar cal = Calendar.getInstance(); + cal.clear(); + cal.setTimeZone(TimeZone.getTimeZone("UTC")); + cal.set(Calendar.YEAR, this.issuingYear.intValue()); + cal.set(Calendar.DAY_OF_YEAR, this.issuingDay.intValue()); + + if (this.issuingTime != null) { + + int hours = this.issuingTime.intValue() / 60; + int minutes = this.issuingTime.intValue() % 60; + cal.set(Calendar.HOUR_OF_DAY, hours); + cal.set(Calendar.MINUTE,minutes); + + } + + Date d = cal.getTime(); + return d; + } + + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/LineType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/LineType.java new file mode 100644 index 0000000..290f0e6 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/LineType.java @@ -0,0 +1,185 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.asn1.datatypesimpl.OctetString; +import org.uic.barcode.asn1.datatypesimpl.SequenceOfUnrestrictedLong; + +@Sequence +@HasExtensionMarker + +public class LineType extends Object { + public LineType() { + } + + @FieldOrder(order = 0) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long carrierNum; + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String carrierIA5; + + @FieldOrder(order = 2) + @Asn1Optional public SequenceOfUnrestrictedLong lineId; + + @FieldOrder(order = 3) + @Asn1Default("stationUIC") + @Asn1Optional public CodeTableType stationCodeTable; + + @FieldOrder(order = 4) + @IntRange(minValue=0,maxValue=9999999) + @Asn1Optional public Long entryStationNum; + + @FieldOrder(order = 5) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String entryStationIA5; + + @FieldOrder(order = 6) + @IntRange(minValue=0,maxValue=9999999) + @Asn1Optional public Long terminatingStationNum; + + @FieldOrder(order = 7) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String terminatingStationIA5; + + @FieldOrder(order = 8) + @Asn1Optional public Asn1BigInteger city; + + @FieldOrder(order = 9) + @Asn1Optional public OctetString binaryZoneId; + + + + public Long getCarrierNum() { + + return this.carrierNum; + } + + public String getCarrierIA5() { + + return this.carrierIA5; + } + + public SequenceOfUnrestrictedLong getLineId() { + + return this.lineId; + } + + public CodeTableType getStationCodeTable() { + + if (stationCodeTable == null) { + return CodeTableType.stationUIC; + } + + return this.stationCodeTable; + } + + public Long getEntryStationNum() { + + return this.entryStationNum; + } + + public String getEntryStationIA5() { + + return this.entryStationIA5; + } + + public Long getTerminatingStationNum() { + + return this.terminatingStationNum; + } + + public String getTerminatingStationIA5() { + + return this.terminatingStationIA5; + } + + public Long getCity() { + + return Asn1BigInteger.toLong(this.city); + } + + public byte[] getBinaryZoneId() { + + return binaryZoneId.toByteArray(); + } + + public void setCarrierNum(Long carrierNum) { + + this.carrierNum = carrierNum; + } + + public void setCarrierIA5(String carrierIA5) { + + this.carrierIA5 = carrierIA5; + } + + public void setLineId(SequenceOfUnrestrictedLong lineId) { + + this.lineId = lineId; + } + + public void setStationCodeTable(CodeTableType stationCodeTable) { + + this.stationCodeTable = stationCodeTable; + } + + public void setEntryStationNum(Long entryStationNum) { + + this.entryStationNum = entryStationNum; + } + + public void setEntryStationIA5(String entryStationIA5) { + + this.entryStationIA5 = entryStationIA5; + } + + public void setTerminatingStationNum(Long terminatingStationNum) { + + this.terminatingStationNum = terminatingStationNum; + } + + public void setTerminatingStationIA5(String terminatingStationIA5) { + + this.terminatingStationIA5 = terminatingStationIA5; + } + + public void setCity(Long city) { + + this.city = Asn1BigInteger.toAsn1(city); + } + + public void setBinaryZoneId(byte[] binaryZoneId) { + + this.binaryZoneId = new OctetString(binaryZoneId); + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/LinkMode.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/LinkMode.java new file mode 100644 index 0000000..00d30b5 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/LinkMode.java @@ -0,0 +1,39 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; + +@HasExtensionMarker +public enum LinkMode { + issuedTogether("issuedTogether"), + onlyValidInCombination("onlyValidInCombination"); + + public String text; + + LinkMode(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/LoadingDeckType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/LoadingDeckType.java new file mode 100644 index 0000000..60a285e --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/LoadingDeckType.java @@ -0,0 +1,38 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + + +public enum LoadingDeckType { + unspecified("unspecified"), + upper("upper"), + lower("lower"); + + public String text; + + LoadingDeckType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/LuggageRestrictionType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/LuggageRestrictionType.java new file mode 100644 index 0000000..04f4309 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/LuggageRestrictionType.java @@ -0,0 +1,88 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.Sequence; + +@Sequence +@HasExtensionMarker +public class LuggageRestrictionType extends Object { + public LuggageRestrictionType() { + } + + @FieldOrder(order = 0) + @IntRange(minValue=0,maxValue=99) + @Asn1Default(value="3") + @Asn1Optional public Long maxHandLuggagePieces; + + @FieldOrder(order = 1) + @IntRange(minValue=0,maxValue=99) + @Asn1Default(value="1") + @Asn1Optional public Long maxNonHandLuggagePieces; + + @FieldOrder(order = 2) + @Asn1Optional public SequenceOfRegisteredLuggageType registeredLuggage; + + + public void setRegisteredLuggage( + SequenceOfRegisteredLuggageType registeredLuggage) { + this.registeredLuggage = registeredLuggage; + } + + public Long getMaxHandLuggagePieces() { + + if (maxHandLuggagePieces == null) { + return new Long(3); + } + + return this.maxHandLuggagePieces; + } + + public Long getMaxNonHandLuggagePieces() { + + if (maxNonHandLuggagePieces == null) { + return new Long(1); + } + + return this.maxNonHandLuggagePieces; + } + + public SequenceOfRegisteredLuggageType getRegisteredLuggage() { + + return this.registeredLuggage; + } + + public void setMaxHandLuggagePieces(Long maxHandLuggagePieces) { + + this.maxHandLuggagePieces = maxHandLuggagePieces; + } + + public void setMaxNonHandLuggagePieces(Long maxNonHandLuggagePieces) { + + this.maxNonHandLuggagePieces = maxNonHandLuggagePieces; + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/OpenTicketData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/OpenTicketData.java new file mode 100644 index 0000000..7d82232 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/OpenTicketData.java @@ -0,0 +1,695 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Date; +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.asn1.datatypes.SizeRange; +import org.uic.barcode.asn1.datatypesimpl.SequenceOfStringIA5; +import org.uic.barcode.ticket.api.utils.DateTimeUtils; + +@Sequence +@HasExtensionMarker +public class OpenTicketData extends Object { + public OpenTicketData() { + } + + @FieldOrder(order = 0) + @Asn1Optional public Asn1BigInteger referenceNum; + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String referenceIA5; + + @FieldOrder(order = 2) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long productOwnerNum; + + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productOwnerIA5; + + @FieldOrder(order = 4) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long productIdNum; + + @FieldOrder(order = 5) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productIdIA5; + + @FieldOrder(order = 6) + @Asn1Optional public Asn1BigInteger externalIssuerId; + + @FieldOrder(order = 7) + @Asn1Optional public Asn1BigInteger issuerAutorizationId; + + @FieldOrder(order = 8) + public Boolean returnIncluded = false; + + @FieldOrder(order = 9) + @Asn1Default("stationUIC") + @Asn1Optional public CodeTableType stationCodeTable; + + @FieldOrder(order = 10) + @IntRange(minValue=1,maxValue=9999999) + @Asn1Optional public Long fromStationNum; + + @FieldOrder(order = 11) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String fromStationIA5; + + @FieldOrder(order = 12) + @IntRange(minValue=1,maxValue=9999999) + @Asn1Optional public Long toStationNum; + + @FieldOrder(order = 13) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String toStationIA5; + + @FieldOrder(order = 14) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String fromStationNameUTF8; + + @FieldOrder(order = 15) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String toStationNameUTF8; + + @FieldOrder(order = 16) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String validRegionDesc; + + @FieldOrder(order = 17) + @Asn1Optional public SequenceOfRegionalValidityType validRegion; + + @FieldOrder(order = 18) + @Asn1Optional public ReturnRouteDescriptionType returnDescription; + + @FieldOrder(order = 19) + @Asn1Default(value = "0") + @IntRange(minValue=-1,maxValue=700) + @Asn1Optional public Long validFromDay; + + @FieldOrder(order = 20) + @IntRange(minValue=0,maxValue=1440) + @Asn1Optional public Long validFromTime; + + @FieldOrder(order = 21) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long validFromUTCOffset; + + @FieldOrder(order = 22) + @Asn1Default(value = "0") + @IntRange(minValue=0,maxValue=370) + @Asn1Optional public Long validUntilDay; + + @FieldOrder(order = 23) + @IntRange(minValue=0,maxValue=1440) + @Asn1Optional public Long validUntilTime; + + @FieldOrder(order = 24) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long validUntilUTCOffset; + + @FieldOrder(order = 25) + @Asn1Optional public SequenceOfActivatedDays activatedDay; + + @FieldOrder(order = 26) + @Asn1Default(value="second") + @Asn1Optional public TravelClassType classCode; + + @FieldOrder(order = 27) + @SizeRange(minValue = 1, maxValue = 2) + @Asn1Optional public String serviceLevel; + + @FieldOrder(order = 28) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public SequenceOfCarrierNum carrierNum; + + @FieldOrder(order = 29) + @Asn1Optional public SequenceOfStringIA5 carrierIA5; + + @FieldOrder(order = 30) + @Asn1Optional public SequenceOfServiceBrands includedServiceBrands; + + @FieldOrder(order = 31) + @Asn1Optional public SequenceOfServiceBrands excludedServiceBrands; + + @FieldOrder(order = 32) + @Asn1Optional public SequenceOfTariffType tariffs; + + @FieldOrder(order = 33) + @Asn1Optional Asn1BigInteger price; + + @FieldOrder(order = 34) + @Asn1Optional SequenceOfVatDetail vatDetails; + + @FieldOrder(order = 35) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String infoText; + + @FieldOrder(order = 36) + @Asn1Optional public SequenceOfIncludedOpenTicketType includedAddOns; + + @FieldOrder(order = 37) + @Asn1Optional public LuggageRestrictionType luggage; + + @FieldOrder(order = 38) + @Asn1Optional public ExtensionData extension; + + + + + public Long getReferenceNum() { + return Asn1BigInteger.toLong(this.referenceNum); + } + + public String getReferenceIA5() { + + return this.referenceIA5; + } + + public Long getProductOwnerNum() { + + return this.productOwnerNum; + } + + public String getProductOwnerIA5() { + + return this.productOwnerIA5; + } + + public Long getProductIdNum() { + + return this.productIdNum; + } + + public String getProductIdIA5() { + + return this.productIdIA5; + } + + public Long getExtIssuerId() { + + return Asn1BigInteger.toLong(externalIssuerId); + } + + public Long getIssuerAutorizationId() { + + return Asn1BigInteger.toLong(issuerAutorizationId); + } + + public Boolean getReturnIncluded() { + + return this.returnIncluded; + } + + public CodeTableType getStationCodeTable() { + + if (stationCodeTable == null) { + return CodeTableType.stationUIC; + } + + + return this.stationCodeTable; + } + + public Long getFromStationNum() { + + return this.fromStationNum; + } + + public String getFromStationIA5() { + + return this.fromStationIA5; + } + + public Long getToStationNum() { + + return this.toStationNum; + } + + public String getToStationIA5() { + + return this.toStationIA5; + } + + public String getFromStationNameUTF8() { + + return this.fromStationNameUTF8; + } + + public String getToStationNameUTF8() { + + return this.toStationNameUTF8; + } + + public String getValidRegionDesc() { + + return this.validRegionDesc; + } + + public List getValidRegion() { + + return this.validRegion; + } + + public ReturnRouteDescriptionType getReturnDescription() { + + return this.returnDescription; + } + + public Long getValidFromDay() { + + return this.validFromDay; + } + + public Long getValidFromTime() { + + return this.validFromTime; + } + + public Long getValidUntilDay() { + + return this.validUntilDay; + } + + public Long getValidUntilTime() { + + return this.validUntilTime; + } + + public List getActivatedDay() { + + return this.activatedDay; + } + + public TravelClassType getClassCode() { + + if (classCode == null) { + return TravelClassType.second; + } + + return this.classCode; + } + + public String getServiceLevel() { + + return this.serviceLevel; + } + + public List getCarriersNum() { + + return this.carrierNum; + } + + public List getCarriersIA5() { + + return this.carrierIA5; + } + + public List getIncludedServiceBrands() { + + return this.includedServiceBrands; + } + + public List getExcludedServiceBrands() { + + return this.excludedServiceBrands; + } + + public List getTariffs() { + + return this.tariffs; + } + + public String getInfoText() { + + return this.infoText; + } + + public List getIncludedAddOns() { + + return this.includedAddOns; + } + + public LuggageRestrictionType getLuggage() { + + return this.luggage; + } + + public ExtensionData getExtension() { + + return this.extension; + } + + public void setReferenceNum(Long referenceNum) { + this.referenceNum = Asn1BigInteger.toAsn1(referenceNum); + } + + public void setReferenceIA5(String referenceIA5) { + + this.referenceIA5 = referenceIA5; + } + + public void setProductOwnerNum(Long productOwnerNum) { + + this.productOwnerNum = productOwnerNum; + } + + public void setProductOwnerIA5(String productOwnerIA5) { + + this.productOwnerIA5 = productOwnerIA5; + } + + public void setProductIdNum(Long productIdNum) { + + this.productIdNum = productIdNum; + } + + public void setProductIdIA5(String productIdIA5) { + + this.productIdIA5 = productIdIA5; + } + + public void setExtIssuerId(Long extIssuerId) { + + this.externalIssuerId = Asn1BigInteger.toAsn1(extIssuerId); + } + + public void setIssuerAutorizationId(Long issuerAutorizationId) { + + this.issuerAutorizationId = Asn1BigInteger.toAsn1(issuerAutorizationId); + } + + public void setReturnIncluded(Boolean returnIncluded) { + + this.returnIncluded = returnIncluded; + } + + public void setStationCodeTable(CodeTableType stationCodeTable) { + + this.stationCodeTable = stationCodeTable; + } + + public void setFromStationNum(Long fromStationNum) { + + this.fromStationNum = fromStationNum; + } + + public void setFromStationIA5(String fromStationIA5) { + + this.fromStationIA5 = fromStationIA5; + } + + public void setToStationNum(Long toStationNum) { + + this.toStationNum = toStationNum; + } + + public void setToStationIA5(String toStationIA5) { + + this.toStationIA5 = toStationIA5; + } + + public void setFromStationNameUTF8(String fromStationNameUTF8) { + + this.fromStationNameUTF8 = fromStationNameUTF8; + } + + public void setToStationNameUTF8(String toStationNameUTF8) { + + this.toStationNameUTF8 = toStationNameUTF8; + } + + public void setValidRegionDesc(String validRegionDesc) { + + this.validRegionDesc = validRegionDesc; + } + + public void setValidRegion(SequenceOfRegionalValidityType validRegion) { + + this.validRegion = validRegion; + } + + public void setReturnDescription(ReturnRouteDescriptionType returnDescription) { + + this.returnDescription = returnDescription; + } + + public void setValidFromDay(Long validFromDay) { + + this.validFromDay = validFromDay; + } + + public void setValidFromTime(Long validFromTime) { + + this.validFromTime = validFromTime; + } + + public void setValidUntilDay(Long validUntilDay) { + + this.validUntilDay = validUntilDay; + } + + public void setValidUntilTime(Long validUntilTime) { + + this.validUntilTime = validUntilTime; + } + + public void setActivatedDay(SequenceOfActivatedDays activatedDay) { + + this.activatedDay = activatedDay; + } + + public void setClassCode(TravelClassType classCode) { + + this.classCode = classCode; + } + + public void setServiceLevel(String serviceLevel) { + + this.serviceLevel = serviceLevel; + } + + public void setCarriersNum(SequenceOfCarrierNum carriersNum) { + + this.carrierNum = carriersNum; + } + + public void setCarriersIA5(SequenceOfStringIA5 carriersIA5) { + + this.carrierIA5 = carriersIA5; + } + + public void setIncludedServiceBrands(SequenceOfServiceBrands includedServiceBrands) { + + this.includedServiceBrands = includedServiceBrands; + } + + public void setExcludedServiceBrands(SequenceOfServiceBrands excludedServiceBrands) { + + this.excludedServiceBrands = excludedServiceBrands; + } + + public void setTariffs(SequenceOfTariffType tariffs) { + + this.tariffs = tariffs; + } + + public void setInfoText(String infoText) { + + this.infoText = infoText; + } + + public void setIncludedAddOns(SequenceOfIncludedOpenTicketType includedAddOns) { + + this.includedAddOns = includedAddOns; + } + + public void setLuggage(LuggageRestrictionType luggage) { + + this.luggage = luggage; + } + + public void setExtension(ExtensionData extension) { + + this.extension = extension; + } + + public Long getPrice() { + return Asn1BigInteger.toLong(price); + } + + public void setPrice(Long price) { + this.price = Asn1BigInteger.toAsn1(price); + } + + public SequenceOfVatDetail getVatDetails() { + return vatDetails; + } + + public void setVatDetails(SequenceOfVatDetail vatDetails) { + this.vatDetails = vatDetails; + } + + public void addVatDetail(VatDetailType vatDetail) { + if (this.vatDetails == null) { + this.vatDetails = new SequenceOfVatDetail(); + } + this.vatDetails.add(vatDetail); + } + + public void setValidityDates (Date fromDate, Date untilDate, Date issuingDate){ + + if (issuingDate == null || fromDate == null) return; + + this.validFromDay = DateTimeUtils.getDateDifference(issuingDate,fromDate); + this.validFromTime = DateTimeUtils.getTime(fromDate); + + if (untilDate != null){ + this.validUntilDay = DateTimeUtils.getDateDifference(fromDate, untilDate); + this.validUntilTime = DateTimeUtils.getTime(untilDate); + } + + } + + public Date getValidFromDate(Date issuingDate){ + + return DateTimeUtils.getDate(issuingDate, this.validFromDay, this.validFromTime); + + } + + public Date getValidUntilDate(Date issuingDate){ + + if (issuingDate == null) return null; + + if (this.validFromDay == null) { + this.validFromDay = 0L; + } + if (this.validUntilDay == null) { + return null; + } + return DateTimeUtils.getDate(issuingDate, this.validFromDay + this.validUntilDay, this.validUntilTime); + + } + + + public void addActivatedDays(Collection days) { + if (days == null || days.isEmpty()) return; + if (this.activatedDay == null) { + this.activatedDay = new SequenceOfActivatedDays(); + } + for (Long l : days) { + this.activatedDay.add(l); + } + } + + /** + * Sets the activated days. + * + * @param dates the dates + * @param issuingDate the issuing date + * @param validFromDate the valid from date + */ + public void setActivatedDays(Collection dates, Date issuingDate, Date validFromDate){ + if (this.activatedDay != null) { + this.activatedDay.clear(); + } else { + this.activatedDay= new SequenceOfActivatedDays(); + } + long dateDif = 0L; + if (validFromDate != null) { + dateDif = DateTimeUtils.getDateDifference(issuingDate,validFromDate); + } + if (dates != null && !dates.isEmpty()) { + for (Date day : dates) { + this.addActivatedDay(issuingDate, dateDif, day); + } + } + } + + + /** + * Adds the activated day. + * + * @param issuingDate the issuing date in UTC + * @param dateOffset the date offset to be added to the issuing date + * @param day the day to be added + */ + public void addActivatedDay(Date issuingDate, long dateOffset, Date day){ + Long vDiff = DateTimeUtils.getDateDifferenceLocal(this.getValidFromDate(issuingDate), day); + if (this.activatedDay == null) { + this.activatedDay = new SequenceOfActivatedDays(); + } + if (vDiff != null) { + this.activatedDay.add(vDiff); + } + } + + /** + * Gets the activated days. + * + * @param issuingDate the issuing date + * @return the activated days + */ + public Collection getActivatedDays(Date issuingDate) { + if (this.activatedDay == null) return null; + ArrayList dates = new ArrayList(); + for (Long diff: this.getActivatedDay()) { + Date day = DateTimeUtils.getDate(this.getValidFromDate(issuingDate), diff, null); + if (day != null) { + dates.add(day); + } + } + return dates; + } + + + public Long getValidFromUTCOffset() { + return validFromUTCOffset; + } + + public void setValidFromUTCOffset(Long validFromUTCOffset) { + this.validFromUTCOffset = validFromUTCOffset; + } + + public Long getValidUntilUTCOffset() { + return validUntilUTCOffset; + } + + public void setValidUntilUTCOffset(Long validUntilUTCOffset) { + this.validUntilUTCOffset = validUntilUTCOffset; + } + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ParkingGroundData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ParkingGroundData.java new file mode 100644 index 0000000..8142ee1 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ParkingGroundData.java @@ -0,0 +1,364 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Date; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.ticket.api.utils.DateTimeUtils; + +@Sequence +@HasExtensionMarker +public class ParkingGroundData extends Object { + public ParkingGroundData() { + } + + @FieldOrder(order = 0) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String referenceIA5; + + @FieldOrder(order = 1) + @Asn1Optional public Asn1BigInteger referenceNum; + + @FieldOrder(order = 2) + @RestrictedString(CharacterRestriction.IA5String) + public String parkingGroundId = ""; + + @FieldOrder(order = 3) + @IntRange(minValue=0,maxValue=370) + @Asn1Optional public Long fromParkingDate; + + @FieldOrder(order = 4) + @IntRange(minValue=0,maxValue=370) + @Asn1Optional public Long toParkingDate; + + @FieldOrder(order = 5) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long productOwnerNum; + + @FieldOrder(order = 6) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productOwnerIA5; + + @FieldOrder(order = 7) + @IntRange(minValue=0,maxValue=32000) + @Asn1Optional public Long productIdNum; + + @FieldOrder(order = 8) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productIdIA5; + + @FieldOrder(order = 9) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String accessCode; + + @FieldOrder(order = 10) + @RestrictedString(CharacterRestriction.UTF8String) + public String location; + + @FieldOrder(order = 11) + @Asn1Default("stationUIC") + @Asn1Optional public CodeTableType stationCodeTable; + + @FieldOrder(order = 12) + @IntRange(minValue=1,maxValue=9999999) + @Asn1Optional public Long stationNum; + + @FieldOrder(order = 13) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String stationIA5; + + @FieldOrder(order = 14) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String specialInformation; + + @FieldOrder(order = 15) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String entryTrack; + + @FieldOrder(order = 16) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String numberPlate; + + @FieldOrder(order = 17) + @Asn1Optional Asn1BigInteger price; + + @FieldOrder(order = 18) + @Asn1Optional SequenceOfVatDetail vatDetails; + + @FieldOrder(order = 19) + @Asn1Optional public ExtensionData extension; + + + + + public String getReferenceIA5() { + + return this.referenceIA5; + } + + public Asn1BigInteger getReferenceNum() { + + return this.referenceNum; + } + + public String getParkingGroundId() { + + return this.parkingGroundId; + } + + public Long getFromParkingDate() { + + return this.fromParkingDate; + } + + public Long getToParkingDate() { + + return this.toParkingDate; + } + + public Long getProductOwnerNum() { + + return this.productOwnerNum; + } + + public String getProductOwnerIA5() { + + return this.productOwnerIA5; + } + + public Long getProductIdNum() { + + return this.productIdNum; + } + + public String getProductIdIA5() { + + return this.productIdIA5; + } + + public String getAccessCode() { + + return this.accessCode; + } + + public String getLocation() { + + return this.location; + } + + public CodeTableType getStationCodeTable() { + + if (stationCodeTable == null) { + return CodeTableType.stationUIC; + } + + return this.stationCodeTable; + } + + public Long getStationNum() { + + return this.stationNum; + } + + public String getStationIA5() { + + return this.stationIA5; + } + + public String getSpecialInformation() { + + return this.specialInformation; + } + + public String getEntryTrack() { + + return this.entryTrack; + } + + public String getNumberPlate() { + + return this.numberPlate; + } + + public ExtensionData getExtension() { + + return this.extension; + } + + public void setReferenceIA5(String referenceIA5) { + + this.referenceIA5 = referenceIA5; + } + + public void setReferenceNum(Asn1BigInteger referenceNum) { + + this.referenceNum = referenceNum; + } + + public void setParkingGroundId(String parkingGroundId) { + + this.parkingGroundId = parkingGroundId; + } + + public void setFromParkingDate(Long fromParkingDate) { + + this.fromParkingDate = fromParkingDate; + } + + public void setToParkingDate(Long toParkingDate) { + + this.toParkingDate = toParkingDate; + } + + public void setProductOwnerNum(Long productOwnerNum) { + + this.productOwnerNum = productOwnerNum; + } + + public void setProductOwnerIA5(String productOwnerIA5) { + + this.productOwnerIA5 = productOwnerIA5; + } + + public void setProductIdNum(Long productIdNum) { + + this.productIdNum = productIdNum; + } + + public void setProductIdIA5(String productIdIA5) { + + this.productIdIA5 = productIdIA5; + } + + public void setAccessCode(String accessCode) { + + this.accessCode = accessCode; + } + + public void setLocation(String location) { + + this.location = location; + } + + public void setStationCodeTable(CodeTableType stationCodeTable) { + + this.stationCodeTable = stationCodeTable; + } + + public void setStationNum(Long stationNum) { + + this.stationNum = stationNum; + } + + public void setStationIA5(String stationIA5) { + + this.stationIA5 = stationIA5; + } + + public void setSpecialInformation(String specialInformation) { + + this.specialInformation = specialInformation; + } + + public void setEntryTrack(String entryTrack) { + + this.entryTrack = entryTrack; + } + + public void setNumberPlate(String numberPlate) { + + this.numberPlate = numberPlate; + } + + public void setExtension(ExtensionData extension) { + + this.extension = extension; + } + + public Long getPrice() { + return Asn1BigInteger.toLong(price); + } + + public void setPrice(Long price) { + this.price = Asn1BigInteger.toAsn1(price); + } + + public SequenceOfVatDetail getVatDetails() { + return vatDetails; + } + + public void setVatDetails(SequenceOfVatDetail vatDetails) { + this.vatDetails = vatDetails; + } + + public void addVatDetail(VatDetailType vatDetail) { + if (this.vatDetails == null) { + this.vatDetails = new SequenceOfVatDetail(); + } + this.vatDetails.add(vatDetail); + } + + + public void setParkingDate (Date fromDate, Date issuingDate){ + + if (issuingDate == null || fromDate == null) return; + + this.fromParkingDate = DateTimeUtils.getDateDifference(issuingDate,fromDate); + + } + + public Date getFromParkingDate(Date issuingDate){ + + return DateTimeUtils.getDate(issuingDate, this.fromParkingDate, 0L); + + } + + public Date getToParkingDate(Date issuingDate) { + + if ( this.toParkingDate == null) return null; + + return DateTimeUtils.getDate(issuingDate, this.fromParkingDate + this.toParkingDate, 1439L); + + } + + public void setParkingDates(Date fromDate, Date toDate, Date issuingDate) { + + if (issuingDate == null || fromDate == null) return; + + this.fromParkingDate = DateTimeUtils.getDateDifference(issuingDate,fromDate); + + + if (toDate != null) { + this.toParkingDate = DateTimeUtils.getDateDifference(fromDate,toDate); + + } + + } + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/PassData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/PassData.java new file mode 100644 index 0000000..701b076 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/PassData.java @@ -0,0 +1,1005 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Date; +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.asn1.datatypesimpl.SequenceOfStringIA5; +import org.uic.barcode.ticket.api.utils.DateTimeUtils; + +// TODO: Auto-generated Javadoc +/** + * The Class PassData. + */ +@Sequence +@HasExtensionMarker +public class PassData extends Object { + + /** + * Instantiates a new pass data. + */ + public PassData() { + } + + /** The reference num. */ + @FieldOrder(order = 0) + @Asn1Optional public Asn1BigInteger referenceNum; + + /** The reference IA 5. */ + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String referenceIA5; + + /** The product owner num. */ + @FieldOrder(order = 2) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long productOwnerNum; + + /** The product owner IA 5. */ + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productOwnerIA5; + + /** The product id num. */ + @FieldOrder(order = 4) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long productIdNum; + + /** The product id IA 5. */ + @FieldOrder(order = 5) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productIdIA5; + + /** The pass type. */ + @FieldOrder(order = 6) + @IntRange(minValue=1,maxValue=250) + @Asn1Optional public Long passType; + + /** The pass description. */ + @FieldOrder(order = 7) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String passDescription; + + /** The class code. */ + @FieldOrder(order = 8) + @Asn1Default (value="second") + @Asn1Optional public TravelClassType classCode; + + /** The valid from day. */ + @FieldOrder(order = 9) + @IntRange(minValue=-1,maxValue=700) + @Asn1Optional public Long validFromDay; + + /** The valid from time. */ + @FieldOrder(order = 10) + @IntRange(minValue=0,maxValue=1440) + @Asn1Optional public Long validFromTime; + + /** The valid from UTC offset. */ + @FieldOrder(order = 11) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long validFromUTCOffset; + + /** The valid until day. */ + @FieldOrder(order = 12) + @IntRange(minValue=0,maxValue=370) + @Asn1Optional public Long validUntilDay; + + /** The valid until time. */ + @FieldOrder(order = 13) + @IntRange(minValue=0,maxValue=1440) + @Asn1Optional public Long validUntilTime; + + /** The valid until UTC offset. */ + @FieldOrder(order = 14) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long validUntilUTCOffset; + + /** The validity period details. */ + @FieldOrder(order = 15) + @Asn1Optional public ValidityPeriodDetailType validityPeriodDetails; + + /** The number of validity days. */ + @FieldOrder(order = 16) + @IntRange(minValue=0,maxValue=370) + @Asn1Optional public Long numberOfValidityDays; + + /** The number of possible trips. */ + @FieldOrder(order = 17) + @IntRange(minValue=1,maxValue=250) + @Asn1Optional public Long numberOfPossibleTrips; + + /** The number of days of travel. */ + @FieldOrder(order = 18) + @IntRange(minValue=1,maxValue=250) + @Asn1Optional public Long numberOfDaysOfTravel; + + /** The activated day. */ + @FieldOrder(order = 19) + @Asn1Optional public SequenceOfActivatedDays activatedDay; + + /** The countries. */ + @FieldOrder(order = 20) + @Asn1Optional public SequenceOfCountries countries; + + /** The included carriers num. */ + @FieldOrder(order = 21) + @Asn1Optional public SequenceOfCarrierNum includedCarriersNum; + + /** The included carriers IA 5. */ + @FieldOrder(order = 22) + @Asn1Optional public SequenceOfStringIA5 includedCarriersIA5; + + /** The excluded carriers num. */ + @FieldOrder(order = 23) + @Asn1Optional public SequenceOfCarrierNum excludedCarriersNum; + + /** The excluded carriers IA 5. */ + @FieldOrder(order = 24) + @Asn1Optional public SequenceOfStringIA5 excludedCarriersIA5; + + /** The included service brands. */ + @FieldOrder(order = 25) + @Asn1Optional public SequenceOfServiceBrands includedServiceBrands; + + /** The excluded service brands. */ + @FieldOrder(order = 26) + @Asn1Optional public SequenceOfServiceBrands excludedServiceBrands; + + /** The valid region. */ + @FieldOrder(order = 27) + @Asn1Optional public SequenceOfRegionalValidityType validRegion; + + /** The tariffs. */ + @FieldOrder(order = 28) + @Asn1Optional public SequenceOfTariffType tariffs; + + /** The price. */ + @FieldOrder(order = 29) + @Asn1Optional Asn1BigInteger price; + + /** The vat details. */ + @FieldOrder(order = 30) + @Asn1Optional SequenceOfVatDetail vatDetails; + + /** The info text. */ + @FieldOrder(order = 31) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String infoText; + + /** The extension. */ + @FieldOrder(order = 32) + @Asn1Optional public ExtensionData extension; + + + + + + /** + * Gets the reference num. + * + * @return the reference num + */ + public Asn1BigInteger getReferenceNum() { + + return this.referenceNum; + } + + /** + * Gets the reference IA 5. + * + * @return the reference IA 5 + */ + public String getReferenceIA5() { + + return this.referenceIA5; + } + + /** + * Gets the product owner num. + * + * @return the product owner num + */ + public Long getProductOwnerNum() { + + return this.productOwnerNum; + } + + /** + * Gets the product owner IA 5. + * + * @return the product owner IA 5 + */ + public String getProductOwnerIA5() { + + return this.productOwnerIA5; + } + + /** + * Gets the product id num. + * + * @return the product id num + */ + public Long getProductIdNum() { + + return this.productIdNum; + } + + /** + * Gets the product id IA 5. + * + * @return the product id IA 5 + */ + public String getProductIdIA5() { + + return this.productIdIA5; + } + + /** + * Gets the pass type. + * + * @return the pass type + */ + public Long getPassType() { + + return this.passType; + } + + /** + * Gets the pass description. + * + * @return the pass description + */ + public String getPassDescription() { + + return this.passDescription; + } + + /** + * Gets the class code. + * + * @return the class code + */ + public TravelClassType getClassCode() { + + if (classCode == null){ + return TravelClassType.second; + } + + return this.classCode; + } + + /** + * Gets the valid from day. + * + * @return the valid from day + */ + public Long getValidFromDay() { + + return this.validFromDay; + } + + /** + * Gets the valid from time. + * + * @return the valid from time + */ + public Long getValidFromTime() { + + return this.validFromTime; + } + + /** + * Gets the valid until day. + * + * @return the valid until day + */ + public Long getValidUntilDay() { + + return this.validUntilDay; + } + + /** + * Gets the valid until time. + * + * @return the valid until time + */ + public Long getValidUntilTime() { + + return this.validUntilTime; + } + + /** + * Gets the validity period details. + * + * @return the validity period details + */ + public ValidityPeriodDetailType getValidityPeriodDetails() { + + return this.validityPeriodDetails; + } + + /** + * Gets the number of validity days. + * + * @return the number of validity days + */ + public Long getNumberOfValidityDays() { + + return this.numberOfValidityDays; + } + + /** + * Gets the number of possible trips. + * + * @return the number of possible trips + */ + public Long getNumberOfPossibleTrips() { + + return this.numberOfPossibleTrips; + } + + /** + * Gets the number of days of travel. + * + * @return the number of days of travel + */ + public Long getNumberOfDaysOfTravel() { + + return this.numberOfDaysOfTravel; + } + + /** + * Gets the activated day. + * + * @return the activated day + */ + public List getActivatedDay() { + + return this.activatedDay; + } + + /** + * Gets the countries. + * + * @return the countries + */ + public List getCountries() { + + return this.countries; + } + + /** + * Gets the included carriers num. + * + * @return the included carriers num + */ + public List getIncludedCarriersNum() { + + return this.includedCarriersNum; + } + + /** + * Gets the included carriers IA 5. + * + * @return the included carriers IA 5 + */ + public List getIncludedCarriersIA5() { + + return this.includedCarriersIA5; + } + + /** + * Gets the excluded carriers num. + * + * @return the excluded carriers num + */ + public List getExcludedCarriersNum() { + + return this.excludedCarriersNum; + } + + /** + * Gets the excluded carriers IA 5. + * + * @return the excluded carriers IA 5 + */ + public SequenceOfStringIA5 getExcludedCarriersIA5() { + + return this.excludedCarriersIA5; + } + + /** + * Gets the included service brands. + * + * @return the included service brands + */ + public SequenceOfServiceBrands getIncludedServiceBrands() { + + return this.includedServiceBrands; + } + + /** + * Gets the excluded service brands. + * + * @return the excluded service brands + */ + public SequenceOfServiceBrands getExcludedServiceBrands() { + + return this.excludedServiceBrands; + } + + /** + * Gets the valid region. + * + * @return the valid region + */ + public List getValidRegion() { + + return this.validRegion; + } + + /** + * Gets the tariffs. + * + * @return the tariffs + */ + public List getTariffs() { + + return this.tariffs; + } + + /** + * Gets the info text. + * + * @return the info text + */ + public String getInfoText() { + + return this.infoText; + } + + /** + * Gets the extension. + * + * @return the extension + */ + public ExtensionData getExtension() { + + return this.extension; + } + + /** + * Sets the reference num. + * + * @param referenceNum the new reference num + */ + public void setReferenceNum(Asn1BigInteger referenceNum) { + + this.referenceNum = referenceNum; + } + + /** + * Sets the reference IA 5. + * + * @param referenceIA5 the new reference IA 5 + */ + public void setReferenceIA5(String referenceIA5) { + + this.referenceIA5 = referenceIA5; + } + + /** + * Sets the product owner num. + * + * @param productOwnerNum the new product owner num + */ + public void setProductOwnerNum(Long productOwnerNum) { + + this.productOwnerNum = productOwnerNum; + } + + /** + * Sets the product owner IA 5. + * + * @param productOwnerIA5 the new product owner IA 5 + */ + public void setProductOwnerIA5(String productOwnerIA5) { + + this.productOwnerIA5 = productOwnerIA5; + } + + /** + * Sets the product id num. + * + * @param productIdNum the new product id num + */ + public void setProductIdNum(Long productIdNum) { + + this.productIdNum = productIdNum; + } + + /** + * Sets the product id IA 5. + * + * @param productIdIA5 the new product id IA 5 + */ + public void setProductIdIA5(String productIdIA5) { + + this.productIdIA5 = productIdIA5; + } + + /** + * Sets the pass type. + * + * @param passType the new pass type + */ + public void setPassType(Long passType) { + + this.passType = passType; + } + + /** + * Sets the pass description. + * + * @param passDescription the new pass description + */ + public void setPassDescription(String passDescription) { + + this.passDescription = passDescription; + } + + /** + * Sets the class code. + * + * @param classCode the new class code + */ + public void setClassCode(TravelClassType classCode) { + + this.classCode = classCode; + } + + /** + * Sets the valid from day. + * + * @param validFromDay the new valid from day + */ + public void setValidFromDay(Long validFromDay) { + + this.validFromDay = validFromDay; + } + + /** + * Sets the valid from time. + * + * @param validFromTime the new valid from time + */ + public void setValidFromTime(Long validFromTime) { + + this.validFromTime = validFromTime; + } + + /** + * Sets the valid until day. + * + * @param validUntilDay the new valid until day + */ + public void setValidUntilDay(Long validUntilDay) { + + this.validUntilDay = validUntilDay; + } + + /** + * Sets the valid until time. + * + * @param validUntilTime the new valid until time + */ + public void setValidUntilTime(Long validUntilTime) { + + this.validUntilTime = validUntilTime; + } + + /** + * Sets the validity period details. + * + * @param validityPeriodDetails the new validity period details + */ + public void setValidityPeriodDetails(ValidityPeriodDetailType validityPeriodDetails) { + + this.validityPeriodDetails = validityPeriodDetails; + } + + /** + * Sets the number of validity days. + * + * @param numberOfValidityDays the new number of validity days + */ + public void setNumberOfValidityDays(Long numberOfValidityDays) { + + this.numberOfValidityDays = numberOfValidityDays; + } + + /** + * Sets the number of possible trips. + * + * @param numberOfPossibleTrips the new number of possible trips + */ + public void setNumberOfPossibleTrips(Long numberOfPossibleTrips) { + + this.numberOfPossibleTrips = numberOfPossibleTrips; + } + + /** + * Sets the number of days of travel. + * + * @param numberOfDaysOfTravel the new number of days of travel + */ + public void setNumberOfDaysOfTravel(Long numberOfDaysOfTravel) { + + this.numberOfDaysOfTravel = numberOfDaysOfTravel; + } + + /** + * Sets the activated day. + * + * @param activatedDay the new activated day + */ + public void setActivatedDay(SequenceOfActivatedDays activatedDay) { + + this.activatedDay = activatedDay; + } + + /** + * Sets the countries. + * + * @param countries the new countries + */ + public void setCountries(SequenceOfCountries countries) { + + this.countries = countries; + } + + /** + * Sets the included carriers num. + * + * @param includedCarriersNum the new included carriers num + */ + public void setIncludedCarriersNum(SequenceOfCarrierNum includedCarriersNum) { + + this.includedCarriersNum = includedCarriersNum; + } + + /** + * Sets the included carriers IA 5. + * + * @param includedCarriersIA5 the new included carriers IA 5 + */ + public void setIncludedCarriersIA5(SequenceOfStringIA5 includedCarriersIA5) { + + this.includedCarriersIA5 = includedCarriersIA5; + } + + /** + * Sets the excluded carriers num. + * + * @param excludedCarriersNum the new excluded carriers num + */ + public void setExcludedCarriersNum(SequenceOfCarrierNum excludedCarriersNum) { + + this.excludedCarriersNum = excludedCarriersNum; + } + + /** + * Sets the excluded carriers IA 5. + * + * @param excludedCarriersIA5 the new excluded carriers IA 5 + */ + public void setExcludedCarriersIA5(SequenceOfStringIA5 excludedCarriersIA5) { + + this.excludedCarriersIA5 = excludedCarriersIA5; + } + + /** + * Sets the included service brands. + * + * @param includedServiceBrands the new included service brands + */ + public void setIncludedServiceBrands(SequenceOfServiceBrands includedServiceBrands) { + + this.includedServiceBrands = includedServiceBrands; + } + + /** + * Sets the excluded service brands. + * + * @param excludedServiceBrands the new excluded service brands + */ + public void setExcludedServiceBrands(SequenceOfServiceBrands excludedServiceBrands) { + + this.excludedServiceBrands = excludedServiceBrands; + } + + /** + * Sets the valid region. + * + * @param validRegion the new valid region + */ + public void setValidRegion(SequenceOfRegionalValidityType validRegion) { + + this.validRegion = validRegion; + } + + /** + * Sets the tariffs. + * + * @param tariffs the new tariffs + */ + public void setTariffs(SequenceOfTariffType tariffs) { + + this.tariffs = tariffs; + } + + /** + * Sets the info text. + * + * @param infoText the new info text + */ + public void setInfoText(String infoText) { + + this.infoText = infoText; + } + + /** + * Sets the extension. + * + * @param extension the new extension + */ + public void setExtension(ExtensionData extension) { + + this.extension = extension; + } + + /** + * Gets the price. + * + * @return the price + */ + public Long getPrice() { + return Asn1BigInteger.toLong(price); + } + + /** + * Sets the price. + * + * @param price the new price + */ + public void setPrice(Long price) { + this.price = Asn1BigInteger.toAsn1(price); + } + + /** + * Gets the vat details. + * + * @return the vat details + */ + public SequenceOfVatDetail getVatDetails() { + return vatDetails; + } + + /** + * Sets the vat details. + * + * @param vatDetails the new vat details + */ + public void setVatDetails(SequenceOfVatDetail vatDetails) { + this.vatDetails = vatDetails; + } + + /** + * Adds the vat detail. + * + * @param vatDetail the vat detail + */ + public void addVatDetail(VatDetailType vatDetail) { + if (this.vatDetails == null) { + this.vatDetails = new SequenceOfVatDetail(); + } + this.vatDetails.add(vatDetail); + } + + /** + * Sets the validity dates. + * + * @param fromDate the from date + * @param untilDate the until date + * @param issuingDate the issuing date + */ + public void setValidityDates (Date fromDate, Date untilDate, Date issuingDate){ + + if (issuingDate == null || fromDate == null) return; + + this.validFromDay = DateTimeUtils.getDateDifference(issuingDate,fromDate); + this.validFromTime = DateTimeUtils.getTime(fromDate); + + if (untilDate != null){ + this.validUntilDay = DateTimeUtils.getDateDifference(fromDate, untilDate); + this.validUntilTime = DateTimeUtils.getTime(untilDate); + } + + } + + /** + * Gets the valid from date. + * + * @param issuingDate the issuing date + * @return the valid from date + */ + public Date getValidFromDate(Date issuingDate){ + + return DateTimeUtils.getDate(issuingDate, this.validFromDay, this.validFromTime); + + } + + /** + * Gets the valid until date. + * + * @param issuingDate the issuing date + * @return the valid until date + */ + public Date getValidUntilDate(Date issuingDate){ + + if (issuingDate == null) return null; + + if (this.validFromDay == null) { + this.validFromDay = 0L; + } + + if (this.validUntilDay == null) { + return null; + } + + + return DateTimeUtils.getDate(issuingDate, this.validFromDay + this.validUntilDay, this.validUntilTime); + + } + + + public void addActivatedDays(Collection days) { + if (days == null || days.isEmpty()) return; + + if (this.activatedDay == null) { + this.activatedDay = new SequenceOfActivatedDays(); + } + for (Long l : days) { + this.activatedDay.add(l); + } + } + + /** + * Sets the activated days. + * + * @param dates the dates + * @param issuingDate the issuing date + * @param validFromDate the valid from date + */ + public void setActivatedDays(Collection dates, Date issuingDate, Date validFromDate){ + if (this.activatedDay != null) { + this.activatedDay.clear(); + } else { + this.activatedDay= new SequenceOfActivatedDays(); + } + long dateDif = 0L; + if (validFromDate != null) { + dateDif = DateTimeUtils.getDateDifference(issuingDate,validFromDate); + } + if (dates != null && !dates.isEmpty()) { + for (Date day : dates) { + this.addActivatedDay(issuingDate, dateDif, day); + } + } + } + + /** + * Adds the activated day. + * + * @param issuingDate the issuing date in UTC + * @param dateOffset the date offset to be added to the issuing date + * @param day the day to be added + */ + public void addActivatedDay(Date issuingDate, long dateOffset, Date day){ + Long vDiff = DateTimeUtils.getDateDifferenceLocal(this.getValidFromDate(issuingDate), day); + if (this.activatedDay == null) { + this.activatedDay = new SequenceOfActivatedDays(); + } + if (vDiff != null) { + this.activatedDay.add(vDiff); + } + } + + /** + * Gets the activated days. + * + * @param issuingDate the issuing date + * @return the activated days + */ + public Collection getActivatedDays(Date issuingDate) { + if (this.activatedDay == null) return null; + ArrayList dates = new ArrayList(); + for (Long diff: this.getActivatedDay()) { + Date day = DateTimeUtils.getDate(this.getValidFromDate(issuingDate), diff, null); + if (day != null) { + dates.add(day); + } + } + return dates; + } + + /** + * Gets the valid from UTC offset. + * + * @return the valid from UTC offset + */ + public Long getValidFromUTCOffset() { + return validFromUTCOffset; + } + + /** + * Sets the valid from UTC offset. + * + * @param validFromUTCOffset the new valid from UTC offset + */ + public void setValidFromUTCOffset(Long validFromUTCOffset) { + this.validFromUTCOffset = validFromUTCOffset; + } + + /** + * Gets the valid until UTC offset. + * + * @return the valid until UTC offset + */ + public Long getValidUntilUTCOffset() { + return validUntilUTCOffset; + } + + /** + * Sets the valid until UTC offset. + * + * @param validUntilUTCOffset the new valid until UTC offset + */ + public void setValidUntilUTCOffset(Long validUntilUTCOffset) { + this.validUntilUTCOffset = validUntilUTCOffset; + } + + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/PassengerType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/PassengerType.java new file mode 100644 index 0000000..bb683bf --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/PassengerType.java @@ -0,0 +1,46 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; + +@HasExtensionMarker +public enum PassengerType { + adult("adult"), + senior("senior"), + child("child"), + youth("youth"), + dog("dog"), + bicycle("bicycle"), + freeAddonPassenger("freeAddonPassenger"), + freeAddonChild("freeAddonChild"); + + public String text; + + PassengerType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } + +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/PlacesType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/PlacesType.java new file mode 100644 index 0000000..6b1567c --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/PlacesType.java @@ -0,0 +1,131 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.asn1.datatypesimpl.SequenceOfStringIA5; + +@Sequence +public class PlacesType extends Object { + public PlacesType() { + } + + @FieldOrder(order = 0) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String coach; + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String placeString; + + @FieldOrder(order = 2) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String placeDescription; + + @FieldOrder(order = 3) + @Asn1Optional public SequenceOfStringIA5 placeIA5; + + @FieldOrder(order = 4) + @Asn1Optional public SequenceOfPlaceNum placeNum; + + + + public String getCoach() { + + return this.coach; + } + + public String getPlaceString() { + + return this.placeString; + } + + public String getPlaceDescription() { + + return this.placeDescription; + } + + public SequenceOfStringIA5 getPlaceIA5() { + + return this.placeIA5; + } + + public SequenceOfPlaceNum getPlaceNum() { + + return this.placeNum; + } + + public void setCoach(String coach) { + + this.coach = coach; + } + + public void setPlaceString(String placeString) { + + this.placeString = placeString; + } + + public void setPlaceDescription(String placeDescription) { + + this.placeDescription = placeDescription; + } + + public void setPlaceIA5(SequenceOfStringIA5 placeIA5) { + + this.placeIA5 = placeIA5; + } + + public void setPlaceNum(SequenceOfPlaceNum placeNum) { + + this.placeNum = placeNum; + } + + @Override + public boolean equals(Object anObject) { + if (this == anObject) return true; + if ((anObject == null) || (anObject.getClass() != this.getClass())) return false; + + PlacesType comparator = (PlacesType)anObject; + + if ((this.getCoach() != comparator.getCoach()) && ((this.getCoach() == null) || (! this.getCoach().equals(comparator.getCoach())))) return false; + if ((this.getPlaceString() != comparator.getPlaceString()) && ((this.getPlaceString() == null) || (! this.getPlaceString().equals(comparator.getPlaceString())))) return false; + if ((this.getPlaceDescription() != comparator.getPlaceDescription()) && ((this.getPlaceDescription() == null) || (! this.getPlaceDescription().equals(comparator.getPlaceDescription())))) return false; + if ((this.getPlaceIA5() != comparator.getPlaceIA5()) && ((this.getPlaceIA5() == null) || (! this.getPlaceIA5().equals(comparator.getPlaceIA5())))) return false; + if ((this.getPlaceNum() != comparator.getPlaceNum()) && ((this.getPlaceNum() == null) || (! this.getPlaceNum().equals(comparator.getPlaceNum())))) return false; + return true; + } + + @Override + public int hashCode() { + int hash = 5477; + + hash = 3547 * hash + (null == this.getCoach() ? 0 : this.getCoach().hashCode()); + hash = 7321 * hash + (null == this.getPlaceString() ? 0 : this.getPlaceString().hashCode()); + hash = 2083 * hash + (null == this.getPlaceDescription() ? 0 : this.getPlaceDescription().hashCode()); + hash = 881 * hash + (null == this.getPlaceIA5() ? 0 : this.getPlaceIA5().hashCode()); + hash = 6679 * hash + (null == this.getPlaceNum() ? 0 : this.getPlaceNum().hashCode()); + return hash; + } + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/PolygoneType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/PolygoneType.java new file mode 100644 index 0000000..24b05cf --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/PolygoneType.java @@ -0,0 +1,58 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.Sequence; + +@Sequence +public class PolygoneType extends Object { + public PolygoneType() { + } + + @FieldOrder(order = 0) + public GeoCoordinateType firstEdge; + + @FieldOrder(order = 1) + public SequenceOfDeltaCoordinates edges; + + + public GeoCoordinateType getFirstEdge() { + + return this.firstEdge; + } + + public SequenceOfDeltaCoordinates getEdges() { + + return this.edges; + } + + public void setFirstEdge(GeoCoordinateType firstEdge) { + + this.firstEdge = firstEdge; + } + + public void setEdges(SequenceOfDeltaCoordinates edges) { + + this.edges = edges; + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/PriceTypeType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/PriceTypeType.java new file mode 100644 index 0000000..b75f3c7 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/PriceTypeType.java @@ -0,0 +1,39 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +public enum PriceTypeType { + noPrice("noPrice"), + reservationFee("reservationFee"), + supplement("supplement"), + travelPrice("travelPrice"); + + + public String text; + + PriceTypeType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/RegionalValidityType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/RegionalValidityType.java new file mode 100644 index 0000000..f35de07 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/RegionalValidityType.java @@ -0,0 +1,100 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import org.uic.barcode.asn1.datatypes.Choice; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; + + +@Choice +@HasExtensionMarker +public class RegionalValidityType extends Object { + public RegionalValidityType() { + } + + @FieldOrder(order = 0) + public TrainLinkType trainLink; + + @FieldOrder(order = 1) + public ViaStationType viaStations; + + @FieldOrder(order = 2) + public ZoneType zones; + + @FieldOrder(order = 3) + public LineType lines; + + @FieldOrder(order = 4) + public PolygoneType polygone; + + + public TrainLinkType getTrainLink() { + + return this.trainLink; + } + + public ViaStationType getViaStations() { + + return this.viaStations; + } + + public ZoneType getZones() { + + return this.zones; + } + + public LineType getLines() { + + return this.lines; + } + + public PolygoneType getPolygone() { + + return this.polygone; + } + + public void setTrainLink(TrainLinkType trainLink) { + + this.trainLink = trainLink; + } + + public void setViaStations(ViaStationType viaStations) { + + this.viaStations = viaStations; + } + + public void setZones(ZoneType zones) { + + this.zones = zones; + } + + public void setLines(LineType lines) { + + this.lines = lines; + } + + public void setPolygone(PolygoneType polygone) { + + this.polygone = polygone; + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/RegisteredLuggageType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/RegisteredLuggageType.java new file mode 100644 index 0000000..442de07 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/RegisteredLuggageType.java @@ -0,0 +1,80 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; + + +@Sequence +@HasExtensionMarker +public class RegisteredLuggageType extends Object { + public RegisteredLuggageType() { + } + + @FieldOrder(order = 0) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String registrationId; + + @FieldOrder(order = 1) + @IntRange(minValue=1,maxValue=99) + @Asn1Optional public Long maxWeight; + + @FieldOrder(order = 2) + @IntRange(minValue=1,maxValue=300) + @Asn1Optional public Long maxSize; + + public String getRegistrationId() { + + return this.registrationId; + } + + public Long getMaxWeight() { + + return this.maxWeight; + } + + public Long getMaxSize() { + + return this.maxSize; + } + + public void setRegistrationId(String registrationId) { + + this.registrationId = registrationId; + } + + public void setMaxWeight(Long maxWeight) { + + this.maxWeight = maxWeight; + } + + public void setMaxSize(Long maxSize) { + + this.maxSize = maxSize; + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ReservationData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ReservationData.java new file mode 100644 index 0000000..adc5f71 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ReservationData.java @@ -0,0 +1,711 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Date; +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.asn1.datatypes.SizeRange; +import org.uic.barcode.asn1.datatypesimpl.SequenceOfStringIA5; +import org.uic.barcode.ticket.api.utils.DateTimeUtils; + +@Sequence +@HasExtensionMarker +public class ReservationData extends Object { + public ReservationData() { + } + + @FieldOrder(order = 0) + @Asn1Optional public Asn1BigInteger trainNum; + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String trainIA5; + + @FieldOrder(order = 2) + @Asn1Default(value="0") + @IntRange(minValue=-1,maxValue=370) + @Asn1Optional public Long departureDate; + + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String referenceIA5; + + @FieldOrder(order = 4) + @Asn1Optional public Asn1BigInteger referenceNum; + + @FieldOrder(order = 5) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long productOwnerNum; + + @FieldOrder(order = 6) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productOwnerIA5; + + @FieldOrder(order = 7) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long productIdNum; + + @FieldOrder(order = 8) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productIdIA5; + + @FieldOrder(order = 9) + @IntRange(minValue=0,maxValue=32000) + @Asn1Optional public Long serviceBrand; + + @FieldOrder(order = 10) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String serviceBrandAbrUTF8; + + @FieldOrder(order = 11) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String serviceBrandNameUTF8; + + @FieldOrder(order = 12) + @Asn1Default("seat") + @Asn1Optional public ServiceType service; + + @FieldOrder(order = 13) + @Asn1Default("stationUICReservation") + @Asn1Optional public CodeTableType stationCodeTable; + + @FieldOrder(order = 14) + @IntRange(minValue=1,maxValue=9999999) + @Asn1Optional public Long fromStationNum; + + @FieldOrder(order = 15) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String fromStationIA5; + + @FieldOrder(order = 16) + @IntRange(minValue=1,maxValue=9999999) + @Asn1Optional public Long toStationNum; + + @FieldOrder(order = 17) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String toStationIA5; + + @FieldOrder(order = 18) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String fromStationNameUTF8; + + @FieldOrder(order = 19) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String toStationNameUTF8; + + @FieldOrder(order = 20) + @IntRange(minValue=0,maxValue=1440) + public Long departureTime; + + @FieldOrder(order = 21) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long departureUTCOffset; + + @FieldOrder(order = 22) + @IntRange(minValue=-1,maxValue=20) + @Asn1Default(value="0") + @Asn1Optional public Long arrivalDate; + + @FieldOrder(order = 23) + @IntRange(minValue=0,maxValue=1440) + @Asn1Optional public Long arrivalTime; + + @FieldOrder(order = 24) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long arrivalUTCOffset; + + @FieldOrder(order = 25) + @Asn1Optional public SequenceOfCarrierNum carrierNum; + + @FieldOrder(order = 26) + @Asn1Optional public SequenceOfStringIA5 carrierIA5; + + @FieldOrder(order = 27) + @Asn1Default("second") + @Asn1Optional public TravelClassType classCode; + + @FieldOrder(order = 28) + @SizeRange(minValue = 1, maxValue = 2) + @Asn1Optional public String serviceLevel; + + @FieldOrder(order = 29) + @Asn1Optional public PlacesType places; + + @FieldOrder(order = 30) + @Asn1Optional public PlacesType additionalPlaces; + + @FieldOrder(order = 31) + @Asn1Optional public PlacesType bicyclePlaces; + + @FieldOrder(order = 32) + @Asn1Optional public CompartmentDetailsType compartmentDetails; + + @FieldOrder(order = 33) + @IntRange(minValue=0,maxValue=200) + @Asn1Default(value="0") + @Asn1Optional public Long numberOfOverbooked; + + @FieldOrder(order = 34) + @Asn1Optional public SequenceOfBerthDetailData berth; + + @FieldOrder(order = 35) + @Asn1Optional public SequenceOfTariffType tariff; + + @FieldOrder(order = 36) + @Asn1Default("travelPrice") + @Asn1Optional public PriceTypeType priceType; + + @FieldOrder(order = 37) + @Asn1Optional Asn1BigInteger price; + + @FieldOrder(order = 38) + @Asn1Optional SequenceOfVatDetail vatDetails; + + @FieldOrder(order = 39) + @IntRange(minValue=0,maxValue=9) + @Asn1Default("0") + @Asn1Optional public Long typeOfSupplement; + + @FieldOrder(order = 40) + @IntRange(minValue=0,maxValue=200) + @Asn1Default("0") + @Asn1Optional public Long numberOfSupplements; + + @FieldOrder(order = 41) + @Asn1Optional public LuggageRestrictionType luggage; + + @FieldOrder(order = 42) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String infoText; + + @FieldOrder(order = 43) + @Asn1Optional public ExtensionData extension; + + public Long getTrainNum() { + + return Asn1BigInteger.toLong(this.trainNum); + } + + public String getTrainIA5() { + return this.trainIA5; + } + + public Long getDepartureDate() { + return this.departureDate; + } + + public String getReferenceIA5() { + return this.referenceIA5; + } + + public Long getReferenceNum() { + return Asn1BigInteger.toLong(this.referenceNum); + } + + public Long getProductOwnerNum() { + return this.productOwnerNum; + } + + public String getProductOwnerIA5() { + return this.productOwnerIA5; + } + + public Long getProductIdNum() { + return this.productIdNum; + } + + public String getProductIdIA5() { + return this.productIdIA5; + } + + public Long getServiceBrand() { + return this.serviceBrand; + } + + public String getServiceBrandAbrUTF8() { + return this.serviceBrandAbrUTF8; + } + + public String getServiceBrandNameUTF8() { + return this.serviceBrandNameUTF8; + } + + public ServiceType getService() { + + if (service == null){ + return ServiceType.seat; + } + + return this.service; + } + + public CodeTableType getStationCodeTable() { + + if (stationCodeTable == null) { + return CodeTableType.stationUICReservation; + } + + return this.stationCodeTable; + } + + public Long getFromStationNum() { + + return this.fromStationNum; + } + + public String getFromStationIA5() { + + return this.fromStationIA5; + } + + public Long getToStationNum() { + + return this.toStationNum; + } + + public String getToStationIA5() { + + return this.toStationIA5; + } + + public String getFromStationNameUTF8() { + + return this.fromStationNameUTF8; + } + + public String getToStationNameUTF8() { + + return this.toStationNameUTF8; + } + + public Long getDepartureTime() { + + return this.departureTime; + } + + public Long getArrivalDate() { + + if (arrivalDate == null) { + return new Long(0); + } + + return this.arrivalDate; + } + + public Long getArrivalTime() { + + return this.arrivalTime; + } + + public List getCarrierNum() { + + return this.carrierNum; + } + + public List getCarrierIA5() { + + return this.carrierIA5; + } + + public TravelClassType getClassCode() { + + + if (classCode == null) { + return TravelClassType.second; + } + + return this.classCode; + } + + public String getServiceLevel() { + + return this.serviceLevel; + } + + public PlacesType getPlaces() { + + return this.places; + } + + public PlacesType getAdditionalPlaces() { + + return this.additionalPlaces; + } + + public PlacesType getBicyclePlaces() { + + return this.bicyclePlaces; + } + + public CompartmentDetailsType getCompartmentDetails() { + + return this.compartmentDetails; + } + + public Long getNumberOfOverbooked() { + + return this.numberOfOverbooked; + } + + public List getBerth() { + + return this.berth; + } + + public List getTariff() { + + return this.tariff; + } + + public PriceTypeType getPriceType() { + + if (priceType == null) { + return PriceTypeType.travelPrice; + } + + return this.priceType; + } + + public Long getTypeOfSupplement() { + + if (typeOfSupplement == null){ + return new Long(0); + } + + + return this.typeOfSupplement; + } + + public Long getNumberOfSupplements() { + + if (numberOfSupplements == null) { + return new Long(0); + } + + return this.numberOfSupplements; + } + + public LuggageRestrictionType getLuggage() { + + return this.luggage; + } + + public String getInfoText() { + + return this.infoText; + } + + public ExtensionData getExtension() { + + return this.extension; + } + + public void setTrainNum(Long trainNum) { + + this.trainNum = Asn1BigInteger.toAsn1(trainNum); + } + + public void setTrainIA5(String trainIA5) { + + this.trainIA5 = trainIA5; + } + + public void setDepartureDate(Long departureDate) { + + this.departureDate = departureDate; + } + + public void setReferenceIA5(String referenceIA5) { + + this.referenceIA5 = referenceIA5; + } + + public void setReferenceNum(Long referenceNum) { + this.referenceNum = Asn1BigInteger.toAsn1(referenceNum); + } + + public void setProductOwnerNum(Long productOwnerNum) { + + this.productOwnerNum = productOwnerNum; + } + + public void setProductOwnerIA5(String productOwnerIA5) { + + this.productOwnerIA5 = productOwnerIA5; + } + + public void setProductIdNum(Long productIdNum) { + + this.productIdNum = productIdNum; + } + + public void setProductIdIA5(String productIdIA5) { + + this.productIdIA5 = productIdIA5; + } + + public void setServiceBrand(Long serviceBrand) { + + this.serviceBrand = serviceBrand; + } + + public void setServiceBrandAbrUTF8(String serviceBrandAbrUTF8) { + + this.serviceBrandAbrUTF8 = serviceBrandAbrUTF8; + } + + public void setServiceBrandNameUTF8(String serviceBrandNameUTF8) { + + this.serviceBrandNameUTF8 = serviceBrandNameUTF8; + } + + public void setService(ServiceType service) { + + this.service = service; + } + + public void setStationCodeTable(CodeTableType stationCodeTable) { + + this.stationCodeTable = stationCodeTable; + } + + public void setFromStationNum(Long fromStationNum) { + + this.fromStationNum = fromStationNum; + } + + public void setFromStationIA5(String fromStationIA5) { + + this.fromStationIA5 = fromStationIA5; + } + + public void setToStationNum(Long toStationNum) { + + this.toStationNum = toStationNum; + } + + public void setToStationIA5(String toStationIA5) { + + this.toStationIA5 = toStationIA5; + } + + public void setFromStationNameUTF8(String fromStationNameUTF8) { + + this.fromStationNameUTF8 = fromStationNameUTF8; + } + + public void setToStationNameUTF8(String toStationNameUTF8) { + + this.toStationNameUTF8 = toStationNameUTF8; + } + + public void setDepartureTime(Long departureTime) { + + this.departureTime = departureTime; + } + + public void setArrivalDate(Long arrivalDate) { + + this.arrivalDate = arrivalDate; + } + + public void setArrivalTime(Long arrivalTime) { + + this.arrivalTime = arrivalTime; + } + + public void setCarrierNum(SequenceOfCarrierNum carrierNum) { + + this.carrierNum = carrierNum; + } + + public void setCarriersNum(List longs) { + if (longs == null) return; + + this.carrierNum = new SequenceOfCarrierNum(); + this.carrierNum.addAll(longs); + } + + public void setCarrierIA5(SequenceOfStringIA5 carrierIA5) { + + this.carrierIA5 = carrierIA5; + } + + public void setClassCode(TravelClassType classCode) { + + this.classCode = classCode; + } + + public void setServiceLevel(String serviceLevel) { + + this.serviceLevel = serviceLevel; + } + + public void setPlaces(PlacesType places) { + + this.places = places; + } + + public void setAdditionalPlaces(PlacesType additionalPlaces) { + + this.additionalPlaces = additionalPlaces; + } + + public void setBicyclePlaces(PlacesType bicyclePlaces) { + + this.bicyclePlaces = bicyclePlaces; + } + + public void setCompartmentDetails(CompartmentDetailsType compartmentDetails) { + + this.compartmentDetails = compartmentDetails; + } + + public void setNumberOfOverbooked(Long numberOfOverbooked) { + + this.numberOfOverbooked = numberOfOverbooked; + } + + public void setBerth(SequenceOfBerthDetailData berth) { + + this.berth = berth; + } + + public void setTariff(SequenceOfTariffType tariff) { + + this.tariff = tariff; + } + + public void setPriceType(PriceTypeType priceType) { + + this.priceType = priceType; + } + + public void setTypeOfSupplement(Long typeOfSupplement) { + + this.typeOfSupplement = typeOfSupplement; + } + + public void setNumberOfSupplements(Long numberOfSupplements) { + + this.numberOfSupplements = numberOfSupplements; + } + + public void setLuggage(LuggageRestrictionType luggage) { + + this.luggage = luggage; + } + + public void setInfoText(String infoText) { + + this.infoText = infoText; + } + + public void setExtension(ExtensionData extension) { + + this.extension = extension; + } + + public Long getPrice() { + return Asn1BigInteger.toLong(price); + } + + public void setPrice(Long price) { + this.price = Asn1BigInteger.toAsn1(price); + } + + public SequenceOfVatDetail getVatDetails() { + return vatDetails; + } + + public void setVatDetails(SequenceOfVatDetail vatDetails) { + this.vatDetails = vatDetails; + } + + public void addVatDetail(VatDetailType vatDetail) { + if (this.vatDetails == null) { + this.vatDetails = new SequenceOfVatDetail(); + } + this.vatDetails.add(vatDetail); + } + + public void setDepartureArrivalDates (Date departure, Date arrival, Date issuingDate){ + + if (issuingDate == null || departure == null) return; + + this.departureDate = DateTimeUtils.getDateDifference(issuingDate,departure); + this.departureTime = DateTimeUtils.getTime(departure); + + if (arrival != null){ + this.arrivalDate = DateTimeUtils.getDateDifference(departure, arrival); + this.arrivalTime = DateTimeUtils.getTime(arrival); + } + + } + + public Date getDepartureDate(Date issuingDate){ + + return DateTimeUtils.getDate(issuingDate, this.departureDate, this.departureTime); + + } + + public Date getArrivalDate(Date issuingDate){ + + if (this.departureDate == null) { + this.departureDate = 0L; + } + + if (this.arrivalDate == null) { + return null; + } + + return DateTimeUtils.getDate(issuingDate, this.departureDate + this.arrivalDate, this.arrivalTime); + } + + public Long getDepartureUTCOffset() { + return departureUTCOffset; + } + + public void setDepartureUTCOffset(Long departureUTCOffset) { + this.departureUTCOffset = departureUTCOffset; + } + + public Long getArrivalUTCOffset() { + return arrivalUTCOffset; + } + + public void setArrivalUTCOffset(Long arrivalUTCOffset) { + this.arrivalUTCOffset = arrivalUTCOffset; + } + + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ReturnRouteDescriptionType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ReturnRouteDescriptionType.java new file mode 100644 index 0000000..438c1fb --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ReturnRouteDescriptionType.java @@ -0,0 +1,150 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; + +@Sequence +@HasExtensionMarker +public class ReturnRouteDescriptionType extends Object { + public ReturnRouteDescriptionType() { + } + + @FieldOrder(order = 0) + @IntRange(minValue=1,maxValue=9999999) + @Asn1Optional public Long fromStationNum; + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String fromStationIA5; + + @FieldOrder(order = 2) + @IntRange(minValue=1,maxValue=9999999) + @Asn1Optional public Long toStationNum; + + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String toStationIA5; + + @FieldOrder(order = 4) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String fromStationNameUTF8; + + @FieldOrder(order = 5) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String toStationNameUTF8; + + @FieldOrder(order = 6) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String validReturnRegionDesc; + + @FieldOrder(order = 7) + @Asn1Optional public SequenceOfRegionalValidityType validReturnRegion; + + public Long getFromStationNum() { + + return this.fromStationNum; + } + + public String getFromStationIA5() { + + return this.fromStationIA5; + } + + public Long getToStationNum() { + + return this.toStationNum; + } + + public String getToStationIA5() { + + return this.toStationIA5; + } + + public String getFromStationNameUTF8() { + + return this.fromStationNameUTF8; + } + + public String getToStationNameUTF8() { + + return this.toStationNameUTF8; + } + + public String getValidReturnRegionDesc() { + + return this.validReturnRegionDesc; + } + + public List getValidReturnRegion() { + + return this.validReturnRegion; + } + + public void setFromStationNum(Long fromStationNum) { + + this.fromStationNum = fromStationNum; + } + + public void setFromStationIA5(String fromStationIA5) { + + this.fromStationIA5 = fromStationIA5; + } + + public void setToStationNum(Long toStationNum) { + + this.toStationNum = toStationNum; + } + + public void setToStationIA5(String toStationIA5) { + + this.toStationIA5 = toStationIA5; + } + + public void setFromStationNameUTF8(String fromStationNameUTF8) { + + this.fromStationNameUTF8 = fromStationNameUTF8; + } + + public void setToStationNameUTF8(String toStationNameUTF8) { + + this.toStationNameUTF8 = toStationNameUTF8; + } + + public void setValidReturnRegionDesc(String validReturnRegionDesc) { + + this.validReturnRegionDesc = validReturnRegionDesc; + } + + public void setValidReturnRegion(SequenceOfRegionalValidityType validReturnRegion) { + + this.validReturnRegion = validReturnRegion; + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/RoofRackType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/RoofRackType.java new file mode 100644 index 0000000..e25b0c5 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/RoofRackType.java @@ -0,0 +1,46 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; + +@HasExtensionMarker +public enum RoofRackType { + norack("norack"), + roofRailing("roofRailing"), + luggageRack("luggageRack"), + skiRack("skiRack"), + boxRack("boxRack"), + rackWithOneBox("rackWithOneBox"), + rackWithTwoBoxes("rackWithTwoBoxes"), + bicycleRack("bicycleRack"), + otherRack("otherRack"); + + public String text; + + RoofRackType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/RouteSectionType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/RouteSectionType.java new file mode 100644 index 0000000..ead3098 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/RouteSectionType.java @@ -0,0 +1,136 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; + +public class RouteSectionType extends Object { + public RouteSectionType() { + } + + @FieldOrder(order = 0) + @Asn1Default("stationUIC") + @Asn1Optional public CodeTableType stationCodeTable; + + @FieldOrder(order = 1) + @IntRange(minValue=1,maxValue=9999999) + @Asn1Optional public Long fromStationNum; + + @FieldOrder(order = 2) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String fromStationIA5; + + @FieldOrder(order = 3) + @IntRange(minValue=1,maxValue=9999999) + @Asn1Optional public Long toStationNum; + + @FieldOrder(order = 4) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String toStationIA5; + + @FieldOrder(order = 5) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String fromStationNameUTF8; + + @FieldOrder(order = 6) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String toStationNameUTF8; + + public CodeTableType getStationCodeTable() { + + if (stationCodeTable == null) { + return CodeTableType.stationUIC; + } + + return this.stationCodeTable; + } + + public Long getFromStationNum() { + + return this.fromStationNum; + } + + public String getFromStationIA5() { + + return this.fromStationIA5; + } + + public Long getToStationNum() { + + return this.toStationNum; + } + + public String getToStationIA5() { + + return this.toStationIA5; + } + + public String getFromStationNameUTF8() { + + return this.fromStationNameUTF8; + } + + public String getToStationNameUTF8() { + + return this.toStationNameUTF8; + } + + public void setStationCodeTable(CodeTableType stationCodeTable) { + + this.stationCodeTable = stationCodeTable; + } + + public void setFromStationNum(Long fromStationNum) { + + this.fromStationNum = fromStationNum; + } + + public void setFromStationIA5(String fromStationIA5) { + + this.fromStationIA5 = fromStationIA5; + } + + public void setToStationNum(Long toStationNum) { + + this.toStationNum = toStationNum; + } + + public void setToStationIA5(String toStationIA5) { + + this.toStationIA5 = toStationIA5; + } + + public void setFromStationNameUTF8(String fromStationNameUTF8) { + + this.fromStationNameUTF8 = fromStationNameUTF8; + } + + public void setToStationNameUTF8(String toStationNameUTF8) { + + this.toStationNameUTF8 = toStationNameUTF8; + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfActivatedDays.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfActivatedDays.java new file mode 100644 index 0000000..2d1eebd --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfActivatedDays.java @@ -0,0 +1,26 @@ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Collection; +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; +import org.uic.barcode.asn1.datatypes.IntRange; + +@IntRange(minValue=0,maxValue=370) +public class SequenceOfActivatedDays extends Asn1SequenceOf { + public SequenceOfActivatedDays() { super(); } + public SequenceOfActivatedDays(Collection coll) { super(coll); } + + public SequenceOfActivatedDays(List numbers) { + super(); + for (Long number: numbers){ + this.add(new Long(number)); + } + } + + public static SequenceOfActivatedDays getSequence(List numList) { + if (numList == null || numList.isEmpty()) return null; + return new SequenceOfActivatedDays(numList); + } + +} \ No newline at end of file diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfBerthDetailData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfBerthDetailData.java new file mode 100644 index 0000000..b552482 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfBerthDetailData.java @@ -0,0 +1,10 @@ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Collection; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; + +public class SequenceOfBerthDetailData extends Asn1SequenceOf { + public SequenceOfBerthDetailData() { super(); } + public SequenceOfBerthDetailData(Collection coll) { super(coll); } +} \ No newline at end of file diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCardReferenceType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCardReferenceType.java new file mode 100644 index 0000000..a454960 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCardReferenceType.java @@ -0,0 +1,10 @@ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Collection; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; + +public class SequenceOfCardReferenceType extends Asn1SequenceOf { + public SequenceOfCardReferenceType() { super(); } + public SequenceOfCardReferenceType(Collection coll) { super(coll); } +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCarrierIA5.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCarrierIA5.java new file mode 100644 index 0000000..f3f09cf --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCarrierIA5.java @@ -0,0 +1,13 @@ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Collection; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.RestrictedString; + +@RestrictedString(CharacterRestriction.IA5String) +public class SequenceOfCarrierIA5 extends Asn1SequenceOf { + public SequenceOfCarrierIA5() { super(); } + public SequenceOfCarrierIA5(Collection coll) { super(coll); } +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCarrierNum.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCarrierNum.java new file mode 100644 index 0000000..9d75e83 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCarrierNum.java @@ -0,0 +1,28 @@ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Collection; +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; +import org.uic.barcode.asn1.datatypes.IntRange; + +@IntRange(minValue=1,maxValue=32000) +public class SequenceOfCarrierNum extends Asn1SequenceOf { + public SequenceOfCarrierNum() { super(); } + public SequenceOfCarrierNum(Collection coll) { super(coll); } + + + public SequenceOfCarrierNum(List numbers) { + super(); + for (Long number: numbers){ + this.add(new Long(number)); + } + } + public static SequenceOfCarrierNum getSequence(List numList) { + if (numList == null || numList.isEmpty()) return null; + return new SequenceOfCarrierNum(numList); + } + + + +} \ No newline at end of file diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCountries.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCountries.java new file mode 100644 index 0000000..e6dd46b --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCountries.java @@ -0,0 +1,27 @@ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Collection; +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; +import org.uic.barcode.asn1.datatypes.IntRange; + +@IntRange(minValue=1,maxValue=250) +public class SequenceOfCountries extends Asn1SequenceOf { + public SequenceOfCountries() { super(); } + public SequenceOfCountries(Collection coll) { super(coll); } + + + public SequenceOfCountries(List numbers) { + super(); + for (Long number: numbers){ + this.add(new Long(number)); + } + } + + public static SequenceOfCountries getSequence(List numList) { + if (numList == null || numList.isEmpty()) return null; + return new SequenceOfCountries(numList); + } + +} \ No newline at end of file diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCustomerStatusType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCustomerStatusType.java new file mode 100644 index 0000000..6506409 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCustomerStatusType.java @@ -0,0 +1,11 @@ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Collection; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; + +public class SequenceOfCustomerStatusType extends Asn1SequenceOf { + public SequenceOfCustomerStatusType() { super(); } + public SequenceOfCustomerStatusType(Collection coll) { super(coll); } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfDeltaCoordinates.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfDeltaCoordinates.java new file mode 100644 index 0000000..b8ce30a --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfDeltaCoordinates.java @@ -0,0 +1,10 @@ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Collection; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; + +public class SequenceOfDeltaCoordinates extends Asn1SequenceOf { + public SequenceOfDeltaCoordinates() { super(); } + public SequenceOfDeltaCoordinates(Collection coll) { super(coll); } +} \ No newline at end of file diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfDocumentData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfDocumentData.java new file mode 100644 index 0000000..94a50ac --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfDocumentData.java @@ -0,0 +1,10 @@ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Collection; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; + +public class SequenceOfDocumentData extends Asn1SequenceOf { + public SequenceOfDocumentData() { super(); } + public SequenceOfDocumentData(Collection coll) { super(coll); } +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfExtensionData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfExtensionData.java new file mode 100644 index 0000000..f6bcf22 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfExtensionData.java @@ -0,0 +1,10 @@ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Collection; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; + +public class SequenceOfExtensionData extends Asn1SequenceOf { + public SequenceOfExtensionData() { super(); } + public SequenceOfExtensionData(Collection coll) { super(coll); } +} \ No newline at end of file diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfIncludedOpenTicketType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfIncludedOpenTicketType.java new file mode 100644 index 0000000..a76647f --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfIncludedOpenTicketType.java @@ -0,0 +1,10 @@ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Collection; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; + +public class SequenceOfIncludedOpenTicketType extends Asn1SequenceOf { + public SequenceOfIncludedOpenTicketType() { super(); } + public SequenceOfIncludedOpenTicketType(Collection coll) { super(coll); } +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfPlaceNum.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfPlaceNum.java new file mode 100644 index 0000000..c8ec7ce --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfPlaceNum.java @@ -0,0 +1,28 @@ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Collection; +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; +import org.uic.barcode.asn1.datatypes.IntRange; + +@IntRange(minValue=1,maxValue=254) +public class SequenceOfPlaceNum extends Asn1SequenceOf { + public SequenceOfPlaceNum() { super(); } + public SequenceOfPlaceNum(Collection coll) { super(coll); } + + + + public SequenceOfPlaceNum(List numbers) { + super(); + for (Long number: numbers){ + this.add(new Long(number)); + } + } + + public static SequenceOfPlaceNum getSequence(List numList) { + if (numList == null || numList.isEmpty()) return null; + return new SequenceOfPlaceNum(numList); + } + +} \ No newline at end of file diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfRegionalValidityType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfRegionalValidityType.java new file mode 100644 index 0000000..1dee609 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfRegionalValidityType.java @@ -0,0 +1,10 @@ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Collection; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; + +public class SequenceOfRegionalValidityType extends Asn1SequenceOf { + public SequenceOfRegionalValidityType() { super(); } + public SequenceOfRegionalValidityType(Collection coll) { super(coll); } +} \ No newline at end of file diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfRegisteredLuggageType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfRegisteredLuggageType.java new file mode 100644 index 0000000..6670df9 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfRegisteredLuggageType.java @@ -0,0 +1,10 @@ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Collection; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; + +public class SequenceOfRegisteredLuggageType extends Asn1SequenceOf { + public SequenceOfRegisteredLuggageType() { super(); } + public SequenceOfRegisteredLuggageType(Collection coll) { super(coll); } +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfServiceBrands.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfServiceBrands.java new file mode 100644 index 0000000..3edd7fb --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfServiceBrands.java @@ -0,0 +1,26 @@ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Collection; +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; +import org.uic.barcode.asn1.datatypes.IntRange; + +@IntRange(minValue=0,maxValue=32000) +public class SequenceOfServiceBrands extends Asn1SequenceOf { + public SequenceOfServiceBrands() { super(); } + public SequenceOfServiceBrands(Collection coll) { super(coll); } + + + public SequenceOfServiceBrands(List numbers) { + super(); + for (Long number: numbers){ + this.add(new Long(number)); + } + } + + public static SequenceOfServiceBrands getSequence(List numList) { + if (numList == null || numList.isEmpty()) return null; + return new SequenceOfServiceBrands(numList); + } +} \ No newline at end of file diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfTariffType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfTariffType.java new file mode 100644 index 0000000..51110ae --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfTariffType.java @@ -0,0 +1,10 @@ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Collection; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; + +public class SequenceOfTariffType extends Asn1SequenceOf { + public SequenceOfTariffType() { super(); } + public SequenceOfTariffType(Collection coll) { super(coll); } +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfTicketLinkType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfTicketLinkType.java new file mode 100644 index 0000000..33b0331 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfTicketLinkType.java @@ -0,0 +1,10 @@ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Collection; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; + +public class SequenceOfTicketLinkType extends Asn1SequenceOf { + public SequenceOfTicketLinkType() { super(); } + public SequenceOfTicketLinkType(Collection coll) { super(coll); } +} \ No newline at end of file diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfTravelerId.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfTravelerId.java new file mode 100644 index 0000000..3a1b1ec --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfTravelerId.java @@ -0,0 +1,26 @@ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Collection; +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; +import org.uic.barcode.asn1.datatypes.IntRange; + +@IntRange(minValue=0,maxValue=254) +public class SequenceOfTravelerId extends Asn1SequenceOf { + public SequenceOfTravelerId() { super(); } + public SequenceOfTravelerId(Collection coll) { super(coll); } + + public SequenceOfTravelerId(List numbers) { + super(); + for (Long number: numbers){ + this.add(new Long(number)); + } + } + + public static SequenceOfTravelerId getSequence(List numList) { + if (numList == null || numList.isEmpty()) return null; + return new SequenceOfTravelerId(numList); + } + +} \ No newline at end of file diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfTravelerType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfTravelerType.java new file mode 100644 index 0000000..cbf7f99 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfTravelerType.java @@ -0,0 +1,10 @@ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Collection; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; + +public class SequenceOfTravelerType extends Asn1SequenceOf { + public SequenceOfTravelerType() { super(); } + public SequenceOfTravelerType(Collection coll) { super(coll); } +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfVatDetail.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfVatDetail.java new file mode 100644 index 0000000..52e0bbf --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfVatDetail.java @@ -0,0 +1,10 @@ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Collection; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; + +public class SequenceOfVatDetail extends Asn1SequenceOf { + public SequenceOfVatDetail() { super(); } + public SequenceOfVatDetail(Collection coll) { super(coll); } +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfViaStationType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfViaStationType.java new file mode 100644 index 0000000..1bd4427 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfViaStationType.java @@ -0,0 +1,10 @@ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Collection; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; + +public class SequenceOfViaStationType extends Asn1SequenceOf { + public SequenceOfViaStationType() { super(); } + public SequenceOfViaStationType(Collection coll) { super(coll); } +} \ No newline at end of file diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SeriesDetailType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SeriesDetailType.java new file mode 100644 index 0000000..d2b7d96 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SeriesDetailType.java @@ -0,0 +1,75 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.Sequence; + +@Sequence +public class SeriesDetailType extends Object { + public SeriesDetailType() { + } + + @FieldOrder(order = 0) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long supplyingCarrier; + + @FieldOrder(order = 1) + @IntRange(minValue=1,maxValue=99) + @Asn1Optional public Long offerIdentification; + + @FieldOrder(order = 2) + @Asn1Optional public Asn1BigInteger series; + + + public Long getSupplyingCarrier() { + + return this.supplyingCarrier; + } + + public Long getOfferIdentification() { + + return this.offerIdentification; + } + + public Long getSeries() { + + return Asn1BigInteger.toLong(this.series); + } + + public void setSupplyingCarrier(Long supplyingCarrier) { + + this.supplyingCarrier = supplyingCarrier; + } + + public void setOfferIdentification(Long offerIdentification) { + + this.offerIdentification = offerIdentification; + } + + public void setSeries(Long series) { + + this.series = Asn1BigInteger.toAsn1(series); + } + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ServiceType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ServiceType.java new file mode 100644 index 0000000..6812779 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ServiceType.java @@ -0,0 +1,38 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +public enum ServiceType { + seat("seat"), + couchette("couchette"), + berth("berth"), + carcarriage("carcarriage"); + + public String text; + + ServiceType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/StationPassageData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/StationPassageData.java new file mode 100644 index 0000000..36dc6bf --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/StationPassageData.java @@ -0,0 +1,387 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Date; +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.asn1.datatypesimpl.SequenceOfStringIA5; +import org.uic.barcode.asn1.datatypesimpl.SequenceOfStringUTF8; +import org.uic.barcode.asn1.datatypesimpl.SequenceOfUnrestrictedLong; +import org.uic.barcode.ticket.api.utils.DateTimeUtils; + +@Sequence +@HasExtensionMarker +public class StationPassageData extends Object { + public StationPassageData() { + } + + @FieldOrder(order = 0) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String referenceIA5; + + @FieldOrder(order = 1) + @Asn1Optional public Asn1BigInteger referenceNum; + + @FieldOrder(order = 2) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long productOwnerNum; + + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productOwnerIA5; + + @FieldOrder(order = 4) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long productIdNum; + + @FieldOrder(order = 5) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productIdIA5; + + @FieldOrder(order = 6) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String productName; + + @FieldOrder(order = 7) + @Asn1Default("stationUIC") + @Asn1Optional public CodeTableType stationCodeTable; + + @FieldOrder(order = 8) + @Asn1Optional public SequenceOfUnrestrictedLong stationNum; + + @FieldOrder(order = 9) + @Asn1Optional public SequenceOfStringIA5 stationIA5; + + @FieldOrder(order = 10) + @Asn1Optional public SequenceOfStringUTF8 stationNameUTF8; + + @FieldOrder(order = 11) + @Asn1Optional public SequenceOfUnrestrictedLong areaCodeNum; + + @FieldOrder(order = 12) + @Asn1Optional public SequenceOfStringIA5 areaCodeIA5; + + @FieldOrder(order = 13) + @Asn1Optional public SequenceOfStringUTF8 areaNameUTF8; + + @FieldOrder(order = 14) + @IntRange(minValue=-1,maxValue=700) + public Long validFromDay; + + @FieldOrder(order = 15) + @IntRange(minValue=0,maxValue=1440) + @Asn1Optional public Long validFromTime; + + @FieldOrder(order = 16) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long validFromUTCOffset; + + @FieldOrder(order = 17) + @Asn1Default(value="0") + @IntRange(minValue=0,maxValue=370) + @Asn1Optional public Long validUntilDay; + + @FieldOrder(order = 18) + @IntRange(minValue=0,maxValue=1440) + @Asn1Optional public Long validUntilTime; + + @FieldOrder(order = 19) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long validUntilUTCOffset; + + @FieldOrder(order = 20) + @Asn1Optional public Asn1BigInteger numberOfDaysValid; + + @FieldOrder(order = 21) + @Asn1Optional public ExtensionData extension; + + + public String getReferenceIA5() { + + return this.referenceIA5; + } + + public Asn1BigInteger getReferenceNum() { + + return this.referenceNum; + } + + public Long getProductOwnerNum() { + + return this.productOwnerNum; + } + + public String getProductOwnerIA5() { + + return this.productOwnerIA5; + } + + public Long getProductIdNum() { + + return this.productIdNum; + } + + public String getProductIdIA5() { + + return this.productIdIA5; + } + + public String getProductName() { + + return this.productName; + } + + public CodeTableType getStationCodeTable() { + + if (stationCodeTable == null) { + return CodeTableType.stationUIC; + } + + return this.stationCodeTable; + } + + public SequenceOfUnrestrictedLong getStationNum() { + + return this.stationNum; + } + + public List getStationIA5() { + + return this.stationIA5; + } + + public SequenceOfStringUTF8 getStationNameUTF8() { + + return this.stationNameUTF8; + } + + public SequenceOfUnrestrictedLong getAreaCodeNum() { + + return this.areaCodeNum; + } + + public List getAreaCodeIA5() { + + return this.areaCodeIA5; + } + + public List getAreaNameUTF8() { + + return this.areaNameUTF8; + } + + public Long getValidFromDay() { + + return this.validFromDay; + } + + public Long getValidFromTime() { + + return this.validFromTime; + } + + public Long getValidUntilDay() { + + return this.validUntilDay; + } + + public Long getValidUntilTime() { + + return this.validUntilTime; + } + + public Long getNumberOfDaysValid() { + + return Asn1BigInteger.toLong(numberOfDaysValid); + } + + public ExtensionData getExtension() { + + return this.extension; + } + + public void setReferenceIA5(String referenceIA5) { + + this.referenceIA5 = referenceIA5; + } + + public void setReferenceNum(Asn1BigInteger referenceNum) { + + this.referenceNum = referenceNum; + } + + public void setProductOwnerNum(Long productOwnerNum) { + + this.productOwnerNum = productOwnerNum; + } + + public void setProductOwnerIA5(String productOwnerIA5) { + + this.productOwnerIA5 = productOwnerIA5; + } + + public void setProductIdNum(Long productIdNum) { + + this.productIdNum = productIdNum; + } + + public void setProductIdIA5(String productIdIA5) { + + this.productIdIA5 = productIdIA5; + } + + public void setProductName(String productName) { + + this.productName = productName; + } + + public void setStationCodeTable(CodeTableType stationCodeTable) { + + this.stationCodeTable = stationCodeTable; + } + + public void setStationNum(SequenceOfUnrestrictedLong stationNum) { + + this.stationNum = stationNum; + } + + public void setStationIA5(SequenceOfStringIA5 stationIA5) { + + this.stationIA5 = stationIA5; + } + + public void setStationNameUTF8(SequenceOfStringUTF8 stationNameUTF8) { + + this.stationNameUTF8 = stationNameUTF8; + } + + public void setAreaCodeNum(SequenceOfUnrestrictedLong sequenceOfUnrestrictedLong) { + + this.areaCodeNum = sequenceOfUnrestrictedLong; + } + + public void setAreaCodeIA5(SequenceOfStringIA5 areaCodeIA5) { + + this.areaCodeIA5 = areaCodeIA5; + } + + public void setAreaNameUTF8(SequenceOfStringUTF8 areaNameUTF8) { + + this.areaNameUTF8 = areaNameUTF8; + } + + public void setValidFromDay(Long validFromDay) { + + this.validFromDay = validFromDay; + } + + public void setValidFromTime(Long validFromTime) { + + this.validFromTime = validFromTime; + } + + public void setValidUntilDay(Long validUntilDay) { + + this.validUntilDay = validUntilDay; + } + + public void setValidUntilTime(Long validUntilTime) { + + this.validUntilTime = validUntilTime; + } + + public void setNumberOfDaysValid(Long numberOfDaysValid) { + + this.numberOfDaysValid = Asn1BigInteger.toAsn1(numberOfDaysValid); + } + + public void setExtension(ExtensionData extension) { + + this.extension = extension; + } + + public void setValidityDates (Date fromDate, Date untilDate, Date issuingDate){ + + if (issuingDate == null || fromDate == null) return; + + this.validFromDay = DateTimeUtils.getDateDifference(issuingDate,fromDate); + this.validFromTime = DateTimeUtils.getTime(fromDate); + + if (untilDate != null){ + this.validUntilDay = DateTimeUtils.getDateDifference(fromDate, untilDate); + this.validUntilTime = DateTimeUtils.getTime(untilDate); + } + + } + + public Date getValidFromDate(Date issuingDate){ + + return DateTimeUtils.getDate(issuingDate, this.validFromDay, this.validFromTime); + + } + + public Date getValidUntilDate(Date issuingDate){ + + if (issuingDate == null) return null; + + if (this.validFromDay == null) { + this.validFromDay = 0L; + } + + if (this.validUntilDay == null) { + return null; + } + + + return DateTimeUtils.getDate(issuingDate, this.validFromDay + this.validUntilDay, this.validUntilTime); + + } + + public Long getValidFromUTCOffset() { + return validFromUTCOffset; + } + + public void setValidFromUTCOffset(Long validFromUTCOffset) { + this.validFromUTCOffset = validFromUTCOffset; + } + + public Long getValidUntilUTCOffset() { + return validUntilUTCOffset; + } + + public void setValidUntilUTCOffset(Long validUntilUTCOffset) { + this.validUntilUTCOffset = validUntilUTCOffset; + } + + + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TariffType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TariffType.java new file mode 100644 index 0000000..66cb399 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TariffType.java @@ -0,0 +1,207 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; + +@Sequence +@HasExtensionMarker +public class TariffType extends Object { + public TariffType() { + } + + @FieldOrder(order = 0) + @IntRange(minValue=1,maxValue=200) + @Asn1Default(value = "1") + @Asn1Optional public Long numberOfPassengers; + + @FieldOrder(order = 1) + @Asn1Optional public PassengerType passengerType; + + @FieldOrder(order = 2) + @IntRange(minValue=1,maxValue=64) + @Asn1Optional public Long ageBelow; + + @FieldOrder(order = 3) + @IntRange(minValue=1,maxValue=128) + @Asn1Optional public Long ageAbove; + + @FieldOrder(order = 4) + @Asn1Optional public SequenceOfTravelerId traverlerid; + + @FieldOrder(order = 5) + public Boolean restrictedToCountryOfResidence; + + @FieldOrder(order = 6) + @Asn1Optional public RouteSectionType restrictedToRouteSection; + + @FieldOrder(order = 7) + @Asn1Optional public SeriesDetailType seriesDataDetails; + + @FieldOrder(order = 8) + @Asn1Optional public Asn1BigInteger tariffIdNum; + + @FieldOrder(order = 9) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String tariffIdIA5; + + @FieldOrder(order = 10) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String tariffDesc; + + @FieldOrder(order = 11) + @Asn1Optional public SequenceOfCardReferenceType reductionCard; + + + + public Long getNumberOfPassengers() { + + if (numberOfPassengers == null) { + return new Long(1); + } + + return this.numberOfPassengers; + } + + public PassengerType getPassengerType() { + + return this.passengerType; + } + + public Long getAgeBelow() { + + return this.ageBelow; + } + + public Long getAgeAbove() { + + return this.ageAbove; + } + + public SequenceOfTravelerId getTraverlerid() { + + return this.traverlerid; + } + + public Boolean getRestrictedToCountryOfResidence() { + + return this.restrictedToCountryOfResidence; + } + + public RouteSectionType getRestrictedToRouteSection() { + + return this.restrictedToRouteSection; + } + + public SeriesDetailType getSeriesDataDetails() { + + return this.seriesDataDetails; + } + + public Long getTariffIdNum() { + + return Asn1BigInteger.toLong(this.tariffIdNum); + } + + public String getTariffIdIA5() { + + return this.tariffIdIA5; + } + + public String getTariffDesc() { + + return this.tariffDesc; + } + + public SequenceOfCardReferenceType getReductionCard() { + + return this.reductionCard; + } + + public void setNumberOfPassengers(Long numberOfPassengers) { + + this.numberOfPassengers = numberOfPassengers; + } + + public void setPassengerType(PassengerType passengerType) { + + this.passengerType = passengerType; + } + + public void setAgeBelow(Long ageBelow) { + + this.ageBelow = ageBelow; + } + + public void setAgeAbove(Long ageAbove) { + + this.ageAbove = ageAbove; + } + + public void setTraverlerid(SequenceOfTravelerId traverlerid) { + + this.traverlerid = traverlerid; + } + + public void setRestrictedToCountryOfResidence(Boolean restrictedToCountryOfResidence) { + + this.restrictedToCountryOfResidence = restrictedToCountryOfResidence; + } + + public void setRestrictedToRouteSection(RouteSectionType restrictedToRouteSection) { + + this.restrictedToRouteSection = restrictedToRouteSection; + } + + public void setSeriesDataDetails(SeriesDetailType seriesDataDetails) { + + this.seriesDataDetails = seriesDataDetails; + } + + public void setTariffIdNum(Long tariffIdNum) { + + this.tariffIdNum = Asn1BigInteger.toAsn1(tariffIdNum); + } + + public void setTariffIdIA5(String tariffIdIA5) { + + this.tariffIdIA5 = tariffIdIA5; + } + + public void setTariffDesc(String tariffDesc) { + + this.tariffDesc = tariffDesc; + } + + public void setReductionCard(SequenceOfCardReferenceType reductionCard) { + + this.reductionCard = reductionCard; + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TicketDetailData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TicketDetailData.java new file mode 100644 index 0000000..e32bb98 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TicketDetailData.java @@ -0,0 +1,190 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + + + +import org.uic.barcode.asn1.datatypes.Choice; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; + +@Choice +@HasExtensionMarker +public class TicketDetailData extends Object { + public TicketDetailData() { + } + + @FieldOrder(order = 0) + public ReservationData reservation; + + @FieldOrder(order = 1) + public CarCarriageReservationData carCarriageReservation; + + @FieldOrder(order = 2) + public OpenTicketData openTicket; + + @FieldOrder(order = 3) + public PassData pass; + + @FieldOrder(order = 4) + public VoucherData voucher; + + @FieldOrder(order = 5) + public CustomerCardData customerCard; + + @FieldOrder(order = 6) + public CountermarkData counterMark; + + @FieldOrder(order = 7) + public ParkingGroundData parkingGround; + + @FieldOrder(order = 8) + public FIPTicketData fipTicket; + + @FieldOrder(order = 9) + public StationPassageData stationPassage; + + @FieldOrder(order = 10) + public DelayConfirmation delayConfirmation; + + @FieldOrder(order = 11) + public ExtensionData extension; + + public ReservationData getReservation() { + + return this.reservation; + } + + public CarCarriageReservationData getCarCarriageReservation() { + + return this.carCarriageReservation; + } + + public OpenTicketData getOpenTicket() { + + return this.openTicket; + } + + public PassData getPass() { + + return this.pass; + } + + public VoucherData getVoucher() { + + return this.voucher; + } + + public CustomerCardData getCustomerCard() { + + return this.customerCard; + } + + public CountermarkData getCounterMark() { + + return this.counterMark; + } + + public ParkingGroundData getParkingGround() { + + return this.parkingGround; + } + + public FIPTicketData getFipTicket() { + + return this.fipTicket; + } + + public StationPassageData getStationPassage() { + + return this.stationPassage; + } + + public DelayConfirmation getDelayConfirmation() { + + return this.delayConfirmation; + } + + public ExtensionData getExtension() { + + return this.extension; + } + + public void setReservation(ReservationData reservation) { + + this.reservation = reservation; + } + + public void setCarCarriageReservation(CarCarriageReservationData carCarriageReservation) { + + this.carCarriageReservation = carCarriageReservation; + } + + public void setOpenTicket(OpenTicketData openTicket) { + + this.openTicket = openTicket; + } + + public void setPass(PassData pass) { + + this.pass = pass; + } + + public void setVoucher(VoucherData voucher) { + + this.voucher = voucher; + } + + public void setCustomerCard(CustomerCardData customerCard) { + + this.customerCard = customerCard; + } + + public void setCounterMark(CountermarkData counterMark) { + + this.counterMark = counterMark; + } + + public void setParkingGround(ParkingGroundData parkingGround) { + + this.parkingGround = parkingGround; + } + + public void setFipTicket(FIPTicketData fipTicket) { + + this.fipTicket = fipTicket; + } + + public void setStationPassage(StationPassageData stationPassage) { + + this.stationPassage = stationPassage; + } + + public void setDelayConfirmation(DelayConfirmation delayConfirmation) { + + this.delayConfirmation = delayConfirmation; + } + + public void setExtension(ExtensionData extension) { + + this.extension = extension; + } + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TicketLinkType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TicketLinkType.java new file mode 100644 index 0000000..2a15f8b --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TicketLinkType.java @@ -0,0 +1,156 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; + +@Sequence +@HasExtensionMarker +public class TicketLinkType extends Object { + public TicketLinkType() { + } + + @FieldOrder(order = 0) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String referenceIA5; + + @FieldOrder(order = 1) + @Asn1Optional public Asn1BigInteger referenceNum; + + @FieldOrder(order = 2) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String issuerName; + + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String issuerPNR; + + @FieldOrder(order = 4) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long productOwnerNum; + + @FieldOrder(order = 5) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productOwnerIA5; + + @FieldOrder(order = 6) + @Asn1Default(value="openTicket") + @Asn1Optional public TicketType ticketType; + + @FieldOrder(order = 7) + @Asn1Default(value="issuedTogether") + @Asn1Optional public LinkMode linkMode; + + public String getReferenceIA5() { + + return this.referenceIA5; + } + + public Long getReferenceNum() { + return Asn1BigInteger.toLong(this.referenceNum); + } + + public String getIssuerName() { + + return this.issuerName; + } + + public Long getProductOwnerNum() { + + return this.productOwnerNum; + } + + public String getProductOwnerIA5() { + + return this.productOwnerIA5; + } + + public TicketType getTicketType() { + + if (ticketType == null) { + return TicketType.openTicket; + } + + return this.ticketType; + } + + public LinkMode getLinkMode() { + + if (linkMode == null){ + return LinkMode.issuedTogether; + } + + return this.linkMode; + } + + public void setReferenceIA5(String referenceIA5) { + + this.referenceIA5 = referenceIA5; + } + + public void setReferenceNum(Long referenceNum) { + this.referenceNum = Asn1BigInteger.toAsn1(referenceNum); + } + + public void setIssuerName(String issuerName) { + + this.issuerName = issuerName; + } + + public void setProductOwnerNum(Long productOwnerNum) { + + this.productOwnerNum = productOwnerNum; + } + + public void setProductOwnerIA5(String productOwnerIA5) { + + this.productOwnerIA5 = productOwnerIA5; + } + + public void setTicketType(TicketType ticketType) { + + this.ticketType = ticketType; + } + + public void setLinkMode(LinkMode linkMode) { + + this.linkMode = linkMode; + } + + public String getIssuerPNR() { + return issuerPNR; + } + + public void setIssuerPNR(String issuerPNR) { + this.issuerPNR = issuerPNR; + } + + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TicketType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TicketType.java new file mode 100644 index 0000000..09f3cfb --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TicketType.java @@ -0,0 +1,41 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; + +@HasExtensionMarker +public enum TicketType { + openTicket("openTicket"), + pass("pass"), + reservation("reservation"), + carCarriageReservation("carCarriageReservation"); + + public String text; + + TicketType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TimeRangeType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TimeRangeType.java new file mode 100644 index 0000000..ac8a51d --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TimeRangeType.java @@ -0,0 +1,59 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.Sequence; + +@Sequence +public class TimeRangeType extends Object { + public TimeRangeType() { + } + + @FieldOrder(order = 0) + @IntRange(minValue=0,maxValue=1440) + public Long fromTime; + + @FieldOrder(order = 1) + @IntRange(minValue=0,maxValue=1440) + public Long untilTime; + + public Long getFromTime() { + + return this.fromTime; + } + + public Long getUntilTime() { + + return this.untilTime; + } + + public void setFromTime(Long fromTime) { + + this.fromTime = fromTime; + } + + public void setUntilTime(Long untilTime) { + + this.untilTime = untilTime; + } + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TokenType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TokenType.java new file mode 100644 index 0000000..80eb42c --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TokenType.java @@ -0,0 +1,92 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.asn1.datatypesimpl.OctetString; + +@Sequence +public class TokenType extends Object { + public TokenType() { + } + + @FieldOrder(order = 0) + @Asn1Optional public Long tokenProviderNum; + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String tokenProviderIA5; + + @FieldOrder(order = 2) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String tokenSpecification; + + @FieldOrder(order = 3) + public OctetString token; + + public Long getTokenProviderNum() { + + return this.tokenProviderNum; + } + + public String getTokenProviderIA5() { + + return this.tokenProviderIA5; + } + + public String getTokenSpecification() { + + return this.tokenSpecification; + } + + public byte[] getToken() { + + return token.toByteArray(); + + } + + public void setTokenProviderNum(Long tokenProviderNum) { + + this.tokenProviderNum = tokenProviderNum; + } + + public void setTokenProviderIA5(String tokenProviderIA5) { + + this.tokenProviderIA5 = tokenProviderIA5; + } + + public void setTokenSpecification(String tokenSpecification) { + + this.tokenSpecification = tokenSpecification; + } + + public void setToken(byte[] token) { + + this.token = new OctetString(token); + + } + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TrainLinkType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TrainLinkType.java new file mode 100644 index 0000000..5469c2f --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TrainLinkType.java @@ -0,0 +1,185 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Date; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.ticket.api.utils.DateTimeUtils; + +@Sequence +public class TrainLinkType extends Object { + public TrainLinkType() { + } + + @FieldOrder(order = 0) + @Asn1Optional public Asn1BigInteger trainNum; + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String trainIA5; + + @FieldOrder(order = 2) + @IntRange(minValue=0,maxValue=370) + @Asn1Optional public Long travelDate; + + @FieldOrder(order = 3) + @IntRange(minValue=0,maxValue=1440) + @Asn1Optional public Long departureTime; + + @FieldOrder(order = 4) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long departureUTCOffset; + + @FieldOrder(order = 5) + @IntRange(minValue=1,maxValue=9999999) + @Asn1Optional public Long fromStationNum; + + @FieldOrder(order = 6) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String fromStationIA5; + + @FieldOrder(order = 7) + @IntRange(minValue=1,maxValue=9999999) + @Asn1Optional public Long toStationNum; + + @FieldOrder(order = 8) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String toStationIA5; + + @FieldOrder(order = 9) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String fromStationName; + + @FieldOrder(order = 10) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String toStationName; + + public Long getTrainNum() { + return Asn1BigInteger.toLong(this.trainNum); + } + + public String getTrainIA5() { + return this.trainIA5; + } + + public Long getTravelDate() { + return this.travelDate; + } + + public Long getDepartureTime() { + return this.departureTime; + } + + public Long getFromStationNum() { + return this.fromStationNum; + } + + public String getFromStationIA5() { + return this.fromStationIA5; + } + + public Long getToStationNum() { + return this.toStationNum; + } + + public String getToStationIA5() { + return this.toStationIA5; + } + + public String getFromStationName() { + return this.fromStationName; + } + + public String getToStationName() { + return this.toStationName; + } + + public void setTrainNum(Long trainNum) { + this.trainNum = Asn1BigInteger.toAsn1(trainNum); + } + + public void setTrainIA5(String trainIA5) { + this.trainIA5 = trainIA5; + } + + public void setTravelDate(Long travelDate) { + this.travelDate = travelDate; + } + + public void setDepartureTime(Long departureTime) { + this.departureTime = departureTime; + } + + public void setFromStationNum(Long fromStationNum) { + this.fromStationNum = fromStationNum; + } + + public void setFromStationIA5(String fromStationIA5) { + this.fromStationIA5 = fromStationIA5; + } + + public void setToStationNum(Long toStationNum) { + this.toStationNum = toStationNum; + } + + public void setToStationIA5(String toStationIA5) { + this.toStationIA5 = toStationIA5; + } + + public void setFromStationName(String fromStationName) { + this.fromStationName = fromStationName; + } + + public void setToStationName(String toStationName) { + this.toStationName = toStationName; + } + + public void setDepartureDate(Date departure, Date issuingDate){ + + if (issuingDate == null || departure == null) return; + + this.travelDate = DateTimeUtils.getDateDifference(issuingDate,departure); + this.departureTime = DateTimeUtils.getTime(departure); + } + + public void setDepartureTimeZone(Date dateLocal, Date dateUTC ) { + // -- (UTC = local + offset * 15 Minutes) + this.departureUTCOffset = new Long(dateLocal.getTime() - dateUTC.getTime()) / (1000 * 60 * 15); + } + + public Date getDepartureDate(Date issuingDate){ + return DateTimeUtils.getDate(issuingDate, this.travelDate, this.departureTime); + } + + public Date getUTCDepartureDate(Date issuingDate){ + return DateTimeUtils.getUTCDate(issuingDate, this.travelDate, this.departureTime, this.departureUTCOffset); + } + + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TravelClassType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TravelClassType.java new file mode 100644 index 0000000..4826e83 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TravelClassType.java @@ -0,0 +1,45 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; + +@HasExtensionMarker +public enum TravelClassType { + notApplicabel("notApplicabel"), + first("first"), + second("second"), + tourist("tourist"), + comfort("comfort"), + premium("premium"), + business("business"), + all("all"); + + public String text; + + TravelClassType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TravelerData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TravelerData.java new file mode 100644 index 0000000..efb88ea --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TravelerData.java @@ -0,0 +1,83 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.FixedSize; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; + +@Sequence +@HasExtensionMarker +public class TravelerData extends Object { + public TravelerData() { + } + + @FieldOrder(order = 0) + @Asn1Optional public SequenceOfTravelerType traveler; + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.IA5String) + @FixedSize(2) + @Asn1Optional public String preferedLanguage; + + @FieldOrder(order = 2) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String groupName; + + + public List getTraveler() { + + return this.traveler; + } + + public String getPreferedLanguage() { + + return this.preferedLanguage; + } + + public String getGroupName() { + + return this.groupName; + } + + public void setTraveler(SequenceOfTravelerType traveler) { + + this.traveler = traveler; + } + + public void setPreferedLanguage(String preferedLanguage) { + + this.preferedLanguage = preferedLanguage; + } + + public void setGroupName(String groupName) { + + this.groupName = groupName; + } + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TravelerType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TravelerType.java new file mode 100644 index 0000000..7f512fc --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TravelerType.java @@ -0,0 +1,322 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Calendar; +import java.util.Date; +import java.util.TimeZone; + +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.asn1.datatypes.SizeRange; + +@Sequence +@HasExtensionMarker +public class TravelerType extends Object { + public TravelerType() { + } + + @FieldOrder(order = 0) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String firstName; + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String secondName; + + @FieldOrder(order = 2) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String lastName; + + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String idCard; + + @FieldOrder(order = 4) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String passportId; + + @FieldOrder(order = 5) + @SizeRange(minValue = 1, maxValue = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String title; + + @FieldOrder(order = 6) + @Asn1Optional public GenderType gender; + + @FieldOrder(order = 7) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String customerIdIA5; + + @FieldOrder(order = 8) + @Asn1Optional public Long customerIdNum; + + @FieldOrder(order = 9) + @IntRange(minValue=1901,maxValue=2155) + @Asn1Optional public Long yearOfBirth; + + @FieldOrder(order = 10) + @IntRange(minValue=0,maxValue=366) + @Asn1Optional public Long dayOfBirth; + + @FieldOrder(order = 11) + public Boolean ticketHolder = true; + + @FieldOrder(order = 12) + @Asn1Optional public PassengerType passengerType; + + @FieldOrder(order = 13) + @Asn1Optional public Boolean passengerWithReducedMobility; + + @FieldOrder(order = 14) + @IntRange(minValue=1,maxValue=999) + @Asn1Optional public Long countryOfResidence; + + @FieldOrder(order = 15) + @IntRange(minValue=1,maxValue=999) + @Asn1Optional public Long countryOfPassport; + + @FieldOrder(order = 16) + @IntRange(minValue=1,maxValue=999) + @Asn1Optional public Long countryOfIdCard; + + @FieldOrder(order = 17) + @Asn1Optional public SequenceOfCustomerStatusType status; + + + + public String getFirstName() { + + return this.firstName; + } + + public String getSecondName() { + + return this.secondName; + } + + public String getLastName() { + + return this.lastName; + } + + public String getIdCard() { + + return this.idCard; + } + + public String getPassportId() { + + return this.passportId; + } + + public String getTitle() { + + return this.title; + } + + public GenderType getGender() { + + return this.gender; + } + + public String getCustomerIdIA5() { + + return this.customerIdIA5; + } + + public Long getCustomerIdNum() { + + return this.customerIdNum; + } + + public Long getYearOfBirth() { + + return this.yearOfBirth; + } + + public Long getDayOfBirth() { + + return this.dayOfBirth; + } + + public Boolean getTicketHolder() { + + return this.ticketHolder; + } + + public PassengerType getPassengerType() { + + return this.passengerType; + } + + public Boolean getPassengerWithReducedMobility() { + return this.passengerWithReducedMobility; + } + + public Long getCountryOfResidence() { + + return this.countryOfResidence; + } + + public Long getCountryOfPassport() { + + return this.countryOfPassport; + } + + public Long getCountryOfIdCard() { + + return this.countryOfIdCard; + } + + public SequenceOfCustomerStatusType getStatus() { + + return this.status; + } + + public void setFirstName(String firstName) { + + this.firstName = firstName; + } + + public void setSecondName(String secondName) { + + this.secondName = secondName; + } + + public void setLastName(String lastName) { + + this.lastName = lastName; + } + + public void setIdCard(String idCard) { + + this.idCard = idCard; + } + + public void setPassportId(String passportId) { + + this.passportId = passportId; + } + + public void setTitle(String title) { + + this.title = title; + } + + public void setGender(GenderType gender) { + + this.gender = gender; + } + + public void setCustomerIdIA5(String customerIdIA5) { + + this.customerIdIA5 = customerIdIA5; + } + + public void setCustomerIdNum(Long customerIdNum) { + + this.customerIdNum = customerIdNum; + } + + public void setYearOfBirth(Long yearOfBirth) { + + this.yearOfBirth = yearOfBirth; + } + + public void setDayOfBirth(Long dayOfBirth) { + + this.dayOfBirth = dayOfBirth; + } + + public void setTicketHolder(Boolean ticketHolder) { + + this.ticketHolder = ticketHolder; + } + + public void setPassengerType(PassengerType passengerType) { + + this.passengerType = passengerType; + } + + public void setPassengerWithReducedMobility(Boolean passengerWithReducedMobility) { + + this.passengerWithReducedMobility = passengerWithReducedMobility; + } + + public void setCountryOfResidence(Long countryOfResidence) { + + this.countryOfResidence = countryOfResidence; + } + + public void setCountryOfPassport(Long countryOfPassport) { + + this.countryOfPassport = countryOfPassport; + } + + public void setCountryOfIdCard(Long countryOfIdCard) { + + this.countryOfIdCard = countryOfIdCard; + } + + public void setStatus(SequenceOfCustomerStatusType status) { + + this.status = status; + } + + + + public void setDateOfBirth(Date date){ + + if (date == null) return; + + Calendar cal = Calendar.getInstance(); + cal.setTime(date); + + this.yearOfBirth = new Long( cal.get(Calendar.YEAR)); + this.dayOfBirth = new Long (cal.get(Calendar.DAY_OF_YEAR)); + + + } + + public Date getDateOfBirth() { + + if (this.yearOfBirth == null) return null; + if (this.dayOfBirth == null) return null; + + Calendar cal = Calendar.getInstance(); + cal.clear(); + cal.setTimeZone(TimeZone.getTimeZone("UTC")); + cal.set(Calendar.YEAR, this.yearOfBirth.intValue()); + cal.set(Calendar.DAY_OF_YEAR, this.dayOfBirth.intValue()); + cal.set(Calendar.HOUR_OF_DAY,0); + cal.set(Calendar.MINUTE,0); + + return cal.getTime(); + } + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/UicRailTicketData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/UicRailTicketData.java new file mode 100644 index 0000000..dfa79a0 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/UicRailTicketData.java @@ -0,0 +1,115 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.asn1.uper.UperEncoder; + +@Sequence +@HasExtensionMarker +public class UicRailTicketData extends Object { + public UicRailTicketData() { + } + + @FieldOrder(order = 0) + public IssuingData issuingDetail; + + @FieldOrder(order = 1) + @Asn1Optional public TravelerData travelerDetail; + + @FieldOrder(order = 2) + @Asn1Optional public SequenceOfDocumentData transportDocument; + + @FieldOrder(order = 3) + @Asn1Optional public ControlData controlDetail; + + @FieldOrder(order = 4) + @Asn1Optional public SequenceOfExtensionData extension; + + public IssuingData getIssuingDetail() { + + return this.issuingDetail; + } + + public TravelerData getTravelerDetail() { + + return this.travelerDetail; + } + + public List getTransportDocument() { + + return this.transportDocument; + } + + public ControlData getControlDetail() { + + return this.controlDetail; + } + + public List getExtension() { + + return this.extension; + } + + public void setIssuingDetail(IssuingData issuingDetail) { + + this.issuingDetail = issuingDetail; + } + + public void setTravelerDetail(TravelerData travelerDetail) { + + this.travelerDetail = travelerDetail; + } + + public void setTransportDocument(SequenceOfDocumentData transportDocument) { + + this.transportDocument = transportDocument; + } + + public void setControlDetail(ControlData controlDetail) { + + this.controlDetail = controlDetail; + } + + public void setExtension(SequenceOfExtensionData extension) { + + this.extension = extension; + } + + + public byte[] encode(){ + return UperEncoder.encode(this); + } + + public String encodeToHex(){ + return UperEncoder.hexStringFromBytes(UperEncoder.encode(this)); + } + + + public static UicRailTicketData decode(byte[] bytes) { + return UperEncoder.decode(bytes, UicRailTicketData.class); + } + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ValidityPeriodDetailType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ValidityPeriodDetailType.java new file mode 100644 index 0000000..1717ea2 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ValidityPeriodDetailType.java @@ -0,0 +1,73 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Collection; + +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.Sequence; + +@Sequence +public class ValidityPeriodDetailType extends Object { + public ValidityPeriodDetailType() { + } + + @FieldOrder(order = 0) + @Asn1Optional public SequenceOfValidityPeriodType validityPeriod; + + @FieldOrder(order = 1) + @Asn1Optional public SequenceOfTimeRangeType excludedTimeRange; + + + public class SequenceOfTimeRangeType extends Asn1SequenceOf { + public SequenceOfTimeRangeType() { super(); } + public SequenceOfTimeRangeType(Collection coll) { super(coll); } + } + + + public class SequenceOfValidityPeriodType extends Asn1SequenceOf { + public SequenceOfValidityPeriodType() { super(); } + public SequenceOfValidityPeriodType(Collection coll) { super(coll); } + } + + public SequenceOfValidityPeriodType getValidityPeriod() { + + return this.validityPeriod; + } + + public SequenceOfTimeRangeType getExcludedTimeRange() { + + return this.excludedTimeRange; + } + + public void setValidityPeriod(SequenceOfValidityPeriodType validityPeriod) { + + this.validityPeriod = validityPeriod; + } + + public void setExcludedTimeRange(SequenceOfTimeRangeType excludedTimeRange) { + + this.excludedTimeRange = excludedTimeRange; + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ValidityPeriodType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ValidityPeriodType.java new file mode 100644 index 0000000..5667ad9 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ValidityPeriodType.java @@ -0,0 +1,165 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Date; + +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.ticket.api.utils.DateTimeUtils; + +@Sequence +public class ValidityPeriodType extends Object { + public ValidityPeriodType() { + } + + @FieldOrder(order = 0) + @IntRange(minValue=0,maxValue=700) + @Asn1Default(value="0") + @Asn1Optional public Long validFromDay; + + @FieldOrder(order = 1) + @IntRange(minValue=0,maxValue=1440) + @Asn1Optional public Long validFromTime; + + @FieldOrder(order = 2) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long validFromUTCOffset; + + @FieldOrder(order = 3) + @IntRange(minValue=0,maxValue=370) + @Asn1Default(value="0") + @Asn1Optional public Long validUntilDay; + + @FieldOrder(order = 4) + @IntRange(minValue=0,maxValue=1440) + @Asn1Optional public Long validUntilTime; + + @FieldOrder(order = 5) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long validUntilUTCOffset; + + public Long getValidFromDay() { + + if (validFromDay == null) { + return new Long(0); + } + + return this.validFromDay; + } + + public Long getValidFromTime() { + + return this.validFromTime; + } + + public Long getValidUntilDay() { + + if (validUntilDay == null) { + return new Long(0); + } + + return this.validUntilDay; + } + + public Long getValidUntilTime() { + + return this.validUntilTime; + } + + public void setValidFromDay(Long validFromDay) { + + this.validFromDay = validFromDay; + } + + public void setValidFromTime(Long validFromTime) { + + this.validFromTime = validFromTime; + } + + public void setValidUntilDay(Long validUntilDay) { + + this.validUntilDay = validUntilDay; + } + + public void setValidUntilTime(Long validUntilTime) { + + this.validUntilTime = validUntilTime; + } + + public void setValidityDates (Date fromDate, Date untilDate, Date issuingDate){ + + if (issuingDate == null || fromDate == null) return; + + this.validFromDay = DateTimeUtils.getDateDifference(issuingDate,fromDate); + this.validFromTime = DateTimeUtils.getTime(fromDate); + + if (untilDate != null){ + this.validUntilDay = DateTimeUtils.getDateDifference(fromDate, untilDate); + this.validUntilTime = DateTimeUtils.getTime(untilDate); + } + + } + + public Date getValidFromDate(Date issuingDate){ + + return DateTimeUtils.getDate(issuingDate, this.validFromDay, this.validFromTime); + + } + + public Date getValidUntilDate(Date issuingDate){ + + if (issuingDate == null) return null; + + if (this.validFromDay == null) { + this.validFromDay = 0L; + } + + if (this.validUntilDay == null) { + return null; + } + + + return DateTimeUtils.getDate(issuingDate, this.validFromDay + this.validUntilDay, this.validUntilTime); + + } + + public Long getValidFromUTCOffset() { + return validFromUTCOffset; + } + + public void setValidFromUTCOffset(Long validFromUTCOffset) { + this.validFromUTCOffset = validFromUTCOffset; + } + + public Long getValidUntilUTCOffset() { + return validUntilUTCOffset; + } + + public void setValidUntilUTCOffset(Long validUntilUTCOffset) { + this.validUntilUTCOffset = validUntilUTCOffset; + } + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/VatDetailType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/VatDetailType.java new file mode 100644 index 0000000..9ebb869 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/VatDetailType.java @@ -0,0 +1,87 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; + + +@Sequence +public class VatDetailType extends Object { + public VatDetailType() { + } + + @FieldOrder(order = 0) + @IntRange(minValue = 1, maxValue = 999) + public Long country; + + @FieldOrder(order = 1) + @IntRange(minValue = 0, maxValue = 999) + public Long percentage; + + @FieldOrder(order = 2) + @Asn1Optional public Asn1BigInteger amount; + + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String vatId; + + public Long getCountry() { + return country; + } + + public void setCountry(Long country) { + this.country = country; + } + + public Long getPercentage() { + return percentage; + } + + public void setPercentage(Long percentage) { + this.percentage = percentage; + } + + public Long getAmount() { + return Asn1BigInteger.toLong(amount); + } + + public void setAmount(Long amount) { + this.amount = Asn1BigInteger.toAsn1(amount); + } + + public String getVatId() { + return vatId; + } + + public void setVatId(String vatId) { + this.vatId = vatId; + } + + + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ViaStationType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ViaStationType.java new file mode 100644 index 0000000..dfc1e56 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ViaStationType.java @@ -0,0 +1,181 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.asn1.datatypesimpl.SequenceOfStringIA5; + +@Sequence +@HasExtensionMarker +public class ViaStationType extends Object { + public ViaStationType() { + } + + @FieldOrder(order = 0) + @Asn1Default("stationUIC") + @Asn1Optional public CodeTableType stationCodeTable; + + @FieldOrder(order = 1) + @IntRange(minValue=1,maxValue=9999999) + @Asn1Optional public Long stationNum; + + @FieldOrder(order = 2) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String stationIA5; + + @FieldOrder(order = 3) + @Asn1Optional public SequenceOfViaStationType alternativeRoutes; + + @FieldOrder(order = 4) + @Asn1Optional public SequenceOfViaStationType route; + + @FieldOrder(order = 5) + @Asn1Optional public Boolean border = false; + + @FieldOrder(order = 6) + @Asn1Optional public SequenceOfCarrierNum carriersNum; + + @FieldOrder(order = 7) + @Asn1Optional public SequenceOfStringIA5 carriersIA5; + + @FieldOrder(order = 8) + @Asn1Optional public Asn1BigInteger seriesId; + + @FieldOrder(order = 9) + @Asn1Optional public Asn1BigInteger routeId; + + + + + + public CodeTableType getStationCodeTable() { + + if (stationCodeTable == null) { + return CodeTableType.stationUIC; + } + + return this.stationCodeTable; + } + + public Long getStationNum() { + + return this.stationNum; + } + + public String getStationIA5() { + + return this.stationIA5; + } + + public SequenceOfViaStationType getAlternativeRoutes() { + + return this.alternativeRoutes; + } + + public SequenceOfViaStationType getRoute() { + + return this.route; + } + + public Boolean getBorder() { + + return this.border; + } + + public SequenceOfCarrierNum getCarriersNum() { + + return this.carriersNum; + } + + public SequenceOfStringIA5 getCarriersIA5() { + + return this.carriersIA5; + } + + public Long getSeriesId() { + + return Asn1BigInteger.toLong(this.seriesId); + } + + public Long getRouteId() { + + return Asn1BigInteger.toLong(this.routeId); + } + + public void setStationCodeTable(CodeTableType stationCodeTable) { + + this.stationCodeTable = stationCodeTable; + } + + public void setStationNum(Long stationNum) { + + this.stationNum = stationNum; + } + + public void setStationIA5(String stationIA5) { + + this.stationIA5 = stationIA5; + } + + public void setAlternativeRoutes(SequenceOfViaStationType alternativeRoutes) { + + this.alternativeRoutes = alternativeRoutes; + } + + public void setRoute(SequenceOfViaStationType route) { + + this.route = route; + } + + public void setBorder(Boolean border) { + + this.border = border; + } + + public void setCarriersNum(SequenceOfCarrierNum carriersNum) { + + this.carriersNum = carriersNum; + } + + public void setCarriersIA5(SequenceOfStringIA5 carriersIA5) { + + this.carriersIA5 = carriersIA5; + } + + public void setSeriesId(Long seriesId) { + + this.seriesId = Asn1BigInteger.toAsn1(seriesId); + } + + public void setRouteId(Long routeId) { + + this.routeId = Asn1BigInteger.toAsn1(routeId); + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/VoucherData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/VoucherData.java new file mode 100644 index 0000000..ab9eaea --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/VoucherData.java @@ -0,0 +1,316 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import java.util.Calendar; +import java.util.Date; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; + + +@Sequence +@HasExtensionMarker +public class VoucherData extends Object { + public VoucherData() { + } + + @FieldOrder(order = 0) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String referenceIA5; + + @FieldOrder(order = 1) + @Asn1Optional public Asn1BigInteger referenceNum; + + @FieldOrder(order = 2) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long productOwnerNum; + + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productOwnerIA5; + + @FieldOrder(order = 4) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long productIdNum; + + @FieldOrder(order = 5) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productIdIA5; + + @FieldOrder(order = 6) + @IntRange(minValue=2016,maxValue=2269) + public Long validFromYear; + + @FieldOrder(order = 7) + @IntRange(minValue=0,maxValue=370) + public Long validFromDay; + + @FieldOrder(order = 8) + @IntRange(minValue=2016,maxValue=2269) + public Long validUntilYear; + + @FieldOrder(order = 9) + @IntRange(minValue=0,maxValue=370) + public Long validUntilDay; + + @FieldOrder(order = 10) + @Asn1Optional public Long value; + + @FieldOrder(order = 11) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long type; + + @FieldOrder(order = 12) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String infoText; + + @FieldOrder(order = 13) + @Asn1Optional public ExtensionData extension; + + + public String getReferenceIA5() { + + return this.referenceIA5; + } + + public Asn1BigInteger getReferenceNum() { + + return this.referenceNum; + } + + public Long getProductOwnerNum() { + + return this.productOwnerNum; + } + + public String getProductOwnerIA5() { + + return this.productOwnerIA5; + } + + public Long getProductIdNum() { + + return this.productIdNum; + } + + public String getProductIdIA5() { + + return this.productIdIA5; + } + + public Long getValidFromYear() { + + return this.validFromYear; + } + + public Long getValidFromDay() { + + return this.validFromDay; + } + + public Long getValidUntilYear() { + + return this.validUntilYear; + } + + public Long getValidUntilDay() { + + return this.validUntilDay; + } + + public Long getValue() { + + return this.value; + } + + public Long getType() { + + return this.type; + } + + public String getInfoText() { + + return this.infoText; + } + + public ExtensionData getExtension() { + + return this.extension; + } + + public void setReferenceIA5(String referenceIA5) { + + this.referenceIA5 = referenceIA5; + } + + public void setReferenceNum(Asn1BigInteger referenceNum) { + + this.referenceNum = referenceNum; + } + + public void setProductOwnerNum(Long productOwnerNum) { + + this.productOwnerNum = productOwnerNum; + } + + public void setProductOwnerIA5(String productOwnerIA5) { + + this.productOwnerIA5 = productOwnerIA5; + } + + public void setProductIdNum(Long productIdNum) { + + this.productIdNum = productIdNum; + } + + public void setProductIdIA5(String productIdIA5) { + + this.productIdIA5 = productIdIA5; + } + + public void setValidFromYear(Long validFromYear) { + + this.validFromYear = validFromYear; + } + + public void setValidFromDay(Long validFromDay) { + + this.validFromDay = validFromDay; + } + + public void setValidUntilYear(Long validUntilYear) { + + this.validUntilYear = validUntilYear; + } + + public void setValidUntilDay(Long validUntilDay) { + + this.validUntilDay = validUntilDay; + } + + public void setValue(Long value) { + + this.value = value; + } + + public void setType(Long type) { + + this.type = type; + } + + public void setInfoText(String infoText) { + + this.infoText = infoText; + } + + public void setExtension(ExtensionData extension) { + + this.extension = extension; + } + + + public void setValidity (Date fromDate , Date untilDate){ + + Calendar fromCal = Calendar.getInstance(); + fromCal.clear(); + fromCal.setTime(fromDate); + + this.validFromYear = new Long( fromCal.get(Calendar.YEAR)); + this.validFromDay = new Long (fromCal.get(Calendar.DAY_OF_YEAR)); + + if (untilDate == null) return; + + Calendar untilCal = Calendar.getInstance(); + untilCal.clear(); + untilCal.setTime(untilDate); + + this.validUntilYear = new Long( untilCal.get(Calendar.YEAR)); + this.validUntilDay = new Long (untilCal.get(Calendar.DAY_OF_YEAR)); + + } + + + public void setValidFrom (Date fromDate){ + + if (fromDate == null) return; + + Calendar fromCal = Calendar.getInstance(); + fromCal.clear(); + fromCal.setTime(fromDate); + + this.validFromYear = new Long( fromCal.get(Calendar.YEAR)); + this.validFromDay = new Long (fromCal.get(Calendar.DAY_OF_YEAR)); + + } + + public void setValidUntil (Date untilDate){ + + if (untilDate == null) return; + + Calendar untilCal = Calendar.getInstance(); + untilCal.clear(); + untilCal.setTime(untilDate); + + this.validUntilYear = new Long( untilCal.get(Calendar.YEAR)); + this.validUntilDay = new Long (untilCal.get(Calendar.DAY_OF_YEAR)); + + } + + public Date getValidFrom(){ + + if (this.validFromYear == null || this.validFromYear == 0) return null; + + Calendar cal = Calendar.getInstance(); + cal.clear(); + //cal.setTimeZone(TimeZone.getTimeZone("UTC")); + cal.set(Calendar.YEAR, this.validFromYear.intValue()); + cal.set(Calendar.DAY_OF_YEAR, this.validFromDay.intValue()); + cal.set(Calendar.MINUTE,0); + cal.set(Calendar.HOUR_OF_DAY,0); + + return cal.getTime(); + + } + + public Date getValidUntil(){ + + if (this.validUntilYear == null || this.validUntilYear == 0) return null; + + Calendar cal = Calendar.getInstance(); + cal.clear(); + //cal.setTimeZone(TimeZone.getTimeZone("UTC")); + cal.set(Calendar.YEAR, this.validUntilYear.intValue()); + cal.set(Calendar.DAY_OF_YEAR, this.validUntilDay.intValue()); + cal.set(Calendar.MINUTE,59); + cal.set(Calendar.HOUR_OF_DAY,23); + + return cal.getTime(); + + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ZoneType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ZoneType.java new file mode 100644 index 0000000..a22e002 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ZoneType.java @@ -0,0 +1,182 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv1; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.asn1.datatypesimpl.OctetString; +import org.uic.barcode.asn1.datatypesimpl.SequenceOfUnrestrictedLong; + +@Sequence +@HasExtensionMarker + +public class ZoneType extends Object { + public ZoneType() { + } + + @FieldOrder(order = 0) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long carrierNum; + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String carrierIA5; + + @FieldOrder(order = 2) + @Asn1Default("stationUIC") + @Asn1Optional public CodeTableType stationCodeTable; + + @FieldOrder(order = 3) + @IntRange(minValue=0,maxValue=9999999) + @Asn1Optional public Long entryStationNum; + + @FieldOrder(order = 4) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String entryStationIA5; + + @FieldOrder(order = 5) + @IntRange(minValue=0,maxValue=9999999) + @Asn1Optional public Long terminatingStationNum; + + @FieldOrder(order = 6) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String terminatingStationIA5; + + @FieldOrder(order = 7) + @Asn1Optional public Asn1BigInteger city; + + @FieldOrder(order = 8) + @Asn1Optional public SequenceOfUnrestrictedLong zoneId; + + @FieldOrder(order = 9) + @Asn1Optional public OctetString binaryZoneId; + + @FieldOrder(order = 10) + @Asn1Optional public String nutsCode; + + + public Long getCarrierNum() { + + return this.carrierNum; + } + + public String getCarrierIA5() { + + return this.carrierIA5; + } + + public CodeTableType getStationCodeTable() { + + if (stationCodeTable == null) { + return CodeTableType.stationUIC; + } + + return this.stationCodeTable; + } + + public Long getEntryStationNum() { + return this.entryStationNum; + } + + public String getEntryStationIA5() { + return this.entryStationIA5; + } + + public Long getTerminatingStationNum() { + return this.terminatingStationNum; + } + + public String getTerminatingStationIA5() { + return this.terminatingStationIA5; + } + + public Asn1BigInteger getCity() { + return this.city; + } + + public SequenceOfUnrestrictedLong getZoneId() { + return this.zoneId; + } + + public byte[] getBinaryZoneId() { + + return binaryZoneId.toByteArray(); + + } + + public String getNutsCode() { + return this.nutsCode; + } + + public void setCarrierNum(Long carrierNum) { + this.carrierNum = carrierNum; + } + + public void setCarrierIA5(String carrierIA5) { + this.carrierIA5 = carrierIA5; + } + + public void setStationCodeTable(CodeTableType stationCodeTable) { + this.stationCodeTable = stationCodeTable; + } + + public void setEntryStationNum(Long entryStationNum) { + this.entryStationNum = entryStationNum; + } + + public void setEntryStationIA5(String entryStationIA5) { + this.entryStationIA5 = entryStationIA5; + } + + public void setTerminatingStationNum(Long terminatingStationNum) { + this.terminatingStationNum = terminatingStationNum; + } + + public void setTerminatingStationIA5(String terminatingStationIA5) { + this.terminatingStationIA5 = terminatingStationIA5; + } + + public void setCity(Asn1BigInteger city) { + this.city = city; + } + + public void setZoneId(SequenceOfUnrestrictedLong zoneId) { + this.zoneId = zoneId; + } + + public void setBinaryZoneId(byte[] binaryZoneId) { + + this.binaryZoneId = new OctetString(binaryZoneId); + + } + + public void setNutsCode(String nutsCode) { + this.nutsCode = nutsCode; + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/BerthDetailData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/BerthDetailData.java new file mode 100644 index 0000000..f4d2677 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/BerthDetailData.java @@ -0,0 +1,79 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.Sequence; + + +@Sequence +@HasExtensionMarker +public class BerthDetailData extends Object { + public BerthDetailData() { + } + + @FieldOrder(order = 0) + public BerthTypeType berthType; + + @FieldOrder(order = 1) + @IntRange(minValue=1, maxValue=999) + public Long numberOfBerths; + + @FieldOrder(order = 2) + @Asn1Default(value="family") + @Asn1Optional public CompartmentGenderType gender; + + + public BerthTypeType getBerthType() { + return this.berthType; + } + + public Long getNumberOfBerths() { + return this.numberOfBerths; + } + + public CompartmentGenderType getGender() { + + if (gender == null){ + return CompartmentGenderType.family; + } else { + return this.gender; + } + } + + public void setBerthType(BerthTypeType berthType) { + + this.berthType = berthType; + } + + public void setNumberOfBerths(Long numberOfBerths) { + this.numberOfBerths = numberOfBerths; + } + + public void setGender(CompartmentGenderType gender) { + this.gender = gender; + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/BerthTypeType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/BerthTypeType.java new file mode 100644 index 0000000..074ca4c --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/BerthTypeType.java @@ -0,0 +1,41 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +public enum BerthTypeType { + single("single"), + special("special"), + double_("double_"), + t2("t2"), + t3("t3"), + t4("t4"); + + + public String text; + + BerthTypeType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CarCarriageReservationData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CarCarriageReservationData.java new file mode 100644 index 0000000..4e0bb5f --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CarCarriageReservationData.java @@ -0,0 +1,734 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Calendar; +import java.util.Date; +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.asn1.datatypesimpl.SequenceOfStringIA5; +import org.uic.barcode.ticket.api.utils.DateTimeUtils; + + + +@Sequence +@HasExtensionMarker +public class CarCarriageReservationData extends Object { + public CarCarriageReservationData() { + } + + @FieldOrder(order = 0) + @Asn1Optional public Asn1BigInteger trainNum; + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String trainIA5; + + @FieldOrder(order = 2) + @IntRange(minValue=-1,maxValue=370) + @Asn1Default(value="0") + @Asn1Optional public Long beginLoadingDate; + + @FieldOrder(order = 3) + @IntRange(minValue=0,maxValue=1439) + @Asn1Optional public Long beginLoadingTime; + + @FieldOrder(order = 4) + @IntRange(minValue=0,maxValue=1439) + @Asn1Optional public Long endLoadingTime; + + @FieldOrder(order = 5) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long loadingUTCOffset; + + @FieldOrder(order = 6) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String referenceIA5; + + @FieldOrder(order = 7) + @Asn1Optional public Asn1BigInteger referenceNum; + + @FieldOrder(order = 8) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long productOwnerNum; + + @FieldOrder(order = 9) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productOwnerIA5; + + @FieldOrder(order = 10) + @IntRange(minValue=0,maxValue=65535) + @Asn1Optional public Long productIdNum; + + @FieldOrder(order = 11) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productIdIA5; + + @FieldOrder(order = 12) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long serviceBrand; + + @FieldOrder(order = 13) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String serviceBrandAbrUTF8; + + @FieldOrder(order = 14) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String serviceBrandNameUTF8; + + @FieldOrder(order = 15) + @Asn1Default("stationUICReservation") + @Asn1Optional public CodeTableType stationCodeTable; + + @FieldOrder(order = 16) + @IntRange(minValue=1,maxValue=9999999) + @Asn1Optional public Long fromStationNum; + + @FieldOrder(order = 17) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String fromStationIA5; + + @FieldOrder(order = 18) + @IntRange(minValue=1,maxValue=9999999) + @Asn1Optional public Long toStationNum; + + @FieldOrder(order = 19) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String toStationIA5; + + @FieldOrder(order = 20) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String fromStationNameUTF8; + + @FieldOrder(order = 21) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String toStationNameUTF8; + + @FieldOrder(order = 22) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String coach; + + @FieldOrder(order = 23) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String place; + + @FieldOrder(order = 24) + @Asn1Optional public CompartmentDetailsType compartmentDetails; + + @FieldOrder(order = 25) + @RestrictedString(CharacterRestriction.IA5String) + public String numberPlate; + + @FieldOrder(order = 26) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String trailerPlate; + + @FieldOrder(order = 27) + @IntRange(minValue=0,maxValue=9) + public Long carCategory; + + @FieldOrder(order = 28) + @IntRange(minValue=0,maxValue=6) + @Asn1Optional public Long boatCategory; + + @FieldOrder(order = 29) + public Boolean textileRoof = false; + + @FieldOrder(order = 30) + @Asn1Default(value ="norack") + @Asn1Optional public RoofRackType roofRackType; + + @FieldOrder(order = 31) + @IntRange(minValue=0,maxValue=99) + @Asn1Optional public Long roofRackHeight; + + @FieldOrder(order = 32) + @IntRange(minValue=0,maxValue=2) + @Asn1Optional public Long attachedBoats; + + @FieldOrder(order = 33) + @IntRange(minValue=0,maxValue=4) + @Asn1Optional public Long attachedBicycles; + + @FieldOrder(order = 34) + @IntRange(minValue=0,maxValue=5) + @Asn1Optional public Long attachedSurfboards; + + @FieldOrder(order = 35) + @IntRange(minValue=0,maxValue=999) + @Asn1Optional public Long loadingListEntry; + + @FieldOrder(order = 36) + @Asn1Default(value="upper") + @Asn1Optional public LoadingDeckType loadingDeck; + + @FieldOrder(order = 37) + @Asn1Optional public SequenceOfCarrierNum carrierNum; + + @FieldOrder(order = 38) + @Asn1Optional public SequenceOfStringIA5 carrierIA5; + + @FieldOrder(order = 39) + public TariffType tariff; + + @FieldOrder(order = 40) + @Asn1Default(value="travelPrice") + @Asn1Optional public PriceTypeType priceType; + + @FieldOrder(order = 41) + @Asn1Optional Asn1BigInteger price; + + @FieldOrder(order = 42) + @Asn1Optional SequenceOfVatDetail vatDetails; + + @FieldOrder(order = 43) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String infoText; + + @FieldOrder(order = 44) + @Asn1Optional public ExtensionData extension; + + public Long getTrainNum() { + if (this.trainNum == null) return null; + return Asn1BigInteger.toLong(this.trainNum); + } + + public String getTrainIA5() { + + return this.trainIA5; + } + + public Long getBeginLoadingDate() { + + return this.beginLoadingDate; + } + + public Long getBeginLoadingTime() { + + if (beginLoadingTime == null) return new Long(0); + return beginLoadingTime; + } + + public Long getEndLoadingTime() { + + return this.endLoadingTime; + } + + public String getReferenceIA5() { + + return this.referenceIA5; + } + + public Long getReferenceNum() { + return Asn1BigInteger.toLong(this.referenceNum); + } + + public Long getProductOwnerNum() { + + return this.productOwnerNum; + } + + public String getProductOwnerIA5() { + + return this.productOwnerIA5; + } + + public Long getProductIdNum() { + + return this.productIdNum; + } + + public String getProductIdIA5() { + + return this.productIdIA5; + } + + public Long getServiceBrand() { + + return this.serviceBrand; + } + + public String getServiceBrandAbrUTF8() { + + return this.serviceBrandAbrUTF8; + } + + public String getServiceBrandNameUTF8() { + + return this.serviceBrandNameUTF8; + } + + public CodeTableType getStationCodeTable() { + + if (stationCodeTable == null) { + return CodeTableType.stationUICReservation; + } + + return this.stationCodeTable; + } + + public Long getFromStationNum() { + + return this.fromStationNum; + } + + public String getFromStationIA5() { + + return this.fromStationIA5; + } + + public Long getToStationNum() { + + return this.toStationNum; + } + + public String getToStationIA5() { + + return this.toStationIA5; + } + + public String getFromStationNameUTF8() { + + return this.fromStationNameUTF8; + } + + public String getToStationNameUTF8() { + + return this.toStationNameUTF8; + } + + public String getCoach() { + + return this.coach; + } + + public String getPlace() { + + return this.place; + } + + public CompartmentDetailsType getCompartmentDetails() { + + return this.compartmentDetails; + } + + public String getNumberPlate() { + + return this.numberPlate; + } + + public String getTrailerPlate() { + + return this.trailerPlate; + } + + public Long getCarCategory() { + + return this.carCategory; + } + + public Long getBoatCategory() { + + return this.boatCategory; + } + + public Boolean getTextileRoof() { + + return this.textileRoof; + } + + public RoofRackType getRoofRackType() { + + if (this.roofRackType == null) return RoofRackType.norack; + return this.roofRackType; + } + + public Long getRoofRackHeight() { + + return this.roofRackHeight; + } + + public Long getAttachedBoats() { + + return this.attachedBoats; + } + + public Long getAttachedBicycles() { + + return this.attachedBicycles; + } + + public Long getAttachedSurfboards() { + + return this.attachedSurfboards; + } + + public Long getLoadingListEntry() { + + return this.loadingListEntry; + } + + public LoadingDeckType getLoadingDeck() { + + if (this.loadingDeck == null) return LoadingDeckType.upper; + return this.loadingDeck; + } + + public SequenceOfCarrierNum getCarrierNum() { + + return this.carrierNum; + } + + public SequenceOfStringIA5 getCarrierIA5() { + + return this.carrierIA5; + } + + public TariffType getTariff() { + + return this.tariff; + } + + public PriceTypeType getPriceType() { + if (this.priceType == null) return PriceTypeType.travelPrice; + return this.priceType; + } + + public String getInfoText() { + + return this.infoText; + } + + public ExtensionData getExtension() { + + return this.extension; + } + + public void setTrainNum(Long trainNum) { + + this.trainNum = new Asn1BigInteger(trainNum); + } + + public void setTrainIA5(String trainIA5) { + + this.trainIA5 = trainIA5; + } + + public void setBeginLoadingDate(Long beginLoadingDate) { + + this.beginLoadingDate = beginLoadingDate; + } + + public void setBeginLoadingTime(Long beginLoadingTime) { + + this.beginLoadingTime = beginLoadingTime; + } + + public void setEndLoadingTime(Long endLoadingTime) { + this.endLoadingTime = endLoadingTime; + } + + public void setReferenceIA5(String referenceIA5) { + + this.referenceIA5 = referenceIA5; + } + + public void setReferenceNum(Long referenceNum) { + + this.referenceNum = Asn1BigInteger.toAsn1(referenceNum); + } + + public void setProductOwnerNum(Long productOwnerNum) { + + this.productOwnerNum = productOwnerNum; + } + + public void setProductOwnerIA5(String productOwnerIA5) { + + this.productOwnerIA5 = productOwnerIA5; + } + + public void setProductIdNum(Long productIdNum) { + + this.productIdNum = productIdNum; + } + + public void setProductIdIA5(String productIdIA5) { + + this.productIdIA5 = productIdIA5; + } + + public void setServiceBrand(Long serviceBrand) { + + this.serviceBrand = serviceBrand; + } + + public void setServiceBrandAbrUTF8(String serviceBrandAbrUTF8) { + + this.serviceBrandAbrUTF8 = serviceBrandAbrUTF8; + } + + public void setServiceBrandNameUTF8(String serviceBrandNameUTF8) { + + this.serviceBrandNameUTF8 = serviceBrandNameUTF8; + } + + public void setStationCodeTable(CodeTableType stationCodeTable) { + + this.stationCodeTable = stationCodeTable; + } + + public void setFromStationNum(Long fromStationNum) { + + this.fromStationNum = fromStationNum; + } + + public void setFromStationIA5(String fromStationIA5) { + + this.fromStationIA5 = fromStationIA5; + } + + public void setToStationNum(Long toStationNum) { + + this.toStationNum = toStationNum; + } + + public void setToStationIA5(String toStationIA5) { + + this.toStationIA5 = toStationIA5; + } + + public void setFromStationNameUTF8(String fromStationNameUTF8) { + + this.fromStationNameUTF8 = fromStationNameUTF8; + } + + public void setToStationNameUTF8(String toStationNameUTF8) { + + this.toStationNameUTF8 = toStationNameUTF8; + } + + public void setCoach(String coach) { + + this.coach = coach; + } + + public void setPlace(String place) { + + this.place = place; + } + + public void setCompartmentDetails(CompartmentDetailsType compartmentDetails) { + + this.compartmentDetails = compartmentDetails; + } + + public void setNumberPlate(String numberPlate) { + + this.numberPlate = numberPlate; + } + + public void setTrailerPlate(String trailerPlate) { + + this.trailerPlate = trailerPlate; + } + + public void setCarCategory(Long carCategory) { + + this.carCategory = carCategory; + } + + public void setBoatCategory(Long boatCategory) { + + this.boatCategory = boatCategory; + } + + public void setTextileRoof(Boolean textileRoof) { + + this.textileRoof = textileRoof; + } + + public void setRoofRackType(RoofRackType roofRackType) { + + this.roofRackType = roofRackType; + } + + public void setRoofRackHeight(Long roofRackHeight) { + + this.roofRackHeight = roofRackHeight; + } + + public void setAttachedBoats(Long attachedBoats) { + + this.attachedBoats = attachedBoats; + } + + public void setAttachedBicycles(Long attachedBicycles) { + + this.attachedBicycles = attachedBicycles; + } + + public void setAttachedSurfboards(Long attachedSurfboards) { + + this.attachedSurfboards = attachedSurfboards; + } + + public void setLoadingListEntry(Long loadingListEntry) { + + this.loadingListEntry = loadingListEntry; + } + + public void setLoadingDeck(LoadingDeckType loadingDeck) { + + this.loadingDeck = loadingDeck; + } + + public void setCarrierNum(SequenceOfCarrierNum carrierNum) { + + this.carrierNum = carrierNum; + } + + public void setCarrierNum(List longs) { + if (longs == null || longs.isEmpty()) return; + this.carrierNum = new SequenceOfCarrierNum(longs); + } + + + public void setCarrierIA5(SequenceOfStringIA5 carrierIA5) { + + this.carrierIA5 = carrierIA5; + } + + public void setTariff(TariffType tariff) { + + this.tariff = tariff; + } + + public void setPriceType(PriceTypeType priceType) { + + this.priceType = priceType; + } + + public void setInfoText(String infoText) { + + this.infoText = infoText; + } + + public void setExtension(ExtensionData extension) { + + this.extension = extension; + } + + public Long getPrice() { + return Asn1BigInteger.toLong(price); + } + + public void setPrice(Long price) { + this.price = Asn1BigInteger.toAsn1(price); + } + + public SequenceOfVatDetail getVatDetails() { + return vatDetails; + } + + public void setVatDetails(SequenceOfVatDetail vatDetails) { + this.vatDetails = vatDetails; + } + + public void addVatDetail(VatDetailType vatDetail) { + if (this.vatDetails == null) { + this.vatDetails = new SequenceOfVatDetail(); + } + this.vatDetails.add(vatDetail); + } + + public void setLoadingDates (Date beginLoading, Date endLoading, Date issuingDate){ + + if (issuingDate == null || beginLoading == null) return; + + this.beginLoadingDate = DateTimeUtils.getDateDifference(issuingDate,beginLoading); + this.beginLoadingTime = DateTimeUtils.getTime(beginLoading); + + if (endLoading != null) { + this.endLoadingTime = DateTimeUtils.getTime(endLoading); + } + } + + public Date getBeginLoadingDate(Date issuingDate){ + + if (issuingDate == null) return null; + + if (this.beginLoadingDate == null) { + this.beginLoadingDate = 0L; + } + + return DateTimeUtils.getDate(issuingDate, this.beginLoadingDate, this.beginLoadingTime); + + } + + public Date getEndLoadingDate(Date issuingDate){ + + if (issuingDate == null) return null; + + if (this.beginLoadingDate == null) { + this.beginLoadingDate = 0L; + } + + if (this.endLoadingTime == null) { + return null; + } + + Date begin = DateTimeUtils.getDate(issuingDate, this.beginLoadingDate, this.beginLoadingTime); + Date end = DateTimeUtils.getDate(issuingDate, this.beginLoadingDate, this.endLoadingTime); + + //max one day difference assumed + if (end.before(begin)) { + Calendar cal = Calendar.getInstance(); + cal.clear(); + cal.setTime(end); + cal.add(Calendar.DAY_OF_YEAR,1); + return cal.getTime(); + } else { + return end; + } + + } + + public Long getLoadingUTCOffset() { + return loadingUTCOffset; + } + + public void setLoadingUTCOffset(Long loadingUTCOffset) { + this.loadingUTCOffset = loadingUTCOffset; + } + + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CardReferenceType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CardReferenceType.java new file mode 100644 index 0000000..3c7d3e2 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CardReferenceType.java @@ -0,0 +1,182 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.math.BigInteger; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; + + +@Sequence +@HasExtensionMarker +public class CardReferenceType extends Object { + public CardReferenceType() { + } + + @FieldOrder(order = 0) + @Asn1Optional public Asn1BigInteger cardIssuerNum; + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String cardIssuerIA5; + + @FieldOrder(order = 2) + @Asn1Optional public Asn1BigInteger cardIdNum; + + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String cardIdIA5; + + @FieldOrder(order = 4) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String cardName; + + @FieldOrder(order = 5) + @Asn1Optional public Asn1BigInteger cardType; + + @FieldOrder(order = 6) + @Asn1Optional public Asn1BigInteger leadingCardIdNum; + + @FieldOrder(order = 7) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String leadingCardIdIA5; + + @FieldOrder(order = 8) + @Asn1Optional public Asn1BigInteger trailingCardIdNum; + + @FieldOrder(order = 9) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String trailingCardIdIA5; + + public Asn1BigInteger getCardIssuerNum() { + + return this.cardIssuerNum; + } + + public String getCardIssuerIA5() { + + return this.cardIssuerIA5; + } + + public Asn1BigInteger getCardIdNum() { + + return this.cardIdNum; + } + + public String getCardIdIA5() { + + return this.cardIdIA5; + } + + public String getCardName() { + + return this.cardName; + } + + public Asn1BigInteger getCardType() { + return this.cardType; + } + + public BigInteger getLeadingCardIdNum() { + if (leadingCardIdNum != null) { + return leadingCardIdNum.toBigInteger(); + } + return null; + } + + public String getLeadingCardIdIA5() { + + return this.leadingCardIdIA5; + } + + public Long getTrailingCardIdNum() { + + return Asn1BigInteger.toLong(this.trailingCardIdNum); + } + + public String getTrailingCardIdIA5() { + + return this.trailingCardIdIA5; + } + + public void setCardIssuerNum(Long cardIssuerNum) { + + this.cardIssuerNum = Asn1BigInteger.toAsn1(cardIssuerNum); + } + + public void setCardIssuerIA5(String cardIssuerIA5) { + + this.cardIssuerIA5 = cardIssuerIA5; + } + + public void setCardIdNum(Asn1BigInteger asn1BigInteger) { + + this.cardIdNum = asn1BigInteger; + } + + public void setCardIdNum(Long cardIdNum) { + + this.cardIdNum = new Asn1BigInteger(cardIdNum); + } + + public void setCardIdIA5(String cardIdIA5) { + + this.cardIdIA5 = cardIdIA5; + } + + public void setCardName(String cardName) { + + this.cardName = cardName; + } + + public void setCardType(Long cardType) { + + this.cardType = Asn1BigInteger.toAsn1(cardType); + } + + public void setLeadingCardIdNum(Long leadingCardIdNum) { + + this.leadingCardIdNum = Asn1BigInteger.toAsn1(leadingCardIdNum); + } + + public void setLeadingCardIdIA5(String leadingCardIdIA5) { + + this.leadingCardIdIA5 = leadingCardIdIA5; + } + + public void setTrailingCardIdNum(Long trailingCardIdNum) { + + this.trailingCardIdNum = Asn1BigInteger.toAsn1(trailingCardIdNum); + } + + public void setTrailingCardIdIA5(String trailingCardIdIA5) { + + this.trailingCardIdIA5 = trailingCardIdIA5; + } + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CodeTableType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CodeTableType.java new file mode 100644 index 0000000..e9c5e01 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CodeTableType.java @@ -0,0 +1,40 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + + +public enum CodeTableType { + stationUIC("stationUIC"), + stationUICReservation("stationUICReservation"), + stationERA("stationERA"), + localCarrierStationCodeTable("localCarrierStationCodeTable"), + proprietaryIssuerStationCodeTable("proprietaryIssuerStationCodeTable"); + + public String text; + + CodeTableType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CompartmentDetailsType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CompartmentDetailsType.java new file mode 100644 index 0000000..ce1832e --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CompartmentDetailsType.java @@ -0,0 +1,136 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; + + +@Sequence +@HasExtensionMarker +public class CompartmentDetailsType extends Object { + public CompartmentDetailsType() { + } + + @FieldOrder(order = 0) + @IntRange(minValue=1,maxValue=99) + @Asn1Optional public Long coachType; + + @FieldOrder(order = 1) + @IntRange(minValue=1,maxValue=99) + @Asn1Optional public Long compartmentType; + + @FieldOrder(order = 2) + @IntRange(minValue=1,maxValue=99) + @Asn1Optional public Long specialAllocation; + + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String coachTypeDescr; + + @FieldOrder(order = 4) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String compartmentTypeDescr; + + @FieldOrder(order = 5) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String specialAllocationDescr; + + @FieldOrder(order = 6) + @Asn1Default(value="unspecified") + public CompartmentPositionType position; + + public Long getCoachType() { + + return this.coachType; + } + + public Long getCompartmentType() { + + return this.compartmentType; + } + + public Long getSpecialAllocation() { + + return this.specialAllocation; + } + + public String getCoachTypeDescr() { + + return this.coachTypeDescr; + } + + public String getCompartmentTypeDescr() { + + return this.compartmentTypeDescr; + } + + public String getSpecialAllocationDescr() { + + return this.specialAllocationDescr; + } + + public CompartmentPositionType getPosition() { + if (position == null) return CompartmentPositionType.unspecified; + return this.position; + } + + public void setCoachType(Long coachType) { + this.coachType = coachType; + } + + public void setCompartmentType(Long compartmentType) { + + this.compartmentType = compartmentType; + } + + public void setSpecialAllocation(Long specialAllocation) { + + this.specialAllocation = specialAllocation; + } + + public void setCoachTypeDescr(String coachTypeDescr) { + + this.coachTypeDescr = coachTypeDescr; + } + + public void setCompartmentTypeDescr(String compartmentTypeDescr) { + + this.compartmentTypeDescr = compartmentTypeDescr; + } + + public void setSpecialAllocationDescr(String specialAllocationDescr) { + + this.specialAllocationDescr = specialAllocationDescr; + } + + public void setPosition(CompartmentPositionType position) { + + this.position = position; + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CompartmentGenderType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CompartmentGenderType.java new file mode 100644 index 0000000..f960234 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CompartmentGenderType.java @@ -0,0 +1,42 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; + +@HasExtensionMarker +public enum CompartmentGenderType { + unspecified("unspecified"), + family("family"), + female("female"), + male("male"), + mixed("mixed"); + + public String text; + + CompartmentGenderType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } + +} \ No newline at end of file diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CompartmentPositionType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CompartmentPositionType.java new file mode 100644 index 0000000..cb43f24 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CompartmentPositionType.java @@ -0,0 +1,38 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + + +public enum CompartmentPositionType { + unspecified("unspecified"), + upperLevel("upperLevel"), + lowerLevel("lowerLevel"); + + public String text; + + CompartmentPositionType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ConfirmationTypeType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ConfirmationTypeType.java new file mode 100644 index 0000000..bf84f91 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ConfirmationTypeType.java @@ -0,0 +1,42 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; + +@HasExtensionMarker +public enum ConfirmationTypeType { + trainDelayConfirmation ("trainDelayConfirmation"), + travelerDelayConfirmation ("travelerDelayConfirmation"), + trainLinkedTicketDelay ("trainLinkedTicketDelay"); + + + + public String text; + + ConfirmationTypeType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ControlData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ControlData.java new file mode 100644 index 0000000..fb73e24 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ControlData.java @@ -0,0 +1,200 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; + + + +@Sequence +@HasExtensionMarker +public class ControlData extends Object { + public ControlData() { + } + + @FieldOrder(order = 0) + @Asn1Optional public SequenceOfCardReferenceType identificationByCardReference; + + @FieldOrder(order = 1) + public Boolean identificationByIdCard = false; + + @FieldOrder(order = 2) + public Boolean identificationByPassportId = false; + + @FieldOrder(order = 3) + @Asn1Optional public Asn1BigInteger identificationItem; + + @FieldOrder(order = 4) + public Boolean passportValidationRequired = false; + + @FieldOrder(order = 5) + public Boolean onlineValidationRequired = false; + + @FieldOrder(order = 6) + @IntRange(minValue=0,maxValue=99) + @Asn1Optional public Long randomDetailedValidationRequired; + + @FieldOrder(order = 7) + public Boolean ageCheckRequired = false; + + @FieldOrder(order = 8) + public Boolean reductionCardCheckRequired = false; + + @FieldOrder(order = 9) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String infoText; + + @FieldOrder(order = 10) + @Asn1Optional public SequenceOfTicketLinkType includedTickets; + + @FieldOrder(order = 11) + @Asn1Optional public ExtensionData extension; + + + + + public SequenceOfCardReferenceType getIdentificationByCardReference() { + + return this.identificationByCardReference; + } + + public Boolean getIdentificationByIdCard() { + + return this.identificationByIdCard; + } + + public Boolean getIdentificationByPassportId() { + + return this.identificationByPassportId; + } + + public Long getIdentificationItem() { + + return Asn1BigInteger.toLong(this.identificationItem); + } + + public Boolean getPassportValidationRequired() { + + return this.passportValidationRequired; + } + + public Boolean getOnlineValidationRequired() { + + return this.onlineValidationRequired; + } + + public Long getRandomDetailedValidationRequired() { + + return this.randomDetailedValidationRequired; + } + + public Boolean getAgeCheckRequired() { + + return this.ageCheckRequired; + } + + public Boolean getReductionCardCheckRequired() { + + return this.reductionCardCheckRequired; + } + + public String getInfoText() { + + return this.infoText; + } + + public SequenceOfTicketLinkType getIncludedTickets() { + + return this.includedTickets; + } + + public ExtensionData getExtension() { + + return this.extension; + } + + public void setIdentificationByCardReference(SequenceOfCardReferenceType identificationByCardReference) { + + this.identificationByCardReference = identificationByCardReference; + } + + public void setIdentificationByIdCard(Boolean identificationByIdCard) { + + this.identificationByIdCard = identificationByIdCard; + } + + public void setIdentificationByPassportId(Boolean identificationByPassportId) { + + this.identificationByPassportId = identificationByPassportId; + } + + public void setIdentificationItem(Long identificationItem) { + + this.identificationItem = Asn1BigInteger.toAsn1(identificationItem); + } + + public void setPassportValidationRequired(Boolean passportValidationRequired) { + + this.passportValidationRequired = passportValidationRequired; + } + + public void setOnlineValidationRequired(Boolean onlineValidationRequired) { + + this.onlineValidationRequired = onlineValidationRequired; + } + + public void setRandomDetailedValidationRequired(Long randomDetailedValidationRequired) { + this.randomDetailedValidationRequired = randomDetailedValidationRequired; + } + + public void setAgeCheckRequired(Boolean ageCheckRequired) { + this.ageCheckRequired = ageCheckRequired; + } + + public void setReductionCardCheckRequired(Boolean reductionCardCheckRequired) { + + this.reductionCardCheckRequired = reductionCardCheckRequired; + } + + public void setInfoText(String infoText) { + + this.infoText = infoText; + } + + public void setIncludedTickets(SequenceOfTicketLinkType includedTickets) { + + this.includedTickets = includedTickets; + } + + public void setExtension(ExtensionData extension) { + + this.extension = extension; + } + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CountermarkData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CountermarkData.java new file mode 100644 index 0000000..435c6ef --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CountermarkData.java @@ -0,0 +1,578 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Date; +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.asn1.datatypesimpl.SequenceOfStringIA5; +import org.uic.barcode.ticket.api.utils.DateTimeUtils; + +@Sequence +@HasExtensionMarker +public class CountermarkData extends Object { + public CountermarkData() { + } + + @FieldOrder(order = 0) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String referenceIA5; + + @FieldOrder(order = 1) + @Asn1Optional public Asn1BigInteger referenceNum; + + @FieldOrder(order = 2) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long productOwnerNum; + + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productOwnerIA5; + + @FieldOrder(order = 4) + @IntRange(minValue=0,maxValue=65535) + @Asn1Optional public Long productIdNum; + + @FieldOrder(order = 5) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productIdIA5; + + @FieldOrder(order = 6) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String ticketReferenceIA5; + + @FieldOrder(order = 7) + @Asn1Optional public Asn1BigInteger ticketReferenceNum; + + @FieldOrder(order = 8) + @IntRange(minValue=1,maxValue=200) + @Asn1Optional public Long numberOfCountermark; + + @FieldOrder(order = 9) + @IntRange(minValue=1,maxValue=200) + @Asn1Optional public Long totalOfCountermarks; + + @FieldOrder(order = 10) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String groupName; + + @FieldOrder(order = 11) + @Asn1Default("stationUIC") + @Asn1Optional public CodeTableType stationCodeTable; + + @FieldOrder(order = 12) + @IntRange(minValue=1,maxValue=9999999) + @Asn1Optional public Long fromStationNum; + + @FieldOrder(order = 13) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String fromStationIA5; + + @FieldOrder(order = 14) + @IntRange(minValue=1,maxValue=9999999) + @Asn1Optional public Long toStationNum; + + @FieldOrder(order = 15) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String toStationIA5; + + @FieldOrder(order = 16) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String fromStationNameUTF8; + + @FieldOrder(order = 17) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String toStationNameUTF8; + + @FieldOrder(order = 18) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String validRegionDesc; + + @FieldOrder(order = 19) + @Asn1Optional public SequenceOfRegionalValidityType validRegion; + + @FieldOrder(order = 20) + public Boolean returnIncluded = false; + + @FieldOrder(order = 21) + @Asn1Optional public ReturnRouteDescriptionType returnDescription; + + @FieldOrder(order = 22) + @IntRange(minValue=-1,maxValue=700) + @Asn1Optional public Long validFromDay; + + @FieldOrder(order = 23) + @IntRange(minValue=0,maxValue=1439) + @Asn1Optional public Long validFromTime; + + @FieldOrder(order = 24) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long validFromUTCOffset; + + @FieldOrder(order = 25) + @IntRange(minValue=0,maxValue=370) + @Asn1Optional public Long validUntilDay; + + @FieldOrder(order = 26) + @IntRange(minValue=0,maxValue=1439) + @Asn1Optional public Long validUntilTime; + + @FieldOrder(order = 27) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long validUntilUTCOffset; + + @FieldOrder(order = 28) + @Asn1Default(value="second") + @Asn1Optional public TravelClassType classCode; + + @FieldOrder(order = 29) + @Asn1Optional public SequenceOfCarrierNum carrierNum; + + @FieldOrder(order = 30) + @Asn1Optional public SequenceOfStringIA5 carrierIA5; + + @FieldOrder(order = 31) + @Asn1Optional public SequenceOfServiceBrands includedServiceBrands; + + @FieldOrder(order = 32) + @Asn1Optional public SequenceOfServiceBrands excludedServiceBrands; + + @FieldOrder(order = 33) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String infoText; + + @FieldOrder(order = 34) + @Asn1Optional public ExtensionData extension; + + + + + + public String getReferenceIA5() { + + return this.referenceIA5; + } + + public Long getReferenceNum() { + + return Asn1BigInteger.toLong(this.referenceNum); + } + + public Long getProductOwnerNum() { + + return this.productOwnerNum; + } + + public String getProductOwnerIA5() { + + return this.productOwnerIA5; + } + + public Long getProductIdNum() { + + return this.productIdNum; + } + + public String getProductIdIA5() { + + return this.productIdIA5; + } + + public String getTicketReferenceIA5() { + + return this.ticketReferenceIA5; + } + + public Long getTicketReferenceNum() { + + return Asn1BigInteger.toLong(this.ticketReferenceNum); + } + + public Long getNumberOfCountermark() { + + return this.numberOfCountermark; + } + + public Long getTotalOfCountermarks() { + + return this.totalOfCountermarks; + } + + public String getGroupName() { + + return this.groupName; + } + + public CodeTableType getStationCodeTable() { + + if (stationCodeTable == null) { + return CodeTableType.stationUIC; + } + + return this.stationCodeTable; + } + + public Long getFromStationNum() { + + return this.fromStationNum; + } + + public String getFromStationIA5() { + + return this.fromStationIA5; + } + + public Long getToStationNum() { + + return this.toStationNum; + } + + public String getToStationIA5() { + + return this.toStationIA5; + } + + public String getFromStationNameUTF8() { + + return this.fromStationNameUTF8; + } + + public String getToStationNameUTF8() { + + return this.toStationNameUTF8; + } + + public String getValidRegionDesc() { + + return this.validRegionDesc; + } + + public SequenceOfRegionalValidityType getValidRegion() { + + return this.validRegion; + } + + public Boolean getReturnIncluded() { + + return this.returnIncluded; + } + + public ReturnRouteDescriptionType getReturnDescription() { + + return this.returnDescription; + } + + public Long getValidFromDay() { + + return this.validFromDay; + } + + public Long getValidFromTime() { + + return this.validFromTime; + } + + public Long getValidUntilDay() { + + return this.validUntilDay; + } + + public Long getValidUntilTime() { + + return this.validUntilTime; + } + + public TravelClassType getClassCode() { + + if (classCode == null){ + return TravelClassType.second; + } + + return this.classCode; + } + + public SequenceOfCarrierNum getCarriersNum() { + + return this.carrierNum; + } + + public SequenceOfStringIA5 getCarriersIA5() { + + return this.carrierIA5; + } + + public SequenceOfServiceBrands getIncludedServiceBrands() { + + return this.includedServiceBrands; + } + + public SequenceOfServiceBrands getExcludedServiceBrands() { + + return this.excludedServiceBrands; + } + + public String getInfoText() { + + return this.infoText; + } + + public ExtensionData getExtension() { + + return this.extension; + } + + public void setReferenceIA5(String referenceIA5) { + + this.referenceIA5 = referenceIA5; + } + + public void setReferenceNum(Long referenceNum) { + + this.referenceNum = Asn1BigInteger.toAsn1(referenceNum); + } + + public void setProductOwnerNum(Long productOwnerNum) { + + this.productOwnerNum = productOwnerNum; + } + + public void setProductOwnerIA5(String productOwnerIA5) { + + this.productOwnerIA5 = productOwnerIA5; + } + + public void setProductIdNum(Long productIdNum) { + + this.productIdNum = productIdNum; + } + + public void setProductIdIA5(String productIdIA5) { + + this.productIdIA5 = productIdIA5; + } + + public void setTicketReferenceIA5(String ticketReferenceIA5) { + + this.ticketReferenceIA5 = ticketReferenceIA5; + } + + public void setTicketReferenceNum(Long ticketReferenceNum) { + + this.ticketReferenceNum = Asn1BigInteger.toAsn1(ticketReferenceNum); + } + + public void setNumberOfCountermark(Long numberOfCountermark) { + + this.numberOfCountermark = numberOfCountermark; + } + + public void setTotalOfCountermarks(Long totalOfCountermarks) { + + this.totalOfCountermarks = totalOfCountermarks; + } + + public void setGroupName(String groupName) { + + this.groupName = groupName; + } + + public void setStationCodeTable(CodeTableType stationCodeTable) { + + this.stationCodeTable = stationCodeTable; + } + + public void setFromStationNum(Long fromStationNum) { + + this.fromStationNum = fromStationNum; + } + + public void setFromStationIA5(String fromStationIA5) { + + this.fromStationIA5 = fromStationIA5; + } + + public void setToStationNum(Long toStationNum) { + + this.toStationNum = toStationNum; + } + + public void setToStationIA5(String toStationIA5) { + + this.toStationIA5 = toStationIA5; + } + + public void setFromStationNameUTF8(String fromStationNameUTF8) { + + this.fromStationNameUTF8 = fromStationNameUTF8; + } + + public void setToStationNameUTF8(String toStationNameUTF8) { + + this.toStationNameUTF8 = toStationNameUTF8; + } + + public void setValidRegionDesc(String validRegionDesc) { + + this.validRegionDesc = validRegionDesc; + } + + public void setValidRegion(SequenceOfRegionalValidityType validRegion) { + + this.validRegion = validRegion; + } + + public void setReturnIncluded(Boolean returnIncluded) { + + this.returnIncluded = returnIncluded; + } + + public void setReturnDescription(ReturnRouteDescriptionType returnDescription) { + + this.returnDescription = returnDescription; + } + + public void setValidFromDay(Long validFromDay) { + + this.validFromDay = validFromDay; + } + + public void setValidFromTime(Long validFromTime) { + + this.validFromTime = validFromTime; + } + + public void setValidUntilDay(Long validUntilDay) { + + this.validUntilDay = validUntilDay; + } + + public void setValidUntilTime(Long validUntilTime) { + + this.validUntilTime = validUntilTime; + } + + public void setClassCode(TravelClassType classCode) { + + this.classCode = classCode; + } + + public void setCarriersNum(SequenceOfCarrierNum carrierNum) { + + this.carrierNum = carrierNum; + } + + public void setCarriersNum(List longs) { + if (longs == null) return; + + this.carrierNum = new SequenceOfCarrierNum(); + this.carrierNum.addAll(longs); + } + + public void setCarriersIA5(SequenceOfStringIA5 carrierIA5) { + + this.carrierIA5 = carrierIA5; + } + + public void setIncludedServiceBrands(SequenceOfServiceBrands includedServiceBrands) { + + this.includedServiceBrands = includedServiceBrands; + } + + public void setExcludedServiceBrands(SequenceOfServiceBrands excludedServiceBrands) { + + this.excludedServiceBrands = excludedServiceBrands; + } + + public void setInfoText(String infoText) { + + this.infoText = infoText; + } + + public void setExtension(ExtensionData extension) { + + this.extension = extension; + } + + + public void setValidityDates (Date fromDate, Date untilDate, Date issuingDate){ + + if (issuingDate == null || fromDate == null) return; + + this.validFromDay = DateTimeUtils.getDateDifference(issuingDate,fromDate); + this.validFromTime = DateTimeUtils.getTime(fromDate); + + if (untilDate != null){ + this.validUntilDay = DateTimeUtils.getDateDifference(fromDate, untilDate); + this.validUntilTime = DateTimeUtils.getTime(untilDate); + } + + } + + public Date getValidFromDate(Date issuingDate){ + + return DateTimeUtils.getDate(issuingDate, this.validFromDay, this.validFromTime); + + } + + public Date getValidUntilDate(Date issuingDate){ + + if (issuingDate == null) return null; + + if (this.validFromDay == null) { + this.validFromDay = 0L; + } + + if (this.validUntilDay == null) { + return null; + } + + + return DateTimeUtils.getDate(issuingDate, this.validFromDay + this.validUntilDay, this.validUntilTime); + + } + + public Long getValidFromUTCOffset() { + return validFromUTCOffset; + } + + public void setValidFromUTCOffset(Long validFromUTCOffset) { + this.validFromUTCOffset = validFromUTCOffset; + } + + public Long getValidUntilUTCOffset() { + return validUntilUTCOffset; + } + + public void setValidUntilUTCOffset(Long validUntilUTCOffset) { + this.validUntilUTCOffset = validUntilUTCOffset; + } + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CustomerCardData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CustomerCardData.java new file mode 100644 index 0000000..e9dbf85 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CustomerCardData.java @@ -0,0 +1,297 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Calendar; +import java.util.Date; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.asn1.datatypesimpl.SequenceOfUnrestrictedLong; + +@Sequence +@HasExtensionMarker +public class CustomerCardData extends Object { + public CustomerCardData() { + } + + @FieldOrder(order = 0) + @Asn1Optional public TravelerType customer; + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String cardIdIA5; + + @FieldOrder(order = 2) + @Asn1Optional public Asn1BigInteger cardIdNum; + + @FieldOrder(order = 3) + @IntRange(minValue=2016,maxValue=2269) + @Asn1Optional public Long validFromYear; + + @FieldOrder(order = 4) + @IntRange(minValue=0,maxValue=700) + @Asn1Optional public Long validFromDay; + + @FieldOrder(order = 5) + @IntRange(minValue=0,maxValue=250) + @Asn1Optional public Long validUntilYear; + + @FieldOrder(order = 6) + @IntRange(minValue=0,maxValue=370) + @Asn1Optional public Long validUntilDay; + + @FieldOrder(order = 7) + @Asn1Optional public TravelClassType classCode; + + @FieldOrder(order = 8) + @IntRange(minValue=0,maxValue=1000) + @Asn1Optional public Long cardType; + + @FieldOrder(order = 9) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String cardTypeDescr; + + @FieldOrder(order = 10) + @Asn1Optional public Asn1BigInteger customerStatus; + + @FieldOrder(order = 11) + @Asn1Optional public String customerStatusDescr; + + @FieldOrder(order = 12) + @Asn1Optional public SequenceOfUnrestrictedLong includedServices; + + @FieldOrder(order = 13) + @Asn1Optional public ExtensionData extension; + + + + + public TravelerType getCustomer() { + + return this.customer; + } + + public String getCardIdIA5() { + + return this.cardIdIA5; + } + + public Asn1BigInteger getCardIdNum() { + + return this.cardIdNum; + } + + public Long getValidFromYear() { + + return this.validFromYear; + } + + public Long getValidFromDay() { + + return this.validFromDay; + } + + public Long getValidUntilYear() { + + return this.validUntilYear; + } + + public Long getValidUntilDay() { + + return this.validUntilDay; + } + + public TravelClassType getClassCode() { + + return this.classCode; + } + + public Long getCardType() { + + return this.cardType; + } + + public String getCardTypeDescr() { + + return this.cardTypeDescr; + } + + public Long getCustomerStatus() { + + return Asn1BigInteger.toLong(this.customerStatus); + } + + public String getCustomerStatusDescr() { + + return this.customerStatusDescr; + } + + public SequenceOfUnrestrictedLong getIncludedServices() { + + return this.includedServices; + } + + public ExtensionData getExtension() { + + return this.extension; + } + + public void setCustomer(TravelerType customer) { + + this.customer = customer; + } + + public void setCardIdIA5(String cardIdIA5) { + + this.cardIdIA5 = cardIdIA5; + } + + public void setCardIdNum(Asn1BigInteger cardIdNum) { + + this.cardIdNum = cardIdNum; + } + + public void setCardIdNum(Long cardIdNum) { + + this.cardIdNum = new Asn1BigInteger(cardIdNum); + } + + public void setValidFromYear(Long validFromYear) { + + this.validFromYear = validFromYear; + } + + public void setValidFromDay(Long validFromDay) { + + this.validFromDay = validFromDay; + } + + public void setValidUntilYear(Long validUntilYear) { + + this.validUntilYear = validUntilYear; + } + + public void setValidUntilDay(Long validUntilDay) { + + this.validUntilDay = validUntilDay; + } + + public void setClassCode(TravelClassType classCode) { + + this.classCode = classCode; + } + + public void setCardType(Long cardType) { + + this.cardType = cardType; + } + + public void setCardTypeDescr(String cardTypeDescr) { + + this.cardTypeDescr = cardTypeDescr; + } + + public void setCustomerStatus(Long customerStatus) { + + this.customerStatus = Asn1BigInteger.toAsn1(customerStatus); + } + + public void setCustomerStatusDescr(String customerStatusDescr) { + + this.customerStatusDescr = customerStatusDescr; + } + + public void setIncludedServices(SequenceOfUnrestrictedLong includedServices) { + + this.includedServices = includedServices; + } + + public void setExtension(ExtensionData extension) { + + this.extension = extension; + } + + public void setValidity (Date fromDate , Date untilDate){ + + Calendar fromCal = Calendar.getInstance(); + fromCal.clear(); + fromCal.setTime(fromDate); + + this.validFromYear = new Long( fromCal.get(Calendar.YEAR)); + this.validFromDay = new Long (fromCal.get(Calendar.DAY_OF_YEAR)); + + if (untilDate == null) return; + + Calendar untilCal = Calendar.getInstance(); + untilCal.clear(); + untilCal.setTime(untilDate); + + int untildays = untilCal.get(Calendar.DAY_OF_YEAR); + + int yearDiff = untilCal.get(Calendar.YEAR) - fromCal.get(Calendar.YEAR); + + this.validUntilYear = new Long( yearDiff); + this.validUntilDay = new Long (untildays); + + } + + public Date getValidFromDate (){ + + if (this.validFromYear == null || this.validFromDay == null) return null; + + Calendar cal = Calendar.getInstance(); + cal.clear(); + //cal.setTimeZone(TimeZone.getTimeZone("UTC")); + cal.set(Calendar.YEAR, this.validFromYear.intValue()); + cal.set(Calendar.DAY_OF_YEAR, this.validFromDay.intValue()); + cal.set(Calendar.MINUTE,0); + cal.set(Calendar.HOUR_OF_DAY,0); + return cal.getTime(); + + } + + + public Date getValidUntilDate (){ + + if (this.validUntilYear == null || this.validUntilDay == null) return null; + + Calendar cal = Calendar.getInstance(); + cal.clear(); + //cal.setTimeZone(TimeZone.getTimeZone("UTC")); + cal.set(Calendar.YEAR, this.validFromYear.intValue()); + if (this.validUntilYear != null) { + cal.add(Calendar.YEAR, this.validUntilYear.intValue()); + } + cal.set(Calendar.DAY_OF_YEAR, this.validUntilDay.intValue()); + cal.set(Calendar.MINUTE,59); + cal.set(Calendar.HOUR_OF_DAY,23); + return cal.getTime(); + + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CustomerStatusType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CustomerStatusType.java new file mode 100644 index 0000000..cb10dc9 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CustomerStatusType.java @@ -0,0 +1,93 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; + + + +@Sequence +public class CustomerStatusType extends Object { + public CustomerStatusType() { + } + + @FieldOrder(order = 0) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long statusProviderNum; + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String statusProviderIA5; + + @FieldOrder(order = 2) + @Asn1Optional public Asn1BigInteger customerStatus; + + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String customerStatusDescr; + + public Long getStatusProviderNum() { + + return this.statusProviderNum; + } + + public String getStatusProviderIA5() { + + return this.statusProviderIA5; + } + + public Long getCustomerStatus() { + + return Asn1BigInteger.toLong(this.customerStatus); + } + + public String getCustomerStatusDescr() { + + return this.customerStatusDescr; + } + + public void setStatusProviderNum(Long statusProviderNum) { + + this.statusProviderNum = statusProviderNum; + } + + public void setStatusProviderIA5(String statusProviderIA5) { + + this.statusProviderIA5 = statusProviderIA5; + } + + public void setCustomerStatus(Long customerStatus) { + + this.customerStatus = Asn1BigInteger.toAsn1(customerStatus); + } + + public void setCustomerStatusDescr(String customerStatusDescr) { + + this.customerStatusDescr = customerStatusDescr; + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/DelayConfirmation.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/DelayConfirmation.java new file mode 100644 index 0000000..72abeb0 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/DelayConfirmation.java @@ -0,0 +1,339 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import java.util.TimeZone; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; + + +@Sequence +@HasExtensionMarker +public class DelayConfirmation extends Object { + public DelayConfirmation() { + } + + @FieldOrder(order = 0) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String referenceIA5; + + @FieldOrder(order = 1) + @Asn1Optional public Asn1BigInteger referenceNum; + + @FieldOrder(order = 2) + @Asn1Optional public Asn1BigInteger trainNum; + + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String trainIA5; + + @FieldOrder(order = 4) + @IntRange(minValue=2016, maxValue=2269) + @Asn1Optional public Long plannedArrivalYear; + + @FieldOrder(order = 5) + @IntRange(minValue=1, maxValue=366) + @Asn1Optional public Long plannedArrivalDay; + + @FieldOrder(order = 6) + @IntRange(minValue=0, maxValue=1439) + @Asn1Optional public Long plannedArrivalTime; + + @FieldOrder(order = 7) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long departureUTCOffset; + + @FieldOrder(order = 8) + @Asn1Default(value="stationUIC") + @Asn1Optional public CodeTableType stationCodeTable; + + @FieldOrder(order = 9) + @IntRange(minValue=1, maxValue=9999999) + @Asn1Optional public Long stationNum; + + @FieldOrder(order = 10) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String stationIA5; + + @FieldOrder(order = 11) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String stationNameUTF8; + + @FieldOrder(order = 12) + @IntRange(minValue=0, maxValue=999, hasExtensionMarker=false) + @Asn1Optional public Long delay; + + @FieldOrder(order = 13) + @Asn1Optional public Boolean trainCancelled = false; + + @FieldOrder(order = 14) + @Asn1Default(value="travelerDelayConfirmation") + @Asn1Optional public ConfirmationTypeType confirmationType; + + @FieldOrder(order = 15) + @Asn1Optional public SequenceOfTicketLinkType affectedTickets; + + @FieldOrder(order = 16) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String infoText; + + @FieldOrder(order = 17) + @Asn1Optional public ExtensionData extension; + + + + public String getReferenceIA5() { + + return this.referenceIA5; + } + + public Asn1BigInteger getReferenceNum() { + + return this.referenceNum; + } + + public Long getTrainNum() { + + return Asn1BigInteger.toLong(this.trainNum); + } + + public String getTrainIA5() { + + return this.trainIA5; + } + + public Long getPlannedArrivalYear() { + + return this.plannedArrivalYear; + } + + public Long getPlannedArrivalDay() { + + return this.plannedArrivalDay; + } + + public Long getPlannedArrivalTime() { + + return this.plannedArrivalTime; + } + + public CodeTableType getStationCodeTable() { + + if (stationCodeTable == null){ + return CodeTableType.stationUIC; + } + return this.stationCodeTable; + } + + public Long getStationNum() { + + return this.stationNum; + } + + public String getStationIA5() { + + return this.stationIA5; + } + + public String getStationNameUTF8() { + + return this.stationNameUTF8; + } + + public Long getDelay() { + + return this.delay; + } + + public Boolean getTrainCancelled() { + + return this.trainCancelled; + } + + public ConfirmationTypeType getConfirmationType() { + + if (confirmationType == null){ + return ConfirmationTypeType.trainDelayConfirmation; + } + + return this.confirmationType; + } + + public List getAffectedTickets() { + + return this.affectedTickets; + } + + public String getInfoText() { + + return this.infoText; + } + + public ExtensionData getExtension() { + + return this.extension; + } + + public void setReferenceIA5(String referenceIA5) { + + this.referenceIA5 = referenceIA5; + } + + public void setReferenceNum(Asn1BigInteger referenceNum) { + this.referenceNum = referenceNum; + } + + public void setReferenceNum(Long referenceNum) { + this.referenceNum = Asn1BigInteger.toAsn1(referenceNum); + } + + public void setTrainNum(Asn1BigInteger trainNum) { + + this.trainNum = trainNum; + } + + public void setTrainIA5(String trainIA5) { + + this.trainIA5 = trainIA5; + } + + public void setPlannedArrivalYear(Long plannedArrivalYear) { + + this.plannedArrivalYear = plannedArrivalYear; + } + + public void setPlannedArrivalDay(Long plannedArrivalDay) { + + this.plannedArrivalDay = plannedArrivalDay; + } + + public void setPlannedArrivalTime(Long plannedArrivalTime) { + + this.plannedArrivalTime = plannedArrivalTime; + } + + public void setStationCodeTable(CodeTableType stationCodeTable) { + + this.stationCodeTable = stationCodeTable; + } + + public void setStationNum(Long stationNum) { + + this.stationNum = stationNum; + } + + public void setStationIA5(String stationIA5) { + + this.stationIA5 = stationIA5; + } + + public void setStationNameUTF8(String stationNameUTF8) { + + this.stationNameUTF8 = stationNameUTF8; + } + + public void setDelay(Long delay) { + + this.delay = delay; + } + + public void setTrainCancelled(Boolean trainCancelled) { + + this.trainCancelled = trainCancelled; + } + + public void setConfirmationType(ConfirmationTypeType confirmationType) { + + this.confirmationType = confirmationType; + } + + public void setAffectedTickets(SequenceOfTicketLinkType affectedTickets) { + + this.affectedTickets = affectedTickets; + } + + public void setInfoText(String infoText) { + + this.infoText = infoText; + } + + public void setExtension(ExtensionData extension) { + + this.extension = extension; + } + + public void setPlannedArrivalDate(Date date){ + + Calendar cal = Calendar.getInstance(); + cal.setTime(date); + + this.plannedArrivalYear = new Long( cal.get(Calendar.YEAR)); + this.plannedArrivalDay = new Long (cal.get(Calendar.DAY_OF_YEAR)); + int time = cal.get(Calendar.HOUR_OF_DAY) * 60 + cal.get(Calendar.MINUTE); + if (time > 0) { + this.plannedArrivalTime = new Long (time ); + } + + } + + public Date getPlannedArrivalDate() { + + if (this.plannedArrivalYear == null || this.plannedArrivalDay == null) return null; + + Calendar cal = Calendar.getInstance(); + cal.clear(); + cal.setTimeZone(TimeZone.getTimeZone("UTC")); + cal.set(Calendar.YEAR, this.plannedArrivalYear.intValue()); + cal.set(Calendar.DAY_OF_YEAR, this.plannedArrivalDay.intValue()); + + if (this.plannedArrivalTime != null) { + + int hours = this.plannedArrivalTime.intValue() / 60; + int minutes = this.plannedArrivalTime.intValue() % 60; + cal.set(Calendar.HOUR_OF_DAY, hours); + cal.set(Calendar.MINUTE,minutes); + + } + + return cal.getTime(); + } + + public Long getDepartureUTCOffset() { + return departureUTCOffset; + } + + public void setDepartureUTCOffset(Long departureUTCOffset) { + this.departureUTCOffset = departureUTCOffset; + } + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/DeltaCoordinates.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/DeltaCoordinates.java new file mode 100644 index 0000000..f4e47ea --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/DeltaCoordinates.java @@ -0,0 +1,58 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.Sequence; + +@Sequence +public class DeltaCoordinates extends Object { + public DeltaCoordinates() { + } + + @FieldOrder(order = 0) + public Asn1BigInteger longitude; + + @FieldOrder(order = 1) + public Asn1BigInteger latitude; + + public Asn1BigInteger getLongitude() { + + return this.longitude; + } + + public Asn1BigInteger getLatitude() { + + return this.latitude; + } + + public void setLongitude(Asn1BigInteger longitude) { + + this.longitude = longitude; + } + + public void setLatitude(Asn1BigInteger latitude) { + + this.latitude = latitude; + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/DocumentData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/DocumentData.java new file mode 100644 index 0000000..d6a759b --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/DocumentData.java @@ -0,0 +1,61 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.Sequence; + +@Sequence +@HasExtensionMarker +public class DocumentData extends Object { + public DocumentData() { + } + + @FieldOrder(order = 0) + @Asn1Optional public TokenType token; + + @FieldOrder(order = 1) + public TicketDetailData ticket; + + public TokenType getToken() { + + return this.token; + } + + public TicketDetailData getTicket() { + + return this.ticket; + } + + public void setToken(TokenType token) { + + this.token = token; + } + + public void setTicket(TicketDetailData ticket) { + + this.ticket = ticket; + } + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ExtensionData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ExtensionData.java new file mode 100644 index 0000000..1e3a33a --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ExtensionData.java @@ -0,0 +1,64 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.asn1.datatypesimpl.OctetString; + + +@Sequence +public class ExtensionData extends Object { + public ExtensionData() { + } + + @FieldOrder(order = 0) + @RestrictedString(CharacterRestriction.IA5String) + public String extensionId; + + @FieldOrder(order = 1) + public OctetString extensionData; + + public String getExtensionId() { + + return this.extensionId; + } + + public byte[] getExtensionData() { + + return extensionData.toByteArray(); + } + + public void setExtensionId(String extensionId) { + + this.extensionId = extensionId; + } + + public void setExtensionData(byte[] extensionData) { + + this.extensionData = new OctetString(extensionData); + + } + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/FIPTicketData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/FIPTicketData.java new file mode 100644 index 0000000..c6a98e4 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/FIPTicketData.java @@ -0,0 +1,338 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Date; +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.asn1.datatypesimpl.SequenceOfStringIA5; +import org.uic.barcode.ticket.api.utils.DateTimeUtils; + +@Sequence +@HasExtensionMarker +public class FIPTicketData extends Object { + public FIPTicketData() { + } + + @FieldOrder(order = 0) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String referenceIA5; + + @FieldOrder(order = 1) + @Asn1Optional public Asn1BigInteger referenceNum; + + @FieldOrder(order = 2) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long productOwnerNum; + + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productOwnerIA5; + + @FieldOrder(order = 4) + @IntRange(minValue=0,maxValue=65535) + @Asn1Optional public Long productIdNum; + + @FieldOrder(order = 5) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productIdIA5; + + @FieldOrder(order = 6) + @IntRange(minValue=-1,maxValue=700) + @Asn1Optional public Long validFromDay; + + @FieldOrder(order = 7) + @IntRange(minValue=0,maxValue=370) + @Asn1Optional public Long validUntilDay; + + @FieldOrder(order = 8) + @Asn1Optional public SequenceOfActivatedDays activatedDay; + + @FieldOrder(order = 9) + @Asn1Optional public SequenceOfCarrierNum carrierNum; + + @FieldOrder(order = 10) + @Asn1Optional public SequenceOfStringIA5 carrierIA5; + + @FieldOrder(order = 11) + @IntRange(minValue=1,maxValue=200) + public Long numberOfTravelDays; + + @FieldOrder(order = 12) + public Boolean includesSupplements = false; + + @FieldOrder(order = 13) + @Asn1Default(value="second") + @Asn1Optional public TravelClassType classCode; + + @FieldOrder(order = 14) + @Asn1Optional public ExtensionData extension; + + public String getReferenceIA5() { + + return this.referenceIA5; + } + + public Asn1BigInteger getReferenceNum() { + + return this.referenceNum; + } + + public Long getProductOwnerNum() { + + return this.productOwnerNum; + } + + public String getProductOwnerIA5() { + + return this.productOwnerIA5; + } + + public Long getProductIdNum() { + + return this.productIdNum; + } + + public String getProductIdIA5() { + + return this.productIdIA5; + } + + public Long getValidFromDay() { + + return this.validFromDay; + } + + public Long getValidUntilDay() { + + return this.validUntilDay; + } + + public List getActivatedDay() { + + return this.activatedDay; + } + + public List getCarrierNum() { + + return this.carrierNum; + } + + public List getCarrierIA5() { + + return this.carrierIA5; + } + + public Long getNumberOfTravelDays() { + + return this.numberOfTravelDays; + } + + public Boolean getIncludesSupplements() { + + return this.includesSupplements; + } + + public TravelClassType getClassCode() { + if (classCode == null) return TravelClassType.second; + return this.classCode; + } + + public ExtensionData getExtension() { + + return this.extension; + } + + public void setReferenceIA5(String referenceIA5) { + + this.referenceIA5 = referenceIA5; + } + + public void setReferenceNum(Asn1BigInteger referenceNum) { + + this.referenceNum = referenceNum; + } + + public void setProductOwnerNum(Long productOwnerNum) { + + this.productOwnerNum = productOwnerNum; + } + + public void setProductOwnerIA5(String productOwnerIA5) { + + this.productOwnerIA5 = productOwnerIA5; + } + + public void setProductIdNum(Long productIdNum) { + + this.productIdNum = productIdNum; + } + + public void setProductIdIA5(String productIdIA5) { + + this.productIdIA5 = productIdIA5; + } + + public void setValidFromDay(Long validFromDay) { + + this.validFromDay = validFromDay; + } + + public void setValidUntilDay(Long validUntilDay) { + + this.validUntilDay = validUntilDay; + } + + public void setActivatedDay(SequenceOfActivatedDays activatedDay) { + + this.activatedDay = activatedDay; + } + + public void setCarrierNum(SequenceOfCarrierNum carrierNum) { + + this.carrierNum = carrierNum; + } + + public void setCarrierIA5(SequenceOfStringIA5 carrierIA5) { + + this.carrierIA5 = carrierIA5; + } + + public void setNumberOfTravelDays(Long numberOfTravelDays) { + + this.numberOfTravelDays = numberOfTravelDays; + } + + public void setIncludesSupplements(Boolean includesSupplements) { + + this.includesSupplements = includesSupplements; + } + + public void setClassCode(TravelClassType classCode) { + this.classCode = classCode; + } + + public void setExtension(ExtensionData extension) { + + this.extension = extension; + } + + public void setValidityDates (Date fromDate, Date untilDate, Date issuingDate){ + + if (issuingDate == null || fromDate == null) return; + + this.validFromDay = DateTimeUtils.getDateDifference(issuingDate,fromDate); + + if (untilDate != null){ + this.validUntilDay = DateTimeUtils.getDateDifference(fromDate, untilDate); + } + + } + + public Date getValidFromDate(Date issuingDate){ + + return DateTimeUtils.getDate(issuingDate, this.validFromDay,0L); + + } + + public Date getValidUntilDate(Date issuingDate){ + + if (issuingDate == null) return null; + + if (this.validFromDay == null) { + this.validFromDay = 0L; + } + + if (this.validUntilDay == null) { + return null; + } + + + return DateTimeUtils.getDate(issuingDate, this.validFromDay + this.validUntilDay, 1439L); + + } + + public void addActivatedDays(Collection days) { + + if (days == null || days.isEmpty()) return; + + if (this.activatedDay == null) { + this.activatedDay = new SequenceOfActivatedDays(); + } + + for (Long l : days) { + this.activatedDay.add(l); + } + + } + + public void addActivatedDay(Date issuingDate, Date day){ + + Long dayDiff = DateTimeUtils.getDateDifference(issuingDate, day); + + if (this.activatedDay == null) { + this.activatedDay = new SequenceOfActivatedDays(); + } + + if (dayDiff != null) { + this.activatedDay.add(dayDiff); + } + + } + + /** + * Gets the activated days. + * + * @param issuingDate the issuing date + * @return the activated days + */ + public Collection getActivatedDays(Date issuingDate) { + + if (this.activatedDay == null) return null; + + ArrayList dates = new ArrayList(); + + for (Long diff: this.getActivatedDay()) { + + Date day = DateTimeUtils.getDate(this.getValidFromDate(issuingDate), diff, null); + + if (day != null) { + dates.add(day); + } + + } + + return dates; + + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/GenderType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/GenderType.java new file mode 100644 index 0000000..f81f045 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/GenderType.java @@ -0,0 +1,42 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; + +@HasExtensionMarker +public enum GenderType { + unspecified("unspecified"), + female("female"), + male("male"), + other("other"); + + + public String text; + + GenderType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/GeoCoordinateSystemType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/GeoCoordinateSystemType.java new file mode 100644 index 0000000..9a5bed4 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/GeoCoordinateSystemType.java @@ -0,0 +1,38 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + + +public enum GeoCoordinateSystemType { + wgs84("wgs84"), + grs80("grs80"); + + + public String text; + + GeoCoordinateSystemType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/GeoCoordinateType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/GeoCoordinateType.java new file mode 100644 index 0000000..16c4401 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/GeoCoordinateType.java @@ -0,0 +1,144 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.Sequence; + +@Sequence +public class GeoCoordinateType extends Object { + public GeoCoordinateType() { + } + + @FieldOrder(order = 0) + @Asn1Default(value="milliDegree") + @Asn1Optional public GeoUnitType geoUnit; + + @FieldOrder(order = 1) + @Asn1Default(value="wgs84") + @Asn1Optional public GeoCoordinateSystemType coordinateSystem; + + @FieldOrder(order = 2) + @Asn1Default(value="north") + @Asn1Optional public HemisphereLongitudeType hemisphereLongitude; + + @FieldOrder(order = 3) + @Asn1Default(value="east") + @Asn1Optional public HemisphereLatitudeType hemisphereLatitude; + + @FieldOrder(order = 4) + public Asn1BigInteger longitude; + + @FieldOrder(order = 5) + public Asn1BigInteger latitude; + + @FieldOrder(order = 6) + @Asn1Optional public GeoUnitType accuracy; + + public GeoUnitType getGeoUnit() { + + if (geoUnit == null){ + return GeoUnitType.milliDegree; + } + return this.geoUnit; + } + + public GeoCoordinateSystemType getCoordinateSystem() { + + if (coordinateSystem == null) { + return GeoCoordinateSystemType.wgs84; + } + + return this.coordinateSystem; + } + + public HemisphereLongitudeType getHemisphereLongitude() { + + if (hemisphereLongitude == null){ + return HemisphereLongitudeType.north; + } + + return this.hemisphereLongitude; + } + + public HemisphereLatitudeType getHemisphereLatitude() { + + if (hemisphereLatitude == null) { + return HemisphereLatitudeType.east; + } + + return this.hemisphereLatitude; + } + + public Long getLongitude() { + + return Asn1BigInteger.toLong(this.longitude); + } + + public Long getLatitude() { + + return Asn1BigInteger.toLong(this.latitude); + } + + public GeoUnitType getAccuracy() { + + return this.accuracy; + } + + public void setGeoUnit(GeoUnitType geoUnit) { + + this.geoUnit = geoUnit; + } + + public void setCoordinateSystem(GeoCoordinateSystemType coordinateSystem) { + + this.coordinateSystem = coordinateSystem; + } + + public void setHemisphereLongitude(HemisphereLongitudeType hemisphereLongitude) { + + this.hemisphereLongitude = hemisphereLongitude; + } + + public void setHemisphereLatitude(HemisphereLatitudeType hemisphereLatitude) { + + this.hemisphereLatitude = hemisphereLatitude; + } + + public void setLongitude(Long longitude) { + + this.longitude = Asn1BigInteger.toAsn1(longitude); + } + + public void setLatitude(Long latitude) { + + this.latitude = Asn1BigInteger.toAsn1(latitude); + } + + public void setAccuracy(GeoUnitType accuracy) { + + this.accuracy = accuracy; + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/GeoUnitType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/GeoUnitType.java new file mode 100644 index 0000000..225505b --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/GeoUnitType.java @@ -0,0 +1,40 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +public enum GeoUnitType { + microDegree("microDegree"), + tenthmilliDegree("tenthmilliDegree"), + milliDegree("milliDegree"), + centiDegree("centiDegree"), + deciDegree("deciDegree"); + + + public String text; + + GeoUnitType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/HemisphereLatitudeType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/HemisphereLatitudeType.java new file mode 100644 index 0000000..63ea321 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/HemisphereLatitudeType.java @@ -0,0 +1,37 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +public enum HemisphereLatitudeType { + east("east"), + west("west"); + + + public String text; + + HemisphereLatitudeType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/HemisphereLongitudeType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/HemisphereLongitudeType.java new file mode 100644 index 0000000..c493255 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/HemisphereLongitudeType.java @@ -0,0 +1,36 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +public enum HemisphereLongitudeType { + north("north"), + south("south"); + + public String text; + + HemisphereLongitudeType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/IncludedOpenTicketType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/IncludedOpenTicketType.java new file mode 100644 index 0000000..cef0b02 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/IncludedOpenTicketType.java @@ -0,0 +1,449 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Date; +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.SizeRange; +import org.uic.barcode.asn1.datatypesimpl.SequenceOfStringIA5; +import org.uic.barcode.ticket.api.utils.DateTimeUtils; + +public class IncludedOpenTicketType extends Object { + public IncludedOpenTicketType() { + } + + @FieldOrder(order = 0) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long productOwnerNum; + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productOwnerIA5; + + @FieldOrder(order = 2) + @IntRange(minValue=0,maxValue=65535) + @Asn1Optional public Long productIdNum; + + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productIdIA5; + + @FieldOrder(order = 4) + @Asn1Optional public Asn1BigInteger externalIssuerId; + + @FieldOrder(order = 5) + @Asn1Optional public Asn1BigInteger issuerAutorizationId; + + @FieldOrder(order = 6) + @Asn1Default("stationUIC") + @Asn1Optional public CodeTableType stationCodeTable; + + @FieldOrder(order = 7) + @Asn1Optional public SequenceOfRegionalValidityType validRegion; + + @FieldOrder(order = 8) + @IntRange(minValue=-1,maxValue=700) + @Asn1Optional public Long validFromDay; + + @FieldOrder(order = 9) + @IntRange(minValue=0,maxValue=1439) + @Asn1Optional public Long validFromTime; + + @FieldOrder(order = 10) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long validFromUTCOffset; + + @FieldOrder(order = 11) + @IntRange(minValue=0,maxValue=370) + @Asn1Optional public Long validUntilDay; + + @FieldOrder(order = 12) + @IntRange(minValue=0,maxValue=1439) + @Asn1Optional public Long validUntilTime; + + @FieldOrder(order = 13) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long validUntilUTCOffset; + + @FieldOrder(order = 14) + @Asn1Default(value="second") + @Asn1Optional public TravelClassType classCode; + + @FieldOrder(order = 15) + @SizeRange(minValue = 1, maxValue = 2) + @Asn1Optional public String serviceLevel; + + @FieldOrder(order = 16) + @Asn1Optional public SequenceOfCarrierNum includedCarriersNum; + + @FieldOrder(order = 17) + @Asn1Optional public SequenceOfStringIA5 includedCarriersIA5; + + @FieldOrder(order = 18) + @Asn1Optional public SequenceOfServiceBrands includedServiceBrands; + + @FieldOrder(order = 19) + @Asn1Optional public SequenceOfServiceBrands excludedServiceBrands; + + @FieldOrder(order = 20) + @Asn1Optional public SequenceOfTariffType tariffs; + + @FieldOrder(order = 21) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String infoText; + + @FieldOrder(order = 22) + @Asn1Optional public SequenceOfTransportTypes includedTransportTypes; + + @FieldOrder(order = 23) + @Asn1Optional public SequenceOfTransportTypes excludedTransportTypes; + + @FieldOrder(order = 24) + @Asn1Optional public ExtensionData extension; + + public Long getProductOwnerNum() { + + return this.productOwnerNum; + } + + public String getProductOwnerIA5() { + + return this.productOwnerIA5; + } + + public Long getProductIdNum() { + + return this.productIdNum; + } + + public String getProductIdIA5() { + + return this.productIdIA5; + } + + public Long getExternalIssuerId() { + + return Asn1BigInteger.toLong(this.externalIssuerId); + } + + public Long getIssuerAutorizationId() { + + return Asn1BigInteger.toLong(this.issuerAutorizationId); + } + + public CodeTableType getStationCodeTable() { + + if (stationCodeTable == null) { + return CodeTableType.stationUIC; + } + + return this.stationCodeTable; + } + + public List getValidRegion() { + + return this.validRegion; + } + + public Long getValidFromDay() { + + return this.validFromDay; + } + + public Long getValidFromTime() { + + return this.validFromTime; + } + + public Long getValidUntilDay() { + + return this.validUntilDay; + } + + public Long getValidUntilTime() { + + return this.validUntilTime; + } + + public TravelClassType getClassCode() { + + if (classCode == null) { + return TravelClassType.second; + } + + return this.classCode; + } + + public String getServiceLevel() { + + return this.serviceLevel; + } + + public List getIncludedCarriersNum() { + + return this.includedCarriersNum; + } + + public List getIncludedCarriersIA5() { + + return this.includedCarriersIA5; + } + + public List getIncludedServiceBrands() { + + return this.includedServiceBrands; + } + + public List getExcludedServiceBrands() { + + return this.excludedServiceBrands; + } + + + + public SequenceOfTransportTypes getIncludedTransportTypes() { + return includedTransportTypes; + } + + public void setIncludedTransportTypes(SequenceOfTransportTypes includedTransportTypes) { + this.includedTransportTypes = includedTransportTypes; + } + + public SequenceOfTransportTypes getExcludedTransportTypes() { + return excludedTransportTypes; + } + + public void setExcludedTransportTypes(SequenceOfTransportTypes excludedTransportTypes) { + this.excludedTransportTypes = excludedTransportTypes; + } + + public List getTariffs() { + + return this.tariffs; + } + + public String getInfoText() { + + return this.infoText; + } + + public ExtensionData getExtension() { + + return this.extension; + } + + public void setProductOwnerNum(Long productOwnerNum) { + + this.productOwnerNum = productOwnerNum; + } + + public void setProductOwnerIA5(String productOwnerIA5) { + + this.productOwnerIA5 = productOwnerIA5; + } + + public void setProductIdNum(Long productIdNum) { + + this.productIdNum = productIdNum; + } + + public void setProductIdIA5(String productIdIA5) { + + this.productIdIA5 = productIdIA5; + } + + public void setExternalIssuerId(Long externalIssuerId) { + + this.externalIssuerId = Asn1BigInteger.toAsn1(externalIssuerId); + } + + public void setIssuerAutorizationId(Long issuerAutorizationId) { + + this.issuerAutorizationId = Asn1BigInteger.toAsn1(issuerAutorizationId); + } + + public void setStationCodeTable(CodeTableType stationCodeTable) { + + this.stationCodeTable = stationCodeTable; + } + + public void setValidRegion(SequenceOfRegionalValidityType validRegion) { + + this.validRegion = validRegion; + } + + public void setValidFromDay(Long validFromDay) { + + this.validFromDay = validFromDay; + } + + public void setValidFromTime(Long validFromTime) { + + this.validFromTime = validFromTime; + } + + public void setValidUntilDay(Long validUntilDay) { + + this.validUntilDay = validUntilDay; + } + + public void setValidUntilTime(Long validUntilTime) { + + this.validUntilTime = validUntilTime; + } + + public void setClassCode(TravelClassType classCode) { + + this.classCode = classCode; + } + + public void setServiceLevel(String serviceLevel) { + + this.serviceLevel = serviceLevel; + } + + public void setIncludedCarriersNum(SequenceOfCarrierNum includedCarriersNum) { + + this.includedCarriersNum = includedCarriersNum; + } + + public void setIncludedCarriersIA5(SequenceOfStringIA5 includedCarriersIA5) { + + this.includedCarriersIA5 = includedCarriersIA5; + } + + public void setIncludedServiceBrands(SequenceOfServiceBrands includedServiceBrands) { + + this.includedServiceBrands = includedServiceBrands; + } + + public void setExcludedServiceBrands(SequenceOfServiceBrands excludedServiceBrands) { + + this.excludedServiceBrands = excludedServiceBrands; + } + + public void setTariffs(SequenceOfTariffType tariffs) { + + this.tariffs = tariffs; + } + + public void setInfoText(String infoText) { + + this.infoText = infoText; + } + + public void setExtension(ExtensionData extension) { + + this.extension = extension; + } + + public void setValidityDates (Date fromDate, Date untilDate, Date issuingDate){ + + if (issuingDate == null || fromDate == null) return; + + this.validFromDay = DateTimeUtils.getDateDifference(issuingDate,fromDate); + this.validFromTime = DateTimeUtils.getTime(fromDate); + + + if (untilDate != null){ + this.validUntilDay = DateTimeUtils.getDateDifference(fromDate, untilDate); + this.validUntilTime = DateTimeUtils.getTime(untilDate); + } + + } + + public void setValidFromTimeZone(Date dateLocal, Date dateUTC ) { + // -- (UTC = local + offset * 15 Minutes) + this.validFromUTCOffset = new Long(dateLocal.getTime() - dateUTC.getTime()) / (1000 * 60 * 15); + } + + public void setValidUntilTimeZone(Date dateLocal, Date dateUTC ) { + // -- (UTC = local + offset * 15 Minutes) + this.validUntilUTCOffset = new Long(dateLocal.getTime() - dateUTC.getTime()) / (1000 * 60 * 15); + + if (this.validFromUTCOffset.longValue() == this.validUntilUTCOffset.longValue()) { + this.validUntilUTCOffset = null; + } + } + + + + public Date getValidFromDate(Date issuingDate){ + + return DateTimeUtils.getDate(issuingDate, this.validFromDay, this.validFromTime); + + } + + public Date getValidUntilDate(Date issuingDate){ + + if (issuingDate == null) return null; + + if (this.validFromDay == null) { + this.validFromDay = 0L; + } + + if (this.validUntilDay == null) { + return null; + } + + return DateTimeUtils.getDate(issuingDate, this.validFromDay + this.validUntilDay, this.validUntilTime); + + } + + public Date getUTCValidFromDate(Date issuingDate){ + return DateTimeUtils.getUTCDate(issuingDate, this.validFromDay, this.validFromTime, this.validFromUTCOffset); + } + + public Date getUTCValidUntilDate(Date issuingDate){ + if (this.validUntilUTCOffset == null) { + return DateTimeUtils.getUTCDate(issuingDate, this.validFromDay, this.validFromTime, this.validFromUTCOffset); + } else { + return DateTimeUtils.getUTCDate(issuingDate, this.validFromDay, this.validUntilTime, this.validFromUTCOffset); + } + } + + public Long getValidFromUTCOffset() { + return validFromUTCOffset; + } + + public void setValidFromUTCOffset(Long validFromUTCOffset) { + this.validFromUTCOffset = validFromUTCOffset; + } + + public Long getValidUntilUTCOffset() { + return validUntilUTCOffset; + } + + public void setValidUntilUTCOffset(Long validUntilUTCOffset) { + this.validUntilUTCOffset = validUntilUTCOffset; + } + + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/IssuingData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/IssuingData.java new file mode 100644 index 0000000..2491d79 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/IssuingData.java @@ -0,0 +1,360 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Calendar; +import java.util.Date; +import java.util.TimeZone; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.FixedSize; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; + +@Sequence +@HasExtensionMarker +public class IssuingData extends Object { + public IssuingData() { + } + + @FieldOrder(order = 0) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long securityProviderNum; + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String securityProviderIA5; + + @FieldOrder(order = 2) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long issuerNum; + + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String issuerIA5; + + @FieldOrder(order = 4) + @IntRange(minValue=2016,maxValue=2269) + public Long issuingYear; + + @FieldOrder(order = 5) + @IntRange(minValue=1,maxValue=366) + public Long issuingDay; + + @FieldOrder(order = 6) + @IntRange(minValue=0,maxValue=1439) + @Asn1Optional public Long issuingTime; + + @FieldOrder(order = 7) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String issuerName; + + @FieldOrder(order = 8) + public Boolean specimen = false; + + @FieldOrder(order = 9) + public Boolean securePaperTicket = false; + + @FieldOrder(order = 10) + public Boolean activated = true; + + @FieldOrder(order = 11) + @FixedSize(3) + @Asn1Default(value="EUR") + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String currency; + + @FieldOrder(order = 12) + @IntRange(minValue=1,maxValue=3) + @Asn1Default(value="2") + @Asn1Optional public Long currencyFract; + + @FieldOrder(order = 13) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String issuerPNR; + + @FieldOrder(order = 14) + @Asn1Optional public ExtensionData extension; + + @FieldOrder(order = 15) + @Asn1Optional public Asn1BigInteger issuedOnTrainNum; + + @FieldOrder(order = 16) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String issuedOnTrainIA5; + + @FieldOrder(order = 17) + @Asn1Optional public Asn1BigInteger issuedOnLine; + + @FieldOrder(order = 18) + @Asn1Optional public GeoCoordinateType pointOfSale; + + + + + + + public Long getSecurityProviderNum() { + + return this.securityProviderNum; + } + + public String getSecurityProviderIA5() { + + return this.securityProviderIA5; + } + + public Long getIssuerNum() { + + return this.issuerNum; + } + + public String getIssuerIA5() { + + return this.issuerIA5; + } + + public Long getIssuingYear() { + + return this.issuingYear; + } + + public Long getIssuingDay() { + + return this.issuingDay; + } + + public Long getIssuingTime() { + + return this.issuingTime; + } + + public String getIssuerName() { + + return this.issuerName; + } + + public Boolean getSpecimen() { + + return this.specimen; + } + + public Boolean getSecurePaperTicket() { + + return this.securePaperTicket; + } + + public Boolean getActivated() { + + return this.activated; + } + + public String getCurrency() { + + if (currency == null || currency.length() == 0){ + return "EUR"; + } + + return this.currency; + } + + public Long getCurrencyFract() { + + if (currencyFract == null) { + return new Long(2); + } + return this.currencyFract; + } + + public String getIssuerPNR() { + + return this.issuerPNR; + } + + public ExtensionData getExtension() { + + return this.extension; + } + + public Long getIssuedOnTrainNum() { + + return Asn1BigInteger.toLong(issuedOnTrainNum); + } + + public String getIssuedOnTrainIA5() { + + return this.issuedOnTrainIA5; + } + + public Long getIssuedOnLine() { + + return Asn1BigInteger.toLong(issuedOnLine); + } + + public GeoCoordinateType getPointOfSale() { + + return this.pointOfSale; + } + + public void setSecurityProviderNum(Long securityProviderNum) { + + this.securityProviderNum = securityProviderNum; + } + + public void setSecurityProviderIA5(String securityProviderIA5) { + + this.securityProviderIA5 = securityProviderIA5; + } + + public void setIssuerNum(Long issuerNum) { + + this.issuerNum = issuerNum; + } + + public void setIssuerIA5(String issuerIA5) { + + this.issuerIA5 = issuerIA5; + } + + public void setIssuingYear(Long issuingYear) { + + this.issuingYear = issuingYear; + } + + public void setIssuingDay(Long issuingDay) { + + this.issuingDay = issuingDay; + } + + public void setIssuingTime(Long issuingTime) { + + this.issuingTime = issuingTime; + } + + public void setIssuerName(String issuerName) { + + this.issuerName = issuerName; + } + + public void setSpecimen(Boolean specimen) { + + this.specimen = specimen; + } + + public void setSecurePaperTicket(Boolean securePaperTicket) { + + this.securePaperTicket = securePaperTicket; + } + + public void setActivated(Boolean activated) { + + this.activated = activated; + } + + public void setCurrency(String currency) { + + this.currency = currency; + } + + public void setCurrencyFract(Long currencyFract) { + + this.currencyFract = currencyFract; + } + + public void setIssuerPNR(String issuerPNR) { + + this.issuerPNR = issuerPNR; + } + + public void setExtension(ExtensionData extension) { + + this.extension = extension; + } + + public void setIssuedOnTrainNum(Long issuedOnTrainNum) { + + this.issuedOnTrainNum = Asn1BigInteger.toAsn1(issuedOnTrainNum); + } + + public void setIssuedOnTrainIA5(String issuedOnTrainIA5) { + + this.issuedOnTrainIA5 = issuedOnTrainIA5; + } + + public void setIssuedOnLine(Long issuedOnLine) { + + this.issuedOnLine = Asn1BigInteger.toAsn1(issuedOnLine); + } + + public void setPointOfSale(GeoCoordinateType pointOfSale) { + + this.pointOfSale = pointOfSale; + } + + public void setIssuingDate(Date date){ + + if (date == null) { + date = Calendar.getInstance().getTime(); + } + + Calendar cal = Calendar.getInstance(); + cal.setTime(date); + + this.issuingYear = new Long( cal.get(Calendar.YEAR)); + this.issuingDay = new Long (cal.get(Calendar.DAY_OF_YEAR)); + int time = cal.get(Calendar.HOUR_OF_DAY) * 60 + cal.get(Calendar.MINUTE); + if (time > 0) { + this.issuingTime = new Long (time ); + } + + } + + public Date getIssuingDate() { + + if (this.issuingYear == null || this.issuingDay == null) return null; + + Calendar cal = Calendar.getInstance(); + cal.clear(); + cal.setTimeZone(TimeZone.getTimeZone("UTC")); + cal.set(Calendar.YEAR, this.issuingYear.intValue()); + cal.set(Calendar.DAY_OF_YEAR, this.issuingDay.intValue()); + + if (this.issuingTime != null) { + + int hours = this.issuingTime.intValue() / 60; + int minutes = this.issuingTime.intValue() % 60; + cal.set(Calendar.HOUR_OF_DAY, hours); + cal.set(Calendar.MINUTE,minutes); + + } + + return cal.getTime(); + } + + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/LineType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/LineType.java new file mode 100644 index 0000000..fff4499 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/LineType.java @@ -0,0 +1,185 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.asn1.datatypesimpl.OctetString; +import org.uic.barcode.asn1.datatypesimpl.SequenceOfUnrestrictedLong; + +@Sequence +@HasExtensionMarker + +public class LineType extends Object { + public LineType() { + } + + @FieldOrder(order = 0) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long carrierNum; + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String carrierIA5; + + @FieldOrder(order = 2) + @Asn1Optional public SequenceOfUnrestrictedLong lineId; + + @FieldOrder(order = 3) + @Asn1Default("stationUIC") + @Asn1Optional public CodeTableType stationCodeTable; + + @FieldOrder(order = 4) + @IntRange(minValue=0,maxValue=9999999) + @Asn1Optional public Long entryStationNum; + + @FieldOrder(order = 5) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String entryStationIA5; + + @FieldOrder(order = 6) + @IntRange(minValue=0,maxValue=9999999) + @Asn1Optional public Long terminatingStationNum; + + @FieldOrder(order = 7) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String terminatingStationIA5; + + @FieldOrder(order = 8) + @Asn1Optional public Asn1BigInteger city; + + @FieldOrder(order = 9) + @Asn1Optional public OctetString binaryZoneId; + + + + public Long getCarrierNum() { + + return this.carrierNum; + } + + public String getCarrierIA5() { + + return this.carrierIA5; + } + + public SequenceOfUnrestrictedLong getLineId() { + + return this.lineId; + } + + public CodeTableType getStationCodeTable() { + + if (stationCodeTable == null) { + return CodeTableType.stationUIC; + } + + return this.stationCodeTable; + } + + public Long getEntryStationNum() { + + return this.entryStationNum; + } + + public String getEntryStationIA5() { + + return this.entryStationIA5; + } + + public Long getTerminatingStationNum() { + + return this.terminatingStationNum; + } + + public String getTerminatingStationIA5() { + + return this.terminatingStationIA5; + } + + public Long getCity() { + + return Asn1BigInteger.toLong(this.city); + } + + public byte[] getBinaryZoneId() { + + return binaryZoneId.toByteArray(); + } + + public void setCarrierNum(Long carrierNum) { + + this.carrierNum = carrierNum; + } + + public void setCarrierIA5(String carrierIA5) { + + this.carrierIA5 = carrierIA5; + } + + public void setLineId(SequenceOfUnrestrictedLong lineId) { + + this.lineId = lineId; + } + + public void setStationCodeTable(CodeTableType stationCodeTable) { + + this.stationCodeTable = stationCodeTable; + } + + public void setEntryStationNum(Long entryStationNum) { + + this.entryStationNum = entryStationNum; + } + + public void setEntryStationIA5(String entryStationIA5) { + + this.entryStationIA5 = entryStationIA5; + } + + public void setTerminatingStationNum(Long terminatingStationNum) { + + this.terminatingStationNum = terminatingStationNum; + } + + public void setTerminatingStationIA5(String terminatingStationIA5) { + + this.terminatingStationIA5 = terminatingStationIA5; + } + + public void setCity(Long city) { + + this.city = Asn1BigInteger.toAsn1(city); + } + + public void setBinaryZoneId(byte[] binaryZoneId) { + + this.binaryZoneId = new OctetString(binaryZoneId); + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/LinkMode.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/LinkMode.java new file mode 100644 index 0000000..f4e7635 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/LinkMode.java @@ -0,0 +1,39 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; + +@HasExtensionMarker +public enum LinkMode { + issuedTogether("issuedTogether"), + onlyValidInCombination("onlyValidInCombination"); + + public String text; + + LinkMode(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/LoadingDeckType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/LoadingDeckType.java new file mode 100644 index 0000000..8662877 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/LoadingDeckType.java @@ -0,0 +1,38 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + + +public enum LoadingDeckType { + unspecified("unspecified"), + upper("upper"), + lower("lower"); + + public String text; + + LoadingDeckType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/LuggageRestrictionType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/LuggageRestrictionType.java new file mode 100644 index 0000000..caa1caa --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/LuggageRestrictionType.java @@ -0,0 +1,88 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.Sequence; + +@Sequence +@HasExtensionMarker +public class LuggageRestrictionType extends Object { + public LuggageRestrictionType() { + } + + @FieldOrder(order = 0) + @IntRange(minValue=0,maxValue=99) + @Asn1Default(value="3") + @Asn1Optional public Long maxHandLuggagePieces; + + @FieldOrder(order = 1) + @IntRange(minValue=0,maxValue=99) + @Asn1Default(value="1") + @Asn1Optional public Long maxNonHandLuggagePieces; + + @FieldOrder(order = 2) + @Asn1Optional public SequenceOfRegisteredLuggageType registeredLuggage; + + + public void setRegisteredLuggage( + SequenceOfRegisteredLuggageType registeredLuggage) { + this.registeredLuggage = registeredLuggage; + } + + public Long getMaxHandLuggagePieces() { + + if (maxHandLuggagePieces == null) { + return new Long(3); + } + + return this.maxHandLuggagePieces; + } + + public Long getMaxNonHandLuggagePieces() { + + if (maxNonHandLuggagePieces == null) { + return new Long(1); + } + + return this.maxNonHandLuggagePieces; + } + + public SequenceOfRegisteredLuggageType getRegisteredLuggage() { + + return this.registeredLuggage; + } + + public void setMaxHandLuggagePieces(Long maxHandLuggagePieces) { + + this.maxHandLuggagePieces = maxHandLuggagePieces; + } + + public void setMaxNonHandLuggagePieces(Long maxNonHandLuggagePieces) { + + this.maxNonHandLuggagePieces = maxNonHandLuggagePieces; + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/OpenTicketData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/OpenTicketData.java new file mode 100644 index 0000000..9900640 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/OpenTicketData.java @@ -0,0 +1,678 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Date; +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.asn1.datatypes.SizeRange; +import org.uic.barcode.asn1.datatypesimpl.SequenceOfStringIA5; +import org.uic.barcode.ticket.api.asn.omv2.SequenceOfActivatedDays; +import org.uic.barcode.ticket.api.utils.DateTimeUtils; + +@Sequence +@HasExtensionMarker +public class OpenTicketData extends Object { + public OpenTicketData() { + } + + @FieldOrder(order = 0) + @Asn1Optional public Asn1BigInteger referenceNum; + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String referenceIA5; + + @FieldOrder(order = 2) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long productOwnerNum; + + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productOwnerIA5; + + @FieldOrder(order = 4) + @IntRange(minValue=0,maxValue=65535) + @Asn1Optional public Long productIdNum; + + @FieldOrder(order = 5) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productIdIA5; + + @FieldOrder(order = 6) + @Asn1Optional public Asn1BigInteger externalIssuerId; + + @FieldOrder(order = 7) + @Asn1Optional public Asn1BigInteger issuerAutorizationId; + + @FieldOrder(order = 8) + public Boolean returnIncluded = false; + + @FieldOrder(order = 9) + @Asn1Default("stationUIC") + @Asn1Optional public CodeTableType stationCodeTable; + + @FieldOrder(order = 10) + @IntRange(minValue=1,maxValue=9999999) + @Asn1Optional public Long fromStationNum; + + @FieldOrder(order = 11) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String fromStationIA5; + + @FieldOrder(order = 12) + @IntRange(minValue=1,maxValue=9999999) + @Asn1Optional public Long toStationNum; + + @FieldOrder(order = 13) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String toStationIA5; + + @FieldOrder(order = 14) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String fromStationNameUTF8; + + @FieldOrder(order = 15) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String toStationNameUTF8; + + @FieldOrder(order = 16) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String validRegionDesc; + + @FieldOrder(order = 17) + @Asn1Optional public SequenceOfRegionalValidityType validRegion; + + @FieldOrder(order = 18) + @Asn1Optional public ReturnRouteDescriptionType returnDescription; + + @FieldOrder(order = 19) + @Asn1Default(value = "0") + @IntRange(minValue=-1,maxValue=700) + @Asn1Optional public Long validFromDay; + + @FieldOrder(order = 20) + @IntRange(minValue=0,maxValue=1439) + @Asn1Optional public Long validFromTime; + + @FieldOrder(order = 21) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long validFromUTCOffset; + + @FieldOrder(order = 22) + @Asn1Default(value = "0") + @IntRange(minValue=0,maxValue=370) + @Asn1Optional public Long validUntilDay; + + @FieldOrder(order = 23) + @IntRange(minValue=0,maxValue=1439) + @Asn1Optional public Long validUntilTime; + + @FieldOrder(order = 24) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long validUntilUTCOffset; + + @FieldOrder(order = 25) + @Asn1Optional public SequenceOfActivatedDays activatedDay; + + @FieldOrder(order = 26) + @Asn1Default(value="second") + @Asn1Optional public TravelClassType classCode; + + @FieldOrder(order = 27) + @SizeRange(minValue = 1, maxValue = 2) + @Asn1Optional public String serviceLevel; + + @FieldOrder(order = 28) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public SequenceOfCarrierNum carrierNum; + + @FieldOrder(order = 29) + @Asn1Optional public SequenceOfStringIA5 carrierIA5; + + @FieldOrder(order = 30) + @Asn1Optional public SequenceOfServiceBrands includedServiceBrands; + + @FieldOrder(order = 31) + @Asn1Optional public SequenceOfServiceBrands excludedServiceBrands; + + @FieldOrder(order = 32) + @Asn1Optional public SequenceOfTariffType tariffs; + + @FieldOrder(order = 33) + @Asn1Optional Asn1BigInteger price; + + @FieldOrder(order = 34) + @Asn1Optional SequenceOfVatDetail vatDetails; + + @FieldOrder(order = 35) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String infoText; + + @FieldOrder(order = 36) + @Asn1Optional public SequenceOfIncludedOpenTicketType includedAddOns; + + @FieldOrder(order = 37) + @Asn1Optional public LuggageRestrictionType luggage; + + @FieldOrder(order = 38) + @Asn1Optional public SequenceOfTransportTypes includedTransportTypes; + + @FieldOrder(order = 39) + @Asn1Optional public SequenceOfTransportTypes excludedTransportTypes; + + @FieldOrder(order = 40) + @Asn1Optional public ExtensionData extension; + + + + + public Long getReferenceNum() { + return Asn1BigInteger.toLong(this.referenceNum); + } + + public String getReferenceIA5() { + + return this.referenceIA5; + } + + public Long getProductOwnerNum() { + + return this.productOwnerNum; + } + + public String getProductOwnerIA5() { + + return this.productOwnerIA5; + } + + public Long getProductIdNum() { + + return this.productIdNum; + } + + public String getProductIdIA5() { + + return this.productIdIA5; + } + + public Long getExtIssuerId() { + + return Asn1BigInteger.toLong(externalIssuerId); + } + + public Long getIssuerAutorizationId() { + + return Asn1BigInteger.toLong(issuerAutorizationId); + } + + public Boolean getReturnIncluded() { + + return this.returnIncluded; + } + + public CodeTableType getStationCodeTable() { + + if (stationCodeTable == null) { + return CodeTableType.stationUIC; + } + + + return this.stationCodeTable; + } + + public Long getFromStationNum() { + + return this.fromStationNum; + } + + public String getFromStationIA5() { + + return this.fromStationIA5; + } + + public Long getToStationNum() { + + return this.toStationNum; + } + + public String getToStationIA5() { + + return this.toStationIA5; + } + + public String getFromStationNameUTF8() { + + return this.fromStationNameUTF8; + } + + public String getToStationNameUTF8() { + + return this.toStationNameUTF8; + } + + public String getValidRegionDesc() { + + return this.validRegionDesc; + } + + public List getValidRegion() { + + return this.validRegion; + } + + public ReturnRouteDescriptionType getReturnDescription() { + + return this.returnDescription; + } + + public Long getValidFromDay() { + + return this.validFromDay; + } + + public Long getValidFromTime() { + + return this.validFromTime; + } + + public Long getValidUntilDay() { + + return this.validUntilDay; + } + + public Long getValidUntilTime() { + + return this.validUntilTime; + } + + public List getActivatedDay() { + + return this.activatedDay; + } + + public TravelClassType getClassCode() { + + if (classCode == null) { + return TravelClassType.second; + } + + return this.classCode; + } + + public String getServiceLevel() { + + return this.serviceLevel; + } + + public List getCarriersNum() { + + return this.carrierNum; + } + + public List getCarriersIA5() { + + return this.carrierIA5; + } + + public List getIncludedServiceBrands() { + + return this.includedServiceBrands; + } + + public List getExcludedServiceBrands() { + + return this.excludedServiceBrands; + } + + public List getTariffs() { + + return this.tariffs; + } + + public String getInfoText() { + + return this.infoText; + } + + public List getIncludedAddOns() { + + return this.includedAddOns; + } + + public LuggageRestrictionType getLuggage() { + + return this.luggage; + } + + public ExtensionData getExtension() { + + return this.extension; + } + + public void setReferenceNum(Long referenceNum) { + this.referenceNum = Asn1BigInteger.toAsn1(referenceNum); + } + + public void setReferenceIA5(String referenceIA5) { + + this.referenceIA5 = referenceIA5; + } + + public void setProductOwnerNum(Long productOwnerNum) { + + this.productOwnerNum = productOwnerNum; + } + + public void setProductOwnerIA5(String productOwnerIA5) { + + this.productOwnerIA5 = productOwnerIA5; + } + + public void setProductIdNum(Long productIdNum) { + + this.productIdNum = productIdNum; + } + + public void setProductIdIA5(String productIdIA5) { + this.productIdIA5 = productIdIA5; + } + + public void setExtIssuerId(Long extIssuerId) { + this.externalIssuerId = Asn1BigInteger.toAsn1(extIssuerId); + } + + public void setIssuerAutorizationId(Long issuerAutorizationId) { + + this.issuerAutorizationId = Asn1BigInteger.toAsn1(issuerAutorizationId); + } + + public void setReturnIncluded(Boolean returnIncluded) { + this.returnIncluded = returnIncluded; + } + + public void setStationCodeTable(CodeTableType stationCodeTable) { + this.stationCodeTable = stationCodeTable; + } + + public void setFromStationNum(Long fromStationNum) { + this.fromStationNum = fromStationNum; + } + + public void setFromStationIA5(String fromStationIA5) { + this.fromStationIA5 = fromStationIA5; + } + + public void setToStationNum(Long toStationNum) { + this.toStationNum = toStationNum; + } + + public void setToStationIA5(String toStationIA5) { + this.toStationIA5 = toStationIA5; + } + + public void setFromStationNameUTF8(String fromStationNameUTF8) { + this.fromStationNameUTF8 = fromStationNameUTF8; + } + + public void setToStationNameUTF8(String toStationNameUTF8) { + this.toStationNameUTF8 = toStationNameUTF8; + } + + public void setValidRegionDesc(String validRegionDesc) { + this.validRegionDesc = validRegionDesc; + } + + public void setValidRegion(SequenceOfRegionalValidityType validRegion) { + this.validRegion = validRegion; + } + + public void setReturnDescription(ReturnRouteDescriptionType returnDescription) { + this.returnDescription = returnDescription; + } + + public void setValidFromDay(Long validFromDay) { + this.validFromDay = validFromDay; + } + + public void setValidFromTime(Long validFromTime) { + this.validFromTime = validFromTime; + } + + public void setValidUntilDay(Long validUntilDay) { + this.validUntilDay = validUntilDay; + } + + public void setValidUntilTime(Long validUntilTime) { + this.validUntilTime = validUntilTime; + } + + public void setActivatedDay(SequenceOfActivatedDays activatedDay) { + this.activatedDay = activatedDay; + } + + public void setClassCode(TravelClassType classCode) { + this.classCode = classCode; + } + + public void setServiceLevel(String serviceLevel) { + this.serviceLevel = serviceLevel; + } + + public void setCarriersNum(SequenceOfCarrierNum carriersNum) { + + this.carrierNum = carriersNum; + } + + public void setCarriersIA5(SequenceOfStringIA5 carriersIA5) { + this.carrierIA5 = carriersIA5; + } + + public void setIncludedServiceBrands(SequenceOfServiceBrands includedServiceBrands) { + this.includedServiceBrands = includedServiceBrands; + } + + public void setExcludedServiceBrands(SequenceOfServiceBrands excludedServiceBrands) { + this.excludedServiceBrands = excludedServiceBrands; + } + + + public SequenceOfTransportTypes getIncludedTransportTypes() { + return includedTransportTypes; + } + + public void setIncludedTransportTypes(SequenceOfTransportTypes includedTransportTypes) { + this.includedTransportTypes = includedTransportTypes; + } + + public SequenceOfTransportTypes getExcludedTransportTypes() { + return excludedTransportTypes; + } + + public void setExcludedTransportTypes(SequenceOfTransportTypes excludedTransportTypes) { + this.excludedTransportTypes = excludedTransportTypes; + } + + public void setTariffs(SequenceOfTariffType tariffs) { + this.tariffs = tariffs; + } + + public void setInfoText(String infoText) { + + this.infoText = infoText; + } + + public void setIncludedAddOns(SequenceOfIncludedOpenTicketType includedAddOns) { + this.includedAddOns = includedAddOns; + } + + public void setLuggage(LuggageRestrictionType luggage) { + this.luggage = luggage; + } + + public void setExtension(ExtensionData extension) { + this.extension = extension; + } + + public Long getPrice() { + return Asn1BigInteger.toLong(price); + } + + public void setPrice(Long price) { + this.price = Asn1BigInteger.toAsn1(price); + } + + public SequenceOfVatDetail getVatDetails() { + return vatDetails; + } + + public void setVatDetails(SequenceOfVatDetail vatDetails) { + this.vatDetails = vatDetails; + } + + public void addVatDetail(VatDetailType vatDetail) { + if (this.vatDetails == null) { + this.vatDetails = new SequenceOfVatDetail(); + } + this.vatDetails.add(vatDetail); + } + + public void setValidityDates (Date fromDate, Date untilDate, Date issuingDate){ + + if (issuingDate == null || fromDate == null) return; + + this.validFromDay = DateTimeUtils.getDateDifference(issuingDate,fromDate); + this.validFromTime = DateTimeUtils.getTime(fromDate); + + if (untilDate != null){ + this.validUntilDay = DateTimeUtils.getDateDifference(fromDate, untilDate); + this.validUntilTime = DateTimeUtils.getTime(untilDate); + } + + } + + public Date getValidFromDate(Date issuingDate){ + + return DateTimeUtils.getDate(issuingDate, this.validFromDay, this.validFromTime); + + } + + public Date getValidUntilDate(Date issuingDate){ + + if (issuingDate == null) return null; + + if (this.validFromDay == null) { + this.validFromDay = 0L; + } + + if (this.validUntilDay == null) { + return null; + } + + + return DateTimeUtils.getDate(issuingDate, this.validFromDay + this.validUntilDay, this.validUntilTime); + + } + + + public void addActivatedDays(Collection days) { + + if (days == null || days.isEmpty()) return; + + if (this.activatedDay == null) { + this.activatedDay = new SequenceOfActivatedDays(); + } + + for (Long l : days) { + this.activatedDay.add(l); + } + + } + + public void addActivatedDay(Date issuingDate, Date day){ + + Long dayDiff = DateTimeUtils.getDateDifference(issuingDate, day); + + if (this.activatedDay == null) { + this.activatedDay = new SequenceOfActivatedDays(); + } + + if (dayDiff != null) { + this.activatedDay.add(dayDiff); + } + + } + + /** + * Gets the activated days. + * + * @param issuingDate the issuing date + * @return the activated days + */ + public Collection getActivatedDays(Date issuingDate) { + + if (this.activatedDay == null) return null; + + ArrayList dates = new ArrayList(); + + for (Long diff: this.getActivatedDay()) { + + Date day = DateTimeUtils.getDate(this.getValidFromDate(issuingDate), diff, null); + + if (day != null) { + dates.add(day); + } + + } + + return dates; + + } + + public Long getValidFromUTCOffset() { + return validFromUTCOffset; + } + + public void setValidFromUTCOffset(Long validFromUTCOffset) { + this.validFromUTCOffset = validFromUTCOffset; + } + + public Long getValidUntilUTCOffset() { + return validUntilUTCOffset; + } + + public void setValidUntilUTCOffset(Long validUntilUTCOffset) { + this.validUntilUTCOffset = validUntilUTCOffset; + } + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ParkingGroundData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ParkingGroundData.java new file mode 100644 index 0000000..0eec185 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ParkingGroundData.java @@ -0,0 +1,364 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Date; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.ticket.api.utils.DateTimeUtils; + +@Sequence +@HasExtensionMarker +public class ParkingGroundData extends Object { + public ParkingGroundData() { + } + + @FieldOrder(order = 0) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String referenceIA5; + + @FieldOrder(order = 1) + @Asn1Optional public Asn1BigInteger referenceNum; + + @FieldOrder(order = 2) + @RestrictedString(CharacterRestriction.IA5String) + public String parkingGroundId = ""; + + @FieldOrder(order = 3) + @IntRange(minValue=0,maxValue=370) + @Asn1Optional public Long fromParkingDate; + + @FieldOrder(order = 4) + @IntRange(minValue=0,maxValue=370) + @Asn1Optional public Long toParkingDate; + + @FieldOrder(order = 5) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long productOwnerNum; + + @FieldOrder(order = 6) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productOwnerIA5; + + @FieldOrder(order = 7) + @IntRange(minValue=0,maxValue=65535) + @Asn1Optional public Long productIdNum; + + @FieldOrder(order = 8) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productIdIA5; + + @FieldOrder(order = 9) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String accessCode; + + @FieldOrder(order = 10) + @RestrictedString(CharacterRestriction.UTF8String) + public String location; + + @FieldOrder(order = 11) + @Asn1Default("stationUIC") + @Asn1Optional public CodeTableType stationCodeTable; + + @FieldOrder(order = 12) + @IntRange(minValue=1,maxValue=9999999) + @Asn1Optional public Long stationNum; + + @FieldOrder(order = 13) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String stationIA5; + + @FieldOrder(order = 14) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String specialInformation; + + @FieldOrder(order = 15) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String entryTrack; + + @FieldOrder(order = 16) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String numberPlate; + + @FieldOrder(order = 17) + @Asn1Optional Asn1BigInteger price; + + @FieldOrder(order = 18) + @Asn1Optional SequenceOfVatDetail vatDetails; + + @FieldOrder(order = 19) + @Asn1Optional public ExtensionData extension; + + + + + public String getReferenceIA5() { + + return this.referenceIA5; + } + + public Asn1BigInteger getReferenceNum() { + + return this.referenceNum; + } + + public String getParkingGroundId() { + + return this.parkingGroundId; + } + + public Long getFromParkingDate() { + + return this.fromParkingDate; + } + + public Long getToParkingDate() { + + return this.toParkingDate; + } + + public Long getProductOwnerNum() { + + return this.productOwnerNum; + } + + public String getProductOwnerIA5() { + + return this.productOwnerIA5; + } + + public Long getProductIdNum() { + + return this.productIdNum; + } + + public String getProductIdIA5() { + + return this.productIdIA5; + } + + public String getAccessCode() { + + return this.accessCode; + } + + public String getLocation() { + + return this.location; + } + + public CodeTableType getStationCodeTable() { + + if (stationCodeTable == null) { + return CodeTableType.stationUIC; + } + + return this.stationCodeTable; + } + + public Long getStationNum() { + + return this.stationNum; + } + + public String getStationIA5() { + + return this.stationIA5; + } + + public String getSpecialInformation() { + + return this.specialInformation; + } + + public String getEntryTrack() { + + return this.entryTrack; + } + + public String getNumberPlate() { + + return this.numberPlate; + } + + public ExtensionData getExtension() { + + return this.extension; + } + + public void setReferenceIA5(String referenceIA5) { + + this.referenceIA5 = referenceIA5; + } + + public void setReferenceNum(Asn1BigInteger referenceNum) { + + this.referenceNum = referenceNum; + } + + public void setParkingGroundId(String parkingGroundId) { + + this.parkingGroundId = parkingGroundId; + } + + public void setFromParkingDate(Long fromParkingDate) { + + this.fromParkingDate = fromParkingDate; + } + + public void setToParkingDate(Long toParkingDate) { + + this.toParkingDate = toParkingDate; + } + + public void setProductOwnerNum(Long productOwnerNum) { + + this.productOwnerNum = productOwnerNum; + } + + public void setProductOwnerIA5(String productOwnerIA5) { + + this.productOwnerIA5 = productOwnerIA5; + } + + public void setProductIdNum(Long productIdNum) { + + this.productIdNum = productIdNum; + } + + public void setProductIdIA5(String productIdIA5) { + + this.productIdIA5 = productIdIA5; + } + + public void setAccessCode(String accessCode) { + + this.accessCode = accessCode; + } + + public void setLocation(String location) { + + this.location = location; + } + + public void setStationCodeTable(CodeTableType stationCodeTable) { + + this.stationCodeTable = stationCodeTable; + } + + public void setStationNum(Long stationNum) { + + this.stationNum = stationNum; + } + + public void setStationIA5(String stationIA5) { + + this.stationIA5 = stationIA5; + } + + public void setSpecialInformation(String specialInformation) { + + this.specialInformation = specialInformation; + } + + public void setEntryTrack(String entryTrack) { + + this.entryTrack = entryTrack; + } + + public void setNumberPlate(String numberPlate) { + + this.numberPlate = numberPlate; + } + + public void setExtension(ExtensionData extension) { + + this.extension = extension; + } + + public Long getPrice() { + return Asn1BigInteger.toLong(price); + } + + public void setPrice(Long price) { + this.price = Asn1BigInteger.toAsn1(price); + } + + public SequenceOfVatDetail getVatDetails() { + return vatDetails; + } + + public void setVatDetails(SequenceOfVatDetail vatDetails) { + this.vatDetails = vatDetails; + } + + public void addVatDetail(VatDetailType vatDetail) { + if (this.vatDetails == null) { + this.vatDetails = new SequenceOfVatDetail(); + } + this.vatDetails.add(vatDetail); + } + + + public void setParkingDate (Date fromDate, Date issuingDate){ + + if (issuingDate == null || fromDate == null) return; + + this.fromParkingDate = DateTimeUtils.getDateDifference(issuingDate,fromDate); + + } + + public Date getFromParkingDate(Date issuingDate){ + + return DateTimeUtils.getDate(issuingDate, this.fromParkingDate, 0L); + + } + + public Date getToParkingDate(Date issuingDate) { + + if ( this.toParkingDate == null) return null; + + return DateTimeUtils.getDate(issuingDate, this.fromParkingDate + this.toParkingDate, 1439L); + + } + + public void setParkingDates(Date fromDate, Date toDate, Date issuingDate) { + + if (issuingDate == null || fromDate == null) return; + + this.fromParkingDate = DateTimeUtils.getDateDifference(issuingDate,fromDate); + + + if (toDate != null) { + this.toParkingDate = DateTimeUtils.getDateDifference(fromDate,toDate); + + } + + } + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/PassData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/PassData.java new file mode 100644 index 0000000..dbc81c3 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/PassData.java @@ -0,0 +1,594 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Date; +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.asn1.datatypesimpl.SequenceOfStringIA5; +import org.uic.barcode.ticket.api.asn.omv2.SequenceOfActivatedDays; +import org.uic.barcode.ticket.api.utils.DateTimeUtils; + +@Sequence +@HasExtensionMarker +public class PassData extends Object { + public PassData() { + } + + @FieldOrder(order = 0) + @Asn1Optional public Asn1BigInteger referenceNum; + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String referenceIA5; + + @FieldOrder(order = 2) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long productOwnerNum; + + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productOwnerIA5; + + @FieldOrder(order = 4) + @IntRange(minValue=0,maxValue=65535) + @Asn1Optional public Long productIdNum; + + @FieldOrder(order = 5) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productIdIA5; + + @FieldOrder(order = 6) + @IntRange(minValue=1,maxValue=250) + @Asn1Optional public Long passType; + + @FieldOrder(order = 7) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String passDescription; + + @FieldOrder(order = 8) + @Asn1Default (value="second") + @Asn1Optional public TravelClassType classCode; + + @FieldOrder(order = 9) + @IntRange(minValue=-1,maxValue=700) + @Asn1Optional public Long validFromDay; + + @FieldOrder(order = 10) + @IntRange(minValue=0,maxValue=1439) + @Asn1Optional public Long validFromTime; + + @FieldOrder(order = 11) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long validFromUTCOffset; + + @FieldOrder(order = 12) + @IntRange(minValue=0,maxValue=370) + @Asn1Optional public Long validUntilDay; + + @FieldOrder(order = 13) + @IntRange(minValue=0,maxValue=1439) + @Asn1Optional public Long validUntilTime; + + @FieldOrder(order = 14) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long validUntilUTCOffset; + + @FieldOrder(order = 15) + @Asn1Optional public ValidityPeriodDetailType validityPeriodDetails; + + @FieldOrder(order = 16) + @IntRange(minValue=0,maxValue=370) + @Asn1Optional public Long numberOfValidityDays; + + @FieldOrder(order = 17) + @IntRange(minValue=1,maxValue=250) + @Asn1Optional public Long numberOfPossibleTrips; + + @FieldOrder(order = 18) + @IntRange(minValue=1,maxValue=250) + @Asn1Optional public Long numberOfDaysOfTravel; + + @FieldOrder(order = 19) + @Asn1Optional public SequenceOfActivatedDays activatedDay; + + @FieldOrder(order = 20) + @Asn1Optional public SequenceOfCountries countries; + + @FieldOrder(order = 21) + @Asn1Optional public SequenceOfCarrierNum includedCarriersNum; + + @FieldOrder(order = 22) + @Asn1Optional public SequenceOfStringIA5 includedCarriersIA5; + + @FieldOrder(order = 23) + @Asn1Optional public SequenceOfCarrierNum excludedCarriersNum; + + @FieldOrder(order = 24) + @Asn1Optional public SequenceOfStringIA5 excludedCarriersIA5; + + @FieldOrder(order = 25) + @Asn1Optional public SequenceOfServiceBrands includedServiceBrands; + + @FieldOrder(order = 26) + @Asn1Optional public SequenceOfServiceBrands excludedServiceBrands; + + @FieldOrder(order = 27) + @Asn1Optional public SequenceOfRegionalValidityType validRegion; + + @FieldOrder(order = 28) + @Asn1Optional public SequenceOfTariffType tariffs; + + @FieldOrder(order = 29) + @Asn1Optional Asn1BigInteger price; + + @FieldOrder(order = 30) + @Asn1Optional SequenceOfVatDetail vatDetails; + + @FieldOrder(order = 31) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String infoText; + + @FieldOrder(order = 32) + @Asn1Optional public ExtensionData extension; + + + + + + public Asn1BigInteger getReferenceNum() { + + return this.referenceNum; + } + + public String getReferenceIA5() { + + return this.referenceIA5; + } + + public Long getProductOwnerNum() { + + return this.productOwnerNum; + } + + public String getProductOwnerIA5() { + + return this.productOwnerIA5; + } + + public Long getProductIdNum() { + + return this.productIdNum; + } + + public String getProductIdIA5() { + + return this.productIdIA5; + } + + public Long getPassType() { + + return this.passType; + } + + public String getPassDescription() { + + return this.passDescription; + } + + public TravelClassType getClassCode() { + + if (classCode == null){ + return TravelClassType.second; + } + + return this.classCode; + } + + public Long getValidFromDay() { + + return this.validFromDay; + } + + public Long getValidFromTime() { + + return this.validFromTime; + } + + public Long getValidUntilDay() { + + return this.validUntilDay; + } + + public Long getValidUntilTime() { + + return this.validUntilTime; + } + + public ValidityPeriodDetailType getValidityPeriodDetails() { + + return this.validityPeriodDetails; + } + + public Long getNumberOfValidityDays() { + + return this.numberOfValidityDays; + } + + public Long getNumberOfPossibleTrips() { + + return this.numberOfPossibleTrips; + } + + public Long getNumberOfDaysOfTravel() { + + return this.numberOfDaysOfTravel; + } + + public List getActivatedDay() { + + return this.activatedDay; + } + + public List getCountries() { + + return this.countries; + } + + public List getIncludedCarriersNum() { + + return this.includedCarriersNum; + } + + public List getIncludedCarriersIA5() { + + return this.includedCarriersIA5; + } + + public List getExcludedCarriersNum() { + + return this.excludedCarriersNum; + } + + public SequenceOfStringIA5 getExcludedCarriersIA5() { + + return this.excludedCarriersIA5; + } + + public SequenceOfServiceBrands getIncludedServiceBrands() { + + return this.includedServiceBrands; + } + + public SequenceOfServiceBrands getExcludedServiceBrands() { + + return this.excludedServiceBrands; + } + + public List getValidRegion() { + + return this.validRegion; + } + + public List getTariffs() { + + return this.tariffs; + } + + public String getInfoText() { + + return this.infoText; + } + + public ExtensionData getExtension() { + + return this.extension; + } + + public void setReferenceNum(Asn1BigInteger referenceNum) { + + this.referenceNum = referenceNum; + } + + public void setReferenceIA5(String referenceIA5) { + + this.referenceIA5 = referenceIA5; + } + + public void setProductOwnerNum(Long productOwnerNum) { + + this.productOwnerNum = productOwnerNum; + } + + public void setProductOwnerIA5(String productOwnerIA5) { + + this.productOwnerIA5 = productOwnerIA5; + } + + public void setProductIdNum(Long productIdNum) { + + this.productIdNum = productIdNum; + } + + public void setProductIdIA5(String productIdIA5) { + + this.productIdIA5 = productIdIA5; + } + + public void setPassType(Long passType) { + + this.passType = passType; + } + + public void setPassDescription(String passDescription) { + + this.passDescription = passDescription; + } + + public void setClassCode(TravelClassType classCode) { + + this.classCode = classCode; + } + + public void setValidFromDay(Long validFromDay) { + + this.validFromDay = validFromDay; + } + + public void setValidFromTime(Long validFromTime) { + + this.validFromTime = validFromTime; + } + + public void setValidUntilDay(Long validUntilDay) { + + this.validUntilDay = validUntilDay; + } + + public void setValidUntilTime(Long validUntilTime) { + + this.validUntilTime = validUntilTime; + } + + public void setValidityPeriodDetails(ValidityPeriodDetailType validityPeriodDetails) { + + this.validityPeriodDetails = validityPeriodDetails; + } + + public void setNumberOfValidityDays(Long numberOfValidityDays) { + + this.numberOfValidityDays = numberOfValidityDays; + } + + public void setNumberOfPossibleTrips(Long numberOfPossibleTrips) { + + this.numberOfPossibleTrips = numberOfPossibleTrips; + } + + public void setNumberOfDaysOfTravel(Long numberOfDaysOfTravel) { + + this.numberOfDaysOfTravel = numberOfDaysOfTravel; + } + + public void setActivatedDay(SequenceOfActivatedDays activatedDay) { + + this.activatedDay = activatedDay; + } + + public void setCountries(SequenceOfCountries countries) { + + this.countries = countries; + } + + public void setIncludedCarriersNum(SequenceOfCarrierNum includedCarriersNum) { + + this.includedCarriersNum = includedCarriersNum; + } + + public void setIncludedCarriersIA5(SequenceOfStringIA5 includedCarriersIA5) { + + this.includedCarriersIA5 = includedCarriersIA5; + } + + public void setExcludedCarriersNum(SequenceOfCarrierNum excludedCarriersNum) { + + this.excludedCarriersNum = excludedCarriersNum; + } + + public void setExcludedCarriersIA5(SequenceOfStringIA5 excludedCarriersIA5) { + + this.excludedCarriersIA5 = excludedCarriersIA5; + } + + public void setIncludedServiceBrands(SequenceOfServiceBrands includedServiceBrands) { + + this.includedServiceBrands = includedServiceBrands; + } + + public void setExcludedServiceBrands(SequenceOfServiceBrands excludedServiceBrands) { + + this.excludedServiceBrands = excludedServiceBrands; + } + + public void setValidRegion(SequenceOfRegionalValidityType validRegion) { + + this.validRegion = validRegion; + } + + public void setTariffs(SequenceOfTariffType tariffs) { + + this.tariffs = tariffs; + } + + public void setInfoText(String infoText) { + + this.infoText = infoText; + } + + public void setExtension(ExtensionData extension) { + + this.extension = extension; + } + + public Long getPrice() { + return Asn1BigInteger.toLong(price); + } + + public void setPrice(Long price) { + this.price = Asn1BigInteger.toAsn1(price); + } + + public SequenceOfVatDetail getVatDetails() { + return vatDetails; + } + + public void setVatDetails(SequenceOfVatDetail vatDetails) { + this.vatDetails = vatDetails; + } + + public void addVatDetail(VatDetailType vatDetail) { + if (this.vatDetails == null) { + this.vatDetails = new SequenceOfVatDetail(); + } + this.vatDetails.add(vatDetail); + } + + public void setValidityDates (Date fromDate, Date untilDate, Date issuingDate){ + + if (issuingDate == null || fromDate == null) return; + + this.validFromDay = DateTimeUtils.getDateDifference(issuingDate,fromDate); + this.validFromTime = DateTimeUtils.getTime(fromDate); + + if (untilDate != null){ + this.validUntilDay = DateTimeUtils.getDateDifference(fromDate, untilDate); + this.validUntilTime = DateTimeUtils.getTime(untilDate); + } + + } + + public Date getValidFromDate(Date issuingDate){ + + return DateTimeUtils.getDate(issuingDate, this.validFromDay, this.validFromTime); + + } + + public Date getValidUntilDate(Date issuingDate){ + + if (issuingDate == null) return null; + + if (this.validFromDay == null) { + this.validFromDay = 0L; + } + + if (this.validUntilDay == null) { + return null; + } + + + return DateTimeUtils.getDate(issuingDate, this.validFromDay + this.validUntilDay, this.validUntilTime); + + } + + public void addActivatedDays(Collection days) { + + if (days == null || days.isEmpty()) return; + + if (this.activatedDay == null) { + this.activatedDay = new SequenceOfActivatedDays(); + } + + for (Long l : days) { + this.activatedDay.add(l); + } + + } + + public void addActivatedDay(Date issuingDate, Date day){ + + Long dayDiff = DateTimeUtils.getDateDifference(issuingDate, day); + + if (this.activatedDay == null) { + this.activatedDay = new SequenceOfActivatedDays(); + } + + if (dayDiff != null) { + this.activatedDay.add(dayDiff); + } + + } + + /** + * Gets the activated days. + * + * @param issuingDate the issuing date + * @return the activated days + */ + public Collection getActivatedDays(Date issuingDate) { + + if (this.activatedDay == null) return null; + + ArrayList dates = new ArrayList(); + + for (Long diff: this.getActivatedDay()) { + + Date day = DateTimeUtils.getDate(this.getValidFromDate(issuingDate), diff, null); + + if (day != null) { + dates.add(day); + } + + } + + return dates; + + } + + public Long getValidFromUTCOffset() { + return validFromUTCOffset; + } + + public void setValidFromUTCOffset(Long validFromUTCOffset) { + this.validFromUTCOffset = validFromUTCOffset; + } + + public Long getValidUntilUTCOffset() { + return validUntilUTCOffset; + } + + public void setValidUntilUTCOffset(Long validUntilUTCOffset) { + this.validUntilUTCOffset = validUntilUTCOffset; + } + + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/PassengerType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/PassengerType.java new file mode 100644 index 0000000..daaba40 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/PassengerType.java @@ -0,0 +1,46 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; + +@HasExtensionMarker +public enum PassengerType { + adult("adult"), + senior("senior"), + child("child"), + youth("youth"), + dog("dog"), + bicycle("bicycle"), + freeAddonPassenger("freeAddonPassenger"), + freeAddonChild("freeAddonChild"); + + public String text; + + PassengerType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } + +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/PlacesType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/PlacesType.java new file mode 100644 index 0000000..1204ea6 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/PlacesType.java @@ -0,0 +1,131 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.asn1.datatypesimpl.SequenceOfStringIA5; + +@Sequence +public class PlacesType extends Object { + public PlacesType() { + } + + @FieldOrder(order = 0) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String coach; + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String placeString; + + @FieldOrder(order = 2) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String placeDescription; + + @FieldOrder(order = 3) + @Asn1Optional public SequenceOfStringIA5 placeIA5; + + @FieldOrder(order = 4) + @Asn1Optional public SequenceOfPlaceNum placeNum; + + + + public String getCoach() { + + return this.coach; + } + + public String getPlaceString() { + + return this.placeString; + } + + public String getPlaceDescription() { + + return this.placeDescription; + } + + public SequenceOfStringIA5 getPlaceIA5() { + + return this.placeIA5; + } + + public SequenceOfPlaceNum getPlaceNum() { + + return this.placeNum; + } + + public void setCoach(String coach) { + + this.coach = coach; + } + + public void setPlaceString(String placeString) { + + this.placeString = placeString; + } + + public void setPlaceDescription(String placeDescription) { + + this.placeDescription = placeDescription; + } + + public void setPlaceIA5(SequenceOfStringIA5 placeIA5) { + + this.placeIA5 = placeIA5; + } + + public void setPlaceNum(SequenceOfPlaceNum placeNum) { + + this.placeNum = placeNum; + } + + @Override + public boolean equals(Object anObject) { + if (this == anObject) return true; + if ((anObject == null) || (anObject.getClass() != this.getClass())) return false; + + PlacesType comparator = (PlacesType)anObject; + + if ((this.getCoach() != comparator.getCoach()) && ((this.getCoach() == null) || (! this.getCoach().equals(comparator.getCoach())))) return false; + if ((this.getPlaceString() != comparator.getPlaceString()) && ((this.getPlaceString() == null) || (! this.getPlaceString().equals(comparator.getPlaceString())))) return false; + if ((this.getPlaceDescription() != comparator.getPlaceDescription()) && ((this.getPlaceDescription() == null) || (! this.getPlaceDescription().equals(comparator.getPlaceDescription())))) return false; + if ((this.getPlaceIA5() != comparator.getPlaceIA5()) && ((this.getPlaceIA5() == null) || (! this.getPlaceIA5().equals(comparator.getPlaceIA5())))) return false; + if ((this.getPlaceNum() != comparator.getPlaceNum()) && ((this.getPlaceNum() == null) || (! this.getPlaceNum().equals(comparator.getPlaceNum())))) return false; + return true; + } + + @Override + public int hashCode() { + int hash = 5477; + + hash = 3547 * hash + (null == this.getCoach() ? 0 : this.getCoach().hashCode()); + hash = 7321 * hash + (null == this.getPlaceString() ? 0 : this.getPlaceString().hashCode()); + hash = 2083 * hash + (null == this.getPlaceDescription() ? 0 : this.getPlaceDescription().hashCode()); + hash = 881 * hash + (null == this.getPlaceIA5() ? 0 : this.getPlaceIA5().hashCode()); + hash = 6679 * hash + (null == this.getPlaceNum() ? 0 : this.getPlaceNum().hashCode()); + return hash; + } + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/PolygoneType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/PolygoneType.java new file mode 100644 index 0000000..a936ee6 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/PolygoneType.java @@ -0,0 +1,58 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.Sequence; + +@Sequence +public class PolygoneType extends Object { + public PolygoneType() { + } + + @FieldOrder(order = 0) + public GeoCoordinateType firstEdge; + + @FieldOrder(order = 1) + public SequenceOfDeltaCoordinates edges; + + + public GeoCoordinateType getFirstEdge() { + + return this.firstEdge; + } + + public SequenceOfDeltaCoordinates getEdges() { + + return this.edges; + } + + public void setFirstEdge(GeoCoordinateType firstEdge) { + + this.firstEdge = firstEdge; + } + + public void setEdges(SequenceOfDeltaCoordinates edges) { + + this.edges = edges; + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/PriceTypeType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/PriceTypeType.java new file mode 100644 index 0000000..4e849bc --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/PriceTypeType.java @@ -0,0 +1,39 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +public enum PriceTypeType { + noPrice("noPrice"), + reservationFee("reservationFee"), + supplement("supplement"), + travelPrice("travelPrice"); + + + public String text; + + PriceTypeType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/RegionalValidityType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/RegionalValidityType.java new file mode 100644 index 0000000..fbae3b1 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/RegionalValidityType.java @@ -0,0 +1,100 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import org.uic.barcode.asn1.datatypes.Choice; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; + + +@Choice +@HasExtensionMarker +public class RegionalValidityType extends Object { + public RegionalValidityType() { + } + + @FieldOrder(order = 0) + public TrainLinkType trainLink; + + @FieldOrder(order = 1) + public ViaStationType viaStations; + + @FieldOrder(order = 2) + public ZoneType zones; + + @FieldOrder(order = 3) + public LineType lines; + + @FieldOrder(order = 4) + public PolygoneType polygone; + + + public TrainLinkType getTrainLink() { + + return this.trainLink; + } + + public ViaStationType getViaStations() { + + return this.viaStations; + } + + public ZoneType getZones() { + + return this.zones; + } + + public LineType getLines() { + + return this.lines; + } + + public PolygoneType getPolygone() { + + return this.polygone; + } + + public void setTrainLink(TrainLinkType trainLink) { + + this.trainLink = trainLink; + } + + public void setViaStations(ViaStationType viaStations) { + + this.viaStations = viaStations; + } + + public void setZones(ZoneType zones) { + + this.zones = zones; + } + + public void setLines(LineType lines) { + + this.lines = lines; + } + + public void setPolygone(PolygoneType polygone) { + + this.polygone = polygone; + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/RegisteredLuggageType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/RegisteredLuggageType.java new file mode 100644 index 0000000..a9d053a --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/RegisteredLuggageType.java @@ -0,0 +1,80 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; + + +@Sequence +@HasExtensionMarker +public class RegisteredLuggageType extends Object { + public RegisteredLuggageType() { + } + + @FieldOrder(order = 0) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String registrationId; + + @FieldOrder(order = 1) + @IntRange(minValue=1,maxValue=99) + @Asn1Optional public Long maxWeight; + + @FieldOrder(order = 2) + @IntRange(minValue=1,maxValue=300) + @Asn1Optional public Long maxSize; + + public String getRegistrationId() { + + return this.registrationId; + } + + public Long getMaxWeight() { + + return this.maxWeight; + } + + public Long getMaxSize() { + + return this.maxSize; + } + + public void setRegistrationId(String registrationId) { + + this.registrationId = registrationId; + } + + public void setMaxWeight(Long maxWeight) { + + this.maxWeight = maxWeight; + } + + public void setMaxSize(Long maxSize) { + + this.maxSize = maxSize; + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ReservationData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ReservationData.java new file mode 100644 index 0000000..31b3fa8 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ReservationData.java @@ -0,0 +1,711 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Date; +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.asn1.datatypes.SizeRange; +import org.uic.barcode.asn1.datatypesimpl.SequenceOfStringIA5; +import org.uic.barcode.ticket.api.utils.DateTimeUtils; + +@Sequence +@HasExtensionMarker +public class ReservationData extends Object { + public ReservationData() { + } + + @FieldOrder(order = 0) + @Asn1Optional public Asn1BigInteger trainNum; + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String trainIA5; + + @FieldOrder(order = 2) + @Asn1Default(value="0") + @IntRange(minValue=-1,maxValue=370) + @Asn1Optional public Long departureDate; + + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String referenceIA5; + + @FieldOrder(order = 4) + @Asn1Optional public Asn1BigInteger referenceNum; + + @FieldOrder(order = 5) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long productOwnerNum; + + @FieldOrder(order = 6) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productOwnerIA5; + + @FieldOrder(order = 7) + @IntRange(minValue=0,maxValue=65535) + @Asn1Optional public Long productIdNum; + + @FieldOrder(order = 8) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productIdIA5; + + @FieldOrder(order = 9) + @IntRange(minValue=0,maxValue=32000) + @Asn1Optional public Long serviceBrand; + + @FieldOrder(order = 10) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String serviceBrandAbrUTF8; + + @FieldOrder(order = 11) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String serviceBrandNameUTF8; + + @FieldOrder(order = 12) + @Asn1Default("seat") + @Asn1Optional public ServiceType service; + + @FieldOrder(order = 13) + @Asn1Default("stationUICReservation") + @Asn1Optional public CodeTableType stationCodeTable; + + @FieldOrder(order = 14) + @IntRange(minValue=1,maxValue=9999999) + @Asn1Optional public Long fromStationNum; + + @FieldOrder(order = 15) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String fromStationIA5; + + @FieldOrder(order = 16) + @IntRange(minValue=1,maxValue=9999999) + @Asn1Optional public Long toStationNum; + + @FieldOrder(order = 17) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String toStationIA5; + + @FieldOrder(order = 18) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String fromStationNameUTF8; + + @FieldOrder(order = 19) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String toStationNameUTF8; + + @FieldOrder(order = 20) + @IntRange(minValue=0,maxValue=1440) + public Long departureTime; + + @FieldOrder(order = 21) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long departureUTCOffset; + + @FieldOrder(order = 22) + @IntRange(minValue=-1,maxValue=20) + @Asn1Default(value="0") + @Asn1Optional public Long arrivalDate; + + @FieldOrder(order = 23) + @IntRange(minValue=0,maxValue=1439) + @Asn1Optional public Long arrivalTime; + + @FieldOrder(order = 24) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long arrivalUTCOffset; + + @FieldOrder(order = 25) + @Asn1Optional public SequenceOfCarrierNum carrierNum; + + @FieldOrder(order = 26) + @Asn1Optional public SequenceOfStringIA5 carrierIA5; + + @FieldOrder(order = 27) + @Asn1Default("second") + @Asn1Optional public TravelClassType classCode; + + @FieldOrder(order = 28) + @SizeRange(minValue = 1, maxValue = 2) + @Asn1Optional public String serviceLevel; + + @FieldOrder(order = 29) + @Asn1Optional public PlacesType places; + + @FieldOrder(order = 30) + @Asn1Optional public PlacesType additionalPlaces; + + @FieldOrder(order = 31) + @Asn1Optional public PlacesType bicyclePlaces; + + @FieldOrder(order = 32) + @Asn1Optional public CompartmentDetailsType compartmentDetails; + + @FieldOrder(order = 33) + @IntRange(minValue=0,maxValue=200) + @Asn1Default(value="0") + @Asn1Optional public Long numberOfOverbooked; + + @FieldOrder(order = 34) + @Asn1Optional public SequenceOfBerthDetailData berth; + + @FieldOrder(order = 35) + @Asn1Optional public SequenceOfTariffType tariff; + + @FieldOrder(order = 36) + @Asn1Default("travelPrice") + @Asn1Optional public PriceTypeType priceType; + + @FieldOrder(order = 37) + @Asn1Optional Asn1BigInteger price; + + @FieldOrder(order = 38) + @Asn1Optional SequenceOfVatDetail vatDetails; + + @FieldOrder(order = 39) + @IntRange(minValue=0,maxValue=9) + @Asn1Default("0") + @Asn1Optional public Long typeOfSupplement; + + @FieldOrder(order = 40) + @IntRange(minValue=0,maxValue=200) + @Asn1Default("0") + @Asn1Optional public Long numberOfSupplements; + + @FieldOrder(order = 41) + @Asn1Optional public LuggageRestrictionType luggage; + + @FieldOrder(order = 42) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String infoText; + + @FieldOrder(order = 43) + @Asn1Optional public ExtensionData extension; + + public Long getTrainNum() { + + return Asn1BigInteger.toLong(this.trainNum); + } + + public String getTrainIA5() { + return this.trainIA5; + } + + public Long getDepartureDate() { + return this.departureDate; + } + + public String getReferenceIA5() { + return this.referenceIA5; + } + + public Long getReferenceNum() { + return Asn1BigInteger.toLong(this.referenceNum); + } + + public Long getProductOwnerNum() { + return this.productOwnerNum; + } + + public String getProductOwnerIA5() { + return this.productOwnerIA5; + } + + public Long getProductIdNum() { + return this.productIdNum; + } + + public String getProductIdIA5() { + return this.productIdIA5; + } + + public Long getServiceBrand() { + return this.serviceBrand; + } + + public String getServiceBrandAbrUTF8() { + return this.serviceBrandAbrUTF8; + } + + public String getServiceBrandNameUTF8() { + return this.serviceBrandNameUTF8; + } + + public ServiceType getService() { + + if (service == null){ + return ServiceType.seat; + } + + return this.service; + } + + public CodeTableType getStationCodeTable() { + + if (stationCodeTable == null) { + return CodeTableType.stationUICReservation; + } + + return this.stationCodeTable; + } + + public Long getFromStationNum() { + + return this.fromStationNum; + } + + public String getFromStationIA5() { + + return this.fromStationIA5; + } + + public Long getToStationNum() { + + return this.toStationNum; + } + + public String getToStationIA5() { + + return this.toStationIA5; + } + + public String getFromStationNameUTF8() { + + return this.fromStationNameUTF8; + } + + public String getToStationNameUTF8() { + + return this.toStationNameUTF8; + } + + public Long getDepartureTime() { + + return this.departureTime; + } + + public Long getArrivalDate() { + + if (arrivalDate == null) { + return new Long(0); + } + + return this.arrivalDate; + } + + public Long getArrivalTime() { + + return this.arrivalTime; + } + + public List getCarrierNum() { + + return this.carrierNum; + } + + public List getCarrierIA5() { + + return this.carrierIA5; + } + + public TravelClassType getClassCode() { + + + if (classCode == null) { + return TravelClassType.second; + } + + return this.classCode; + } + + public String getServiceLevel() { + + return this.serviceLevel; + } + + public PlacesType getPlaces() { + + return this.places; + } + + public PlacesType getAdditionalPlaces() { + + return this.additionalPlaces; + } + + public PlacesType getBicyclePlaces() { + + return this.bicyclePlaces; + } + + public CompartmentDetailsType getCompartmentDetails() { + + return this.compartmentDetails; + } + + public Long getNumberOfOverbooked() { + + return this.numberOfOverbooked; + } + + public List getBerth() { + + return this.berth; + } + + public List getTariff() { + + return this.tariff; + } + + public PriceTypeType getPriceType() { + + if (priceType == null) { + return PriceTypeType.travelPrice; + } + + return this.priceType; + } + + public Long getTypeOfSupplement() { + + if (typeOfSupplement == null){ + return new Long(0); + } + + + return this.typeOfSupplement; + } + + public Long getNumberOfSupplements() { + + if (numberOfSupplements == null) { + return new Long(0); + } + + return this.numberOfSupplements; + } + + public LuggageRestrictionType getLuggage() { + + return this.luggage; + } + + public String getInfoText() { + + return this.infoText; + } + + public ExtensionData getExtension() { + + return this.extension; + } + + public void setTrainNum(Long trainNum) { + + this.trainNum = Asn1BigInteger.toAsn1(trainNum); + } + + public void setTrainIA5(String trainIA5) { + + this.trainIA5 = trainIA5; + } + + public void setDepartureDate(Long departureDate) { + + this.departureDate = departureDate; + } + + public void setReferenceIA5(String referenceIA5) { + + this.referenceIA5 = referenceIA5; + } + + public void setReferenceNum(Long referenceNum) { + this.referenceNum = Asn1BigInteger.toAsn1(referenceNum); + } + + public void setProductOwnerNum(Long productOwnerNum) { + + this.productOwnerNum = productOwnerNum; + } + + public void setProductOwnerIA5(String productOwnerIA5) { + + this.productOwnerIA5 = productOwnerIA5; + } + + public void setProductIdNum(Long productIdNum) { + + this.productIdNum = productIdNum; + } + + public void setProductIdIA5(String productIdIA5) { + + this.productIdIA5 = productIdIA5; + } + + public void setServiceBrand(Long serviceBrand) { + + this.serviceBrand = serviceBrand; + } + + public void setServiceBrandAbrUTF8(String serviceBrandAbrUTF8) { + + this.serviceBrandAbrUTF8 = serviceBrandAbrUTF8; + } + + public void setServiceBrandNameUTF8(String serviceBrandNameUTF8) { + + this.serviceBrandNameUTF8 = serviceBrandNameUTF8; + } + + public void setService(ServiceType service) { + + this.service = service; + } + + public void setStationCodeTable(CodeTableType stationCodeTable) { + + this.stationCodeTable = stationCodeTable; + } + + public void setFromStationNum(Long fromStationNum) { + + this.fromStationNum = fromStationNum; + } + + public void setFromStationIA5(String fromStationIA5) { + + this.fromStationIA5 = fromStationIA5; + } + + public void setToStationNum(Long toStationNum) { + + this.toStationNum = toStationNum; + } + + public void setToStationIA5(String toStationIA5) { + + this.toStationIA5 = toStationIA5; + } + + public void setFromStationNameUTF8(String fromStationNameUTF8) { + + this.fromStationNameUTF8 = fromStationNameUTF8; + } + + public void setToStationNameUTF8(String toStationNameUTF8) { + + this.toStationNameUTF8 = toStationNameUTF8; + } + + public void setDepartureTime(Long departureTime) { + + this.departureTime = departureTime; + } + + public void setArrivalDate(Long arrivalDate) { + + this.arrivalDate = arrivalDate; + } + + public void setArrivalTime(Long arrivalTime) { + + this.arrivalTime = arrivalTime; + } + + public void setCarrierNum(SequenceOfCarrierNum carrierNum) { + + this.carrierNum = carrierNum; + } + + public void setCarriersNum(List longs) { + if (longs == null) return; + + this.carrierNum = new SequenceOfCarrierNum(); + this.carrierNum.addAll(longs); + } + + public void setCarrierIA5(SequenceOfStringIA5 carrierIA5) { + + this.carrierIA5 = carrierIA5; + } + + public void setClassCode(TravelClassType classCode) { + + this.classCode = classCode; + } + + public void setServiceLevel(String serviceLevel) { + + this.serviceLevel = serviceLevel; + } + + public void setPlaces(PlacesType places) { + + this.places = places; + } + + public void setAdditionalPlaces(PlacesType additionalPlaces) { + + this.additionalPlaces = additionalPlaces; + } + + public void setBicyclePlaces(PlacesType bicyclePlaces) { + + this.bicyclePlaces = bicyclePlaces; + } + + public void setCompartmentDetails(CompartmentDetailsType compartmentDetails) { + + this.compartmentDetails = compartmentDetails; + } + + public void setNumberOfOverbooked(Long numberOfOverbooked) { + + this.numberOfOverbooked = numberOfOverbooked; + } + + public void setBerth(SequenceOfBerthDetailData berth) { + + this.berth = berth; + } + + public void setTariff(SequenceOfTariffType tariff) { + + this.tariff = tariff; + } + + public void setPriceType(PriceTypeType priceType) { + + this.priceType = priceType; + } + + public void setTypeOfSupplement(Long typeOfSupplement) { + + this.typeOfSupplement = typeOfSupplement; + } + + public void setNumberOfSupplements(Long numberOfSupplements) { + + this.numberOfSupplements = numberOfSupplements; + } + + public void setLuggage(LuggageRestrictionType luggage) { + + this.luggage = luggage; + } + + public void setInfoText(String infoText) { + + this.infoText = infoText; + } + + public void setExtension(ExtensionData extension) { + + this.extension = extension; + } + + public Long getPrice() { + return Asn1BigInteger.toLong(price); + } + + public void setPrice(Long price) { + this.price = Asn1BigInteger.toAsn1(price); + } + + public SequenceOfVatDetail getVatDetails() { + return vatDetails; + } + + public void setVatDetails(SequenceOfVatDetail vatDetails) { + this.vatDetails = vatDetails; + } + + public void addVatDetail(VatDetailType vatDetail) { + if (this.vatDetails == null) { + this.vatDetails = new SequenceOfVatDetail(); + } + this.vatDetails.add(vatDetail); + } + + public void setDepartureArrivalDates (Date departure, Date arrival, Date issuingDate){ + + if (issuingDate == null || departure == null) return; + + this.departureDate = DateTimeUtils.getDateDifference(issuingDate,departure); + this.departureTime = DateTimeUtils.getTime(departure); + + if (arrival != null){ + this.arrivalDate = DateTimeUtils.getDateDifference(departure, arrival); + this.arrivalTime = DateTimeUtils.getTime(arrival); + } + + } + + public Date getDepartureDate(Date issuingDate){ + + return DateTimeUtils.getDate(issuingDate, this.departureDate, this.departureTime); + + } + + public Date getArrivalDate(Date issuingDate){ + + if (this.departureDate == null) { + this.departureDate = 0L; + } + + if (this.arrivalDate == null) { + return null; + } + + return DateTimeUtils.getDate(issuingDate, this.departureDate + this.arrivalDate, this.arrivalTime); + } + + public Long getDepartureUTCOffset() { + return departureUTCOffset; + } + + public void setDepartureUTCOffset(Long departureUTCOffset) { + this.departureUTCOffset = departureUTCOffset; + } + + public Long getArrivalUTCOffset() { + return arrivalUTCOffset; + } + + public void setArrivalUTCOffset(Long arrivalUTCOffset) { + this.arrivalUTCOffset = arrivalUTCOffset; + } + + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ReturnRouteDescriptionType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ReturnRouteDescriptionType.java new file mode 100644 index 0000000..5334b27 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ReturnRouteDescriptionType.java @@ -0,0 +1,150 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; + +@Sequence +@HasExtensionMarker +public class ReturnRouteDescriptionType extends Object { + public ReturnRouteDescriptionType() { + } + + @FieldOrder(order = 0) + @IntRange(minValue=1,maxValue=9999999) + @Asn1Optional public Long fromStationNum; + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String fromStationIA5; + + @FieldOrder(order = 2) + @IntRange(minValue=1,maxValue=9999999) + @Asn1Optional public Long toStationNum; + + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String toStationIA5; + + @FieldOrder(order = 4) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String fromStationNameUTF8; + + @FieldOrder(order = 5) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String toStationNameUTF8; + + @FieldOrder(order = 6) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String validReturnRegionDesc; + + @FieldOrder(order = 7) + @Asn1Optional public SequenceOfRegionalValidityType validReturnRegion; + + public Long getFromStationNum() { + + return this.fromStationNum; + } + + public String getFromStationIA5() { + + return this.fromStationIA5; + } + + public Long getToStationNum() { + + return this.toStationNum; + } + + public String getToStationIA5() { + + return this.toStationIA5; + } + + public String getFromStationNameUTF8() { + + return this.fromStationNameUTF8; + } + + public String getToStationNameUTF8() { + + return this.toStationNameUTF8; + } + + public String getValidReturnRegionDesc() { + + return this.validReturnRegionDesc; + } + + public List getValidReturnRegion() { + + return this.validReturnRegion; + } + + public void setFromStationNum(Long fromStationNum) { + + this.fromStationNum = fromStationNum; + } + + public void setFromStationIA5(String fromStationIA5) { + + this.fromStationIA5 = fromStationIA5; + } + + public void setToStationNum(Long toStationNum) { + + this.toStationNum = toStationNum; + } + + public void setToStationIA5(String toStationIA5) { + + this.toStationIA5 = toStationIA5; + } + + public void setFromStationNameUTF8(String fromStationNameUTF8) { + + this.fromStationNameUTF8 = fromStationNameUTF8; + } + + public void setToStationNameUTF8(String toStationNameUTF8) { + + this.toStationNameUTF8 = toStationNameUTF8; + } + + public void setValidReturnRegionDesc(String validReturnRegionDesc) { + + this.validReturnRegionDesc = validReturnRegionDesc; + } + + public void setValidReturnRegion(SequenceOfRegionalValidityType validReturnRegion) { + + this.validReturnRegion = validReturnRegion; + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/RoofRackType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/RoofRackType.java new file mode 100644 index 0000000..c05e917 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/RoofRackType.java @@ -0,0 +1,46 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; + +@HasExtensionMarker +public enum RoofRackType { + norack("norack"), + roofRailing("roofRailing"), + luggageRack("luggageRack"), + skiRack("skiRack"), + boxRack("boxRack"), + rackWithOneBox("rackWithOneBox"), + rackWithTwoBoxes("rackWithTwoBoxes"), + bicycleRack("bicycleRack"), + otherRack("otherRack"); + + public String text; + + RoofRackType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/RouteSectionType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/RouteSectionType.java new file mode 100644 index 0000000..e0f9c46 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/RouteSectionType.java @@ -0,0 +1,136 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; + +public class RouteSectionType extends Object { + public RouteSectionType() { + } + + @FieldOrder(order = 0) + @Asn1Default("stationUIC") + @Asn1Optional public CodeTableType stationCodeTable; + + @FieldOrder(order = 1) + @IntRange(minValue=1,maxValue=9999999) + @Asn1Optional public Long fromStationNum; + + @FieldOrder(order = 2) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String fromStationIA5; + + @FieldOrder(order = 3) + @IntRange(minValue=1,maxValue=9999999) + @Asn1Optional public Long toStationNum; + + @FieldOrder(order = 4) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String toStationIA5; + + @FieldOrder(order = 5) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String fromStationNameUTF8; + + @FieldOrder(order = 6) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String toStationNameUTF8; + + public CodeTableType getStationCodeTable() { + + if (stationCodeTable == null) { + return CodeTableType.stationUIC; + } + + return this.stationCodeTable; + } + + public Long getFromStationNum() { + + return this.fromStationNum; + } + + public String getFromStationIA5() { + + return this.fromStationIA5; + } + + public Long getToStationNum() { + + return this.toStationNum; + } + + public String getToStationIA5() { + + return this.toStationIA5; + } + + public String getFromStationNameUTF8() { + + return this.fromStationNameUTF8; + } + + public String getToStationNameUTF8() { + + return this.toStationNameUTF8; + } + + public void setStationCodeTable(CodeTableType stationCodeTable) { + + this.stationCodeTable = stationCodeTable; + } + + public void setFromStationNum(Long fromStationNum) { + + this.fromStationNum = fromStationNum; + } + + public void setFromStationIA5(String fromStationIA5) { + + this.fromStationIA5 = fromStationIA5; + } + + public void setToStationNum(Long toStationNum) { + + this.toStationNum = toStationNum; + } + + public void setToStationIA5(String toStationIA5) { + + this.toStationIA5 = toStationIA5; + } + + public void setFromStationNameUTF8(String fromStationNameUTF8) { + + this.fromStationNameUTF8 = fromStationNameUTF8; + } + + public void setToStationNameUTF8(String toStationNameUTF8) { + + this.toStationNameUTF8 = toStationNameUTF8; + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfActivatedDays.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfActivatedDays.java new file mode 100644 index 0000000..776c774 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfActivatedDays.java @@ -0,0 +1,26 @@ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Collection; +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; +import org.uic.barcode.asn1.datatypes.IntRange; + +@IntRange(minValue=0,maxValue=370) +public class SequenceOfActivatedDays extends Asn1SequenceOf { + public SequenceOfActivatedDays() { super(); } + public SequenceOfActivatedDays(Collection coll) { super(coll); } + + public SequenceOfActivatedDays(List numbers) { + super(); + for (Long number: numbers){ + this.add(new Long(number)); + } + } + + public static SequenceOfActivatedDays getSequence(List numList) { + if (numList == null || numList.isEmpty()) return null; + return new SequenceOfActivatedDays(numList); + } + +} \ No newline at end of file diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfBerthDetailData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfBerthDetailData.java new file mode 100644 index 0000000..38482f4 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfBerthDetailData.java @@ -0,0 +1,10 @@ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Collection; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; + +public class SequenceOfBerthDetailData extends Asn1SequenceOf { + public SequenceOfBerthDetailData() { super(); } + public SequenceOfBerthDetailData(Collection coll) { super(coll); } +} \ No newline at end of file diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfCardReferenceType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfCardReferenceType.java new file mode 100644 index 0000000..4e602bb --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfCardReferenceType.java @@ -0,0 +1,10 @@ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Collection; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; + +public class SequenceOfCardReferenceType extends Asn1SequenceOf { + public SequenceOfCardReferenceType() { super(); } + public SequenceOfCardReferenceType(Collection coll) { super(coll); } +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfCarrierIA5.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfCarrierIA5.java new file mode 100644 index 0000000..c06d78d --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfCarrierIA5.java @@ -0,0 +1,13 @@ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Collection; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.RestrictedString; + +@RestrictedString(CharacterRestriction.IA5String) +public class SequenceOfCarrierIA5 extends Asn1SequenceOf { + public SequenceOfCarrierIA5() { super(); } + public SequenceOfCarrierIA5(Collection coll) { super(coll); } +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfCarrierNum.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfCarrierNum.java new file mode 100644 index 0000000..53417c2 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfCarrierNum.java @@ -0,0 +1,28 @@ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Collection; +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; +import org.uic.barcode.asn1.datatypes.IntRange; + +@IntRange(minValue=1,maxValue=32000) +public class SequenceOfCarrierNum extends Asn1SequenceOf { + public SequenceOfCarrierNum() { super(); } + public SequenceOfCarrierNum(Collection coll) { super(coll); } + + + public SequenceOfCarrierNum(List numbers) { + super(); + for (Long number: numbers){ + this.add(new Long(number)); + } + } + public static SequenceOfCarrierNum getSequence(List numList) { + if (numList == null || numList.isEmpty()) return null; + return new SequenceOfCarrierNum(numList); + } + + + +} \ No newline at end of file diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfCountries.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfCountries.java new file mode 100644 index 0000000..2dca27a --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfCountries.java @@ -0,0 +1,27 @@ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Collection; +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; +import org.uic.barcode.asn1.datatypes.IntRange; + +@IntRange(minValue=1,maxValue=250) +public class SequenceOfCountries extends Asn1SequenceOf { + public SequenceOfCountries() { super(); } + public SequenceOfCountries(Collection coll) { super(coll); } + + + public SequenceOfCountries(List numbers) { + super(); + for (Long number: numbers){ + this.add(new Long(number)); + } + } + + public static SequenceOfCountries getSequence(List numList) { + if (numList == null || numList.isEmpty()) return null; + return new SequenceOfCountries(numList); + } + +} \ No newline at end of file diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfCustomerStatusType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfCustomerStatusType.java new file mode 100644 index 0000000..e660e0c --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfCustomerStatusType.java @@ -0,0 +1,11 @@ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Collection; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; + +public class SequenceOfCustomerStatusType extends Asn1SequenceOf { + public SequenceOfCustomerStatusType() { super(); } + public SequenceOfCustomerStatusType(Collection coll) { super(coll); } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfDeltaCoordinates.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfDeltaCoordinates.java new file mode 100644 index 0000000..66ff4b0 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfDeltaCoordinates.java @@ -0,0 +1,10 @@ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Collection; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; + +public class SequenceOfDeltaCoordinates extends Asn1SequenceOf { + public SequenceOfDeltaCoordinates() { super(); } + public SequenceOfDeltaCoordinates(Collection coll) { super(coll); } +} \ No newline at end of file diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfDocumentData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfDocumentData.java new file mode 100644 index 0000000..57b3ba7 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfDocumentData.java @@ -0,0 +1,10 @@ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Collection; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; + +public class SequenceOfDocumentData extends Asn1SequenceOf { + public SequenceOfDocumentData() { super(); } + public SequenceOfDocumentData(Collection coll) { super(coll); } +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfExtensionData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfExtensionData.java new file mode 100644 index 0000000..6def741 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfExtensionData.java @@ -0,0 +1,10 @@ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Collection; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; + +public class SequenceOfExtensionData extends Asn1SequenceOf { + public SequenceOfExtensionData() { super(); } + public SequenceOfExtensionData(Collection coll) { super(coll); } +} \ No newline at end of file diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfIncludedOpenTicketType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfIncludedOpenTicketType.java new file mode 100644 index 0000000..ac0efff --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfIncludedOpenTicketType.java @@ -0,0 +1,10 @@ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Collection; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; + +public class SequenceOfIncludedOpenTicketType extends Asn1SequenceOf { + public SequenceOfIncludedOpenTicketType() { super(); } + public SequenceOfIncludedOpenTicketType(Collection coll) { super(coll); } +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfPlaceNum.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfPlaceNum.java new file mode 100644 index 0000000..3cc6471 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfPlaceNum.java @@ -0,0 +1,28 @@ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Collection; +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; +import org.uic.barcode.asn1.datatypes.IntRange; + +@IntRange(minValue=1,maxValue=254) +public class SequenceOfPlaceNum extends Asn1SequenceOf { + public SequenceOfPlaceNum() { super(); } + public SequenceOfPlaceNum(Collection coll) { super(coll); } + + + + public SequenceOfPlaceNum(List numbers) { + super(); + for (Long number: numbers){ + this.add(new Long(number)); + } + } + + public static SequenceOfPlaceNum getSequence(List numList) { + if (numList == null || numList.isEmpty()) return null; + return new SequenceOfPlaceNum(numList); + } + +} \ No newline at end of file diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfRegionalValidityType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfRegionalValidityType.java new file mode 100644 index 0000000..e261eb8 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfRegionalValidityType.java @@ -0,0 +1,10 @@ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Collection; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; + +public class SequenceOfRegionalValidityType extends Asn1SequenceOf { + public SequenceOfRegionalValidityType() { super(); } + public SequenceOfRegionalValidityType(Collection coll) { super(coll); } +} \ No newline at end of file diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfRegisteredLuggageType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfRegisteredLuggageType.java new file mode 100644 index 0000000..e8709ce --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfRegisteredLuggageType.java @@ -0,0 +1,10 @@ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Collection; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; + +public class SequenceOfRegisteredLuggageType extends Asn1SequenceOf { + public SequenceOfRegisteredLuggageType() { super(); } + public SequenceOfRegisteredLuggageType(Collection coll) { super(coll); } +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfServiceBrands.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfServiceBrands.java new file mode 100644 index 0000000..4eb829b --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfServiceBrands.java @@ -0,0 +1,26 @@ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Collection; +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; +import org.uic.barcode.asn1.datatypes.IntRange; + +@IntRange(minValue=0,maxValue=32000) +public class SequenceOfServiceBrands extends Asn1SequenceOf { + public SequenceOfServiceBrands() { super(); } + public SequenceOfServiceBrands(Collection coll) { super(coll); } + + + public SequenceOfServiceBrands(List numbers) { + super(); + for (Long number: numbers){ + this.add(new Long(number)); + } + } + + public static SequenceOfServiceBrands getSequence(List numList) { + if (numList == null || numList.isEmpty()) return null; + return new SequenceOfServiceBrands(numList); + } +} \ No newline at end of file diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfTariffType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfTariffType.java new file mode 100644 index 0000000..5c7b773 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfTariffType.java @@ -0,0 +1,10 @@ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Collection; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; + +public class SequenceOfTariffType extends Asn1SequenceOf { + public SequenceOfTariffType() { super(); } + public SequenceOfTariffType(Collection coll) { super(coll); } +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfTicketLinkType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfTicketLinkType.java new file mode 100644 index 0000000..52005b1 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfTicketLinkType.java @@ -0,0 +1,10 @@ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Collection; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; + +public class SequenceOfTicketLinkType extends Asn1SequenceOf { + public SequenceOfTicketLinkType() { super(); } + public SequenceOfTicketLinkType(Collection coll) { super(coll); } +} \ No newline at end of file diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfTransportTypes.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfTransportTypes.java new file mode 100644 index 0000000..b8e2b64 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfTransportTypes.java @@ -0,0 +1,26 @@ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Collection; +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; +import org.uic.barcode.asn1.datatypes.IntRange; + +@IntRange(minValue=0,maxValue=31) +public class SequenceOfTransportTypes extends Asn1SequenceOf { + public SequenceOfTransportTypes() { super(); } + public SequenceOfTransportTypes(Collection coll) { super(coll); } + + + public SequenceOfTransportTypes(List numbers) { + super(); + for (Long number: numbers){ + this.add(new Long(number)); + } + } + + public static SequenceOfTransportTypes getSequence(List numList) { + if (numList == null || numList.isEmpty()) return null; + return new SequenceOfTransportTypes(numList); + } +} \ No newline at end of file diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfTravelerId.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfTravelerId.java new file mode 100644 index 0000000..eb9c3e2 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfTravelerId.java @@ -0,0 +1,26 @@ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Collection; +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; +import org.uic.barcode.asn1.datatypes.IntRange; + +@IntRange(minValue=1,maxValue=254) +public class SequenceOfTravelerId extends Asn1SequenceOf { + public SequenceOfTravelerId() { super(); } + public SequenceOfTravelerId(Collection coll) { super(coll); } + + public SequenceOfTravelerId(List numbers) { + super(); + for (Long number: numbers){ + this.add(new Long(number)); + } + } + + public static SequenceOfTravelerId getSequence(List numList) { + if (numList == null || numList.isEmpty()) return null; + return new SequenceOfTravelerId(numList); + } + +} \ No newline at end of file diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfTravelerType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfTravelerType.java new file mode 100644 index 0000000..e1fd312 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfTravelerType.java @@ -0,0 +1,10 @@ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Collection; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; + +public class SequenceOfTravelerType extends Asn1SequenceOf { + public SequenceOfTravelerType() { super(); } + public SequenceOfTravelerType(Collection coll) { super(coll); } +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfVatDetail.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfVatDetail.java new file mode 100644 index 0000000..3aae8e9 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfVatDetail.java @@ -0,0 +1,10 @@ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Collection; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; + +public class SequenceOfVatDetail extends Asn1SequenceOf { + public SequenceOfVatDetail() { super(); } + public SequenceOfVatDetail(Collection coll) { super(coll); } +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfViaStationType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfViaStationType.java new file mode 100644 index 0000000..b5bb0aa --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfViaStationType.java @@ -0,0 +1,10 @@ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Collection; + +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; + +public class SequenceOfViaStationType extends Asn1SequenceOf { + public SequenceOfViaStationType() { super(); } + public SequenceOfViaStationType(Collection coll) { super(coll); } +} \ No newline at end of file diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SeriesDetailType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SeriesDetailType.java new file mode 100644 index 0000000..d7477d1 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SeriesDetailType.java @@ -0,0 +1,75 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.Sequence; + +@Sequence +public class SeriesDetailType extends Object { + public SeriesDetailType() { + } + + @FieldOrder(order = 0) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long supplyingCarrier; + + @FieldOrder(order = 1) + @IntRange(minValue=1,maxValue=99) + @Asn1Optional public Long offerIdentification; + + @FieldOrder(order = 2) + @Asn1Optional public Asn1BigInteger series; + + + public Long getSupplyingCarrier() { + + return this.supplyingCarrier; + } + + public Long getOfferIdentification() { + + return this.offerIdentification; + } + + public Long getSeries() { + + return Asn1BigInteger.toLong(this.series); + } + + public void setSupplyingCarrier(Long supplyingCarrier) { + + this.supplyingCarrier = supplyingCarrier; + } + + public void setOfferIdentification(Long offerIdentification) { + + this.offerIdentification = offerIdentification; + } + + public void setSeries(Long series) { + + this.series = Asn1BigInteger.toAsn1(series); + } + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ServiceType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ServiceType.java new file mode 100644 index 0000000..b13c094 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ServiceType.java @@ -0,0 +1,38 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +public enum ServiceType { + seat("seat"), + couchette("couchette"), + berth("berth"), + carcarriage("carcarriage"); + + public String text; + + ServiceType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/StationPassageData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/StationPassageData.java new file mode 100644 index 0000000..a378bb7 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/StationPassageData.java @@ -0,0 +1,387 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Date; +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.asn1.datatypesimpl.SequenceOfStringIA5; +import org.uic.barcode.asn1.datatypesimpl.SequenceOfStringUTF8; +import org.uic.barcode.asn1.datatypesimpl.SequenceOfUnrestrictedLong; +import org.uic.barcode.ticket.api.utils.DateTimeUtils; + +@Sequence +@HasExtensionMarker +public class StationPassageData extends Object { + public StationPassageData() { + } + + @FieldOrder(order = 0) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String referenceIA5; + + @FieldOrder(order = 1) + @Asn1Optional public Asn1BigInteger referenceNum; + + @FieldOrder(order = 2) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long productOwnerNum; + + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productOwnerIA5; + + @FieldOrder(order = 4) + @IntRange(minValue=0,maxValue=65535) + @Asn1Optional public Long productIdNum; + + @FieldOrder(order = 5) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productIdIA5; + + @FieldOrder(order = 6) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String productName; + + @FieldOrder(order = 7) + @Asn1Default("stationUIC") + @Asn1Optional public CodeTableType stationCodeTable; + + @FieldOrder(order = 8) + @Asn1Optional public SequenceOfUnrestrictedLong stationNum; + + @FieldOrder(order = 9) + @Asn1Optional public SequenceOfStringIA5 stationIA5; + + @FieldOrder(order = 10) + @Asn1Optional public SequenceOfStringUTF8 stationNameUTF8; + + @FieldOrder(order = 11) + @Asn1Optional public SequenceOfUnrestrictedLong areaCodeNum; + + @FieldOrder(order = 12) + @Asn1Optional public SequenceOfStringIA5 areaCodeIA5; + + @FieldOrder(order = 13) + @Asn1Optional public SequenceOfStringUTF8 areaNameUTF8; + + @FieldOrder(order = 14) + @IntRange(minValue=-1,maxValue=700) + public Long validFromDay; + + @FieldOrder(order = 15) + @IntRange(minValue=0,maxValue=1440) + @Asn1Optional public Long validFromTime; + + @FieldOrder(order = 16) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long validFromUTCOffset; + + @FieldOrder(order = 17) + @Asn1Default(value="0") + @IntRange(minValue=0,maxValue=370) + @Asn1Optional public Long validUntilDay; + + @FieldOrder(order = 18) + @IntRange(minValue=0,maxValue=1440) + @Asn1Optional public Long validUntilTime; + + @FieldOrder(order = 19) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long validUntilUTCOffset; + + @FieldOrder(order = 20) + @Asn1Optional public Asn1BigInteger numberOfDaysValid; + + @FieldOrder(order = 21) + @Asn1Optional public ExtensionData extension; + + + public String getReferenceIA5() { + + return this.referenceIA5; + } + + public Asn1BigInteger getReferenceNum() { + + return this.referenceNum; + } + + public Long getProductOwnerNum() { + + return this.productOwnerNum; + } + + public String getProductOwnerIA5() { + + return this.productOwnerIA5; + } + + public Long getProductIdNum() { + + return this.productIdNum; + } + + public String getProductIdIA5() { + + return this.productIdIA5; + } + + public String getProductName() { + + return this.productName; + } + + public CodeTableType getStationCodeTable() { + + if (stationCodeTable == null) { + return CodeTableType.stationUIC; + } + + return this.stationCodeTable; + } + + public SequenceOfUnrestrictedLong getStationNum() { + + return this.stationNum; + } + + public List getStationIA5() { + + return this.stationIA5; + } + + public SequenceOfStringUTF8 getStationNameUTF8() { + + return this.stationNameUTF8; + } + + public SequenceOfUnrestrictedLong getAreaCodeNum() { + + return this.areaCodeNum; + } + + public List getAreaCodeIA5() { + + return this.areaCodeIA5; + } + + public List getAreaNameUTF8() { + + return this.areaNameUTF8; + } + + public Long getValidFromDay() { + + return this.validFromDay; + } + + public Long getValidFromTime() { + + return this.validFromTime; + } + + public Long getValidUntilDay() { + + return this.validUntilDay; + } + + public Long getValidUntilTime() { + + return this.validUntilTime; + } + + public Long getNumberOfDaysValid() { + + return Asn1BigInteger.toLong(numberOfDaysValid); + } + + public ExtensionData getExtension() { + + return this.extension; + } + + public void setReferenceIA5(String referenceIA5) { + + this.referenceIA5 = referenceIA5; + } + + public void setReferenceNum(Asn1BigInteger referenceNum) { + + this.referenceNum = referenceNum; + } + + public void setProductOwnerNum(Long productOwnerNum) { + + this.productOwnerNum = productOwnerNum; + } + + public void setProductOwnerIA5(String productOwnerIA5) { + + this.productOwnerIA5 = productOwnerIA5; + } + + public void setProductIdNum(Long productIdNum) { + + this.productIdNum = productIdNum; + } + + public void setProductIdIA5(String productIdIA5) { + + this.productIdIA5 = productIdIA5; + } + + public void setProductName(String productName) { + + this.productName = productName; + } + + public void setStationCodeTable(CodeTableType stationCodeTable) { + + this.stationCodeTable = stationCodeTable; + } + + public void setStationNum(SequenceOfUnrestrictedLong stationNum) { + + this.stationNum = stationNum; + } + + public void setStationIA5(SequenceOfStringIA5 stationIA5) { + + this.stationIA5 = stationIA5; + } + + public void setStationNameUTF8(SequenceOfStringUTF8 stationNameUTF8) { + + this.stationNameUTF8 = stationNameUTF8; + } + + public void setAreaCodeNum(SequenceOfUnrestrictedLong sequenceOfUnrestrictedLong) { + + this.areaCodeNum = sequenceOfUnrestrictedLong; + } + + public void setAreaCodeIA5(SequenceOfStringIA5 areaCodeIA5) { + + this.areaCodeIA5 = areaCodeIA5; + } + + public void setAreaNameUTF8(SequenceOfStringUTF8 areaNameUTF8) { + + this.areaNameUTF8 = areaNameUTF8; + } + + public void setValidFromDay(Long validFromDay) { + + this.validFromDay = validFromDay; + } + + public void setValidFromTime(Long validFromTime) { + + this.validFromTime = validFromTime; + } + + public void setValidUntilDay(Long validUntilDay) { + + this.validUntilDay = validUntilDay; + } + + public void setValidUntilTime(Long validUntilTime) { + + this.validUntilTime = validUntilTime; + } + + public void setNumberOfDaysValid(Long numberOfDaysValid) { + + this.numberOfDaysValid = Asn1BigInteger.toAsn1(numberOfDaysValid); + } + + public void setExtension(ExtensionData extension) { + + this.extension = extension; + } + + public void setValidityDates (Date fromDate, Date untilDate, Date issuingDate){ + + if (issuingDate == null || fromDate == null) return; + + this.validFromDay = DateTimeUtils.getDateDifference(issuingDate,fromDate); + this.validFromTime = DateTimeUtils.getTime(fromDate); + + if (untilDate != null){ + this.validUntilDay = DateTimeUtils.getDateDifference(fromDate, untilDate); + this.validUntilTime = DateTimeUtils.getTime(untilDate); + } + + } + + public Date getValidFromDate(Date issuingDate){ + + return DateTimeUtils.getDate(issuingDate, this.validFromDay, this.validFromTime); + + } + + public Date getValidUntilDate(Date issuingDate){ + + if (issuingDate == null) return null; + + if (this.validFromDay == null) { + this.validFromDay = 0L; + } + + if (this.validUntilDay == null) { + return null; + } + + + return DateTimeUtils.getDate(issuingDate, this.validFromDay + this.validUntilDay, this.validUntilTime); + + } + + public Long getValidFromUTCOffset() { + return validFromUTCOffset; + } + + public void setValidFromUTCOffset(Long validFromUTCOffset) { + this.validFromUTCOffset = validFromUTCOffset; + } + + public Long getValidUntilUTCOffset() { + return validUntilUTCOffset; + } + + public void setValidUntilUTCOffset(Long validUntilUTCOffset) { + this.validUntilUTCOffset = validUntilUTCOffset; + } + + + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TariffType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TariffType.java new file mode 100644 index 0000000..efc5d3b --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TariffType.java @@ -0,0 +1,206 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; + +@Sequence +@HasExtensionMarker +public class TariffType extends Object { + public TariffType() { + } + @FieldOrder(order = 0) + @IntRange(minValue=1,maxValue=200) + @Asn1Default(value = "1") + @Asn1Optional public Long numberOfPassengers; + + @FieldOrder(order = 1) + @Asn1Optional public PassengerType passengerType; + + @FieldOrder(order = 2) + @IntRange(minValue=1,maxValue=64) + @Asn1Optional public Long ageBelow; + + @FieldOrder(order = 3) + @IntRange(minValue=1,maxValue=128) + @Asn1Optional public Long ageAbove; + + @FieldOrder(order = 5) + @Asn1Optional public SequenceOfTravelerId traverlerid; + + @FieldOrder(order = 6) + public Boolean restrictedToCountryOfResidence; + + @FieldOrder(order = 7) + @Asn1Optional public RouteSectionType restrictedToRouteSection; + + @FieldOrder(order = 8) + @Asn1Optional public SeriesDetailType seriesDataDetails; + + @FieldOrder(order = 9) + @Asn1Optional public Asn1BigInteger tariffIdNum; + + @FieldOrder(order = 10) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String tariffIdIA5; + + @FieldOrder(order = 11) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String tariffDesc; + + @FieldOrder(order = 12) + @Asn1Optional public SequenceOfCardReferenceType reductionCard; + + + + public Long getNumberOfPassengers() { + + if (numberOfPassengers == null) { + return new Long(1); + } + + return this.numberOfPassengers; + } + + public PassengerType getPassengerType() { + + return this.passengerType; + } + + public Long getAgeBelow() { + + return this.ageBelow; + } + + public Long getAgeAbove() { + + return this.ageAbove; + } + + public SequenceOfTravelerId getTraverlerid() { + + return this.traverlerid; + } + + public Boolean getRestrictedToCountryOfResidence() { + + return this.restrictedToCountryOfResidence; + } + + public RouteSectionType getRestrictedToRouteSection() { + + return this.restrictedToRouteSection; + } + + public SeriesDetailType getSeriesDataDetails() { + + return this.seriesDataDetails; + } + + public Long getTariffIdNum() { + + return Asn1BigInteger.toLong(this.tariffIdNum); + } + + public String getTariffIdIA5() { + + return this.tariffIdIA5; + } + + public String getTariffDesc() { + + return this.tariffDesc; + } + + public SequenceOfCardReferenceType getReductionCard() { + + return this.reductionCard; + } + + public void setNumberOfPassengers(Long numberOfPassengers) { + + this.numberOfPassengers = numberOfPassengers; + } + + public void setPassengerType(PassengerType passengerType) { + + this.passengerType = passengerType; + } + + public void setAgeBelow(Long ageBelow) { + + this.ageBelow = ageBelow; + } + + public void setAgeAbove(Long ageAbove) { + + this.ageAbove = ageAbove; + } + + public void setTraverlerid(SequenceOfTravelerId traverlerid) { + + this.traverlerid = traverlerid; + } + + public void setRestrictedToCountryOfResidence(Boolean restrictedToCountryOfResidence) { + + this.restrictedToCountryOfResidence = restrictedToCountryOfResidence; + } + + public void setRestrictedToRouteSection(RouteSectionType restrictedToRouteSection) { + + this.restrictedToRouteSection = restrictedToRouteSection; + } + + public void setSeriesDataDetails(SeriesDetailType seriesDataDetails) { + + this.seriesDataDetails = seriesDataDetails; + } + + public void setTariffIdNum(Long tariffIdNum) { + + this.tariffIdNum = Asn1BigInteger.toAsn1(tariffIdNum); + } + + public void setTariffIdIA5(String tariffIdIA5) { + + this.tariffIdIA5 = tariffIdIA5; + } + + public void setTariffDesc(String tariffDesc) { + + this.tariffDesc = tariffDesc; + } + + public void setReductionCard(SequenceOfCardReferenceType reductionCard) { + + this.reductionCard = reductionCard; + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TicketDetailData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TicketDetailData.java new file mode 100644 index 0000000..4cdac60 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TicketDetailData.java @@ -0,0 +1,190 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + + + +import org.uic.barcode.asn1.datatypes.Choice; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; + +@Choice +@HasExtensionMarker +public class TicketDetailData extends Object { + public TicketDetailData() { + } + + @FieldOrder(order = 0) + public ReservationData reservation; + + @FieldOrder(order = 1) + public CarCarriageReservationData carCarriageReservation; + + @FieldOrder(order = 2) + public OpenTicketData openTicket; + + @FieldOrder(order = 3) + public PassData pass; + + @FieldOrder(order = 4) + public VoucherData voucher; + + @FieldOrder(order = 5) + public CustomerCardData customerCard; + + @FieldOrder(order = 6) + public CountermarkData counterMark; + + @FieldOrder(order = 7) + public ParkingGroundData parkingGround; + + @FieldOrder(order = 8) + public FIPTicketData fipTicket; + + @FieldOrder(order = 9) + public StationPassageData stationPassage; + + @FieldOrder(order = 10) + public DelayConfirmation delayConfirmation; + + @FieldOrder(order = 11) + public ExtensionData extension; + + public ReservationData getReservation() { + + return this.reservation; + } + + public CarCarriageReservationData getCarCarriageReservation() { + + return this.carCarriageReservation; + } + + public OpenTicketData getOpenTicket() { + + return this.openTicket; + } + + public PassData getPass() { + + return this.pass; + } + + public VoucherData getVoucher() { + + return this.voucher; + } + + public CustomerCardData getCustomerCard() { + + return this.customerCard; + } + + public CountermarkData getCounterMark() { + + return this.counterMark; + } + + public ParkingGroundData getParkingGround() { + + return this.parkingGround; + } + + public FIPTicketData getFipTicket() { + + return this.fipTicket; + } + + public StationPassageData getStationPassage() { + + return this.stationPassage; + } + + public DelayConfirmation getDelayConfirmation() { + + return this.delayConfirmation; + } + + public ExtensionData getExtension() { + + return this.extension; + } + + public void setReservation(ReservationData reservation) { + + this.reservation = reservation; + } + + public void setCarCarriageReservation(CarCarriageReservationData carCarriageReservation) { + + this.carCarriageReservation = carCarriageReservation; + } + + public void setOpenTicket(OpenTicketData openTicket) { + + this.openTicket = openTicket; + } + + public void setPass(PassData pass) { + + this.pass = pass; + } + + public void setVoucher(VoucherData voucher) { + + this.voucher = voucher; + } + + public void setCustomerCard(CustomerCardData customerCard) { + + this.customerCard = customerCard; + } + + public void setCounterMark(CountermarkData counterMark) { + + this.counterMark = counterMark; + } + + public void setParkingGround(ParkingGroundData parkingGround) { + + this.parkingGround = parkingGround; + } + + public void setFipTicket(FIPTicketData fipTicket) { + + this.fipTicket = fipTicket; + } + + public void setStationPassage(StationPassageData stationPassage) { + + this.stationPassage = stationPassage; + } + + public void setDelayConfirmation(DelayConfirmation delayConfirmation) { + + this.delayConfirmation = delayConfirmation; + } + + public void setExtension(ExtensionData extension) { + + this.extension = extension; + } + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TicketLinkType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TicketLinkType.java new file mode 100644 index 0000000..d1c02a6 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TicketLinkType.java @@ -0,0 +1,156 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; + +@Sequence +@HasExtensionMarker +public class TicketLinkType extends Object { + public TicketLinkType() { + } + + @FieldOrder(order = 0) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String referenceIA5; + + @FieldOrder(order = 1) + @Asn1Optional public Asn1BigInteger referenceNum; + + @FieldOrder(order = 2) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String issuerName; + + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String issuerPNR; + + @FieldOrder(order = 4) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long productOwnerNum; + + @FieldOrder(order = 5) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productOwnerIA5; + + @FieldOrder(order = 6) + @Asn1Default(value="openTicket") + @Asn1Optional public TicketType ticketType; + + @FieldOrder(order = 7) + @Asn1Default(value="issuedTogether") + @Asn1Optional public LinkMode linkMode; + + public String getReferenceIA5() { + + return this.referenceIA5; + } + + public Long getReferenceNum() { + return Asn1BigInteger.toLong(this.referenceNum); + } + + public String getIssuerName() { + + return this.issuerName; + } + + public Long getProductOwnerNum() { + + return this.productOwnerNum; + } + + public String getProductOwnerIA5() { + + return this.productOwnerIA5; + } + + public TicketType getTicketType() { + + if (ticketType == null) { + return TicketType.openTicket; + } + + return this.ticketType; + } + + public LinkMode getLinkMode() { + + if (linkMode == null){ + return LinkMode.issuedTogether; + } + + return this.linkMode; + } + + public void setReferenceIA5(String referenceIA5) { + + this.referenceIA5 = referenceIA5; + } + + public void setReferenceNum(Long referenceNum) { + this.referenceNum = Asn1BigInteger.toAsn1(referenceNum); + } + + public void setIssuerName(String issuerName) { + + this.issuerName = issuerName; + } + + public void setProductOwnerNum(Long productOwnerNum) { + + this.productOwnerNum = productOwnerNum; + } + + public void setProductOwnerIA5(String productOwnerIA5) { + + this.productOwnerIA5 = productOwnerIA5; + } + + public void setTicketType(TicketType ticketType) { + + this.ticketType = ticketType; + } + + public void setLinkMode(LinkMode linkMode) { + + this.linkMode = linkMode; + } + + public String getIssuerPNR() { + return issuerPNR; + } + + public void setIssuerPNR(String issuerPNR) { + this.issuerPNR = issuerPNR; + } + + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TicketType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TicketType.java new file mode 100644 index 0000000..3787266 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TicketType.java @@ -0,0 +1,41 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; + +@HasExtensionMarker +public enum TicketType { + openTicket("openTicket"), + pass("pass"), + reservation("reservation"), + carCarriageReservation("carCarriageReservation"); + + public String text; + + TicketType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TimeRangeType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TimeRangeType.java new file mode 100644 index 0000000..0c8bb90 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TimeRangeType.java @@ -0,0 +1,59 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.Sequence; + +@Sequence +public class TimeRangeType extends Object { + public TimeRangeType() { + } + + @FieldOrder(order = 0) + @IntRange(minValue=0,maxValue=1439) + public Long fromTime; + + @FieldOrder(order = 1) + @IntRange(minValue=0,maxValue=1439) + public Long untilTime; + + public Long getFromTime() { + + return this.fromTime; + } + + public Long getUntilTime() { + + return this.untilTime; + } + + public void setFromTime(Long fromTime) { + + this.fromTime = fromTime; + } + + public void setUntilTime(Long untilTime) { + + this.untilTime = untilTime; + } + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TokenType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TokenType.java new file mode 100644 index 0000000..d8ac20c --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TokenType.java @@ -0,0 +1,92 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.asn1.datatypesimpl.OctetString; + +@Sequence +public class TokenType extends Object { + public TokenType() { + } + + @FieldOrder(order = 0) + @Asn1Optional public Long tokenProviderNum; + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String tokenProviderIA5; + + @FieldOrder(order = 2) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String tokenSpecification; + + @FieldOrder(order = 4) + public OctetString token; + + public Long getTokenProviderNum() { + + return this.tokenProviderNum; + } + + public String getTokenProviderIA5() { + + return this.tokenProviderIA5; + } + + public String getTokenSpecification() { + + return this.tokenSpecification; + } + + public byte[] getToken() { + + return token.toByteArray(); + + } + + public void setTokenProviderNum(Long tokenProviderNum) { + + this.tokenProviderNum = tokenProviderNum; + } + + public void setTokenProviderIA5(String tokenProviderIA5) { + + this.tokenProviderIA5 = tokenProviderIA5; + } + + public void setTokenSpecification(String tokenSpecification) { + + this.tokenSpecification = tokenSpecification; + } + + public void setToken(byte[] token) { + + this.token = new OctetString(token); + + } + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TrainLinkType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TrainLinkType.java new file mode 100644 index 0000000..f269497 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TrainLinkType.java @@ -0,0 +1,185 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Date; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.ticket.api.utils.DateTimeUtils; + +@Sequence +public class TrainLinkType extends Object { + public TrainLinkType() { + } + + @FieldOrder(order = 0) + @Asn1Optional public Asn1BigInteger trainNum; + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String trainIA5; + + @FieldOrder(order = 2) + @IntRange(minValue=0,maxValue=370) + @Asn1Optional public Long travelDate; + + @FieldOrder(order = 3) + @IntRange(minValue=0,maxValue=1440) + @Asn1Optional public Long departureTime; + + @FieldOrder(order = 4) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long departureUTCOffset; + + @FieldOrder(order = 5) + @IntRange(minValue=1,maxValue=9999999) + @Asn1Optional public Long fromStationNum; + + @FieldOrder(order = 6) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String fromStationIA5; + + @FieldOrder(order = 7) + @IntRange(minValue=1,maxValue=9999999) + @Asn1Optional public Long toStationNum; + + @FieldOrder(order = 8) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String toStationIA5; + + @FieldOrder(order = 9) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String fromStationName; + + @FieldOrder(order = 10) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String toStationName; + + public Long getTrainNum() { + return Asn1BigInteger.toLong(this.trainNum); + } + + public String getTrainIA5() { + return this.trainIA5; + } + + public Long getTravelDate() { + return this.travelDate; + } + + public Long getDepartureTime() { + return this.departureTime; + } + + public Long getFromStationNum() { + return this.fromStationNum; + } + + public String getFromStationIA5() { + return this.fromStationIA5; + } + + public Long getToStationNum() { + return this.toStationNum; + } + + public String getToStationIA5() { + return this.toStationIA5; + } + + public String getFromStationName() { + return this.fromStationName; + } + + public String getToStationName() { + return this.toStationName; + } + + public void setTrainNum(Long trainNum) { + this.trainNum = Asn1BigInteger.toAsn1(trainNum); + } + + public void setTrainIA5(String trainIA5) { + this.trainIA5 = trainIA5; + } + + public void setTravelDate(Long travelDate) { + this.travelDate = travelDate; + } + + public void setDepartureTime(Long departureTime) { + this.departureTime = departureTime; + } + + public void setFromStationNum(Long fromStationNum) { + this.fromStationNum = fromStationNum; + } + + public void setFromStationIA5(String fromStationIA5) { + this.fromStationIA5 = fromStationIA5; + } + + public void setToStationNum(Long toStationNum) { + this.toStationNum = toStationNum; + } + + public void setToStationIA5(String toStationIA5) { + this.toStationIA5 = toStationIA5; + } + + public void setFromStationName(String fromStationName) { + this.fromStationName = fromStationName; + } + + public void setToStationName(String toStationName) { + this.toStationName = toStationName; + } + + public void setDepartureDate(Date departure, Date issuingDate){ + + if (issuingDate == null || departure == null) return; + + this.travelDate = DateTimeUtils.getDateDifference(issuingDate,departure); + this.departureTime = DateTimeUtils.getTime(departure); + } + + public void setDepartureTimeZone(Date dateLocal, Date dateUTC ) { + // -- (UTC = local + offset * 15 Minutes) + this.departureUTCOffset = new Long(dateLocal.getTime() - dateUTC.getTime()) / (1000 * 60 * 15); + } + + public Date getDepartureDate(Date issuingDate){ + return DateTimeUtils.getDate(issuingDate, this.travelDate, this.departureTime); + } + + public Date getUTCDepartureDate(Date issuingDate){ + return DateTimeUtils.getUTCDate(issuingDate, this.travelDate, this.departureTime, this.departureUTCOffset); + } + + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TravelClassType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TravelClassType.java new file mode 100644 index 0000000..01aa09f --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TravelClassType.java @@ -0,0 +1,50 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; + +@HasExtensionMarker +public enum TravelClassType { + notApplicabel("notApplicabel"), + first("first"), + second("second"), + tourist("tourist"), + comfort("comfort"), + premium("premium"), + business("business"), + all("all"), + premiumFirst("premiumFirst"), + standardFirst("standardFirst"), + premiumSecond("premiumSecond"), + standardSecond("standardSecond"); + + + public String text; + + TravelClassType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TravelerData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TravelerData.java new file mode 100644 index 0000000..53d6019 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TravelerData.java @@ -0,0 +1,82 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.FixedSize; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; + +@Sequence +@HasExtensionMarker +public class TravelerData extends Object { + public TravelerData() { + } + @FieldOrder(order = 0) + @Asn1Optional public SequenceOfTravelerType traveler; + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.IA5String) + @FixedSize(2) + @Asn1Optional public String preferedLanguage; + + @FieldOrder(order = 2) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String groupName; + + + public List getTraveler() { + + return this.traveler; + } + + public String getPreferedLanguage() { + + return this.preferedLanguage; + } + + public String getGroupName() { + + return this.groupName; + } + + public void setTraveler(SequenceOfTravelerType traveler) { + + this.traveler = traveler; + } + + public void setPreferedLanguage(String preferedLanguage) { + + this.preferedLanguage = preferedLanguage; + } + + public void setGroupName(String groupName) { + + this.groupName = groupName; + } + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TravelerType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TravelerType.java new file mode 100644 index 0000000..b0efae0 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/TravelerType.java @@ -0,0 +1,322 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Calendar; +import java.util.Date; +import java.util.TimeZone; + +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.asn1.datatypes.SizeRange; + +@Sequence +@HasExtensionMarker +public class TravelerType extends Object { + public TravelerType() { + } + + @FieldOrder(order = 0) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String firstName; + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String secondName; + + @FieldOrder(order = 2) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String lastName; + + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String idCard; + + @FieldOrder(order = 4) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String passportId; + + @FieldOrder(order = 5) + @SizeRange(minValue = 1, maxValue = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String title; + + @FieldOrder(order = 6) + @Asn1Optional public GenderType gender; + + @FieldOrder(order = 7) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String customerIdIA5; + + @FieldOrder(order = 8) + @Asn1Optional public Long customerIdNum; + + @FieldOrder(order = 9) + @IntRange(minValue=1901,maxValue=2155) + @Asn1Optional public Long yearOfBirth; + + @FieldOrder(order = 10) + @IntRange(minValue=0,maxValue=366) + @Asn1Optional public Long dayOfBirth; + + @FieldOrder(order = 11) + public Boolean ticketHolder = true; + + @FieldOrder(order = 12) + @Asn1Optional public PassengerType passengerType; + + @FieldOrder(order = 13) + @Asn1Optional public Boolean passengerWithReducedMobility; + + @FieldOrder(order = 14) + @IntRange(minValue=1,maxValue=999) + @Asn1Optional public Long countryOfResidence; + + @FieldOrder(order = 15) + @IntRange(minValue=1,maxValue=999) + @Asn1Optional public Long countryOfPassport; + + @FieldOrder(order = 16) + @IntRange(minValue=1,maxValue=999) + @Asn1Optional public Long countryOfIdCard; + + @FieldOrder(order = 17) + @Asn1Optional public SequenceOfCustomerStatusType status; + + + + public String getFirstName() { + + return this.firstName; + } + + public String getSecondName() { + + return this.secondName; + } + + public String getLastName() { + + return this.lastName; + } + + public String getIdCard() { + + return this.idCard; + } + + public String getPassportId() { + + return this.passportId; + } + + public String getTitle() { + + return this.title; + } + + public GenderType getGender() { + + return this.gender; + } + + public String getCustomerIdIA5() { + + return this.customerIdIA5; + } + + public Long getCustomerIdNum() { + + return this.customerIdNum; + } + + public Long getYearOfBirth() { + + return this.yearOfBirth; + } + + public Long getDayOfBirth() { + + return this.dayOfBirth; + } + + public Boolean getTicketHolder() { + + return this.ticketHolder; + } + + public PassengerType getPassengerType() { + + return this.passengerType; + } + + public Boolean getPassengerWithReducedMobility() { + return this.passengerWithReducedMobility; + } + + public Long getCountryOfResidence() { + + return this.countryOfResidence; + } + + public Long getCountryOfPassport() { + + return this.countryOfPassport; + } + + public Long getCountryOfIdCard() { + + return this.countryOfIdCard; + } + + public SequenceOfCustomerStatusType getStatus() { + + return this.status; + } + + public void setFirstName(String firstName) { + + this.firstName = firstName; + } + + public void setSecondName(String secondName) { + + this.secondName = secondName; + } + + public void setLastName(String lastName) { + + this.lastName = lastName; + } + + public void setIdCard(String idCard) { + + this.idCard = idCard; + } + + public void setPassportId(String passportId) { + + this.passportId = passportId; + } + + public void setTitle(String title) { + + this.title = title; + } + + public void setGender(GenderType gender) { + + this.gender = gender; + } + + public void setCustomerIdIA5(String customerIdIA5) { + + this.customerIdIA5 = customerIdIA5; + } + + public void setCustomerIdNum(Long customerIdNum) { + + this.customerIdNum = customerIdNum; + } + + public void setYearOfBirth(Long yearOfBirth) { + + this.yearOfBirth = yearOfBirth; + } + + public void setDayOfBirth(Long dayOfBirth) { + + this.dayOfBirth = dayOfBirth; + } + + public void setTicketHolder(Boolean ticketHolder) { + + this.ticketHolder = ticketHolder; + } + + public void setPassengerType(PassengerType passengerType) { + + this.passengerType = passengerType; + } + + public void setPassengerWithReducedMobility(Boolean passengerWithReducedMobility) { + + this.passengerWithReducedMobility = passengerWithReducedMobility; + } + + public void setCountryOfResidence(Long countryOfResidence) { + + this.countryOfResidence = countryOfResidence; + } + + public void setCountryOfPassport(Long countryOfPassport) { + + this.countryOfPassport = countryOfPassport; + } + + public void setCountryOfIdCard(Long countryOfIdCard) { + + this.countryOfIdCard = countryOfIdCard; + } + + public void setStatus(SequenceOfCustomerStatusType status) { + + this.status = status; + } + + + + public void setDateOfBirth(Date date){ + + if (date == null) return; + + Calendar cal = Calendar.getInstance(); + cal.setTime(date); + + this.yearOfBirth = new Long( cal.get(Calendar.YEAR)); + this.dayOfBirth = new Long (cal.get(Calendar.DAY_OF_YEAR)); + + + } + + public Date getDateOfBirth() { + + if (this.yearOfBirth == null) return null; + if (this.dayOfBirth == null) return null; + + Calendar cal = Calendar.getInstance(); + cal.clear(); + cal.setTimeZone(TimeZone.getTimeZone("UTC")); + cal.set(Calendar.YEAR, this.yearOfBirth.intValue()); + cal.set(Calendar.DAY_OF_YEAR, this.dayOfBirth.intValue()); + cal.set(Calendar.HOUR_OF_DAY,0); + cal.set(Calendar.MINUTE,0); + + return cal.getTime(); + } + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/UicRailTicketData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/UicRailTicketData.java new file mode 100644 index 0000000..31fddba --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/UicRailTicketData.java @@ -0,0 +1,115 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.List; + +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.asn1.uper.UperEncoder; + +@Sequence +@HasExtensionMarker +public class UicRailTicketData extends Object { + public UicRailTicketData() { + } + + @FieldOrder(order = 0) + public IssuingData issuingDetail; + + @FieldOrder(order = 1) + @Asn1Optional public TravelerData travelerDetail; + + @FieldOrder(order = 2) + @Asn1Optional public SequenceOfDocumentData transportDocument; + + @FieldOrder(order = 3) + @Asn1Optional public ControlData controlDetail; + + @FieldOrder(order = 4) + @Asn1Optional public SequenceOfExtensionData extension; + + public IssuingData getIssuingDetail() { + + return this.issuingDetail; + } + + public TravelerData getTravelerDetail() { + + return this.travelerDetail; + } + + public List getTransportDocument() { + + return this.transportDocument; + } + + public ControlData getControlDetail() { + + return this.controlDetail; + } + + public List getExtension() { + + return this.extension; + } + + public void setIssuingDetail(IssuingData issuingDetail) { + + this.issuingDetail = issuingDetail; + } + + public void setTravelerDetail(TravelerData travelerDetail) { + + this.travelerDetail = travelerDetail; + } + + public void setTransportDocument(SequenceOfDocumentData transportDocument) { + + this.transportDocument = transportDocument; + } + + public void setControlDetail(ControlData controlDetail) { + + this.controlDetail = controlDetail; + } + + public void setExtension(SequenceOfExtensionData extension) { + + this.extension = extension; + } + + + public byte[] encode(){ + return UperEncoder.encode(this); + } + + public String encodeToHex(){ + return UperEncoder.hexStringFromBytes(UperEncoder.encode(this)); + } + + + public static UicRailTicketData decode(byte[] bytes) { + return UperEncoder.decode(bytes, UicRailTicketData.class); + } + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ValidityPeriodDetailType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ValidityPeriodDetailType.java new file mode 100644 index 0000000..dd9935b --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ValidityPeriodDetailType.java @@ -0,0 +1,73 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Collection; + +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.Sequence; + +@Sequence +public class ValidityPeriodDetailType extends Object { + public ValidityPeriodDetailType() { + } + + @FieldOrder(order = 0) + @Asn1Optional public SequenceOfValidityPeriodType validityPeriod; + + @FieldOrder(order = 1) + @Asn1Optional public SequenceOfTimeRangeType excludedTimeRange; + + + public class SequenceOfTimeRangeType extends Asn1SequenceOf { + public SequenceOfTimeRangeType() { super(); } + public SequenceOfTimeRangeType(Collection coll) { super(coll); } + } + + + public class SequenceOfValidityPeriodType extends Asn1SequenceOf { + public SequenceOfValidityPeriodType() { super(); } + public SequenceOfValidityPeriodType(Collection coll) { super(coll); } + } + + public SequenceOfValidityPeriodType getValidityPeriod() { + + return this.validityPeriod; + } + + public SequenceOfTimeRangeType getExcludedTimeRange() { + + return this.excludedTimeRange; + } + + public void setValidityPeriod(SequenceOfValidityPeriodType validityPeriod) { + + this.validityPeriod = validityPeriod; + } + + public void setExcludedTimeRange(SequenceOfTimeRangeType excludedTimeRange) { + + this.excludedTimeRange = excludedTimeRange; + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ValidityPeriodType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ValidityPeriodType.java new file mode 100644 index 0000000..7b08f73 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ValidityPeriodType.java @@ -0,0 +1,165 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Date; + +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.ticket.api.utils.DateTimeUtils; + +@Sequence +public class ValidityPeriodType extends Object { + public ValidityPeriodType() { + } + + @FieldOrder(order = 0) + @IntRange(minValue=0,maxValue=700) + @Asn1Default(value="0") + @Asn1Optional public Long validFromDay; + + @FieldOrder(order = 1) + @IntRange(minValue=0,maxValue=1439) + @Asn1Optional public Long validFromTime; + + @FieldOrder(order = 2) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long validFromUTCOffset; + + @FieldOrder(order = 3) + @IntRange(minValue=0,maxValue=370) + @Asn1Default(value="0") + @Asn1Optional public Long validUntilDay; + + @FieldOrder(order = 4) + @IntRange(minValue=0,maxValue=1439) + @Asn1Optional public Long validUntilTime; + + @FieldOrder(order = 5) + @IntRange(minValue=-60, maxValue=60) + @Asn1Optional public Long validUntilUTCOffset; + + public Long getValidFromDay() { + + if (validFromDay == null) { + return new Long(0); + } + + return this.validFromDay; + } + + public Long getValidFromTime() { + + return this.validFromTime; + } + + public Long getValidUntilDay() { + + if (validUntilDay == null) { + return new Long(0); + } + + return this.validUntilDay; + } + + public Long getValidUntilTime() { + + return this.validUntilTime; + } + + public void setValidFromDay(Long validFromDay) { + + this.validFromDay = validFromDay; + } + + public void setValidFromTime(Long validFromTime) { + + this.validFromTime = validFromTime; + } + + public void setValidUntilDay(Long validUntilDay) { + + this.validUntilDay = validUntilDay; + } + + public void setValidUntilTime(Long validUntilTime) { + + this.validUntilTime = validUntilTime; + } + + public void setValidityDates (Date fromDate, Date untilDate, Date issuingDate){ + + if (issuingDate == null || fromDate == null) return; + + this.validFromDay = DateTimeUtils.getDateDifference(issuingDate,fromDate); + this.validFromTime = DateTimeUtils.getTime(fromDate); + + if (untilDate != null){ + this.validUntilDay = DateTimeUtils.getDateDifference(fromDate, untilDate); + this.validUntilTime = DateTimeUtils.getTime(untilDate); + } + + } + + public Date getValidFromDate(Date issuingDate){ + + return DateTimeUtils.getDate(issuingDate, this.validFromDay, this.validFromTime); + + } + + public Date getValidUntilDate(Date issuingDate){ + + if (issuingDate == null) return null; + + if (this.validFromDay == null) { + this.validFromDay = 0L; + } + + if (this.validUntilDay == null) { + return null; + } + + + return DateTimeUtils.getDate(issuingDate, this.validFromDay + this.validUntilDay, this.validUntilTime); + + } + + public Long getValidFromUTCOffset() { + return validFromUTCOffset; + } + + public void setValidFromUTCOffset(Long validFromUTCOffset) { + this.validFromUTCOffset = validFromUTCOffset; + } + + public Long getValidUntilUTCOffset() { + return validUntilUTCOffset; + } + + public void setValidUntilUTCOffset(Long validUntilUTCOffset) { + this.validUntilUTCOffset = validUntilUTCOffset; + } + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/VatDetailType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/VatDetailType.java new file mode 100644 index 0000000..adfb4e8 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/VatDetailType.java @@ -0,0 +1,87 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; + + +@Sequence +public class VatDetailType extends Object { + public VatDetailType() { + } + + @FieldOrder(order = 0) + @IntRange(minValue = 1, maxValue = 999) + public Long country; + + @FieldOrder(order = 1) + @IntRange(minValue = 0, maxValue = 999) + public Long percentage; + + @FieldOrder(order = 2) + @Asn1Optional public Asn1BigInteger amount; + + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String vatId; + + public Long getCountry() { + return country; + } + + public void setCountry(Long country) { + this.country = country; + } + + public Long getPercentage() { + return percentage; + } + + public void setPercentage(Long percentage) { + this.percentage = percentage; + } + + public Long getAmount() { + return Asn1BigInteger.toLong(amount); + } + + public void setAmount(Long amount) { + this.amount = Asn1BigInteger.toAsn1(amount); + } + + public String getVatId() { + return vatId; + } + + public void setVatId(String vatId) { + this.vatId = vatId; + } + + + + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ViaStationType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ViaStationType.java new file mode 100644 index 0000000..0e2ca6c --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ViaStationType.java @@ -0,0 +1,181 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.asn1.datatypesimpl.SequenceOfStringIA5; + +@Sequence +@HasExtensionMarker +public class ViaStationType extends Object { + public ViaStationType() { + } + + @FieldOrder(order = 0) + @Asn1Default("stationUIC") + @Asn1Optional public CodeTableType stationCodeTable; + + @FieldOrder(order = 1) + @IntRange(minValue=1,maxValue=9999999) + @Asn1Optional public Long stationNum; + + @FieldOrder(order = 2) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String stationIA5; + + @FieldOrder(order = 3) + @Asn1Optional public SequenceOfViaStationType alternativeRoutes; + + @FieldOrder(order = 4) + @Asn1Optional public SequenceOfViaStationType route; + + @FieldOrder(order = 5) + @Asn1Optional public Boolean border = false; + + @FieldOrder(order = 6) + @Asn1Optional public SequenceOfCarrierNum carriersNum; + + @FieldOrder(order = 7) + @Asn1Optional public SequenceOfStringIA5 carriersIA5; + + @FieldOrder(order = 8) + @Asn1Optional public Asn1BigInteger seriesId; + + @FieldOrder(order = 9) + @Asn1Optional public Asn1BigInteger routeId; + + + + + + public CodeTableType getStationCodeTable() { + + if (stationCodeTable == null) { + return CodeTableType.stationUIC; + } + + return this.stationCodeTable; + } + + public Long getStationNum() { + + return this.stationNum; + } + + public String getStationIA5() { + + return this.stationIA5; + } + + public SequenceOfViaStationType getAlternativeRoutes() { + + return this.alternativeRoutes; + } + + public SequenceOfViaStationType getRoute() { + + return this.route; + } + + public Boolean getBorder() { + + return this.border; + } + + public SequenceOfCarrierNum getCarriersNum() { + + return this.carriersNum; + } + + public SequenceOfStringIA5 getCarriersIA5() { + + return this.carriersIA5; + } + + public Long getSeriesId() { + + return Asn1BigInteger.toLong(this.seriesId); + } + + public Long getRouteId() { + + return Asn1BigInteger.toLong(this.routeId); + } + + public void setStationCodeTable(CodeTableType stationCodeTable) { + + this.stationCodeTable = stationCodeTable; + } + + public void setStationNum(Long stationNum) { + + this.stationNum = stationNum; + } + + public void setStationIA5(String stationIA5) { + + this.stationIA5 = stationIA5; + } + + public void setAlternativeRoutes(SequenceOfViaStationType alternativeRoutes) { + + this.alternativeRoutes = alternativeRoutes; + } + + public void setRoute(SequenceOfViaStationType route) { + + this.route = route; + } + + public void setBorder(Boolean border) { + + this.border = border; + } + + public void setCarriersNum(SequenceOfCarrierNum carriersNum) { + + this.carriersNum = carriersNum; + } + + public void setCarriersIA5(SequenceOfStringIA5 carriersIA5) { + + this.carriersIA5 = carriersIA5; + } + + public void setSeriesId(Long seriesId) { + + this.seriesId = Asn1BigInteger.toAsn1(seriesId); + } + + public void setRouteId(Long routeId) { + + this.routeId = Asn1BigInteger.toAsn1(routeId); + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/VoucherData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/VoucherData.java new file mode 100644 index 0000000..1395976 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/VoucherData.java @@ -0,0 +1,316 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import java.util.Calendar; +import java.util.Date; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; + + +@Sequence +@HasExtensionMarker +public class VoucherData extends Object { + public VoucherData() { + } + + @FieldOrder(order = 0) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String referenceIA5; + + @FieldOrder(order = 1) + @Asn1Optional public Asn1BigInteger referenceNum; + + @FieldOrder(order = 2) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long productOwnerNum; + + @FieldOrder(order = 3) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productOwnerIA5; + + @FieldOrder(order = 4) + @IntRange(minValue=0,maxValue=65535) + @Asn1Optional public Long productIdNum; + + @FieldOrder(order = 5) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String productIdIA5; + + @FieldOrder(order = 6) + @IntRange(minValue=2016,maxValue=2269) + public Long validFromYear; + + @FieldOrder(order = 7) + @IntRange(minValue=0,maxValue=370) + public Long validFromDay; + + @FieldOrder(order = 8) + @IntRange(minValue=2016,maxValue=2269) + public Long validUntilYear; + + @FieldOrder(order = 9) + @IntRange(minValue=0,maxValue=370) + public Long validUntilDay; + + @FieldOrder(order = 10) + @Asn1Optional public Long value; + + @FieldOrder(order = 11) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long type; + + @FieldOrder(order = 12) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional public String infoText; + + @FieldOrder(order = 13) + @Asn1Optional public ExtensionData extension; + + + public String getReferenceIA5() { + + return this.referenceIA5; + } + + public Asn1BigInteger getReferenceNum() { + + return this.referenceNum; + } + + public Long getProductOwnerNum() { + + return this.productOwnerNum; + } + + public String getProductOwnerIA5() { + + return this.productOwnerIA5; + } + + public Long getProductIdNum() { + + return this.productIdNum; + } + + public String getProductIdIA5() { + + return this.productIdIA5; + } + + public Long getValidFromYear() { + + return this.validFromYear; + } + + public Long getValidFromDay() { + + return this.validFromDay; + } + + public Long getValidUntilYear() { + + return this.validUntilYear; + } + + public Long getValidUntilDay() { + + return this.validUntilDay; + } + + public Long getValue() { + + return this.value; + } + + public Long getType() { + + return this.type; + } + + public String getInfoText() { + + return this.infoText; + } + + public ExtensionData getExtension() { + + return this.extension; + } + + public void setReferenceIA5(String referenceIA5) { + + this.referenceIA5 = referenceIA5; + } + + public void setReferenceNum(Asn1BigInteger referenceNum) { + + this.referenceNum = referenceNum; + } + + public void setProductOwnerNum(Long productOwnerNum) { + + this.productOwnerNum = productOwnerNum; + } + + public void setProductOwnerIA5(String productOwnerIA5) { + + this.productOwnerIA5 = productOwnerIA5; + } + + public void setProductIdNum(Long productIdNum) { + + this.productIdNum = productIdNum; + } + + public void setProductIdIA5(String productIdIA5) { + + this.productIdIA5 = productIdIA5; + } + + public void setValidFromYear(Long validFromYear) { + + this.validFromYear = validFromYear; + } + + public void setValidFromDay(Long validFromDay) { + + this.validFromDay = validFromDay; + } + + public void setValidUntilYear(Long validUntilYear) { + + this.validUntilYear = validUntilYear; + } + + public void setValidUntilDay(Long validUntilDay) { + + this.validUntilDay = validUntilDay; + } + + public void setValue(Long value) { + + this.value = value; + } + + public void setType(Long type) { + + this.type = type; + } + + public void setInfoText(String infoText) { + + this.infoText = infoText; + } + + public void setExtension(ExtensionData extension) { + + this.extension = extension; + } + + + public void setValidity (Date fromDate , Date untilDate){ + + Calendar fromCal = Calendar.getInstance(); + fromCal.clear(); + fromCal.setTime(fromDate); + + this.validFromYear = new Long( fromCal.get(Calendar.YEAR)); + this.validFromDay = new Long (fromCal.get(Calendar.DAY_OF_YEAR)); + + if (untilDate == null) return; + + Calendar untilCal = Calendar.getInstance(); + untilCal.clear(); + untilCal.setTime(untilDate); + + this.validUntilYear = new Long( untilCal.get(Calendar.YEAR)); + this.validUntilDay = new Long (untilCal.get(Calendar.DAY_OF_YEAR)); + + } + + + public void setValidFrom (Date fromDate){ + + if (fromDate == null) return; + + Calendar fromCal = Calendar.getInstance(); + fromCal.clear(); + fromCal.setTime(fromDate); + + this.validFromYear = new Long( fromCal.get(Calendar.YEAR)); + this.validFromDay = new Long (fromCal.get(Calendar.DAY_OF_YEAR)); + + } + + public void setValidUntil (Date untilDate){ + + if (untilDate == null) return; + + Calendar untilCal = Calendar.getInstance(); + untilCal.clear(); + untilCal.setTime(untilDate); + + this.validUntilYear = new Long( untilCal.get(Calendar.YEAR)); + this.validUntilDay = new Long (untilCal.get(Calendar.DAY_OF_YEAR)); + + } + + public Date getValidFrom(){ + + if (this.validFromYear == null || this.validFromYear == 0) return null; + + Calendar cal = Calendar.getInstance(); + cal.clear(); + //cal.setTimeZone(TimeZone.getTimeZone("UTC")); + cal.set(Calendar.YEAR, this.validFromYear.intValue()); + cal.set(Calendar.DAY_OF_YEAR, this.validFromDay.intValue()); + cal.set(Calendar.MINUTE,0); + cal.set(Calendar.HOUR_OF_DAY,0); + + return cal.getTime(); + + } + + public Date getValidUntil(){ + + if (this.validUntilYear == null || this.validUntilYear == 0) return null; + + Calendar cal = Calendar.getInstance(); + cal.clear(); + //cal.setTimeZone(TimeZone.getTimeZone("UTC")); + cal.set(Calendar.YEAR, this.validUntilYear.intValue()); + cal.set(Calendar.DAY_OF_YEAR, this.validUntilDay.intValue()); + cal.set(Calendar.MINUTE,59); + cal.set(Calendar.HOUR_OF_DAY,23); + + return cal.getTime(); + + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ZoneType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ZoneType.java new file mode 100644 index 0000000..3f269ee --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ZoneType.java @@ -0,0 +1,182 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.asn.omv2; + +import org.uic.barcode.asn1.datatypes.Asn1BigInteger; +import org.uic.barcode.asn1.datatypes.Asn1Default; +import org.uic.barcode.asn1.datatypes.Asn1Optional; +import org.uic.barcode.asn1.datatypes.CharacterRestriction; +import org.uic.barcode.asn1.datatypes.FieldOrder; +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; +import org.uic.barcode.asn1.datatypes.IntRange; +import org.uic.barcode.asn1.datatypes.RestrictedString; +import org.uic.barcode.asn1.datatypes.Sequence; +import org.uic.barcode.asn1.datatypesimpl.OctetString; +import org.uic.barcode.asn1.datatypesimpl.SequenceOfUnrestrictedLong; + +@Sequence +@HasExtensionMarker + +public class ZoneType extends Object { + public ZoneType() { + } + + @FieldOrder(order = 0) + @IntRange(minValue=1,maxValue=32000) + @Asn1Optional public Long carrierNum; + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String carrierIA5; + + @FieldOrder(order = 2) + @Asn1Default("stationUIC") + @Asn1Optional public CodeTableType stationCodeTable; + + @FieldOrder(order = 3) + @IntRange(minValue=0,maxValue=9999999) + @Asn1Optional public Long entryStationNum; + + @FieldOrder(order = 4) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String entryStationIA5; + + @FieldOrder(order = 5) + @IntRange(minValue=0,maxValue=9999999) + @Asn1Optional public Long terminatingStationNum; + + @FieldOrder(order = 6) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional public String terminatingStationIA5; + + @FieldOrder(order = 7) + @Asn1Optional public Asn1BigInteger city; + + @FieldOrder(order = 8) + @Asn1Optional public SequenceOfUnrestrictedLong zoneId; + + @FieldOrder(order = 9) + @Asn1Optional public OctetString binaryZoneId; + + @FieldOrder(order = 10) + @Asn1Optional public String nutsCode; + + + public Long getCarrierNum() { + + return this.carrierNum; + } + + public String getCarrierIA5() { + + return this.carrierIA5; + } + + public CodeTableType getStationCodeTable() { + + if (stationCodeTable == null) { + return CodeTableType.stationUIC; + } + + return this.stationCodeTable; + } + + public Long getEntryStationNum() { + return this.entryStationNum; + } + + public String getEntryStationIA5() { + return this.entryStationIA5; + } + + public Long getTerminatingStationNum() { + return this.terminatingStationNum; + } + + public String getTerminatingStationIA5() { + return this.terminatingStationIA5; + } + + public Asn1BigInteger getCity() { + return this.city; + } + + public SequenceOfUnrestrictedLong getZoneId() { + return this.zoneId; + } + + public byte[] getBinaryZoneId() { + + return binaryZoneId.toByteArray(); + + } + + public String getNutsCode() { + return this.nutsCode; + } + + public void setCarrierNum(Long carrierNum) { + this.carrierNum = carrierNum; + } + + public void setCarrierIA5(String carrierIA5) { + this.carrierIA5 = carrierIA5; + } + + public void setStationCodeTable(CodeTableType stationCodeTable) { + this.stationCodeTable = stationCodeTable; + } + + public void setEntryStationNum(Long entryStationNum) { + this.entryStationNum = entryStationNum; + } + + public void setEntryStationIA5(String entryStationIA5) { + this.entryStationIA5 = entryStationIA5; + } + + public void setTerminatingStationNum(Long terminatingStationNum) { + this.terminatingStationNum = terminatingStationNum; + } + + public void setTerminatingStationIA5(String terminatingStationIA5) { + this.terminatingStationIA5 = terminatingStationIA5; + } + + public void setCity(Asn1BigInteger city) { + this.city = city; + } + + public void setZoneId(SequenceOfUnrestrictedLong zoneId) { + this.zoneId = zoneId; + } + + public void setBinaryZoneId(byte[] binaryZoneId) { + + this.binaryZoneId = new OctetString(binaryZoneId); + + } + + public void setNutsCode(String nutsCode) { + this.nutsCode = nutsCode; + } + + +} diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/package.html b/src/main/java/org/uic/barcode/ticket/api/asn/package.html new file mode 100644 index 0000000..307075e --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/package.html @@ -0,0 +1,7 @@ + + +asn + + Provides code generated from the asn.1 specification using the openAsn compiler to implement the asn.1 encoduing and decoding using unaligned PER encoding. + + \ No newline at end of file -- cgit v1.2.3