From 5ef4ad89630e4c51dcd7093e78d71eeda0be727d Mon Sep 17 00:00:00 2001 From: CGantert345 <57003061+CGantert345@users.noreply.github.com> Date: Fri, 3 Jan 2020 10:42:49 +0100 Subject: api spec --- .../uic/ticket/api/EncodingFormatException.java | 26 + src/org/uic/ticket/api/UicRailTicketCoder.java | 171 ++ .../uic/ticket/api/UnsuportedFeatureException.java | 30 + src/org/uic/ticket/api/package.html | 9 + src/org/uic/ticket/api/spec/IBerth.java | 61 + .../ticket/api/spec/ICarCarriageReservation.java | 594 ++++++ src/org/uic/ticket/api/spec/ICardReference.java | 107 + .../uic/ticket/api/spec/ICompartmentDetails.java | 128 ++ src/org/uic/ticket/api/spec/IControlDetail.java | 249 +++ src/org/uic/ticket/api/spec/ICounterMark.java | 400 ++++ src/org/uic/ticket/api/spec/ICustomerCard.java | 172 ++ .../api/spec/ICustomerStatusDescription.java | 79 + .../uic/ticket/api/spec/IDelayConfirmation.java | 269 +++ src/org/uic/ticket/api/spec/IDocumentData.java | 32 + .../uic/ticket/api/spec/IDocumentExtension.java | 14 + src/org/uic/ticket/api/spec/IExtension.java | 58 + src/org/uic/ticket/api/spec/IFipTicket.java | 178 ++ src/org/uic/ticket/api/spec/IGeoCoordinate.java | 136 ++ .../uic/ticket/api/spec/IIncludedOpenTicket.java | 394 ++++ src/org/uic/ticket/api/spec/IIssuingDetail.java | 189 ++ src/org/uic/ticket/api/spec/ILine.java | 115 ++ .../uic/ticket/api/spec/ILuggageRestriction.java | 56 + src/org/uic/ticket/api/spec/IOpenTicket.java | 518 +++++ src/org/uic/ticket/api/spec/IParkingGround.java | 253 +++ src/org/uic/ticket/api/spec/IPass.java | 415 ++++ src/org/uic/ticket/api/spec/IPlaces.java | 80 + src/org/uic/ticket/api/spec/IPolygone.java | 32 + src/org/uic/ticket/api/spec/IRegionalValidity.java | 15 + .../uic/ticket/api/spec/IRegisteredLuggage.java | 56 + src/org/uic/ticket/api/spec/IReservation.java | 522 +++++ .../ticket/api/spec/IReturnRouteDescription.java | 100 + src/org/uic/ticket/api/spec/IRouteSection.java | 84 + .../uic/ticket/api/spec/ISeriesDataDetails.java | 66 + src/org/uic/ticket/api/spec/IServiceBrand.java | 55 + src/org/uic/ticket/api/spec/IStationPassage.java | 241 +++ src/org/uic/ticket/api/spec/ITariff.java | 207 ++ src/org/uic/ticket/api/spec/ITicketLink.java | 99 + src/org/uic/ticket/api/spec/ITimeRange.java | 72 + src/org/uic/ticket/api/spec/IToken.java | 52 + src/org/uic/ticket/api/spec/ITrainLink.java | 122 ++ src/org/uic/ticket/api/spec/ITraveler.java | 253 +++ src/org/uic/ticket/api/spec/ITravelerDetail.java | 61 + src/org/uic/ticket/api/spec/IUicRailTicket.java | 192 ++ .../ticket/api/spec/IUicTicketObjectFactory.java | 51 + src/org/uic/ticket/api/spec/IValidityDetails.java | 45 + src/org/uic/ticket/api/spec/IValidityRange.java | 72 + src/org/uic/ticket/api/spec/IVatDetail.java | 22 + src/org/uic/ticket/api/spec/IViaStation.java | 172 ++ src/org/uic/ticket/api/spec/IVoucher.java | 146 ++ src/org/uic/ticket/api/spec/IZone.java | 144 ++ src/org/uic/ticket/api/spec/package.html | 7 + .../uic/ticket/api/spec/uicBarcodeHeader0.1.asn | 151 ++ .../spec/uicBarcodeV1finalDelayConfirmation.asn | 1789 +++++++++++++++++ .../spec/uicBarcodeV1finalDelayConfirmation1.1.asn | 1976 +++++++++++++++++++ .../spec/uicBarcodeV1finalDelayConfirmation1.2.asn | 1986 +++++++++++++++++++ .../spec/uicBarcodeV1finalDelayConfirmation1.3.asn | 2043 +++++++++++++++++++ .../spec/uicBarcodeV1finalDelayConfirmation2.0.asn | 2047 ++++++++++++++++++++ 57 files changed, 17613 insertions(+) create mode 100644 src/org/uic/ticket/api/EncodingFormatException.java create mode 100644 src/org/uic/ticket/api/UicRailTicketCoder.java create mode 100644 src/org/uic/ticket/api/UnsuportedFeatureException.java create mode 100644 src/org/uic/ticket/api/package.html create mode 100644 src/org/uic/ticket/api/spec/IBerth.java create mode 100644 src/org/uic/ticket/api/spec/ICarCarriageReservation.java create mode 100644 src/org/uic/ticket/api/spec/ICardReference.java create mode 100644 src/org/uic/ticket/api/spec/ICompartmentDetails.java create mode 100644 src/org/uic/ticket/api/spec/IControlDetail.java create mode 100644 src/org/uic/ticket/api/spec/ICounterMark.java create mode 100644 src/org/uic/ticket/api/spec/ICustomerCard.java create mode 100644 src/org/uic/ticket/api/spec/ICustomerStatusDescription.java create mode 100644 src/org/uic/ticket/api/spec/IDelayConfirmation.java create mode 100644 src/org/uic/ticket/api/spec/IDocumentData.java create mode 100644 src/org/uic/ticket/api/spec/IDocumentExtension.java create mode 100644 src/org/uic/ticket/api/spec/IExtension.java create mode 100644 src/org/uic/ticket/api/spec/IFipTicket.java create mode 100644 src/org/uic/ticket/api/spec/IGeoCoordinate.java create mode 100644 src/org/uic/ticket/api/spec/IIncludedOpenTicket.java create mode 100644 src/org/uic/ticket/api/spec/IIssuingDetail.java create mode 100644 src/org/uic/ticket/api/spec/ILine.java create mode 100644 src/org/uic/ticket/api/spec/ILuggageRestriction.java create mode 100644 src/org/uic/ticket/api/spec/IOpenTicket.java create mode 100644 src/org/uic/ticket/api/spec/IParkingGround.java create mode 100644 src/org/uic/ticket/api/spec/IPass.java create mode 100644 src/org/uic/ticket/api/spec/IPlaces.java create mode 100644 src/org/uic/ticket/api/spec/IPolygone.java create mode 100644 src/org/uic/ticket/api/spec/IRegionalValidity.java create mode 100644 src/org/uic/ticket/api/spec/IRegisteredLuggage.java create mode 100644 src/org/uic/ticket/api/spec/IReservation.java create mode 100644 src/org/uic/ticket/api/spec/IReturnRouteDescription.java create mode 100644 src/org/uic/ticket/api/spec/IRouteSection.java create mode 100644 src/org/uic/ticket/api/spec/ISeriesDataDetails.java create mode 100644 src/org/uic/ticket/api/spec/IServiceBrand.java create mode 100644 src/org/uic/ticket/api/spec/IStationPassage.java create mode 100644 src/org/uic/ticket/api/spec/ITariff.java create mode 100644 src/org/uic/ticket/api/spec/ITicketLink.java create mode 100644 src/org/uic/ticket/api/spec/ITimeRange.java create mode 100644 src/org/uic/ticket/api/spec/IToken.java create mode 100644 src/org/uic/ticket/api/spec/ITrainLink.java create mode 100644 src/org/uic/ticket/api/spec/ITraveler.java create mode 100644 src/org/uic/ticket/api/spec/ITravelerDetail.java create mode 100644 src/org/uic/ticket/api/spec/IUicRailTicket.java create mode 100644 src/org/uic/ticket/api/spec/IUicTicketObjectFactory.java create mode 100644 src/org/uic/ticket/api/spec/IValidityDetails.java create mode 100644 src/org/uic/ticket/api/spec/IValidityRange.java create mode 100644 src/org/uic/ticket/api/spec/IVatDetail.java create mode 100644 src/org/uic/ticket/api/spec/IViaStation.java create mode 100644 src/org/uic/ticket/api/spec/IVoucher.java create mode 100644 src/org/uic/ticket/api/spec/IZone.java create mode 100644 src/org/uic/ticket/api/spec/package.html create mode 100644 src/org/uic/ticket/api/spec/uicBarcodeHeader0.1.asn create mode 100644 src/org/uic/ticket/api/spec/uicBarcodeV1finalDelayConfirmation.asn create mode 100644 src/org/uic/ticket/api/spec/uicBarcodeV1finalDelayConfirmation1.1.asn create mode 100644 src/org/uic/ticket/api/spec/uicBarcodeV1finalDelayConfirmation1.2.asn create mode 100644 src/org/uic/ticket/api/spec/uicBarcodeV1finalDelayConfirmation1.3.asn create mode 100644 src/org/uic/ticket/api/spec/uicBarcodeV1finalDelayConfirmation2.0.asn (limited to 'src/org/uic') diff --git a/src/org/uic/ticket/api/EncodingFormatException.java b/src/org/uic/ticket/api/EncodingFormatException.java new file mode 100644 index 0000000..2d80598 --- /dev/null +++ b/src/org/uic/ticket/api/EncodingFormatException.java @@ -0,0 +1,26 @@ +/* + * + */ +package org.uic.ticket.api; + + +/** + * The Class EncodingFormatException. + */ +public class EncodingFormatException extends Exception { + + /** + * + */ + private static final long serialVersionUID = -6949233719793346110L; + + /** + * Instantiates a new encoding format exception. The exception indicates a violation of the asn.1 ticket format specification + * + * @param message the message + */ + public EncodingFormatException(String message) { + super(message); + } + +} diff --git a/src/org/uic/ticket/api/UicRailTicketCoder.java b/src/org/uic/ticket/api/UicRailTicketCoder.java new file mode 100644 index 0000000..0221526 --- /dev/null +++ b/src/org/uic/ticket/api/UicRailTicketCoder.java @@ -0,0 +1,171 @@ +/* + * + */ +package org.uic.ticket.api; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; + +import org.uic.ticket.api.asn.omv1.UicRailTicketData; +import org.uic.ticket.api.spec.IUicRailTicket; +import org.uic.ticket.api.utils.Api2OpenAsnEncoder; +import org.uic.ticket.api.utils.OpenAsn2ApiDecoder; + + +/** + * The Class UicRailTicketCoder. + */ +public class UicRailTicketCoder { + + + /** + * encode an UicRailTicket to asn.1 format using PER unaligned encoding + * + * @param outputStream the output stream for the encoded data + * @param uicRailTicket the uic rail ticket to be encoded + * @param version version of the asn1 specification + * @throws IOException signals that an I/O exception has occurred. + * @throws EncodingFormatException signals that a format rule of the asn.1 specification was violated. + */ + public byte[] encodeTag(IUicRailTicket uicRailTicket, int version) throws IOException, EncodingFormatException { + + + byte[] content = encode(uicRailTicket, version); + + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + + String idTag = "U_FLEX"; + String versionId = "01"; + int length = 8; + + //size of data + length = length + content.length; + + //size of length element + length = length + 4; + String lengthElement = String.format("%04d",length); + + outputStream.write(idTag.getBytes()); + outputStream.write(versionId.getBytes()); + outputStream.write(lengthElement.getBytes()); + + outputStream.write(content); + + return outputStream.toByteArray(); + +} + + + + + /** + * encode an UicRailTicket to asn.1 format using PER unaligned encoding + * + * @param outputStream the output stream for the encoded data + * @param uicRailTicket the uic rail ticket to be encoded + * @param version of the asn1 specification + * @throws IOException signals that an I/O exception has occurred. + * @throws EncodingFormatException signals that a format rule of the asn.1 specification was violated. + */ + public byte[] encode (IUicRailTicket uicRailTicket, int version) throws IOException, EncodingFormatException{ + + if (version != 1) { + throw new EncodingFormatException(String.format("Encoding version %d not supported", version)); + } + + Api2OpenAsnEncoder uicEncoder = new Api2OpenAsnEncoder(); + + UicRailTicketData asnUicRailTicketData = uicEncoder.populateToAsn1Model(uicRailTicket); + + return asnUicRailTicketData.encode(); + + } + + + /** + * encode an UicRailTicket to asn.1 format using PER unaligned encoding + * + * @param outputStream the output stream for the encoded data + * @param uicRailTicket the uic rail ticket to be encoded + * @param version of the asn1 specification + * @throws IOException signals that an I/O exception has occurred. + * @throws EncodingFormatException signals that a format rule of the asn.1 specification was violated. + */ + public void encode ( ByteArrayOutputStream outputStream, IUicRailTicket uicRailTicket, int version) throws IOException, EncodingFormatException{ + + if (version != 1) { + throw new EncodingFormatException(String.format("Encoding version %d not supported", version)); + } + + Api2OpenAsnEncoder uicEncoder = new Api2OpenAsnEncoder(); + + UicRailTicketData asnUicRailTicketData = uicEncoder.populateToAsn1Model(uicRailTicket); + + outputStream.write(asnUicRailTicketData.encode()); + + return; + + } + + /** + * Decode a rail ticket from asn.1 unaligned PER encoded data. + * + * @param byteData the asn.1 PER encoded byte data + * @return the decoded uic rail ticket + * @throws IOException signals that an I/O exception has occurred. + * @throws EncodingFormatException + */ + public IUicRailTicket decodeFromAsn (byte[] byteData, int version) throws IOException, EncodingFormatException{ + + if (version != 1) { + throw new EncodingFormatException(String.format("Encoding version %d not supported", version)); + } + + UicRailTicketData asnUicRailTicketData = UicRailTicketData.decode(byteData); + + OpenAsn2ApiDecoder uicDecoder = new OpenAsn2ApiDecoder(); + + IUicRailTicket uicRailTicket = uicDecoder.decodeFromAsn(asnUicRailTicketData); + + return uicRailTicket; + + } + + + /** + * Decode a rail ticket from asn.1 unaligned PER encoded data. + * @param version of the asn1 specification + * @param input stream of the asn.1 PER encoded data + * @return the decoded uic rail ticket + * @throws IOException signals that an I/O exception has occurred. + * @throws EncodingFormatException + */ + public IUicRailTicket decodeFromAsn (InputStream input, int version) throws IOException, EncodingFormatException{ + + if (version != 1) { + throw new EncodingFormatException(String.format("Encoding version %d not supported", version)); + } + + ByteArrayOutputStream buffer = new ByteArrayOutputStream(); + + int nRead; + byte[] data = new byte[16384]; + + while ((nRead = input.read(data, 0, data.length)) != -1) { + buffer.write(data, 0, nRead); + } + + buffer.flush(); + + byte[] byteData = buffer.toByteArray(); + + return decodeFromAsn (byteData, version); + + + } + + + + +} diff --git a/src/org/uic/ticket/api/UnsuportedFeatureException.java b/src/org/uic/ticket/api/UnsuportedFeatureException.java new file mode 100644 index 0000000..ba5abae --- /dev/null +++ b/src/org/uic/ticket/api/UnsuportedFeatureException.java @@ -0,0 +1,30 @@ +/* + * + */ +package org.uic.ticket.api; + +/** + * The Class EncodingFormatException. + */ +public class UnsuportedFeatureException extends Exception { + + /** + * + */ + private static final long serialVersionUID = -3156877999150353704L; + + /** + * + */ + + + /** + * Instantiates a new encoding format exception. The exception indicates a violation of the asn.1 ticket format specification + * + * @param message the message + */ + public UnsuportedFeatureException(String message) { + super(message); + } + +} diff --git a/src/org/uic/ticket/api/package.html b/src/org/uic/ticket/api/package.html new file mode 100644 index 0000000..c7b3611 --- /dev/null +++ b/src/org/uic/ticket/api/package.html @@ -0,0 +1,9 @@ + + +UIC ticket data API + + This API provides a specification of ticket data as an interface and an implementation of an encoder/decoder to encode and decode ticket data to an asn.1 PER encoded byte stream according to the UIC specification. +
+ Any ticket data implementing the interface defined in package spec can be encoded/decoded. The package impl provides a simple implementation of the ticket. + + \ No newline at end of file diff --git a/src/org/uic/ticket/api/spec/IBerth.java b/src/org/uic/ticket/api/spec/IBerth.java new file mode 100644 index 0000000..78a9780 --- /dev/null +++ b/src/org/uic/ticket/api/spec/IBerth.java @@ -0,0 +1,61 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +import org.uic.ticket.api.EncodingFormatException; +import org.uic.ticket.api.asn.omv1.BerthTypeType; +import org.uic.ticket.api.asn.omv1.CompartmentGenderType; + + +/** + * The Interface IBerth to specify the number and type of reserved berths in a reservation. + */ +public interface IBerth { + + /** + * Gets the type of the berth (Single, Special, Double,..). + * -- sleeper compartment types corresponding to UIC leaflet 918.1 + * + * @return the type + */ + public BerthTypeType getType() ; + + /** + * Sets the type of the Berth. + * -- sleeper compartment types corresponding to UIC leaflet 918.1 + * + * @param type the new berth type + */ + public void setType(BerthTypeType type); + + /** + * Gets the number of berths. + * + * @return the number of berths reserved for the specified type of berth. + */ + public int getNumberOfBerths(); + + /** + * Sets the number of berths reserved for the specified type of berth. The largest number allowed is 200. + * + * @param numberOfBerths the new number of berths + * @throws EncodingFormatException + */ + public void setNumberOfBerths(int numberOfBerths); + + /** + * Gets the gender information of the compartment reserved (family, male, female, mixed,..). + * + * @return the gender + */ + public CompartmentGenderType getGender(); + + /** + * Sets the gender information of the compartment reserved (family, male, female, mixed,..). + * + * @param gender the new gender + */ + public void setGender(CompartmentGenderType gender) ; + +} diff --git a/src/org/uic/ticket/api/spec/ICarCarriageReservation.java b/src/org/uic/ticket/api/spec/ICarCarriageReservation.java new file mode 100644 index 0000000..6465e29 --- /dev/null +++ b/src/org/uic/ticket/api/spec/ICarCarriageReservation.java @@ -0,0 +1,594 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +import java.util.Collection; +import java.util.Date; + +import org.uic.ticket.api.asn.omv1.CodeTableType; +import org.uic.ticket.api.asn.omv1.LoadingDeckType; +import org.uic.ticket.api.asn.omv1.PriceTypeType; +import org.uic.ticket.api.asn.omv1.RoofRackType; + +/** + * The Interface ICarCarriageReservation. + * + * The data describe a car carriage reservation + * + */ +public interface ICarCarriageReservation extends IDocumentData { + + /** + * Gets the train. + * + * @return the train + */ + public String getTrain(); + + /** + * Sets the train. + * + * @param train the new train + */ + public void setTrain(String train); + + /** + * Gets the booking reference. + * + * The booking reference must contain the booking reference exchanged via + * booking interface according to UIC leaflet 918.1 in case this interface was used. + * + * @return the booking reference + */ + public String getReference(); + + /** + * Sets the reference. + * + * The booking reference must contain the booking reference exchanged via + * booking interface according to UIC leaflet 918.1 in case this interface was used. + * + * @param reference the new reference + */ + public void setReference(String reference); + + /** + * Gets the product id. + * + * A product id to be looked up in a product catalog + * + * @return the product id + */ + public String getProductId() ; + + /** + * Sets the product id. + * + * @param productId the new product id + */ + public void setProductId(String productId); + + /** + * Gets the product owner. + * + * The company that defined the product. This is the allocating railway in case of car carriage reservations. + * + * @return the product owner + */ + public String getProductOwner() ; + + /** + * Sets the product owner. + * + * The company that defined the product. This is the allocating railway in case of car carriage reservations. + * + * @param productOwner the new product owner + */ + public void setProductOwner(String productOwner); + + /** + * Gets the service brand of the train. + * + * @return the service brand of the train + */ + public IServiceBrand getServiceBrand(); + + /** + * sets the service brand of the train. + * @return + * + * @return the service brand of the train + */ + public void setServiceBrand(IServiceBrand serviceBrand); + + + /** + * Gets the station code table. + * + * Defines the station code table to be used to retrieve station information. + * Default in case of reservations is the UIC station codes table for reservations + * + * @return the station code table + */ + public CodeTableType getStationCodeTable(); + + /** + * Sets the station code table. + * + * Defines the station code table to be used to retrieve station information. + * Default in case of reservations is the UIC station codes table for reservations + * + * @param stationCodeTable the new station code table + */ + public void setStationCodeTable(CodeTableType stationCodeTable); + + /** + * Gets the from station code + * + * @return the from station code + */ + public String getFromStation(); + + /** + * Sets the from station code + * + * @param fromStation the new from station code + */ + public void setFromStation(String fromStation); + + /** + * Gets the to station code + * + * @return the to station code + */ + public String getToStation(); + + /** + * Sets the to station code + * + * @param toStation the new to station code + */ + public void setToStation(String toStation); + + /** + * Gets the from station name. + * + * Station names should be used only in bilateral scenarios where the + * control devices do not provide a station code table. + * + * @return the from station name + */ + public String getFromStationName(); + + /** + * Sets the from station name. + * + * Station names should be used only in bilateral scenarios where the + * control devices do not provide a station code table. + * + * @param fromStationName the new from station name + */ + public void setFromStationName(String fromStationName); + + /** + * Gets the to station name. + * + * Station names should be used only in bilateral scenarios where the + * control devices do not provide a station code table. + * + * @return the to station name + */ + public String getToStationName(); + + /** + * Sets the to station name. + * + * Station names should be used only in bilateral scenarios where the + * control devices do not provide a station code table. + * + * @param toStationName the new to station name + */ + public void setToStationName(String toStationName); + + /** + * Gets the carriers responsible for the transport + * + * @return the carriers + */ + public Collection getCarriers(); + + /** + * Adds a carrier responsible for the transport + * + * @param carrier the carrier + */ + public void addCarrier(String carrier); + + + /** + * Gets the service level. + * + * Service level codes are defined in UIC leaflet 918.1 + * + * @return the service level + */ + public String getServiceLevel(); + + /** + * Sets the service level. + * + * Service level codes are defined in UIC leaflet 918.1 + * + * @param serviceLevel the new service level + */ + public void setServiceLevel(String serviceLevel); + + + /** + * Gets the place type details. + * + * @return the place type details + */ + public ICompartmentDetails getCompartmentDetails(); + + /** + * Sets the place type details. + * + * @param compartmentDetails the new place type details + */ + public void setCompartmentDetails(ICompartmentDetails compartmentDetails); + + /** + * Gets the price type. + * + * price type indicates whether the price for the travel is included or not + * + * @return the price type + */ + public PriceTypeType getPriceType(); + + /** + * Sets the price type. + * + * price type indicates whether the price for the travel is included or not + * + * @param priceType the new price type + */ + public void setPriceType(PriceTypeType priceType) ; + + /** + * Gets the info text for the control staff + * + * @return the info text for the control staff + */ + public String getInfoText(); + + /** + * Sets the info text for the control staff + * + * @param infoText the new info text for the control staff + */ + public void setInfoText(String infoText); + + /** + * Gets the proprietary extension + * + * @return the proprietary extension + */ + public IExtension getExtension(); + + /** + * Sets the proprietary extension. + * + * @param extension the new proprietary extension + */ + public void setExtension(IExtension extension); + + /** + * Gets the coach. + * + * @return the coach + */ + public String getCoach(); + + /** + * Sets the coach. + * + * @param coach the new coach + */ + public void setCoach(String coach); + + /** + * Gets the place. + * + * @return the place + */ + public String getPlace(); + + /** + * Sets the place. + * + * @param place the new place + */ + public void setPlace(String place); + + /** + * Gets the tariff. + * + * @return the tariff + */ + public ITariff getTariff(); + + /** + * Sets the tariff. + * + * @param tariff the new tariff + */ + public void setTariff(ITariff tariff); + + /** + * Gets the number plate. + * + * @return the number plate + */ + public String getNumberPlate(); + + /** + * Sets the number plate. + * + * @param numberPlate the new number plate + */ + public void setNumberPlate(String numberPlate); + + /** + * Gets the trailer plate. + * + * @return the trailer plate + */ + public String getTrailerPlate(); + + /** + * Sets the trailer plate. + * + * @param trailerPlate the new trailer plate + */ + public void setTrailerPlate(String trailerPlate); + + /** + * Gets the car category. + * + * Car categories are defined in UIC leaflet 918.1 + * + * @return the car category + */ + public int getCarCategory() ; + + /** + * Sets the car category. + * + * Car categories are defined in UIC leaflet 918.1 + * + * @param carCategory the new car category + */ + public void setCarCategory(int carCategory); + + /** + * Gets the boat category. + * + * Boat categories are defined in UIC leaflet 918.1 + * + * @return the boat category + */ + public int getBoatCategory(); + + /** + * Sets the boat category. + * + * Boat categories are defined in UIC leaflet 918.1 + * + * @param boatCategory the new boat category + */ + public void setBoatCategory(int boatCategory) ; + + /** + * Checks if the car has a textile roof. + * + * @return true, if the car has a textile roof + */ + public boolean isTextileRoof(); + + /** + * Sets that the car bas a textile roof. + * + * @param textileRoof the textile roof of a car + */ + public void setTextileRoof(boolean textileRoof); + + /** + * Gets the roof rack type. + * + * Roof rack types are defined in UIC leaflet 918.1 + * + * @return the roof rack type + */ + public RoofRackType getRoofRackType(); + + /** + * Sets the roof rack type. + * + * Roof rack types are defined in UIC leaflet 918.1 + * + * @param roofRackType the new roof rack type + */ + public void setRoofRackType(RoofRackType roofRackType); + + /** + * Gets the roof rack height in cm + * + * @return the roof rack height in cm + */ + public int getRoofRackHeight(); + + /** + * Sets the roof rack height in cm + * + * @param roofRackHeight the new roof rack height in cm + */ + public void setRoofRackHeight(int roofRackHeight); + + /** + * Gets the number of attached boats. + * + * @return the number of attached boats + */ + public int getAttachedBoats(); + + /** + * Sets the number of attached boats. + * + * @param attachedBoats the number of attached boats + */ + public void setAttachedBoats(int attachedBoats) ; + + /** + * Gets the number of attached bicycles. + * + * @return the number of attached bicycles + */ + public int getAttachedBicycles(); + + /** + * Sets the number of attached bicycles. + * + * @param attachedBicycles the number of attached bicycles + */ + public void setAttachedBicycles(int attachedBicycles); + + /** + * Gets the number of attached surfboards. + * + * @return the number of attached surfboards + */ + public int getAttachedSurfboards(); + + /** + * Sets the number of attached surfboards. + * + * @param attachedSurfboards the number of attached surfboards + */ + public void setAttachedSurfboards(int attachedSurfboards); + + /** + * Gets the begin of the loading on the train + * + * @return the begin loading date and time + */ + public Date getBeginLoading(); + + /** + * Sets the begin of the loading on the train + * + * @param beginLoading the begin loading date and time + */ + public void setBeginLoading(Date beginLoading); + + /** + * Gets the end of the loading on the train + * + * @return the end of the loading on the train + */ + public Date getEndLoading(); + + /** + * Sets the end of the loading on the train + * + * @param endLoading the end of the loading on the train + */ + public void setEndLoading(Date endLoading); + + /** + * Gets the loading list entry. + * + * @return the loading list entry + */ + public int getLoadingListEntry(); + + /** + * Sets the loading list entry. + * + * @param loadingListEntry the new loading list entry + */ + public void setLoadingListEntry(int loadingListEntry); + + /** + * Gets the loading deck. + * + * @return the loading deck + */ + public LoadingDeckType getLoadingDeck(); + + /** + * Sets the loading deck. + * + * @param loadingDeck the new loading deck + */ + public void setLoadingDeck(LoadingDeckType loadingDeck); + + + /** + * Sets the price. + * + * + * @param price + */ + public void setPrice(Long price); + + + /** + * Gets the price. + * + * The price + * + * @return the price + */ + public Long getPrice(); + + + /** + * Gets the included add on tickets. + * + * E.g. an included local transport ticket at the beginning or end of the route. + * + * @return the included add ons + */ + public Collection getVatDetails(); + + /** + * Adds an included add on ticket. + * + * E.g. an included local transport ticket at the beginning or end of the route. + * + * @param includedAddOn the included add on + */ + public void addVatDetail(IVatDetail vatDetail) ; + + + /** + * Gets the departure date time offset to UTC in units of 15 minutes. + * + * @return the loading time UTC offset + */ + public Long getLoadingTimeUTCoffset(); + + /** + * Sets the departure date time. + * + * @param the loading time UTC offset + */ + public void setLoadingTimeUTCoffset(Long UTCoffset) ; + + + + +} diff --git a/src/org/uic/ticket/api/spec/ICardReference.java b/src/org/uic/ticket/api/spec/ICardReference.java new file mode 100644 index 0000000..38a2194 --- /dev/null +++ b/src/org/uic/ticket/api/spec/ICardReference.java @@ -0,0 +1,107 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +/** + * The Interface ICardReference. + * + * ICardReference defines the data for a reference to a customer card + */ +public interface ICardReference { + + + /** + * Gets the card issuer. + * + * For rail cards the RICS code has to be used. + * + * @return the card issuer + */ + public String getCardIssuer(); + + /** + * Sets the card issuer. + * + * For rail cards the RICS code has to be used. + * + * @param cardIssuer the new card issuer + */ + public void setCardIssuer(String cardIssuer); + + /** + * Gets the card id. + * + * The id will be trimmed. The maximum size is 20 positions + * + * @return the card id + */ + public String getCardId(); + + /** + * Sets the card id. + * + * @param cardId the new card id + */ + public void setCardId(String cardId); + + /** + * Gets the card name. + * + * @return the card name + */ + public String getCardName(); + + /** + * Sets the card name. + * + * + * @param cardName the new card name + */ + public void setCardName(String cardName); + + /** + * Gets the card type. + * + * @return the card type + */ + public int getCardType(); + + /** + * Sets the card type. + * + * Code list defined and published by the issuer of the card + * + * @param cardType the new card type + */ + public void setCardType(int cardType); + + /** + * Gets the leading card id in case the entire cardId must not be provided. + * + * @return the leading card id + */ + public String getLeadingCardId(); + + /** + * Sets the leading card id in case the entire cardId must not be provided. + * + * @param leadingCardId the new leading card id + */ + public void setLeadingCardId(String leadingCardId); + + /** + * Gets the trailing card id in case the entire cardId must not be provided. + * + * @return the trailing card id + */ + public String getTrailingCardId(); + + /** + * Sets the trailing card id in case the entire cardId must not be provided. + * + * @param trailingCardId the new trailing card id + */ + public void setTrailingCardId(String trailingCardId); + +} diff --git a/src/org/uic/ticket/api/spec/ICompartmentDetails.java b/src/org/uic/ticket/api/spec/ICompartmentDetails.java new file mode 100644 index 0000000..4e05801 --- /dev/null +++ b/src/org/uic/ticket/api/spec/ICompartmentDetails.java @@ -0,0 +1,128 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +import org.uic.ticket.api.asn.omv1.CompartmentPositionType; + +/** + * The Interface ICompartmentDetails. + * + * ICompartmentDetails defines details on reserved place types + * + * The codes corresponds to UIC leaflet 918.1 element 51 + * + */ +public interface ICompartmentDetails { + + /** + * Gets the coach type. + * + * The codes corresponds to UIC leaflet 918.1 element 51 position 1 and 2 + * + * @return the coach type + */ + public int getCoachType(); + + /** + * Sets the coach type. + * + * The codes corresponds to UIC leaflet 918.1 element 51 position 1 and 2 + * + * @param coachType the new coach type + */ + public void setCoachType(int coachType); + + /** + * Gets the compartment type. + * + * The codes corresponds to UIC leaflet 918.1 element 51 position 3 and 4 + * + * @return the compartment type + */ + public int getCompartmentType() ; + + /** + * Sets the compartment type. + * + * The codes corresponds to UIC leaflet 918.1 element 51 position 3 and 4 + * + * @param compartmentType the new compartment type + */ + public void setCompartmentType(int compartmentType); + + /** + * Gets the special allocation. + * + * The codes corresponds to UIC leaflet 918.1 element 51 position 5 and 6 + * + * @return the special allocation + */ + public int getSpecialAllocation() ; + + /** + * Sets the special allocation. + * + * The codes corresponds to UIC leaflet 918.1 element 51 position 5 and 6 + * + * @param specialAllocation the new special allocation + */ + public void setSpecialAllocation(int specialAllocation); + + /** + * Gets the coach type description. + * + * @return the coach type description + */ + public String getCoachTypeDescr(); + + /** + * Sets the coach type description. + * + * @param coachTypeDescr the new coach type description + */ + public void setCoachTypeDescr(String coachTypeDescr); + + /** + * Gets the compartment type description. + * + * @return the compartment type description + */ + public String getCompartmentTypeDescr(); + + /** + * Sets the compartment type description + * + * @param comparttmentTypeDescr the new compartment type description + */ + public void setCompartmentTypeDescr(String comparttmentTypeDescr); + + /** + * Gets the special allocation description. + * + * @return the special allocation description + */ + public String getSpecialAllocationDescr(); + + /** + * Sets the special allocation description. + * + * @param specialAllocationDescr the new special allocation description + */ + public void setSpecialAllocationDescr(String specialAllocationDescr); + + /** + * Gets the position in trains with different decks. + * + * @return the position + */ + public CompartmentPositionType getPosition(); + + /** + * Sets the position of the compartment in trains with different decks + * + * @param position the new position + */ + public void setPosition(CompartmentPositionType position); + +} diff --git a/src/org/uic/ticket/api/spec/IControlDetail.java b/src/org/uic/ticket/api/spec/IControlDetail.java new file mode 100644 index 0000000..dbfd001 --- /dev/null +++ b/src/org/uic/ticket/api/spec/IControlDetail.java @@ -0,0 +1,249 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +import java.util.Collection; + +/** + * The Interface IControlDetail. + * + * + * IControlDetails provides data supporting the control process: + * -- - list of items which the traveler can use to identify himself or the unique + * -- usage of the ticket + * -- (card ids, parts or identity card numbers, credit card numbers,..) + * -- - hints on the validation to be made on board + */ +public interface IControlDetail { + + /** + * Gets the card references the traveler can use to identify himself. + * + * @return the card references + */ + public Collection getIdentificationByCardReference(); + + + + /** + * Adds a card references the traveler can use to identify himself. + * + * @param cardReference the card reference + */ + public void addIdentificationByCardReference(ICardReference cardReference); + + + /** + * Checks if the traveler can be identified by id card. + * + * @return true, if identification by id card is possible + */ + public boolean isIdentificationByIdCard(); + + + /** + * Sets whether the traveler can be identified by id card. + * + * @param identificationByIdCard the new identification by id card flag + */ + public void setIdentificationByIdCard(boolean identificationByIdCard); + + + /** + * Checks whether the traveler can be identified by passport id. + * + * @return true, if the traveler can be identified by passport id + */ + public boolean isIdentificationByPassportId(); + + + /** + * Sets whether the traveler can be identified by passport id. + * + * @param identificationByPassportId the new identification by passport id flag + */ + public void setIdentificationByPassportId(boolean identificationByPassportId); + + + /** + * Gets the identification item code. + * + * For future use, no code list defined yet + * + * @return the identification item + */ + public int getIdentificationItem(); + + + /** + * Sets the identification item. + * + * For future use, no code list defined yet + * + * @param identificationItem the new identification item + */ + public void setIdentificationItem(int identificationItem); + + + /** + * Checks if passport validation is required. + * + * @return true, if is passport validation required + */ + public boolean isPassportValidationRequired(); + + + /** + * Sets the passport validation required. + * + * @param passportValidationRequired the new passport validation required flag + */ + public void setPassportValidationRequired(boolean passportValidationRequired); + + + /** + * Checks if is online validation required. + * + * In this case the ticket must be validated with the online server holding the ticket. + * This is usually the server of the product owner of a ticket. + * + * @return true, if is online validation required + */ + public boolean isOnlineValidationRequired(); + + + /** + * Sets the online validation required. + * + * In this case the ticket must be validated with the online server holding the ticket. + * This is usually the server of the product owner of a ticket. + * + * @param onlineValidationRequired the new online validation required + */ + public void setOnlineValidationRequired(boolean onlineValidationRequired); + + + /** + * Gets the random detailed validation required. + * + * This indicates to the control device, that this ticket type should be + * checked in more detail in the indicated percentage of cases. + * + * The ticket type is identified by: + * - product owner + * - type of the ticket (Reservation, Open Ticket, Pass,..) + * + * The detailed inspection might be implemented by storing the entire bar code data for + * further inspection and in taking a picture of the paper ticket. + * + * @return the random detailed validation required + */ + public int getRandomDetailedValidationRequired(); + + + /** + * Sets the random detailed validation required. + * + * This indicates to the control device, that this ticket type should be + * checked in more detail in the indicated percentage of cases. + * + * The ticket type is identified by: + * - product owner + * - type of the ticket (Reservation, Open Ticket, Pass,..) + * + * The detailed inspection might be implemented by storing the entire bar code data for + * further inspection and in taking a picture of the paper ticket. + * + * @param randomOnlineValidationRequired the new random detailed validation required + */ + public void setRandomDetailedValidationRequired(int randomOnlineValidationRequired); + + + /** + * Checks if an age check on the passengers is required. + * + * @return true, if an age check on the passengers is required + */ + public boolean isAgeCheckRequired(); + + + /** + * Sets whether an age check on the passengers is required. + * + * @param ageCheckRequired the new age check required flag + */ + public void setAgeCheckRequired(boolean ageCheckRequired); + + + /** + * Checks if is reduction card check required. + * + * @return true, if is reduction card check required + */ + public boolean isReductionCardCheckRequired(); + + + /** + * Sets the reduction card check required. + * + * @param reductionCardCheckRequired the new reduction card check required + */ + public void setReductionCardCheckRequired(boolean reductionCardCheckRequired); + + + /** + * Gets the info text for the control staff. + * + * @return the info text for the control staff + */ + public String getInfoText(); + + + /** + * Sets the info text for the control staff. + * + * @param infoText the new info text for the control staff + */ + public void setInfoText(String infoText); + + + /** + * Gets the linked tickets. + * + * Linked tickets are separate tickets which should be included in the check. + * E.g. A Rail Pass accompanying a Reservation with a tariff valid for passes only. + * + * @return the linked tickets + */ + public Collection getLinkedTickets() ; + + + /** + * Adds the linked ticket. + * + * Linked tickets are separate tickets which should be included in the check. + * E.g. A Rail Pass accompanying a Reservation with a tariff valid for passes only. + * + * @param linkedTicket the linked ticket + */ + public void addLinkedTicket(ITicketLink linkedTicket) ; + + + /** + * Gets the extension. + * + * @return the extension + */ + public IExtension getExtension(); + + + /** + * Sets the extension. + * + * @param extension the new extension + */ + public void setExtension(IExtension extension); + + +} diff --git a/src/org/uic/ticket/api/spec/ICounterMark.java b/src/org/uic/ticket/api/spec/ICounterMark.java new file mode 100644 index 0000000..c6b5744 --- /dev/null +++ b/src/org/uic/ticket/api/spec/ICounterMark.java @@ -0,0 +1,400 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +import java.util.Collection; +import java.util.Date; + +import org.uic.ticket.api.asn.omv1.CodeTableType; +import org.uic.ticket.api.asn.omv1.TravelClassType; + +/** + * The Interface ICounterMark. + * + * The group ticket counter mark. + * + * Members of a group might be provided with a counter mark indicating their + * participation in a group. The counter mark is not itself a ticket, but referees to a + * ticket. + * + * The content corresponds to the open ticket content. + * + */ +public interface ICounterMark extends IDocumentData { + + + /** + * Gets the reference. + * + * @return the reference + */ + public String getReference(); + + /** + * Sets the reference. + * + * @param reference the new reference + */ + public void setReference(String reference); + + /** + * Gets the product owner. + * + * The product owner is the railways responsible for assembling this ticket. As there is currently no + * standard interface for open tickets between an product owner and an issuer this is usually + * identical to the issuer of a counter mark. + * + * @return the product owner + */ + public String getProductOwner(); + + /** + * Sets the product owner. + * + * The product owner is the railways responsible for assembling this ticket. As there is currently no + * standard interface for open tickets between an product owner and an issuer this is usually + * identical to the issuer of a counter mark. + * + * @param productOwner the new product owner + */ + public void setProductOwner(String productOwner); + + /** + * Gets the product id. + * + * @return the product id + */ + public String getProductId(); + + /** + * Sets the product id. + * + * @param productId the new product id + */ + public void setProductId(String productId); + + + /** + * Checks if is return included. + * + * @return true, if is return included + */ + public boolean isReturnIncluded(); + + /** + * Sets the return included. + * + * @param returnIncluded the new return included + */ + public void setReturnIncluded(boolean returnIncluded); + + /** + * Gets the station code table. + * + * Defines the station code table to be used to retrieve station information. + * Default in this case is the UIC station codes table for standard UIC + * station code from MERITS (UIC country code + 5 digit local code) + * + * @return the station code table + */ + public CodeTableType getStationCodeTable(); + + /** + * Sets the station code table. + * + * Defines the station code table to be used to retrieve station information. + * Default in this case is the UIC station codes table for standard UIC + * station code from MERITS (UIC country code + 5 digit local code) + * + * @param stationCodeTable the new station code table + */ + public void setStationCodeTable(CodeTableType stationCodeTable); + + /** + * Gets the from station. + * + * @return the from station + */ + public String getFromStation(); + + /** + * Sets the from station. + * + * @param fromStation the new from station + */ + public void setFromStation(String fromStation); + + /** + * Gets the to station. + * + * @return the to station + */ + public String getToStation(); + + /** + * Sets the to station. + * + * @param toStation the new to station + */ + public void setToStation(String toStation); + + /** + * Gets the from station name. + * + * @return the from station name + */ + public String getFromStationName(); + + /** + * Sets the from station name. + * + * @param fromStationName the new from station name + */ + public void setFromStationName(String fromStationName); + + /** + * Gets the to station name. + * + * @return the to station name + */ + public String getToStationName(); + + /** + * Sets the to station name. + * + * @param toStationName the new to station name + */ + public void setToStationName(String toStationName); + + /** + * Gets the valid region desc. + * + * @return the valid region desc + */ + public String getValidRegionDesc(); + + /** + * Sets the valid region desc. + * + * @param validRegionDesc the new valid region desc + */ + public void setValidRegionDesc(String validRegionDesc); + + /** + * Gets the valid region list. + * + * @return the valid region list + */ + public Collection getValidRegionList(); + + /** + * Adds the valid region list. + * + * @param validRegion the valid region + */ + public void addValidRegionList(IRegionalValidity validRegion); + + /** + * Gets the return description. + * + * @return the return description + */ + public IReturnRouteDescription getReturnDescription() ; + + /** + * Sets the return description. + * + * @param returnDescription the new return description + */ + public void setReturnDescription(IReturnRouteDescription returnDescription); + + /** + * Gets the valid from. + * + * @return the valid from + */ + public Date getValidFrom() ; + + /** + * Sets the valid from. + * + * @param validFrom the new valid from + */ + public void setValidFrom(Date validFrom); + + /** + * Gets the valid until. + * + * @return the valid until + */ + public Date getValidUntil(); + + /** + * Sets the valid until. + * + * @param validUntil the new valid until + */ + public void setValidUntil(Date validUntil); + + /** + * Gets the class code. + * + * @return the class code + */ + public TravelClassType getClassCode(); + + /** + * Sets the class code. + * + * @param classCode the new class code + */ + public void setClassCode(TravelClassType classCode); + + /** + * Gets the included carriers. + * + * @return the included carriers + */ + public Collection getIncludedCarriers(); + + /** + * Adds the included carrier. + * + * @param includedCarrier the included carrier + */ + public void addIncludedCarrier(String includedCarrier); + + /** + * Gets the included service brands. + * + * @return the included service brands + */ + public Collection getIncludedServiceBrands(); + + /** + * Adds the included service brand. + * + * @param includedServiceBrand the included service brand + */ + public void addIncludedServiceBrand(Integer includedServiceBrand); + + /** + * Gets the excluded service brands. + * + * @return the excluded service brands + */ + public Collection getExcludedServiceBrands(); + + /** + * Adds the excluded service brand. + * + * @param excludedServiceBrand the excluded service brand + */ + public void addExcludedServiceBrand(Integer excludedServiceBrand); + + /** + * Gets the info text. + * + * @return the info text + */ + public String getInfoText(); + + /** + * Sets the info text. + * + * @param infoText the new info text + */ + public void setInfoText(String infoText); + + /** + * Gets the extension. + * + * @return the extension + */ + public IExtension getExtension(); + + /** + * Sets the extension. + * + * @param extension the new extension + */ + public void setExtension(IExtension extension); + + /** + * Gets the total of countermarks. + * + * @return the total of countermarks + */ + public int getTotalOfCountermarks(); + + /** + * Sets the total of countermarks. + * + * @param totalOfCountermarks the new total of countermarks + */ + public void setTotalOfCountermarks(int totalOfCountermarks); + + /** + * Gets the group name. + * + * @return the group name + */ + public String getGroupName(); + + /** + * Sets the group name. + * + * @param groupName the new group name + */ + public void setGroupName(String groupName); + + /** + * Gets the number of countermark. + * + * @return the number of countermark + */ + public int getNumberOfCountermark(); + + /** + * Sets the number of countermark. + * + * @param numberOfCountermark the new number of countermark + */ + public void setNumberOfCountermark(int numberOfCountermark) ; + + + public void setTicketReference(String ticketReference); + public String getTicketReference(); + + /** + * Gets the validFrom date time offset to UTC in units of 15 minutes. + * + * @return the validFrom date time UTC offset + */ + public Long getValidFromUTCoffset(); + + /** + * Sets the validFrom date time. + * + * @param validFromDateTime the new validFrom date time + */ + public void setValidFromUTCoffset(Long validFromUTCoffset) ; + + /** + * Gets the validUntil date time offset to UTC in units of 15 minutes. + * + * @return the validUntil date time UTC offset + */ + public Long getValidUntilUTCoffset(); + + /** + * Sets the validUntil date time. + * + * @param validUntilDateTime the new validUntil date time + */ + public void setValidUntilUTCoffset(Long validUntilUTCoffset) ; + + + +} diff --git a/src/org/uic/ticket/api/spec/ICustomerCard.java b/src/org/uic/ticket/api/spec/ICustomerCard.java new file mode 100644 index 0000000..a5be24a --- /dev/null +++ b/src/org/uic/ticket/api/spec/ICustomerCard.java @@ -0,0 +1,172 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +import java.util.Collection; +import java.util.Date; + +import org.uic.ticket.api.asn.omv1.TravelClassType; + +// TODO: Auto-generated Javadoc +/** + * The Interface ICustomerCard. + */ +public interface ICustomerCard extends IDocumentData { + + + /** + * Gets the customer. + * + * @return the customer + */ + public ITraveler getCustomer() ; + + /** + * Sets the customer. + * + * @param customer the new customer + */ + public void setCustomer(ITraveler customer) ; + + /** + * Gets the card id. + * + * @return the card id + */ + public String getCardId(); + + /** + * Sets the card id. + * + * @param cardId the new card id + */ + public void setCardId(String cardId); + + /** + * Gets the valid from. + * + * @return the valid from + */ + public Date getValidFrom(); + + /** + * Sets the valid from. + * + * @param validFrom the new valid from + */ + public void setValidFrom(Date validFrom); + + /** + * Gets the valid until. + * + * @return the valid until + */ + public Date getValidUntil(); + + /** + * Sets the valid until. + * + * @param validUntil the new valid until + */ + public void setValidUntil(Date validUntil) ; + + /** + * Gets the class code. + * + * @return the class code + */ + public TravelClassType getClassCode(); + + /** + * Sets the class code. + * + * @param classCode the new class code + */ + public void setClassCode(TravelClassType classCode); + + /** + * Gets the card type. + * + * @return the card type + */ + public int getCardType(); + + /** + * Sets the card type. + * + * @param cardType the new card type + */ + public void setCardType(int cardType); + + /** + * Gets the card type descr. + * + * @return the card type descr + */ + public String getCardTypeDescr(); + + /** + * Sets the card type descr. + * + * @param cardTypeDescr the new card type descr + */ + public void setCardTypeDescr(String cardTypeDescr); + + /** + * Gets the customer status. + * + * @return the customer status + */ + public int getCustomerStatus(); + + /** + * Sets the customer status. + * + * @param customerStatus the new customer status + */ + public void setCustomerStatus(int customerStatus); + + /** + * Gets the customer status descr. + * + * @return the customer status descr + */ + public String getCustomerStatusDescr(); + + /** + * Sets the customer status descr. + * + * @param customerStatusDescr the new customer status descr + */ + public void setCustomerStatusDescr(String customerStatusDescr); + + /** + * Gets the included services. + * + * @return the included services + */ + public Collection getIncludedServices(); + + /** + * Adds the included service. + * + * @param includedService the included service + */ + public void addIncludedService(Integer includedService); + + /** + * Gets the extension. + * + * @return the extension + */ + public IExtension getExtension(); + + /** + * Sets the extension. + * + * @param extension the new extension + */ + public void setExtension(IExtension extension); + +} diff --git a/src/org/uic/ticket/api/spec/ICustomerStatusDescription.java b/src/org/uic/ticket/api/spec/ICustomerStatusDescription.java new file mode 100644 index 0000000..65f85c2 --- /dev/null +++ b/src/org/uic/ticket/api/spec/ICustomerStatusDescription.java @@ -0,0 +1,79 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +/** + * The Interface ICustomerStatusDescription. + * + * + * ICustomerStatusDescription provides a description of the customer status. + * + */ +public interface ICustomerStatusDescription { + + /** + * Gets the status provider. + * + * RICS codes should be used in case the status is provided by a railway. + * + * @return the status provider + */ + public String getStatusProvider(); + + /** + * Sets the status provider. + * + * RICS codes should be used in case the status is provided by a railway. + * + * @param statusProvider the new status provider + */ + public void setStatusProvider(String statusProvider); + + /** + * Gets the human readable status description. + * + * @return the human readable status description. + */ + public String getDescription(); + + /** + * Sets the human readable status description. + * + * @param description the new the human readable status description. + */ + public void setDescription(String description) ; + + /** + * Gets the status code. + * + * -- customer status code + * -- 1 = basic + * -- 2 = premium + * -- 3 = silver + * -- 4 = gold + * -- 5 = platinum + * -- 6 = senator + * -- > 50 - code table of the status provider + * + * @return the status code + */ + public int getStatus() ; + + /** + * Sets the status. + * + * -- customer status code + * -- 1 = basic + * -- 2 = premium + * -- 3 = silver + * -- 4 = gold + * -- 5 = platinum + * -- 6 = senator + * -- > 50 - code table of the status provider + * + * @param status the new status + */ + public void setStatus(int status) ; + +} diff --git a/src/org/uic/ticket/api/spec/IDelayConfirmation.java b/src/org/uic/ticket/api/spec/IDelayConfirmation.java new file mode 100644 index 0000000..aa9b418 --- /dev/null +++ b/src/org/uic/ticket/api/spec/IDelayConfirmation.java @@ -0,0 +1,269 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +import java.util.Collection; +import java.util.Date; + +import org.uic.ticket.api.asn.omv1.CodeTableType; + + +// TODO: Auto-generated Javadoc +/** + * The Interface IDelayConfirmation implements + * a confirmation of delay given to a traveler to prove to another carrier he want tu use to continue the journey + * that he was delayed. + */ +public interface IDelayConfirmation extends IDocumentData { + + + /** + * Gets the reference. + * + * @return the reference + */ + public String getReference(); + + /** + * Sets the reference. + * + * @param reference the new reference + */ + public void setReference(String reference); + + /** + * Gets the train. + * + * @return the train + */ + public String getTrain(); + + /** + * Sets the train. + * + * @param train the new train + */ + public void setTrain(String train); + + /** + * Gets the station code table. + * + * Defines the station code table to be used to retrieve station information. + * Default in this case is the UIC station codes table for standard UIC + * station code from MERITS (UIC country code + 5 digit local code) + * + * @return the station code table + */ + public CodeTableType getStationCodeTable(); + + /** + * Sets the station code table. + * + * Defines the station code table to be used to retrieve station information. + * Default in this case is the UIC station codes table for standard UIC + * station code from MERITS (UIC country code + 5 digit local code) + * + * @param stationCodeTable the new station code table + */ + public void setStationCodeTable(CodeTableType stationCodeTable); + + /** + * Gets the from station code where the delay was final (usually the station where the traveler left the train). + * + * @return the from station code + */ + public String getStation(); + + /** + * Sets the from station code where the delay was final (usually the station where the traveler left the train). + * + * @param station the new station + */ + public void setStation(String station); + + + /** + * Sets the from station name where the delay was final (usually the station where the traveler left the train). + * + * @param fromStationName the new from station name + */ + public void setStationName(String fromStationName); + + /** + * Gets the to station name where the delay was final (usually the station where the traveler left the train). + * + * @return the to station name + */ + public String getStationName(); + + /** + * Gets the planned arrival date and time where the traveler left the train. + * + * @return the planned arrival date and time + */ + public Date getArrivalDate(); + + /** + * Sets the planned arrival date and time where the traveler left the train. + * + * @param arrivalDate the new planned arrival date and time + */ + public void setArrivalDate(Date arrivalDate); + + /** + * Checks if is train was cancelled. + * + * @return true, if is train cancelled + */ + public boolean isTrainCancelled(); + + /** + * Sets the train cancelled. + * + * @param trainIsCancelled the new train cancelled + */ + public void setTrainCancelled(boolean trainIsCancelled); + + + /** + * Gets the delay in minutes. + * + * @return the delay in minutes + */ + public int getDelay(); + + /** + * Sets the delay in minutes. + * + * @param delay the delay in minutes + */ + public void setDelay(int delay); + + /** + * Gets the confirmation type. + * + * See code list of the specification for the meaning of the values. + * + * @return the confirmation type + */ + public int getConfirmationType(); + + /** + * Sets the confirmation type. + * + * See code list of the specification for the meaning of the values. + * + * @param type the new confirmation type + */ + public void setConfirmationType(int type); + + /** + * Sets the confirmation that the traveler was on board of the delayed train. + * + * @param travelerOnBoardDelayed the confirmation that the traveler was on the delayed train + */ + public void setTravelerOnBoardDelayed(boolean travelerOnBoardDelayed); + + /** + * Sets the confirmation that the train was delayed. + * + * @param trainDelayed the confirmation that the train was delayed + */ + public void setTrainDelayed(boolean trainDelayed); + + /** + * Sets the confirmation that the train was delayed and the traveler had a ticket designated to the delayed train. + * + * @param trainOfTravelerDelayed the confirmation that the train was delayed and the traveler had a ticket designated to the delayed train. + */ + public void setTrainDelayedTravelerHasTrainTicket(boolean trainOfTravelerDelayed); + + /** + * Checks if this document confirms that the traveler was on board of the delayed train. + * + * @return true, if this document confirms that the traveler was on board of the delayed train + */ + public boolean isTravelerOnBoardDelayed(); + + /** + * Checks if this document confirms that the train is delayed. + * + * @return true, if is train delay is confirmed + */ + public boolean isTrainDelayed(); + + /** + * Checks if this document confirms that the train where the traveler had a designated ticket for is delayed. + * + * @return true, if this document confirms that the traveler has a ticket designated to the delayed train. + */ + public boolean isTrainDelayedTravelerHasTrainTicket(); + + + /** + * Gets the linked tickets. + * + * Link to the ticket valid on the delayed train. + * + * @return the linked tickets + */ + public Collection getLinkedTickets() ; + + + /** + * Adds the linked ticket valid on the delayed train. + * + * + * @param linkedTicket the linked ticket + */ + public void addLinkedTicket(ITicketLink linkedTicket) ; + + + + + /** + * Gets the info text. + * + * @return the info text + */ + public String getInfoText(); + + /** + * Sets the info text. + * + * @param infoText the new info text + */ + public void setInfoText(String infoText); + + + /** + * Gets the extension. + * + * @return the extension + */ + public IExtension getExtension(); + + /** + * Sets the extension. + * + * @param extension the new extension + */ + public void setExtension(IExtension extension); + + /** + * Gets the arrival ut coffset. + * + * @return the arrival ut coffset + */ + public Long getArrivalUTCoffset(); + + /** + * Sets the arrival ut coffset. + * + * @param arrivalUTCoffset the new arrival ut coffset + */ + public void setArrivalUTCoffset(Long arrivalUTCoffset); + + +} diff --git a/src/org/uic/ticket/api/spec/IDocumentData.java b/src/org/uic/ticket/api/spec/IDocumentData.java new file mode 100644 index 0000000..963d545 --- /dev/null +++ b/src/org/uic/ticket/api/spec/IDocumentData.java @@ -0,0 +1,32 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +/** + * The Interface IDocumentData. + * + * IDocumentData is the super class of transport documents and customer cards. It provides a token. + * + */ +public interface IDocumentData { + + /** + * Gets the token. + * + * @return the token + */ + public IToken getToken(); + + /** + * Sets the token. + * + * @param token the new token + */ + public void setToken(IToken token); + + + + + +} diff --git a/src/org/uic/ticket/api/spec/IDocumentExtension.java b/src/org/uic/ticket/api/spec/IDocumentExtension.java new file mode 100644 index 0000000..d34ff94 --- /dev/null +++ b/src/org/uic/ticket/api/spec/IDocumentExtension.java @@ -0,0 +1,14 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +/** + * The Interface IDocumentExtension. + * + * IDocumentExtension provides a transport document that contains purely proprietary extension data. + * + */ +public interface IDocumentExtension extends IDocumentData, IExtension { + +} diff --git a/src/org/uic/ticket/api/spec/IExtension.java b/src/org/uic/ticket/api/spec/IExtension.java new file mode 100644 index 0000000..9d110ab --- /dev/null +++ b/src/org/uic/ticket/api/spec/IExtension.java @@ -0,0 +1,58 @@ +/* + * + */ +package org.uic.ticket.api.spec; + + +/** + * The Interface IExtension. + * + * IExtension defines an extension of the data defined in the UIC standard + * + * If not agreed bilaterally otherwise these extensions must be ignored. + * + * -- the generic non - standard extension contains: + * -- - an extension id to distinguish different extensions + * -- - the extension data as binary data + * -- proprietary extensions are by definition proprietary. This standard provides + * -- the means to identify these extensions + * -- within the data and to skip these data. + * -- the evaluation of these data and the unique identification of the extensions + * -- via the extension id is in the + * -- responsibility of the railways which use these extensions. + * + */ +public interface IExtension { + + /** + * Gets the id of the extension. + * The id identifies the type of the extension. + * + * @return the id + */ + public String getId() ; + + /** + * Sets the id. + * The id identifies the type of the extension. + * + * @param id the new id + */ + public void setId(String id); + + /** + * Gets the binary data content. + * + * @return the binary data content + */ + public byte[] getBinarydata(); + + /** + * Sets the binary data content. + * + * @param binarydata the new binary data content + */ + public void setBinarydata(byte[] binarydata); + + +} diff --git a/src/org/uic/ticket/api/spec/IFipTicket.java b/src/org/uic/ticket/api/spec/IFipTicket.java new file mode 100644 index 0000000..73cbc0e --- /dev/null +++ b/src/org/uic/ticket/api/spec/IFipTicket.java @@ -0,0 +1,178 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +import java.util.Collection; +import java.util.Date; + +import org.uic.ticket.api.asn.omv1.TravelClassType; + +// TODO: Auto-generated Javadoc +/** + * The Interface IFipTicket. + * + * IFipTicket provides a description of the FIP ticket. + * + */ +public interface IFipTicket extends IDocumentData { + + /** + * Gets the reference. + * + * @return the reference + */ + public String getReference(); + + /** + * Sets the reference. + * + * @param reference the new reference + */ + public void setReference(String reference); + + /** + * Gets the product id. + * + * @return the product id + */ + public String getProductId() ; + + /** + * Sets the product id. + * + * @param productId the new product id + */ + public void setProductId(String productId); + + /** + * Gets the product owner. + * + * @return the product owner + */ + public String getProductOwner(); + + /** + * Sets the product owner. + * + * @param productOwner the new product owner + */ + public void setProductOwner(String productOwner); + + + + /** + * Gets the travel class code. + * + * @return the travel class code + */ + public TravelClassType getClassCode(); + + /** + * Sets the class code. + * + * @param classCode the new class code + */ + public void setClassCode(TravelClassType classCode); + + /** + * Gets the valid from date. + * + * @return the valid from date + */ + public Date getValidFrom(); + + /** + * Sets the valid from date. + * + * @param validFrom the new valid from date + */ + public void setValidFrom(Date validFrom); + + /** + * Gets the valid until date. + * + * @return the valid until date + */ + public Date getValidUntil(); + + /** + * Sets the valid until date. + * + * @param validUntil the new valid until date + */ + public void setValidUntil(Date validUntil); + + /** + * Gets the number of travel days allowed for traveling within the validity range. + * + * @return the number of travel days allowed for traveling within the validity range. + */ + public int getNumberOfTravelDates(); + + /** + * Sets the number of travel days allowed for traveling within the validity range. + * + * @param numberOfTravelDates the new number of travel days + */ + public void setNumberOfTravelDates(int numberOfTravelDates); + + /** + * Checks if supplements are included. + * + * @return true, if is supplements are included + */ + public boolean isIncludesSupplements(); + + /** + * Sets whether supplements are included. + * + * @param includesSuplements the new includes supplements flag + */ + public void setIncludesSupplements(boolean includesSuplements); + + /** + * Gets the carriers valid for traveling. + * + * @return the carriers valid for traveling + */ + public Collection getCarriers(); + + /** + * Adds a carrier. + * + * @param carrier the carrier + */ + public void addCarrier(String carrier); + + /** + * Gets the extension. + * + * @return the extension + */ + public IExtension getExtension(); + + /** + * Sets the extension. + * + * @param extensionData the new extension + */ + public void setExtension(IExtension extensionData); + + /** + * Gets the activated days where the ticket is valid for tarveling. + * + * @return the activated days + */ + public Collection getActivatedDays(); + + /** + * Adds the activated day. + * + * @param day the day + */ + public void addActivatedDay(Date day); + + + +} diff --git a/src/org/uic/ticket/api/spec/IGeoCoordinate.java b/src/org/uic/ticket/api/spec/IGeoCoordinate.java new file mode 100644 index 0000000..9fa1ba5 --- /dev/null +++ b/src/org/uic/ticket/api/spec/IGeoCoordinate.java @@ -0,0 +1,136 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +import org.uic.ticket.api.asn.omv1.GeoCoordinateSystemType; +import org.uic.ticket.api.asn.omv1.GeoUnitType; +import org.uic.ticket.api.asn.omv1.HemisphereLatitudeType; +import org.uic.ticket.api.asn.omv1.HemisphereLongitudeType; + +/** + * The Interface IGeoCoordinate. + * + * IGeoCoordinate provides the data for a geo coordinate. + * + */ +public interface IGeoCoordinate { + + /** + * Gets the unit. + * + * Default is milliDegree + * + * @return the unit + */ + public GeoUnitType getUnit(); + + /** + * Sets the unit. + * + * Default is milliDegree + * + * @param unit the new unit + */ + public void setUnit(GeoUnitType unit); + + /** + * Gets the accuracy. + * + * @return the accuracy + */ + public GeoUnitType getAccuracy(); + + /** + * Sets the accuracy. + * + * @param accuracy the new accuracy + */ + public void setAccuracy(GeoUnitType accuracy); + + /** + * Gets the geo coordinate system. + * + * Default is wgs84 + * + * @return the geo coordinate + */ + public GeoCoordinateSystemType getSystem(); + + /** + * Sets the geo coordinate + * + * Default is wgs84 + * + * @param system the new geo coordinate + */ + public void setSystem(GeoCoordinateSystemType system); + + /** + * Gets the longitude hemisphere. + * + * @return the longitude hemisphere + */ + public HemisphereLongitudeType getHemisphereLongitude() ; + + /** + * Sets the longitude hemisphere. + * + * Default is north + * + * @param hemispherLongiture the new longitude hemisphere. + */ + public void setHemisphereLongitude(HemisphereLongitudeType hemispherLongiture); + + /** + * Gets the latitude hemisphere. + * + * Default is east + * + * @return the latitude hemisphere. + */ + public HemisphereLatitudeType getHemisphereLatitude(); + + /** + * Sets the latitude hemisphere. + * + * Default is east + * + * @param hemisphereLatitude the new latitude hemisphere. + */ + public void setHemisphereLatitude(HemisphereLatitudeType hemisphereLatitude); + + /** + * Gets the longitude. + * + * @return the longitude + */ + public Long getLongitude(); + + /** + * Sets the longitude. + * + * @param longitude the new longitude + */ + public void setLongitude(long longitude) ; + + /** + * Gets the latitude. + * + * @return the latitude + */ + public Long getLatitude() ; + + /** + * Sets the latitude. + * + * @param latitude the new latitude + */ + public void setLatitude(long latitude); + + public IGeoCoordinate clone(); + + public void addLongitude(Long longValue); + + public void addLatitude(Long longValue); +} diff --git a/src/org/uic/ticket/api/spec/IIncludedOpenTicket.java b/src/org/uic/ticket/api/spec/IIncludedOpenTicket.java new file mode 100644 index 0000000..ab9ee81 --- /dev/null +++ b/src/org/uic/ticket/api/spec/IIncludedOpenTicket.java @@ -0,0 +1,394 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +import java.util.Collection; +import java.util.Date; + +import org.uic.ticket.api.asn.omv1.CodeTableType; +import org.uic.ticket.api.asn.omv1.TravelClassType; + +/** + * The Interface IIncludedOpenTicket. + * + * IIncludedOpenTicket provides the description of an add on ticket to be added to an open ticket. + * E.g. a local transport ticket at the end or begin of the route. + * + */ +public interface IIncludedOpenTicket { + + /** + * Gets the departure date. + * + * @return the departure date + */ + public Date getDepartureDate(); + + /** + * Sets the departure date. + * + * @param departureDate the new departure date + */ + public void setDepartureDate(Date departureDate); + + /** + * Gets the arrival date. + * + * @return the arrival date + */ + public Date getArrivalDate() ; + + /** + * Sets the arrival date. + * + * @param arrivalDate the new arrival date + */ + public void setArrivalDate(Date arrivalDate); + + + /** + * Gets the product id. + * + * @return the product id + */ + public String getProductId() ; + + /** + * Sets the product id. + * + * @param productId the new product id + */ + public void setProductId(String productId) ; + + /** + * Gets the product owner. + * + * @return the product owner + */ + public String getProductOwner(); + + /** + * Sets the product owner. + * + * @param productOwner the new product owner + */ + public void setProductOwner(String productOwner); + + /** + * Gets the external issuer. + * + * @return the external issuer + */ + public int getExternalIssuer(); + + /** + * Sets the external issuer. + * + * Identification of the issuer provided by an external carrier + * + * @param externalIssuer the new external issuer + */ + public void setExternalIssuer(int externalIssuer); + + /** + * Gets the authorization code. + * + * Authorization code given by a carrier to the product owner to allow the sale + * + * @return the authorization code + */ + public int getAuthorizationCode(); + + /** + * Sets the authorization code. + * + * An authorization code given by a carrier to the product owner to allow the sale + * + * @param authorizationCode the new authorization code + */ + public void setAuthorizationCode(int authorizationCode); + + /** + * Gets the station code table. + * + * Defines the station code table to be used to retrieve station information. + * Default in this case is the UIC station codes table for standard UIC + * station code from MERITS (UIC country code + 5 digit local code) + * + * @return the station code table + */ + public CodeTableType getStationCodeTable(); + + /** + * Sets the station code table. + * + * Defines the station code table to be used to retrieve station information. + * Default in this case is the UIC station codes table for standard UIC + * station code from MERITS (UIC country code + 5 digit local code) + * + * @param stationCodeTable the new station code table + */ + public void setStationCodeTable(CodeTableType stationCodeTable); + + /** + * Gets the from station code. + * + * @return the from station code + */ + public String getFromStation(); + + /** + * Sets the from station code. + * + * @param fromStation the new from station code + */ + public void setFromStation(String fromStation); + + /** + * Gets the to station code. + * + * @return the to station code + */ + public String getToStation(); + + /** + * Sets the to station code. + * + * @param toStation the new to station code + */ + public void setToStation(String toStation); + + /** + * Gets the from station name. + * + * @return the from station name + */ + public String getFromStationName(); + + /** + * Sets the from station name. + * + * @param fromStationName the new from station name + */ + public void setFromStationName(String fromStationName); + + /** + * Gets the to station name. + * + * @return the to station name + */ + public String getToStationName(); + + /** + * Sets the to station name. + * + * @param toStationName the new to station name + */ + public void setToStationName(String toStationName); + + /** + * Gets the valid region description. + * + * @return the valid region desc + */ + public String getValidRegionDesc(); + + /** + * Sets the valid region description. + * + * @param validRegionDesc the new valid region description + */ + public void setValidRegionDesc(String validRegionDesc); + + /** + * Gets the list of valid regions. + * + * @return the list of valid regions + */ + public Collection getValidRegionList(); + + /** + * Adds a valid region. + * + * @param validRegion the valid region + */ + public void addValidRegionList(IRegionalValidity validRegion); + + /** + * Gets the valid from date and time. + * + * @return the valid from date and time. + */ + public Date getValidFrom(); + + /** + * Sets the valid from date and time. + * + * @param validFrom the new valid from date and time. + */ + public void setValidFrom(Date validFrom); + + /** + * Gets the valid until date and time. + * + * @return the valid until date and time. + */ + public Date getValidUntil(); + + /** + * Sets the valid until date and time. + * + * @param validUntil the new valid until date and time. + */ + public void setValidUntil(Date validUntil); + + /** + * Gets the travel class code. + * + * @return the travel class code + */ + public TravelClassType getClassCode(); + + /** + * Sets the travel class code. + * + * @param classCode the new travel class code + */ + public void setClassCode(TravelClassType classCode); + + /** + * Gets the carriers included in the transport contract. + * + * @return the included carriers + */ + public Collection getIncludedCarriers(); + + /** + * Adds the included carrier. + * + * @param includedCarrier the included carrier + */ + public void addIncludedCarrier(String includedCarrier); + + /** + * Gets the included service brands on which the ticket is valid + * + * The list should be omitted in case all service brands are + * included or a list of excluded service brands is provided. + * + * @return the included service brands + */ + public Collection getIncludedServiceBrands(); + + /** + * Adds an included service brand. + * + * The list should be omitted in case all service brands are + * included or a list of excluded service brands is provided. + * + * @param includedServiceBrand the included service brand + */ + public void addIncludedServiceBrand(Integer includedServiceBrand); + + /** + * Gets the list of excluded service brands. + * + * The list should be omitted in case a complete + * list of included service brands is provided. + * + * @return the list of excluded service brands + */ + public Collection getExcludedServiceBrands(); + + /** + * Adds an excluded service brand. + * + * The list should be omitted in case a complete + * list of included service brands is provided. + * + * @param excludedServiceBrand the excluded service brand + */ + public void addExcludedServiceBrand(Integer excludedServiceBrand); + + + /** + * Gets the tariffs. + * + * @return the tariffs + */ + public Collection getTariffs(); + + /** + * Adds the tariff. + * + * @param tariff the tariff + */ + public void addTariff(ITariff tariff); + + /** + * Gets the info text. + * + * @return the info text + */ + public String getInfoText(); + + /** + * Sets the info text. + * + * @param infoText the new info text + */ + public void setInfoText(String infoText); + + /** + * Gets the extension. + * + * @return the extension + */ + public IExtension getExtension() ; + + /** + * Sets the extension. + * + * @param extension the new extension + */ + public void setExtension(IExtension extension); + + + /** + * Sets the until date and time. + * + * @param date the new until date and time + */ + public void setUntilDate(Date date); + + + /** + * Gets the validFrom date time offset to UTC in units of 15 minutes. + * + * @return the validFrom date time UTC offset + */ + public Long getValidFromUTCoffset(); + + /** + * Sets the validFrom date time. + * + * @param validFromDateTime the new validFrom date time + */ + public void setValidFromUTCoffset(Long validFromUTCoffset) ; + + /** + * Gets the validUntil date time offset to UTC in units of 15 minutes. + * + * @return the validUntil date time UTC offset + */ + public Long getValidUntilUTCoffset(); + + /** + * Sets the validUntil date time. + * + * @param validUntilDateTime the new validUntil date time + */ + public void setValidUntilUTCoffset(Long validUntilUTCoffset) ; + +} diff --git a/src/org/uic/ticket/api/spec/IIssuingDetail.java b/src/org/uic/ticket/api/spec/IIssuingDetail.java new file mode 100644 index 0000000..afe309d --- /dev/null +++ b/src/org/uic/ticket/api/spec/IIssuingDetail.java @@ -0,0 +1,189 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +import java.util.Date; + +// TODO: Auto-generated Javadoc +/** + * The Interface IIssuerDetails. + */ +public interface IIssuingDetail { + + /** + * Gets the issuing date. + * + * @return the issuing date + */ + public Date getIssuingDate(); + + /** + * Sets the issuing date. + * + * @param date the new issuing date + */ + public void setIssuingDate(Date date); + + /** + * Gets the issuer. + * + * @return the issuer + */ + public String getIssuer(); + + /** + * Sets the issuer. + * + * @param issuer the new issuer + */ + public void setIssuer(String issuer); + + /** + * Gets the security provider. + * + * @return the security provider + */ + public String getSecurityProvider(); + + + /** + * Sets the security provider. + * + * @param securityProvider the new security provider + */ + public void setSecurityProvider(String securityProvider); + + + /** + * Gets the issuer name. + * + * @return the issuer name + */ + public String getIssuerName(); + + + /** + * Sets the issuer name. + * + * @param issuerName the new issuer name + */ + public void setIssuerName(String issuerName); + + + /** + * Checks if is specimen. + * + * @return true, if is specimen + */ + public boolean isSpecimen(); + + + /** + * Sets the specimen. + * + * @param specimen the new specimen + */ + public void setSpecimen(boolean specimen); + + + /** + * Checks if is activated. + * + * @return true, if is activated + */ + public boolean isActivated(); + + + /** + * Sets the activated. + * + * @param activated the new activated + */ + public void setActivated(boolean activated); + + + /** + * Gets the issuer pnr. + * + * @return the issuer pnr + */ + public String getIssuerPNR(); + + + /** + * Sets the issuer pnr. + * + * @param issuerPNR the new issuer pnr + */ + public void setIssuerPNR(String issuerPNR); + + + /** + * Gets the extension. + * + * @return the extension + */ + public IExtension getExtension(); + + + /** + * Sets the extension. + * + * @param extension the new extension + */ + public void setExtension(IExtension extension); + + + /** + * Gets the issued on train. + * + * @return the issued on train + */ + public String getIssuedOnTrain(); + + + /** + * Sets the issued on train. + * + * @param issuedOnTrain the new issued on train + */ + public void setIssuedOnTrain(String issuedOnTrain); + + + /** + * Gets the issued on line. + * + * @return the issued on line + */ + public int getIssuedOnLine(); + + + /** + * Sets the issued on line. + * + * @param issuedOnLine the new issued on line + */ + public void setIssuedOnLine(int issuedOnLine); + + + /** + * Gets the point of sale. + * + * @return the point of sale + */ + public IGeoCoordinate getPointOfSale(); + + + /** + * Sets the point of sale. + * + * @param pointOfSale the new point of sale + */ + public void setPointOfSale(IGeoCoordinate pointOfSale); + + + public boolean isSecurePaperTicket(); + public void setSecurePaperTicket(boolean securePaperTicket); + +} diff --git a/src/org/uic/ticket/api/spec/ILine.java b/src/org/uic/ticket/api/spec/ILine.java new file mode 100644 index 0000000..f1066f2 --- /dev/null +++ b/src/org/uic/ticket/api/spec/ILine.java @@ -0,0 +1,115 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +import java.util.HashSet; + +import org.uic.ticket.api.asn.omv1.CodeTableType; + +// TODO: Auto-generated Javadoc +/** + * The Interface ILine. + */ +public interface ILine extends IRegionalValidity{ + + /** + * Gets the carrier. + * + * @return the carrier + */ + public String getCarrier(); + + /** + * Sets the carrier. + * + * @param carrier the new carrier + */ + public void setCarrier(String carrier); + + /** + * Gets the line ids. + * + * @return the line ids + */ + public HashSet getLineIds(); + + /** + * Adds the line id. + * + * @param lineId the line id + */ + public void addLineId(Integer lineId); + + /** + * Gets the station code table. + * + * @return the station code table + */ + public CodeTableType getStationCodeTable(); + + /** + * Sets the station code table. + * + * @param stationCodeTable the new station code table + */ + public void setStationCodeTable(CodeTableType stationCodeTable); + + /** + * Gets the entry station. + * + * @return the entry station + */ + public String getEntryStation() ; + + /** + * Sets the entry station. + * + * @param entryStation the new entry station + */ + public void setEntryStation(String entryStation); + + /** + * Gets the terminating station. + * + * @return the terminating station + */ + public String getTerminatingStation(); + + /** + * Sets the terminating station. + * + * @param terminatingStation the new terminating station + */ + public void setTerminatingStation(String terminatingStation); + + /** + * Gets the city. + * + * @return the city + */ + public int getCity() ; + + /** + * Sets the city. + * + * @param city the new city + */ + public void setCity(int city); + + /** + * Gets the binary zone id. + * + * @return the binary zone id + */ + public byte[] getBinaryZoneId() ; + + /** + * Sets the binary zone id. + * + * @param binatyZoneId the new binary zone id + */ + public void setBinaryZoneId(byte[] binatyZoneId); + + +} diff --git a/src/org/uic/ticket/api/spec/ILuggageRestriction.java b/src/org/uic/ticket/api/spec/ILuggageRestriction.java new file mode 100644 index 0000000..5ee2eec --- /dev/null +++ b/src/org/uic/ticket/api/spec/ILuggageRestriction.java @@ -0,0 +1,56 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +import java.util.Collection; + +// TODO: Auto-generated Javadoc +/** + * The Interface ILuggageRestriction. + */ +public interface ILuggageRestriction { + + /** + * Gets the max hand luggage pieces. + * + * @return the max hand luggage pieces + */ + public int getMaxHandLuggagePieces(); + + /** + * Sets the max hand luggage pieces. + * + * @param maxHandLuggagePieces the new max hand luggage pieces + */ + public void setMaxHandLuggagePieces(int maxHandLuggagePieces); + + /** + * Gets the max non hand luggage pieces. + * + * @return the max non hand luggage pieces + */ + public int getMaxNonHandLuggagePieces(); + + /** + * Sets the max non hand luggage pieces. + * + * @param maxNonHandLuggagePieces the new max non hand luggage pieces + */ + public void setMaxNonHandLuggagePieces(int maxNonHandLuggagePieces); + + /** + * Gets the registered luggage. + * + * @return the registered luggage + */ + public Collection getRegisteredLuggage(); + + /** + * Adds the registered luggage. + * + * @param registeredLuggage the registered luggage + */ + public void addRegisteredLuggage(IRegisteredLuggage registeredLuggage); + +} diff --git a/src/org/uic/ticket/api/spec/IOpenTicket.java b/src/org/uic/ticket/api/spec/IOpenTicket.java new file mode 100644 index 0000000..f5bb7d2 --- /dev/null +++ b/src/org/uic/ticket/api/spec/IOpenTicket.java @@ -0,0 +1,518 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +import java.util.Collection; +import java.util.Date; + +import org.uic.ticket.api.asn.omv1.CodeTableType; +import org.uic.ticket.api.asn.omv1.TravelClassType; + +// TODO: Auto-generated Javadoc +/** + * The Interface IOpenTicket. + */ +public interface IOpenTicket extends IDocumentData { + + + /** + * Gets the reference. + * + * @return the reference + */ + public String getReference(); + + /** + * Sets the reference. + * + * @param reference the new reference + */ + public void setReference(String reference); + + /** + * Gets the product id. + * + * @return the product id + */ + public String getProductId(); + + /** + * Sets the product id. + * + * @param productId the new product id + */ + public void setProductId(String productId); + + /** + * Gets the product owner. + * + * The product owner is the railways responsible for assembling this ticket. As there is currently no + * standard interface for open tickets between an product owner and an issuer this is usually + * identical to the issuer of an open ticket. + * + * @return the product owner + */ + public String getProductOwner(); + + /** + * Sets the product owner. + * + * The product owner is the railways responsible for assembling this ticket. As there is currently no + * standard interface for open tickets between an product owner and an issuer this is usually + * identical to the issuer of an open ticket. + * + * @param productOwner the new product owner + */ + public void setProductOwner(String productOwner); + + /** + * Gets the external issuer. + * + * @return the external issuer + */ + public int getExternalIssuer(); + + /** + * Sets the external issuer. + * + * Identification of the issuer provided by an external carrier + * + * @param externalIssuer the new external issuer + */ + public void setExternalIssuer(int externalIssuer); + + /** + * Gets the authorization code. + * + * Authorization code given by a carrier to the product owner to allow the sale + * + * @return the authorization code + */ + public int getAuthorizationCode(); + + /** + * Sets the authorization code. + * + * An authorization code given by a carrier to the product owner to allow the sale + * + * @param authorizationCode the new authorization code + */ + public void setAuthorizationCode(int authorizationCode); + + /** + * Checks if the ticket includes the return trip. + * + * @return true, if the ticket includes the return trip. + */ + public boolean isReturnIncluded(); + + /** + * Sets that the ticket includes the return trip. + * + * @param returnIncluded the new return included + */ + public void setReturnIncluded(boolean returnIncluded); + + /** + * Gets the station code table. + * + * Defines the station code table to be used to retrieve station information. + * Default in this case is the UIC station codes table for standard UIC + * station code from MERITS (UIC country code + 5 digit local code) + * + * @return the station code table + */ + public CodeTableType getStationCodeTable(); + + /** + * Sets the station code table. + * + * Defines the station code table to be used to retrieve station information. + * Default in this case is the UIC station codes table for standard UIC + * station code from MERITS (UIC country code + 5 digit local code) + * + * @param stationCodeTable the new station code table + */ + public void setStationCodeTable(CodeTableType stationCodeTable); + + /** + * Gets the from station code. + * + * @return the from station code + */ + public String getFromStation(); + + /** + * Sets the from station code. + * + * @param fromStation the new from station code + */ + public void setFromStation(String fromStation); + + /** + * Gets the to station code. + * + * @return the to station code + */ + public String getToStation(); + + /** + * Sets the to station code. + * + * @param toStation the new to station code + */ + public void setToStation(String toStation); + + /** + * Gets the from station name. + * + * @return the from station name + */ + public String getFromStationName(); + + /** + * Sets the from station name. + * + * @param fromStationName the new from station name + */ + public void setFromStationName(String fromStationName); + + /** + * Gets the to station name. + * + * @return the to station name + */ + public String getToStationName(); + + /** + * Sets the to station name. + * + * @param toStationName the new to station name + */ + public void setToStationName(String toStationName); + + /** + * Gets the valid region description. + * + * @return the valid region desc + */ + public String getValidRegionDesc(); + + /** + * Sets the human readable description of the valid region. + * + * @param validRegionDesc the new human readable description of the valid region + */ + public void setValidRegionDesc(String validRegionDesc); + + /** + * Gets the list of valid regions. + * + * @return the list of valid regions + */ + public Collection getValidRegionList(); + + /** + * Adds a valid region. + * + * @param validRegion the valid region + */ + public void addValidRegionList(IRegionalValidity validRegion); + + /** + * Gets the return trip description. + * + * @return the return trip description + */ + public IReturnRouteDescription getReturnDescription() ; + + /** + * Sets the return description. + * + * @param returnDescription the new return description + */ + public void setReturnDescription(IReturnRouteDescription returnDescription); + + /** + * Gets the valid from date and time. + * + * @return the valid from date and time. + */ + public Date getValidFrom() ; + + /** + * Sets the valid from date and time. + * + * @param validFrom the new valid from date and time + */ + public void setValidFrom(Date validFrom); + + /** + * Gets the valid until date and time. + * + * @return the valid until date and time. + */ + public Date getValidUntil(); + + /** + * Sets the valid until date and time. + * + * @param validUntil the new valid until date and time. + */ + public void setValidUntil(Date validUntil); + + /** + * Gets the activated days. + * + * A list of days where the ticket is valid. This should be omitted if + * the ticket is valid on the entire validity range. + * + * @return the activated days + */ + public Collection getActivatedDays(); + + /** + * Adds the activated day. + * + * A list of days where the ticket is valid. This should be omitted if + * the ticket is valid on the entire validity range. + * + * @param activatedDay the activated day + */ + public void addActivatedDay(Date activatedDay); + + /** + * Gets the travel class code. + * + * @return the travel class code + */ + public TravelClassType getClassCode(); + + /** + * Sets the travel class code. + * + * @param classCode the new travel class code + */ + public void setClassCode(TravelClassType classCode); + + /** + * Gets the carriers included in the transport contract. + * + * @return the included carriers + */ + public Collection getIncludedCarriers(); + + /** + * Adds a carrier to the transport contract. + * + * @param includedCarrier the carrier + */ + public void addIncludedCarrier(String includedCarrier); + + /** + * Gets the included service brands on which the ticket is valid + * + * The list should be omitted in case all service brands are + * included or a list of excluded service brands is provided. + * + * @return the included service brands + */ + public Collection getIncludedServiceBrands(); + + /** + * Adds an included service brand. + * + * The list should be omitted in case all service brands are + * included or a list of excluded service brands is provided. + * + * @param includedServiceBrand the included service brand + */ + public void addIncludedServiceBrand(Integer includedServiceBrand); + + /** + * Gets the list of excluded service brands. + * + * The list should be omitted in case a complete + * list of included service brands is provided. + * + * @return the list of excluded service brands + */ + public Collection getExcludedServiceBrands(); + + /** + * Adds an excluded service brand. + * + * The list should be omitted in case a complete + * list of included service brands is provided. + * + * @param excludedServiceBrand the excluded service brand + */ + public void addExcludedServiceBrand(Integer excludedServiceBrand); + + /** + * Gets the tariffs. + * + * @return the tariffs + */ + public Collection getTariffs(); + + /** + * Adds the tariff. + * + * @param tariff the tariff + */ + public void addTariff(ITariff tariff); + + /** + * Gets the included add on tickets. + * + * E.g. an included local transport ticket at the beginning or end of the route. + * + * @return the included add ons + */ + public Collection getIncludedAddOns(); + + /** + * Adds an included add on ticket. + * + * E.g. an included local transport ticket at the beginning or end of the route. + * + * @param includedAddOn the included add on + */ + public void addIncludedAddOn(IIncludedOpenTicket includedAddOn) ; + + /** + * Gets the info text. + * + * @return the info text + */ + public String getInfoText(); + + /** + * Sets the info text. + * + * @param infoText the new info text + */ + public void setInfoText(String infoText); + + /** + * Gets the luggage restriction. + * + * @return the luggage restriction + */ + public ILuggageRestriction getLuggageRestriction(); + + /** + * Sets the luggage restriction. + * + * @param luggageRestriction the new luggage restriction + */ + public void setLuggageRestriction(ILuggageRestriction luggageRestriction); + + /** + * Gets the extension. + * + * @return the extension + */ + public IExtension getExtension(); + + /** + * Sets the extension. + * + * @param extension the new extension + */ + public void setExtension(IExtension extension); + + + /** + * Sets the service level. + * + * The service level codes are defined in UIC leaflet 918.1 + * + * @param serviceLevel the new service level + */ + public void setServiceLevel(String serviceLevel); + + + /** + * Gets the service level. + * + * The service level codes are defined in UIC leaflet 918.1 + * + * @return the service level + */ + public String getServiceLevel(); + + + + /** + * Sets the price. + * + * + * @param price + */ + public void setPrice(Long price); + + + /** + * Gets the price. + * + * The price + * + * @return the price + */ + public Long getPrice(); + + + /** + * Gets the included add on tickets. + * + * E.g. an included local transport ticket at the beginning or end of the route. + * + * @return the included add ons + */ + public Collection getVatDetails(); + + /** + * Adds an included add on ticket. + * + * E.g. an included local transport ticket at the beginning or end of the route. + * + * @param includedAddOn the included add on + */ + public void addVatDetail(IVatDetail vatDetail) ; + + + + + /** + * Gets the validFrom date time offset to UTC in units of 15 minutes. + * + * @return the validFrom date time UTC offset + */ + public Long getValidFromUTCoffset(); + + /** + * Sets the validFrom date time. + * + * @param validFromDateTime the new validFrom date time + */ + public void setValidFromUTCoffset(Long validFromUTCoffset) ; + + /** + * Gets the validUntil date time offset to UTC in units of 15 minutes. + * + * @return the validUntil date time UTC offset + */ + public Long getValidUntilUTCoffset(); + + /** + * Sets the validUntil date time. + * + * @param validUntilDateTime the new validUntil date time + */ + public void setValidUntilUTCoffset(Long validUntilUTCoffset) ; + + +} diff --git a/src/org/uic/ticket/api/spec/IParkingGround.java b/src/org/uic/ticket/api/spec/IParkingGround.java new file mode 100644 index 0000000..55cd55b --- /dev/null +++ b/src/org/uic/ticket/api/spec/IParkingGround.java @@ -0,0 +1,253 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +import java.util.Collection; +import java.util.Date; + +import org.uic.ticket.api.asn.omv1.CodeTableType; + + +/** + * The Interface IParkingGround. + * + * IParkingGround provides the data for a prking ground reservation + */ +public interface IParkingGround extends IDocumentData { + + /** + * Gets the parking ground id. + * + * @return the parking ground id + */ + public String getParkingGroundId(); + + /** + * Sets the id of the parking ground + * + * @param parkingGroundId the new parking ground id + */ + public void setParkingGroundId(String parkingGroundId); + + /** + * Gets the from parking date. + * + * @return the from parking date + */ + public Date getFromParkingDate(); + + /** + * Sets the from parking date. + * + * @param parkingDate the new from parking date + */ + public void setFromParkingDate(Date parkingDate); + + /** + * Gets the to parking date. + * + * @return the to parking date + */ + public Date getToParkingDate(); + + /** + * Sets the to parking date. + * + * @param parkingDate the new to parking date + */ + public void setToParkingDate(Date parkingDate); + + /** + * Gets the reference. + * + * @return the reference + */ + public String getReference(); + + /** + * Sets the reference. + * + * @param reference the new reference + */ + public void setReference(String reference); + + /** + * Gets the access code to enter the parking ground. + * + * @return the access code to enter the parking ground + */ + public String getAccessCode(); + + /** + * Sets the access code to enter the parking ground. + * + * @param accessCode the new access code to enter the parking ground + */ + public void setAccessCode(String accessCode); + + /** + * Gets the human readable location name of the parking ground. + * + * @return the human readable location name of the parking ground. + */ + public String getLocation(); + + /** + * Sets the human readable location name of the parking ground. + * + * @param location the new human readable location name of the parking ground. + */ + public void setLocation(String location); + + /** + * Gets the station code in case the parking ground is associated with a station + * + * @return the station code in case the parking ground is associated with a station + */ + public String getStation(); + + /** + * Sets the station code in case the parking ground is associated with a station + * + * @param station the new station code in case the parking ground is associated with a station + */ + public void setStation(String station); + + /** + * Gets the special information. + * + * @return the special information + */ + public String getSpecialInformation(); + + /** + * Sets the special information. + * + * @param specialInformation the new special information + */ + public void setSpecialInformation(String specialInformation); + + /** + * Gets the entry track to enter the parking ground. + * + * @return the entry track to enter the parking ground. + */ + public String getEntryTrack(); + + /** + * Sets the entry track to enter the parking ground.. + * + * @param entryTrack the new entry track to enter the parking ground. + */ + public void setEntryTrack(String entryTrack); + + /** + * Gets the number plate. + * + * @return the number plate + */ + public String getNumberPlate(); + + /** + * Sets the number plate. + * + * @param numberPlate the new number plate + */ + public void setNumberPlate(String numberPlate); + + /** + * Gets the extension. + * + * @return the extension + */ + public IExtension getExtension(); + + /** + * Sets the extension. + * + * @param extensionData the new extension + */ + public void setExtension(IExtension extensionData); + + /** + * Gets the station code table. + * + * @return the station code table + */ + public CodeTableType getStationCodeTable(); + + /** + * Sets the station code table. + * + * @param stationCodeTable the new station code table + */ + public void setStationCodeTable(CodeTableType stationCodeTable); + + /** + * Gets the product owner. + * + * @return the product owner + */ + public String getProductOwner(); + + /** + * Sets the product owner. + * + * @param productOwner the new product owner + */ + public void setProductOwner(String productOwner); + + + /** + * Gets the product type. + * + * @return the product type + */ + public String getProductId(); + + /** + * Sets the product type. + * + * @param id the new product id + */ + public void setProductId(String type); + + /** + * Sets the price. + * + * + * @param price + */ + public void setPrice(Long price); + + + /** + * Gets the price. + * + * The price + * + * @return the price + */ + public Long getPrice(); + + + /** + * Gets the included add on tickets. + * + * E.g. an included local transport ticket at the beginning or end of the route. + * + * @return the included add ons + */ + public Collection getVatDetails(); + + /** + * Adds an included add on ticket. + * + * E.g. an included local transport ticket at the beginning or end of the route. + * + * @param includedAddOn the included add on + */ + public void addVatDetail(IVatDetail vatDetail) ; + +} diff --git a/src/org/uic/ticket/api/spec/IPass.java b/src/org/uic/ticket/api/spec/IPass.java new file mode 100644 index 0000000..339b842 --- /dev/null +++ b/src/org/uic/ticket/api/spec/IPass.java @@ -0,0 +1,415 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +import java.util.Collection; +import java.util.Date; + +import org.uic.ticket.api.asn.omv1.TravelClassType; + +// TODO: Auto-generated Javadoc +/** + * The Interface IPass. + * + * IPass provides the data for a rail pass ticket. + * + */ +public interface IPass extends IDocumentData { + + /** + * Gets the reference. + * + * @return the reference + */ + public String getReference(); + + /** + * Sets the reference. + * + * @param reference the new reference + */ + public void setReference(String reference); + + /** + * Gets the product id. + * + * @return the product id + */ + public String getProductId(); + + /** + * Sets the product id. + * + * @param productId the new product id + */ + public void setProductId(String productId); + + /** + * Gets the product owner. + * + * Company that provides the product. + * E.g. The RICS code of Eurail G.E.I. for Eurail passes. + * + * @return the product owner + */ + public String getProductOwner(); + + /** + * Sets the product owner. + * + * Company that provides the product. + * E.g. The RICS code of Eurail G.E.I. for Eurail passes. + * + * @param productOwner the new product owner + */ + public void setProductOwner(String productOwner); + + /** + * Gets the pass type. + * + * @return the pass type + */ + public int getPassType(); + + /** + * Sets the pass type. + * + * -- type of the pass, code list provided by the product owner + * + * @param passType the new pass type + */ + public void setPassType(int passType); + + /** + * Gets the human readable pass description. + * + * @return the human readable pass description. + */ + public String getPassDescription(); + + /** + * Sets the human readable pass description. + * + * @param passDescription the new human readable pass description. + */ + public void setPassDescription(String passDescription); + + /** + * Gets the class code. + * + * @return the class code + */ + public TravelClassType getClassCode(); + + /** + * Sets the travel class code. + * + * @param classCode the new travel class code + */ + public void setClassCode(TravelClassType classCode); + + /** + * Gets the valid from date and time. + * + * @return the valid from date and time + */ + public Date getValidFrom(); + + /** + * Sets the valid from date and time. + * + * @param validFrom the new valid from date and time + */ + public void setValidFrom(Date validFrom); + + /** + * Gets the valid until date and time. + * + * @return the valid until date and time + */ + public Date getValidUntil(); + + /** + * Sets the valid until date and time. + * + * @param validUntil the new valid until date and time + */ + public void setValidUntil(Date validUntil); + + /** + * Gets the number of validity days in case this is less than the entire validity range and the valid from day is open. + * + * @return the number of validity days in case this is less than the entire validity range. + */ + public int getNumberOfValidityDays(); + + /** + * Sets the number of validity days in case this is less than the entire validity range and the valid from day is open. + * + * @param numberOfValidityDays the new number of validity days in case this is less than the entire validity range. + */ + public void setNumberOfValidityDays(int numberOfValidityDays); + + /** + * Gets the number of possible trips. + * + * @return the number of possible trips + */ + public int getNumberOfPossibleTrips(); + + /** + * Sets the number of possible trips. + * + * @param numberOfPossibleTrips the new number of possible trips + */ + public void setNumberOfPossibleTrips(int numberOfPossibleTrips); + + /** + * Gets the number of days of travel in case this is less than the entire validity range. + * + * @return the number of days of travel in case this is less than the entire validity range + */ + public int getNumberOfDaysOfTravel(); + + /** + * Sets the number of days of travel in case this is less than the entire validity range. + * + * @param numberOfDaysOfTravel the new number of days of travel in case this is less than the entire validity range + */ + public void setNumberOfDaysOfTravel(int numberOfDaysOfTravel) ; + + /** + * Gets the activated days valid for traveling. + * + * @return the activated days valid for traveling + */ + public Collection getActivatedDays() ; + + /** + * Adds an activated day valid for traveling. + * + * @param activatedDay the activated day valid for traveling + */ + public void addActivatedDay(Date activatedDay); + + /** + * Gets the countries where the pass is valid. + * + * Code list according to the codes in UIC leaflet 918.2 + * + * @return the countries + */ + public Collection getCountries(); + + /** + * Adds a country. + * + * Code list according to the codes in UIC leaflet 918.2 + * + * @param country the country + */ + public void addCountry(Integer country); + + /** + * Gets the included carriers. + * + * @return the included carriers + */ + public Collection getIncludedCarriers(); + + /** + * Adds the included carrier. + * + * @param carrier the carrier + */ + public void addIncludedCarrier(String carrier); + + /** + * Gets the excluded carriers. + * + * @return the excluded carriers + */ + public Collection getExcludedCarriers(); + + /** + * Adds the excluded carrier. + * + * @param carrier the carrier + */ + public void addExcludedCarrier(String carrier); + + /** + * Gets the included service brands. + * + * @return the included service brands + */ + public Collection getIncludedServiceBrands(); + + /** + * Adds the included service brand. + * + * @param includedServiceBrand the included service brand + */ + public void addIncludedServiceBrand(Integer includedServiceBrand); + + /** + * Gets the excluded service brands. + * + * @return the excluded service brands + */ + public Collection getExcludedServiceBrands(); + + /** + * Adds the excluded service brand. + * + * @param excludedServiceBrand the excluded service brand + */ + public void addExcludedServiceBrand(Integer excludedServiceBrand); + + /** + * Gets the list of valid regions. + * + * @return the valid region list + */ + public Collection getValidRegionList(); + + /** + * Adds a valid region. + * + * @param validRegion the valid region to be added + */ + public void addValidRegion(IRegionalValidity validRegion); + + /** + * Gets the tariffs. + * + * @return the tariffs + */ + public Collection getTariffs(); + + /** + * Adds the tariff. + * + * @param tariff the tariff + */ + public void addTariff(ITariff tariff); + + /** + * Gets the info text. + * + * @return the info text + */ + public String getInfoText(); + + /** + * Sets the info text. + * + * @param infoText the new info text + */ + public void setInfoText(String infoText); + + /** + * Gets the extension. + * + * @return the extension + */ + public IExtension getExtension(); + + /** + * Sets the extension. + * + * @param extension the new extension + */ + public void setExtension(IExtension extension); + + + /** + * Sets the validity details containing additional validity ranges and excluded time ranges. + * + * @param validityDetails the new validity details + */ + public void setValidityDetails(IValidityDetails validityDetails); + + + /** + * Gets the validity details containing additional validity ranges and excluded time ranges. + * + * @return the validity details + */ + public IValidityDetails getValidityDetails(); + + /** + * Sets the price. + * + * + * @param price + */ + public void setPrice(Long price); + + + /** + * Gets the price. + * + * The price + * + * @return the price + */ + public Long getPrice(); + + + /** + * Gets the included add on tickets. + * + * E.g. an included local transport ticket at the beginning or end of the route. + * + * @return the included add ons + */ + public Collection getVatDetails(); + + /** + * Adds an included add on ticket. + * + * E.g. an included local transport ticket at the beginning or end of the route. + * + * @param includedAddOn the included add on + */ + public void addVatDetail(IVatDetail vatDetail) ; + + /** + * Sets the until date and time. + * + * @param date the new until date and time + */ + public void setUntilDate(Date date); + + + /** + * Gets the validFrom date time offset to UTC in units of 15 minutes. + * + * @return the validFrom date time UTC offset + */ + public Long getValidFromUTCoffset(); + + /** + * Sets the validFrom date time. + * + * @param validFromDateTime the new validFrom date time + */ + public void setValidFromUTCoffset(Long validFromUTCoffset) ; + + /** + * Gets the validUntil date time offset to UTC in units of 15 minutes. + * + * @return the validUntil date time UTC offset + */ + public Long getValidUntilUTCoffset(); + + /** + * Sets the validUntil date time. + * + * @param validUntilDateTime the new validUntil date time + */ + public void setValidUntilUTCoffset(Long validUntilUTCoffset) ; + +} diff --git a/src/org/uic/ticket/api/spec/IPlaces.java b/src/org/uic/ticket/api/spec/IPlaces.java new file mode 100644 index 0000000..7033938 --- /dev/null +++ b/src/org/uic/ticket/api/spec/IPlaces.java @@ -0,0 +1,80 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +import java.util.Collection; + +/** + * The Interface IPlaces. + * + * IPlaces provides data on reserved places + */ +public interface IPlaces { + + /** + * Gets the coach. + * + * @return the coach + */ + public String getCoach() ; + + /** + * Sets the coach. + * + * @param coach the new coach + */ + public void setCoach(String coach) ; + + /** + * Gets the human readable place string. + * E.g.: "15-18, 21, 22" + * + * @return the place string + */ + public String getPlaceString() ; + + /** + * Sets the the human readable place string. + * E.g.: "15-18, 21, 22" + * + * This elements should be avoided if not explicitly required for a special product. + * + * @param placeString the new place string + */ + public void setPlaceString(String placeString); + + /** + * Gets the human readable place description. + * E.g. "2 Window, open space" + * + * This elements should be avoided if not explicitly required for a special product. + * + * @return the human readable place description + */ + public String getPlaceDescription(); + + /** + * Sets the human readable place description. + * E.g. "2 Window, open space" + * + * @param placeDescription the new place description + */ + public void setPlaceDescription(String placeDescription); + + /** + * Gets the places. + * + * @return the places + */ + public Collection getPlaces(); + + /** + * Adds the place. + * + * @param place the place + */ + public void addPlace(String place); + + +} diff --git a/src/org/uic/ticket/api/spec/IPolygone.java b/src/org/uic/ticket/api/spec/IPolygone.java new file mode 100644 index 0000000..36e6cd8 --- /dev/null +++ b/src/org/uic/ticket/api/spec/IPolygone.java @@ -0,0 +1,32 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +import java.util.Collection; + +/** + * The Interface IPolygone. + * + * + * IPolygone provides a description of a region valid for traveling by a polygon of geo-coordinates. + * + */ +public interface IPolygone extends IRegionalValidity { + + /** + * Gets the edges of the polygon. + * + * @return the edges + */ + public Collection getEdges(); + + /** + * Adds an edge to the polygon. + * + * @param edge the geo-coordinate of the edge + */ + public void addEdge(IGeoCoordinate edge); + + +} diff --git a/src/org/uic/ticket/api/spec/IRegionalValidity.java b/src/org/uic/ticket/api/spec/IRegionalValidity.java new file mode 100644 index 0000000..18590f8 --- /dev/null +++ b/src/org/uic/ticket/api/spec/IRegionalValidity.java @@ -0,0 +1,15 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +/** + * The Interface IRegionalValidity. + * + * IRegionalValidity indicates a description of a region valid for travelling + * + */ +public interface IRegionalValidity { + + +} diff --git a/src/org/uic/ticket/api/spec/IRegisteredLuggage.java b/src/org/uic/ticket/api/spec/IRegisteredLuggage.java new file mode 100644 index 0000000..87e3ba7 --- /dev/null +++ b/src/org/uic/ticket/api/spec/IRegisteredLuggage.java @@ -0,0 +1,56 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +/** + * The Interface IRegisteredLuggage. + * + * IRegisteredLuggage provides a description for a piece of luggage registered for traveling and + * thus exceeding the general restrictions for luggage transport. + * + */ +public interface IRegisteredLuggage { + + /** + * Gets the registration id. + * + * @return the registration id + */ + public String getRegistrationId(); + + /** + * Sets the registration id. + * + * @param registrationId the new registration id + */ + public void setRegistrationId(String registrationId); + + /** + * Gets the max weight of the luggage piece in kg. + * + * @return the max weight + */ + public int getMaxWeight(); + + /** + * Sets the max weight of the luggage piece in kg. + * + * @param maxWeight the new max weight + */ + public void setMaxWeight(int maxWeight); + + /** + * Gets the max size as sum of length with and height in cm + * + * @return the max size + */ + public int getMaxSize() ; + + /** + * Sets the max size as sum of length with and height in cm. + * + * @param maxSize the new max size + */ + public void setMaxSize(int maxSize); +} diff --git a/src/org/uic/ticket/api/spec/IReservation.java b/src/org/uic/ticket/api/spec/IReservation.java new file mode 100644 index 0000000..3ec90da --- /dev/null +++ b/src/org/uic/ticket/api/spec/IReservation.java @@ -0,0 +1,522 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +import java.util.Collection; +import java.util.Date; + +import org.uic.ticket.api.asn.omv1.CodeTableType; +import org.uic.ticket.api.asn.omv1.PriceTypeType; +import org.uic.ticket.api.asn.omv1.ServiceType; +import org.uic.ticket.api.asn.omv1.TravelClassType; + + +/** + * The Interface IReservation. + * + * IReservation describes a reservation, either a reservation only or an integrated reservation ticket + */ +public interface IReservation extends IDocumentData { + + /** + * Gets the train. + * + * @return the train + */ + public String getTrain(); + + /** + * Sets the train. + * + * @param train the new train + */ + public void setTrain(String train); + + /** + * Gets the departure date and time. + * + * @return the departure date and time + */ + public Date getDepartureDate(); + + /** + * Sets the departure date and time. + * + * @param departureDate the new departure date and time + */ + public void setDepartureDate(Date departureDate); + + /** + * Gets the arrival date and time. + * + * @return the arrival date and time + */ + public Date getArrivalDate(); + + /** + * Sets the arrival date and time. + * + * @param arrivalDate the new arrival date and time + */ + public void setArrivalDate(Date arrivalDate); + + /** + * Gets the booking reference. + * + * The booking reference must contain the booking reference exchanged via + * booking interface according to UIC leaflet 918.1 in case this interface was used. + * + * @return the booking reference + */ + public String getReference(); + + /** + * Sets the reference. + * + * The booking reference must contain the booking reference exchanged via + * booking interface according to UIC leaflet 918.1 in case this interface was used. + * + * @param reference the new reference + */ + public void setReference(String reference); + + /** + * Gets the product id. + * + * @return the product id + */ + public String getProductId(); + + /** + * Sets the product id. + * + * @param productId the new product id + */ + public void setProductId(String productId); + + /** + * Gets the product owner. + * + * The company that defined the product. This is the allocating railway in case of car carriage reservations. + * + * @return the product owner + */ + public String getProductOwner() ; + + /** + * Sets the product owner. + * + * The company that defined the product. This is the allocating railway in case of car carriage reservations. + * + * @param productOwner the new product owner + */ + public void setProductOwner(String productOwner); + + /** + * Gets the service brand of the train. + * + * Service brand code list provided by UIC + * + * @return the service brand of the train + */ + public IServiceBrand getServiceBrand(); + + /** + * Sets the service brand of the train + * + * Service brand code list provided by UIC + * + * @param serviceBrand the new service brand of the train + */ + public void setServiceBrand(IServiceBrand serviceBrand); + + /** + * Gets the service. + * + * @return the service + */ + public ServiceType getService(); + + /** + * Sets the service. + * + * Services according to UIC leaflet 918.1 + * + * @param service the new service + */ + public void setService(ServiceType service); + + + /** + * Gets the station code table. + * + * @return the station code table + */ + public CodeTableType getStationCodeTable(); + + /** + * Gets the station code table. + * + * Defines the station code table to be used to retrieve station information. + * Default in case of reservations is the UIC station codes table for reservations + * + * @return the station code table + */ + public void setStationCodeTable(CodeTableType stationCodeTable); + + /** + * Gets the from station code. + * + * @return the from station code + */ + public String getFromStation(); + + /** + * Sets the from station code. + * + * @param fromStation the new from station code + */ + public void setFromStation(String fromStation); + + /** + * Gets the to station code. + * + * @return the to station code + */ + public String getToStation(); + + /** + * Sets the to station code. + * + * @param toStation the new to station code + */ + public void setToStation(String toStation); + + /** + * Gets the from station name. + * + * @return the from station name + */ + public String getFromStationName(); + + /** + * Sets the from station name. + * + * @param fromStationName the new from station name + */ + public void setFromStationName(String fromStationName); + + /** + * Gets the to station name. + * + * @return the to station name + */ + public String getToStationName(); + + /** + * Sets the to station name. + * + * @param toStationName the new to station name + */ + public void setToStationName(String toStationName); + + /** + * Gets the carriers responsible for the transport. + * + * @return the carriers + */ + public Collection getCarriers(); + + /** + * Adds a carrier responsible for the transport. + * + * @param carrier the carrier + */ + public void addCarrier(String carrier); + + /** + * Gets the travel class code. + * + * @return the travel class code + */ + public TravelClassType getClassCode(); + + /** + * Sets the travel class code. + * + * @param classCode the new travel class code + */ + public void setClassCode(TravelClassType classCode); + + /** + * Gets the service level. + * + * Service level codes as defined in UIC leaflet 918.1 + * + * @return the service level + */ + public String getServiceLevel(); + + /** + * Sets the service level. + * + * Service level codes as defined in UIC leaflet 918.1 + * + * @param serviceLevel the new service level + */ + public void setServiceLevel(String serviceLevel); + + /** + * Gets the places. + * + * @return the places + */ + public IPlaces getPlaces(); + + /** + * Sets the places. + * + * @param places the new places + */ + public void setPlaces(IPlaces places); + + + /** + * Gets the additional places in a second coach. + * + * @return the additional places in a second coach. + */ + public IPlaces getAdditionalPlaces(); + + /** + * Sets the additional places. + * + * @param places the new places + */ + public void setAdditionalPlaces(IPlaces places); + + /** + * Gets the bicycle places. + * + * @return the bicycle places + */ + public IPlaces getBicyclePlaces(); + + /** + * Sets the bicycle places. + * + * @param bicyclePlaces the new bicycle places + */ + public void setBicyclePlaces(IPlaces bicyclePlaces); + + /** + * Gets the compartment details. + * + * @return the compartment details + */ + public ICompartmentDetails getCompartmentDetails(); + + /** + * Sets the compartment details. + * + * @param compartmentDetails the new compartment details + */ + public void setCompartmentDetails(ICompartmentDetails compartmentDetails); + + /** + * Gets the number of overbooked travelers. + * + * @return the number of overbooked travelers + */ + public int getNumberOfOverbooked(); + + /** + * Sets the number of overbooked travelers. + * + * @param numberOfOverbooked the new number of overbooked travelers + */ + public void setNumberOfOverbooked(int numberOfOverbooked); + + /** + * Gets the berths. + * + * @return the berths + */ + public Collection getBerths(); + + /** + * Adds the berth. + * + * @param berth the berth + */ + public void addBerth(IBerth berth); + + /** + * Gets the tariffs. + * + * @return the tariffs + */ + public Collection getTariffs(); + + /** + * Adds the tariff. + * + * @param tariff the tariff + */ + public void addTariff(ITariff tariff); + + /** + * Gets the price type. + * + * @return the price type + */ + public PriceTypeType getPriceType(); + + /** + * Sets the price type. + * + * @param priceType the new price type + */ + public void setPriceType(PriceTypeType priceType) ; + + /** + * Gets the type of supplement. + * + * Codes according to UIC leaflet 918.1 + * + * @return the type of supplement + */ + public int getTypeOfSupplement() ; + + /** + * Sets the type of supplement. + * + * Codes according to UIC leaflet 918.1 + * + * @param typeOfSupplement the new type of supplement + */ + public void setTypeOfSupplement(int typeOfSupplement); + + /** + * Gets the number of supplements. + * + * @return the number of supplements + */ + public int getNumberOfSupplements(); + + /** + * Sets the number of supplements. + * + * @param numberOfSupplements the new number of supplements + */ + public void setNumberOfSupplements(int numberOfSupplements); + + + /** + * Gets the info text. + * + * @return the info text + */ + public String getInfoText(); + + /** + * Sets the info text. + * + * @param infoText the new info text + */ + public void setInfoText(String infoText) ; + + /** + * Gets the luggage restriction. + * + * @return the luggage restriction + */ + public ILuggageRestriction getLuggageRestriction(); + + /** + * Sets the luggage restriction. + * + * @param luggageRestriction the new luggage restriction + */ + public void setLuggageRestriction(ILuggageRestriction luggageRestriction); + + /** + * Gets the extension. + * + * @return the extension + */ + public IExtension getExtension(); + + /** + * Sets the extension. + * + * @param extension the new extension + */ + public void setExtension(IExtension extension); + + /** + * Sets the price. + * + * + * @param price + */ + public void setPrice(Long price); + + + /** + * Gets the price. + * + * The price + * + * @return the price + */ + public Long getPrice(); + + + /** + * Gets the included add on tickets. + * + * E.g. an included local transport ticket at the beginning or end of the route. + * + * @return the included add ons + */ + public Collection getVatDetails(); + + /** + * Adds an included add on ticket. + * + * E.g. an included local transport ticket at the beginning or end of the route. + * + * @param includedAddOn the included add on + */ + public void addVatDetail(IVatDetail vatDetail) ; + + /** + * Gets the departure date time offset to UTC in units of 15 minutes. + * + * @return the departure date time UTC offset + */ + public Long getDepartureUTCoffset(); + + /** + * Sets the departure date time. + * + * @param departureDateTime the new departure date time + */ + public void setDepartureUTCoffset(Long departureUTCoffset) ; + + /** + * Gets the arrival date time offset to UTC in units of 15 minutes. + * + * @return the arrival date time UTC offset + */ + public Long getArrivalUTCoffset(); + + /** + * Sets the arrival date time. + * + * @param arrivalDateTime the new arrival date time + */ + public void setArrivalUTCoffset(Long arrivalUTCoffset) ; +} diff --git a/src/org/uic/ticket/api/spec/IReturnRouteDescription.java b/src/org/uic/ticket/api/spec/IReturnRouteDescription.java new file mode 100644 index 0000000..6f718da --- /dev/null +++ b/src/org/uic/ticket/api/spec/IReturnRouteDescription.java @@ -0,0 +1,100 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +import java.util.Collection; + +/** + * The Interface IReturnRouteDescription. + * + * IReturnRouteDescription provides the description of a return route for an open + * ticket. The data elements for the route description are repeated. + */ +public interface IReturnRouteDescription { + + /** + * Gets the from station code. + * + * @return the from station code + */ + public String getFromStation() ; + + /** + * Sets the from station code. + * + * @param fromStation the new from station code + */ + public void setFromStation(String fromStation); + + /** + * Gets the to station code. + * + * @return the to station code + */ + public String getToStation(); + + /** + * Sets the to station code. + * + * @param toStation the new to station code + */ + public void setToStation(String toStation) ; + + /** + * Gets the from station name. + * + * @return the from station name + */ + public String getFromStationName() ; + + /** + * Sets the from station name. + * + * @param fromStationName the new from station name + */ + public void setFromStationName(String fromStationName); + + /** + * Gets the to station name. + * + * @return the to station name + */ + public String getToStationName(); + + /** + * Sets the to station name. + * + * @param toStationName the new to station name + */ + public void setToStationName(String toStationName); + + /** + * Gets the valid region description. + * + * @return the valid region desc + */ + public String getValidRegionDesc(); + + /** + * Sets the valid region description. + * + * @param validRegionDesc the new valid region description + */ + public void setValidRegionDesc(String validRegionDesc); + + /** + * Gets the list of valid regions. + * + * @return the valid region list + */ + public Collection getValidRegionList() ; + + /** + * Adds the valid region list. + * + * @param validRegion the valid region + */ + public void addValidRegionList(IRegionalValidity validRegion); + +} diff --git a/src/org/uic/ticket/api/spec/IRouteSection.java b/src/org/uic/ticket/api/spec/IRouteSection.java new file mode 100644 index 0000000..ef93426 --- /dev/null +++ b/src/org/uic/ticket/api/spec/IRouteSection.java @@ -0,0 +1,84 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +import org.uic.ticket.api.asn.omv1.CodeTableType; + +/** + * The Interface IRouteSection. + * + * IRouteSection describes a section of a route by the beginn and end station. + */ +public interface IRouteSection { + + /** + * Gets the station code table. + * + * @return the station code table + */ + public CodeTableType getStationCodeTable(); + + /** + * Sets the station code table. + * + * @param stationCodeTable the new station code table + */ + public void setStationCodeTable(CodeTableType stationCodeTable); + + /** + * Gets the from station code. + * + * @return the from station code + */ + public String getFromStation(); + + /** + * Sets the from station code. + * + * @param fromStation the new from station code + */ + public void setFromStation(String fromStation) ; + + /** + * Gets the to station code. + * + * @return the to station code + */ + public String getToStation(); + + /** + * Sets the to station code. + * + * @param toStation the new to station code + */ + public void setToStation(String toStation); + + /** + * Gets the from station name. + * + * @return the from station name + */ + public String getFromStationName(); + + /** + * Sets the from station name. + * + * @param fromStationName the new from station name + */ + public void setFromStationName(String fromStationName); + + /** + * Gets the to station name. + * + * @return the to station name + */ + public String getToStationName(); + + /** + * Sets the to station name. + * + * @param toStationName the new to station name + */ + public void setToStationName(String toStationName); +} diff --git a/src/org/uic/ticket/api/spec/ISeriesDataDetails.java b/src/org/uic/ticket/api/spec/ISeriesDataDetails.java new file mode 100644 index 0000000..7c410a2 --- /dev/null +++ b/src/org/uic/ticket/api/spec/ISeriesDataDetails.java @@ -0,0 +1,66 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +/** + * The Interface ISeriesDataDetails. + * + * ISeriesDataDetails describes details of a series (according to UIC leaflet 108.1 + * + * Series details should be omitted if not explicitely required for a specific product. + * + * + */ +public interface ISeriesDataDetails { + + + + /** + * Gets the supplying carrier of the series data. + * + * @return the supplying carrier of the series data + */ + public int getSupplyingCarrier() ; + + + /** + * Sets the supplying carrier of the series data. + * + * @param supplyingCarrier the new supplying carrier of the series data + */ + public void setSupplyingCarrier(int supplyingCarrier); + + + /** + * Gets the offer identification of the series data. + * + * @return the offer identification of the series data + */ + public int getOfferIdentification(); + + + /** + * Sets the offer identification of the series data. + * + * @param offerIdentification the new offer identification of the series data + */ + public void setOfferIdentification(int offerIdentification) ; + + + /** + * Gets the series id. + * + * @return the series id + */ + public int getSeries(); + + + /** + * Sets the series id. + * + * @param series the new series id + */ + public void setSeries(int series) ; + +} diff --git a/src/org/uic/ticket/api/spec/IServiceBrand.java b/src/org/uic/ticket/api/spec/IServiceBrand.java new file mode 100644 index 0000000..4a99dad --- /dev/null +++ b/src/org/uic/ticket/api/spec/IServiceBrand.java @@ -0,0 +1,55 @@ +package org.uic.ticket.api.spec; + + +public interface IServiceBrand { + + /** + * Gets the service brand of the train. + * + * Service brand code list provided by UIC + * + * @return the service brand of the train + */ + public int getServiceBrand(); + + /** + * Sets the service brand of the train + * + * Service brand code list provided by UIC + * + * @param serviceBrand the new service brand of the train + */ + public void setServiceBrand(int serviceBrand); + + + /** + * Gets the service brand description. + * + * Services according to UIC leaflet 918.1 + * + * @return the service brand description + */ + public String getServiceBrandDescription(); + + /** + * Sets the service brand description. + * + * @param serviceBrandDescription the new service brand description + */ + public void setServiceBrandDescription(String serviceBrandDescription); + + /** + * Gets the service brand abbreviation. + * + * @return the service brand abbreviation + */ + public String getServiceBrandAbbreviation(); + + /** + * Sets the service brand abbreviation. + * + * @param serviceBrandAbbreviation the new service brand abbreviation + */ + public void setServiceBrandAbbreviation(String serviceBrandAbbreviation); + +} diff --git a/src/org/uic/ticket/api/spec/IStationPassage.java b/src/org/uic/ticket/api/spec/IStationPassage.java new file mode 100644 index 0000000..c98b83d --- /dev/null +++ b/src/org/uic/ticket/api/spec/IStationPassage.java @@ -0,0 +1,241 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +import java.util.Collection; +import java.util.Date; + +import org.uic.ticket.api.asn.omv1.CodeTableType; + +// TODO: Auto-generated Javadoc +/** + * The Interface IStationPassage. + * + * IStationPassage describes a ticket to enter or pass a station or platform. + * + */ +public interface IStationPassage extends IDocumentData { + + /** + * Gets the reference. + * + * @return the reference + */ + public String getReference(); + + /** + * Sets the reference. + * + * @param reference the new reference + */ + public void setReference(String reference); + + /** + * Gets the product type. + * + * @return the product type + */ + public String getProductId(); + + /** + * Sets the product type. + * + * @param type the new product id + */ + public void setProductId(String type); + + /** + * Gets the product owner. + * + * @return the product owner + */ + public String getProductOwner(); + + /** + * Sets the product owner. + * + * @param productOwner the new product owner + */ + public void setProductOwner(String productOwner); + + /** + * Gets the valid from date and time. + * + * @return the valid from date and time + */ + public Date getValidFrom(); + + /** + * Sets the valid from date and time. + * + * @param validFrom the new valid from date and time + */ + public void setValidFrom(Date validFrom); + + /** + * Gets the valid until date and time. + * + * @return the valid until date and time + */ + public Date getValidUntil() ; + + /** + * Sets the valid until date and time. + * + * @param validUntil the new valid until date and time + */ + public void setValidUntil(Date validUntil); + + /** + * Gets the station code table. + * + * @return the station code table + */ + public CodeTableType getStationCodeTable(); + + /** + * Sets the station code table. + * + * @param stationCodeTable the new station code table + */ + public void setStationCodeTable(CodeTableType stationCodeTable); + + /** + * Gets the list of station codes of all stations where the passage is allowed. + * + * @return the stations list + */ + public Collection getStations(); + + /** + * Adds a station where the passage is allowed. + * + * @param station the station code + */ + public void addStation(String station); + + /** + * Adds a station name of a station where the passage is allowed. + * + * @param name the name + */ + public void addStationName(String name); + + /** + * Gets the station names of all stations where the passage is allowed. + * + * @return the station names + */ + public Collection getStationNames(); + + /** + * Gets the number of days allowed the passage is allowed in case the number is smaller that the validity range. + * + * @return the number of passage days allowed + */ + public int getNumberOfdaysAllowed(); + + /** + * Sets the number of days allowed the passage is allowed in case the number is smaller that the validity range. + * + * @param numberOfdaysAllowed the new number of allowed days + */ + public void setNumberOfdaysAllowed(int numberOfdaysAllowed); + + + /** + * Gets the product name. + * + * @return the product name + */ + public String getProductName(); + + /** + * Sets the product name. + * + * @param name the new product name + */ + public void setProductName(String name); + + + /** + * Gets the extension. + * + * @return the extension + */ + public IExtension getExtension(); + + /** + * Sets the extension. + * + * @param extensionData the new extension + */ + public void setExtension(IExtension extensionData); + + + /** + * Gets the area codes of areas in a station where the access is allowed. + * + * @return the area codes of areas in a station where the access is allowed + */ + public Collection getAreaCodes(); + + /** + * Gets the area names of areas in a station where the access is allowed. + * + * @return the area names of areas in a station where the access is allowed + */ + public Collection getAreaNames(); + + /** + * Adds an area code of an area in a station where the access is allowed. + * + * @param code the area code of an area in a station where the access is allowed. + */ + public void addAreaCode(String code); + + /** + * Adds an area name of an area in a station where the access is allowed. + * + * @param name the name of an area in a station where the access is allowed + */ + public void addAreaName(String name); + + /** + * Sets the until date and time. + * + * @param date the new until date and time + */ + public void setUntilDate(Date date); + + + /** + * Gets the validFrom date time offset to UTC in units of 15 minutes. + * + * @return the validFrom date time UTC offset + */ + public Long getValidFromUTCoffset(); + + /** + * Sets the validFrom date time. + * + * @param validFromDateTime the new validFrom date time + */ + public void setValidFromUTCoffset(Long validFromUTCoffset) ; + + /** + * Gets the validUntil date time offset to UTC in units of 15 minutes. + * + * @return the validUntil date time UTC offset + */ + public Long getValidUntilUTCoffset(); + + /** + * Sets the validUntil date time. + * + * @param validUntilDateTime the new validUntil date time + */ + public void setValidUntilUTCoffset(Long validUntilUTCoffset) ; + +} diff --git a/src/org/uic/ticket/api/spec/ITariff.java b/src/org/uic/ticket/api/spec/ITariff.java new file mode 100644 index 0000000..5bd4a15 --- /dev/null +++ b/src/org/uic/ticket/api/spec/ITariff.java @@ -0,0 +1,207 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +import java.util.Collection; + +import org.uic.ticket.api.asn.omv1.PassengerType; + +// TODO: Auto-generated Javadoc +/** + * The Interface ITariff. + * + * ITariff describes the tariff of an open ticket, reservation or or IRT + * + * + */ +public interface ITariff { + + /** + * Gets the number of passengers associated with that tariff. + * + * @return the number of passengers associated with that tariff + */ + public int getNumberOfPassengers(); + + + /** + * Sets the number of passengers associated with that tariff. + * + * @param numberOfPassengers the new number of passengers associated with that tariff + */ + public void setNumberOfPassengers(int numberOfPassengers); + + + /** + * Gets the passenger type. + * + * @return the passenger type + */ + public PassengerType getPassengerType(); + + + /** + * Sets the passenger type. + * + * @param passengerType the new passenger type + */ + public void setPassengerType(PassengerType passengerType); + + /** + * Gets the upper limit of the age of the passenger to qualify for that tariff. + * + * @return the upper age limit + */ + public int getAgeBelow(); + + /** + * Sets the upper limit of the age of the passenger to qualify for that tariff. + * + * @param ageBelow the new upper limit of the age of the passenger to qualify for that tariff + */ + public void setAgeBelow(int ageBelow); + + + /** + * Gets the lower limit of the age of the passenger to qualify for that tariff. + * + * @return the lower limit of the age of the passenger to qualify for that tariff + */ + public int getAgeAbove(); + + + /** + * Sets the lower limit of the age of the passenger to qualify for that tariff. + * + * @param ageAbove the new lower limit of the age of the passenger to qualify for that tariff + */ + public void setAgeAbove(int ageAbove); + + + /** + * Gets the traveler ids. + * + * This provides a link to the travelers listed in the data in case the travelers have to be named (e.g. Eurail passes) + * -- the number indicates the position in the traveler list starting from 1 + * + * @return the traveler ids + */ + public Collection getTravelerIds() ; + + + /** + * Adds the traveler id. + * + * This provides a link to the travelers listed in the data in case the travelers have to be named (e.g. Eurail passes) + * -- the number indicates the position in the traveler list starting from 1 + * + * @param travelerId the traveler id + */ + public void addTravelerId(Integer travelerId); + + /** + * Checks if this tariff is restricted to the country of residence given in the traveler data. + * + * @return true, if is restricted to country of residence + */ + public boolean isRestrictedToCountryOfResidence(); + + + + /** + * Sets if this tariff is restricted to the country of residence given in the traveler data. + * + * @param restrictedToCountryOfResidence the new restricted to country of residence + */ + public void setRestrictedToCountryOfResidence(boolean restrictedToCountryOfResidence); + + + /** + * Gets the restricted to route section. + * + * This limits the tariff to a route section. + * This could be used in case the age restrictions vary along the route. + * + * @return the restricted to route section + */ + public IRouteSection getRestrictedToRouteSection(); + + + /** + * Sets the restricted to route section. + * + * This limits the tariff to a route section. + * This could be used in case the age restrictions vary along the route. + * + * @param restrictedToRouteSection the new restricted to route section + */ + public void setRestrictedToRouteSection(IRouteSection restrictedToRouteSection); + + + /** + * Sets the series data details. + * + * Add series details in case the tariff is based on data from UIC leaflet 108.1. + * + * @param seriesDataDetails the new series data details + */ + public void setSeriesDataDetails(ISeriesDataDetails seriesDataDetails); + + + /** + * Gets the series data details. + * + * Add series details in case the tariff is based on data from UIC leaflet 108.1. + * + * @return the series data details + */ + public ISeriesDataDetails getSeriesDataDetails(); + + /** + * Gets the tariff code. + * + * @return the tariff code + */ + public String getTariffId() ; + + + /** + * Sets the tariff code. + * + * @param tariffId the new tariff code + */ + public void setTariffId(String tariffId); + + + /** + * Gets the human readable tariff description. + * + * @return the human readable tariff description + */ + public String getTariffDescription(); + + + /** + * Sets the human readable tariff description. + * + * @param tariffDescription the new human readable tariff description + */ + public void setTariffDescription(String tariffDescription); + + /** + * Gets the list of reduction cards required to qualify for that tariff. + * + * + * @return the reduction cards required to qualify for that tariff + */ + public Collection getReductionCards(); + + + /** + * Adds a reduction card required to qualify for that tariff. + * + * @param reductionCard the reduction card + */ + public void addReductionCard(ICardReference reductionCard); +} diff --git a/src/org/uic/ticket/api/spec/ITicketLink.java b/src/org/uic/ticket/api/spec/ITicketLink.java new file mode 100644 index 0000000..2c180c4 --- /dev/null +++ b/src/org/uic/ticket/api/spec/ITicketLink.java @@ -0,0 +1,99 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +import org.uic.ticket.api.asn.omv1.LinkMode; +import org.uic.ticket.api.asn.omv1.TicketType; + +/** + * The Interface ITicketLink. + * + * ITicketLink provides data to reference an external separate ticket + */ +public interface ITicketLink { + + /** + * Gets the reference. + * + * @return the reference + */ + public String getReference() ; + + /** + * Sets the reference. + * + * @param reference the new reference + */ + public void setReference(String reference); + + /** + * Gets the issuer. + * + * @return the issuer + */ + public String getIssuer(); + + /** + * Sets the issuer. + * + * @param issuer the new issuer + */ + public void setIssuer(String issuer) ; + + /** + * Gets the product owner. + * + * @return the product owner + */ + public String getProductOwner(); + + /** + * Sets the product owner. + * + * @param productOwner the new product owner + */ + public void setProductOwner(String productOwner); + + /** + * Gets the ticket type. + * + * @return the ticket type + */ + public TicketType getTicketType(); + + /** + * Sets the ticket type. + * + * @param ticketType the new ticket type + */ + public void setTicketType(TicketType ticketType); + + /** + * Gets the link mode. + * + * @return the link mode + */ + public LinkMode getLinkMode(); + + /** + * Sets the link mode. + * + * @param linkMode the new link mode + */ + public void setLinkMode(LinkMode linkMode); + + /** + * Gets the issuer PNR. + * + * @return the issuer PNR + */ + public String getIssuerPNR() ; + + /** + * Sets the issuer PNR. + * + * @param train the new train + */ + public void setIssuerPNR(String issuerPNR); +} diff --git a/src/org/uic/ticket/api/spec/ITimeRange.java b/src/org/uic/ticket/api/spec/ITimeRange.java new file mode 100644 index 0000000..82164d1 --- /dev/null +++ b/src/org/uic/ticket/api/spec/ITimeRange.java @@ -0,0 +1,72 @@ +/* + * + */ +package org.uic.ticket.api.spec; + + + +/** + * The Interface ITimeRange. + * + * ITimeRange defines a range of times. The times are encoded as Minutes of the day (0 = 0:00 , 1440 = 24:00) + */ +public interface ITimeRange { + + /** + * Gets the from time. + * + * @return the from time + */ + public int getFromTime(); + + /** + * Gets the until time. + * + * @return the until time + */ + public int getUntilTime(); + + /** + * Sets the from time. + * + * @param minutes the new from time + */ + public void setFromTime(int minutes); + + /** + * Sets the until time. + * + * @param minutes the new until time + */ + public void setUntilTime(int minutes); + + + /** + * Gets the validFrom date time offset to UTC in units of 15 minutes. + * + * @return the validFrom date time UTC offset + */ + public Long getValidFromUTCoffset(); + + /** + * Sets the validFrom date time. + * + * @param validFromDateTime the new validFrom date time + */ + public void setValidFromUTCoffset(Long validFromUTCoffset) ; + + /** + * Gets the validUntil date time offset to UTC in units of 15 minutes. + * + * @return the validUntil date time UTC offset + */ + public Long getValidUntilUTCoffset(); + + /** + * Sets the validUntil date time. + * + * @param validUntilDateTime the new validUntil date time + */ + public void setValidUntilUTCoffset(Long validUntilUTCoffset) ; + +} diff --git a/src/org/uic/ticket/api/spec/IToken.java b/src/org/uic/ticket/api/spec/IToken.java new file mode 100644 index 0000000..5f38183 --- /dev/null +++ b/src/org/uic/ticket/api/spec/IToken.java @@ -0,0 +1,52 @@ +package org.uic.ticket.api.spec; + + +/** + * The Interface IToken. + * + * IToken specifies a unique token + */ +public interface IToken { + + /** + * Gets the token provider. + * + * @return the token provider + */ + public String getTokenProvider(); + + /** + * Gets the token specification. + * + * @return the token specification + */ + public String getTokenSpecification(); + + /** + * Gets the token. + * + * @return the token + */ + public byte[] getToken(); + + /** + * Sets the token provider. + * + * @param provider the new token provider + */ + public void setTokenProvider(String provider); + + /** + * Sets the token specification. + * + * @param specification the new token specification + */ + public void setTokenSpecification(String specification); + + /** + * Sets the token. + * + * @param token the new token + */ + public void setToken(byte[] token); +} diff --git a/src/org/uic/ticket/api/spec/ITrainLink.java b/src/org/uic/ticket/api/spec/ITrainLink.java new file mode 100644 index 0000000..b647db7 --- /dev/null +++ b/src/org/uic/ticket/api/spec/ITrainLink.java @@ -0,0 +1,122 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +import java.util.Date; + +/** + * The Interface ITrainLink. + * + * ITrainLink specifies the mandatory use of a train within the route of an open ticket or counter mark. + */ +public interface ITrainLink extends IRegionalValidity { + + /** + * Gets the train. + * + * @return the train + */ + public String getTrain() ; + + /** + * Sets the train. + * + * @param train the new train + */ + public void setTrain(String train); + + /** + * Gets the departure date time. + * + * @return the departure date time + */ + public Date getDepartureDateTime(); + + /** + * Sets the departure date time. + * + * @param departureDateTime the new departure date time + */ + public void setDepartureDateTime(Date departureDateTime) ; + + + /** + * Gets the departure date time offset to UTC in units of 15 minutes. + * + * @return the departure date time UTC offset + */ + public Long getDepartureUTCoffset(); + + /** + * Sets the departure date time. + * + * @param departureDateTime the new departure date time + */ + public void setDepartureUTCoffset(Long departureUTCoffset) ; + + + + + /** + * Gets the from station code. + * + * @return the from station code + */ + public String getFromStation(); + + /** + * Sets the from station code. + * + * @param fromStation the new from station code + */ + public void setFromStation(String fromStation); + + /** + * Gets the to station code. + * + * @return the to station code + */ + public String getToStation(); + + /** + * Sets the to station code. + * + * @param toStation the new to station code + */ + public void setToStation(String toStation); + + /** + * Gets the from station name. + * + * @return the from station name + */ + public String getFromStationName() ; + + /** + * Sets the from station name. + * + * @param fromStationName the new from station name + */ + public void setFromStationName(String fromStationName); + + /** + * Gets the to station name. + * + * @return the to station name + */ + public String getToStationName(); + + /** + * Sets the to station name. + * + * @param toStationName the new to station name + */ + public void setToStationName(String toStationName); + + + + + + +} diff --git a/src/org/uic/ticket/api/spec/ITraveler.java b/src/org/uic/ticket/api/spec/ITraveler.java new file mode 100644 index 0000000..b3d6480 --- /dev/null +++ b/src/org/uic/ticket/api/spec/ITraveler.java @@ -0,0 +1,253 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +import java.util.Collection; +import java.util.Date; + +import org.uic.ticket.api.asn.omv1.GenderType; +import org.uic.ticket.api.asn.omv1.PassengerType; + +// TODO: Auto-generated Javadoc +/** + * The Interface ITravelerData. + * + * ITravelerData specifies the details of a traveler. + * + */ +public interface ITraveler { + + /** + * Gets the first name. + * + * @return the first name + */ + public String getFirstName(); + + /** + * Sets the first name. + * + * @param firstName the new first name + */ + public void setFirstName(String firstName); + + /** + * Gets the second name. + * + * @return the second name + */ + public String getSecondName() ; + + /** + * Sets the second name. + * + * @param secondName the new second name + */ + public void setSecondName(String secondName); + + /** + * Gets the last name. + * + * @return the last name + */ + public String getLastName(); + + /** + * Sets the last name. + * + * @param lastName the new last name + */ + public void setLastName(String lastName); + + /** + * Gets the id card. + * + * @return the id card + */ + public String getIdCard(); + + /** + * Sets the id card. + * + * @param idCard the new id card + */ + public void setIdCard(String idCard) ; + + /** + * Gets the passport id. + * + * @return the passport id + */ + public String getPassportId() ; + + /** + * Sets the passport id. + * + * @param passportId the new passport id + */ + public void setPassportId(String passportId); + + /** + * Gets the title. + * + * @return the title + */ + public String getTitle(); + + /** + * Sets the title. + * + * @param title the new title + */ + public void setTitle(String title); + + /** + * Gets the gender. + * + * @return the gender + */ + public GenderType getGender(); + + /** + * Sets the gender. + * + * @param gender the new gender + */ + public void setGender(GenderType gender); + + /** + * Gets the customer id. + * + * @return the customer id + */ + public String getCustomerId(); + + /** + * Sets the customer id. + * + * @param customerId the new customer id + */ + public void setCustomerId(String customerId); + + /** + * Gets the date of birth. + * + * @return the date of birth + */ + public Date getDateOfBirth(); + + /** + * Sets the date of birth. + * + * @param dateOfBirth the new date of birth + */ + public void setDateOfBirth(Date dateOfBirth); + + /** + * Checks if is ticket holder. + * + * @return true, if is ticket holder + */ + public boolean isTicketHolder(); + + /** + * Sets the ticket holder. + * + * @param ticketHolder the new ticket holder + */ + public void setTicketHolder(boolean ticketHolder); + + /** + * Gets the passenger type. + * + * @return the passenger type + */ + public PassengerType getPassengerType(); + + /** + * Sets the passenger type. + * + * @param passengerType the new passenger type + */ + public void setPassengerType(PassengerType passengerType); + + /** + * Checks if is passenger with reduced mobility. + * + * @return true, if is passenger with reduced mobility + */ + public boolean isPassengerWithReducedMobility(); + + /** + * Sets the passenger with reduced mobility. + * + * @param passengerWithReducedMobility the new passenger with reduced mobility + */ + public void setPassengerWithReducedMobility(boolean passengerWithReducedMobility); + + /** + * Gets the country of residence (numeric ISO country code) . + * + * @return the country of residence (numeric ISO country code) + */ + public int getCountryOfResidence(); + + /** + * Sets the country of residence (numeric ISO country code) . + * + * @param countryOfResidence the new country of residence (numeric ISO country code) + */ + public void setCountryOfResidence(int countryOfResidence); + + + + /** + * Gets the passport country (numeric ISO country code) . + * + * @return the passport country (numeric ISO country code) + */ + public int getPassportCountry(); + + + /** + * Sets the passport country (numeric ISO country code) . + * + * @param passportCountry the new passport country (numeric ISO country code) + */ + public void setPassportCountry(int passportCountry); + + + /** + * Gets the ID card country (numeric ISO country code) . + * + * @return the ID card country (numeric ISO country code) + */ + public int getIDCardCountry(); + + + /** + * Sets the ID card country (numeric ISO country code) . + * + * @param idcardCountry the new ID card country (numeric ISO country code) + */ + public void setIDCardCountry(int idcardCountry); + + /** + * Gets the status collection. + * + * @return the status collection + */ + public Collection getStatusCollection(); + + /** + * Adds the status description. + * + * @param statusDescription the status description + */ + public void addStatusDescription(ICustomerStatusDescription statusDescription) ; + + + + +} diff --git a/src/org/uic/ticket/api/spec/ITravelerDetail.java b/src/org/uic/ticket/api/spec/ITravelerDetail.java new file mode 100644 index 0000000..9368bc2 --- /dev/null +++ b/src/org/uic/ticket/api/spec/ITravelerDetail.java @@ -0,0 +1,61 @@ +/* + * + */ +package org.uic.ticket.api.spec; + + +import java.util.Set; + +/** + * The Interface ITravelerDetail. + * + * ITravelerDetail provides a list of traveler data. + */ +public interface ITravelerDetail { + + /** + * Gets the group name. + * + * @return the group name + */ + public String getGroupName() ; + + /** + * Sets the group name. + * + * @param groupName the new group name + */ + public void setGroupName(String groupName) ; + + /** + * Adds the traveler. + * + * @param traveler the traveler + */ + public void addTraveler (ITraveler traveler) ; + + /** + * Gets the travelers. + * + * @return the travelers + */ + public Set getTravelers() ; + + /** + * Gets the preferred language. + * ISO 639-1 coding of the language preferred for the traveler / ticket holder + * + * @return the preferred language + */ + public String getPreferredLanguage(); + + /** + * Sets the preferred language. + * ISO 639-1 coding of the language preferred for the traveler / ticket holder + * + * @param language the new preferred language + */ + public void setPreferredLanguage(String language); + + +} diff --git a/src/org/uic/ticket/api/spec/IUicRailTicket.java b/src/org/uic/ticket/api/spec/IUicRailTicket.java new file mode 100644 index 0000000..4b95d57 --- /dev/null +++ b/src/org/uic/ticket/api/spec/IUicRailTicket.java @@ -0,0 +1,192 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +import java.util.Collection; + + +/** + * The Interface IUicRailTicket. + * + * This class provides the top level of the data for a document to be encoded + * according to the: + * UIC standard for ticket control data in asn.1 / PER unaligned encoding. + * version 1.0 + * + * The data contains: + * -- -issuer informations + * -- -the details of the transport document + * -- -informations required for the control process + * -- -informations on the travelers independent from the transport document + * -- -proprietary extensions + * + */ +public interface IUicRailTicket { + + /** + * Gets the issuer details. + * + * @return the issuer details + */ + public IIssuingDetail getIssuerDetails(); + + /** + * Gets the traveler details. + * + * @return the traveler details + */ + public ITravelerDetail getTravelerDetails(); + + /** + * Gets the traveler details. + * + * @return the traveler details + */ + public IControlDetail getControlDetails(); + + /** + * Gets the extensions. + * + * @return the extensions + */ + public Collection getExtensions(); + + /** + * Adds an extension + * + * @param extension the extension + */ + public void addExtension(IExtension extension); + + /** + * Gets the transport documents. + * + * @return the transport documents + */ + public Collection getDocuments(); + + + /** + * Sets the issuer details. + * + * @param issuerDetails the new issuer details + */ + public void setIssuerDetails(IIssuingDetail issuerDetails); + + /** + * Sets the traveler details. + * + * @param travelerDetails the new traveler details + */ + public void setTravelerDetails(ITravelerDetail travelerDetails); + + /** + * Sets the control details + * + * @param controlDetails the new control details + */ + public void setControlDetails(IControlDetail controlDetails); + + + /** + * Gets the travel document data. + * + * @return the travel document data + */ + public Collection getDocumentData(); + + /** + * Adds the reservation. + * -- more than one document to be used on bilateral agreement only + * + * @param document the reservation + */ + public void addReservation(IReservation document); + + /** + * Adds the open ticket. + * -- more than one document to be used on bilateral agreement only + * + * @param document the open ticket + */ + public void addOpenTicket(IOpenTicket document); + + /** + * Adds the car carriage reservation. + * + * @param document the car carriage reservation + */ + public void addCarCarriageReservation(ICarCarriageReservation document); + + /** + * Adds the rail pass. + * -- more than one document to be used on bilateral agreement only + * + * @param document the rail pass + */ + public void addPass(IPass document); + + /** + * Adds the voucher. + * + * @param document the voucher + */ + public void addVoucher(IVoucher document); + + /** + * Adds the customer card. + * -- more than one document to be used on bilateral agreement only + * + * @param document the customer card + */ + public void addCustomerCard(ICustomerCard document); + + /** + * Adds the group ticket counter mark. + * -- more than one document to be used on bilateral agreement only + * + * @param document the group ticket counter mark + */ + public void addCounterMark(ICounterMark document); + + /** + * Adds the parking ground reservation + * -- more than one document to be used on bilateral agreement only + * + * @param document the parking ground reservation + */ + public void addParkingGround(IParkingGround document); + + /** + * Adds the FIP ticket. + * + * @param document the FIP ticket + */ + public void addFipTicket (IFipTicket document); + + /** + * Adds the station passage allowance. + * -- more than one document to be used on bilateral agreement only + * + * @param document the station passage allowance + */ + public void addStationPassage(IStationPassage document); + + /** + * Adds the delay confirmation + * -- more than one document to be used on bilateral agreement only + * + * @param document the delay confirmation + */ + public void addDelayConfirmation(IDelayConfirmation document); + + /** + * Adds a proprietary document. + * if not bilaterally agreed otherwise proprietary extensions must be ignored + * + * @param document the proprietary document + */ + public void addDocumentExtension(IDocumentExtension document); + +} diff --git a/src/org/uic/ticket/api/spec/IUicTicketObjectFactory.java b/src/org/uic/ticket/api/spec/IUicTicketObjectFactory.java new file mode 100644 index 0000000..f47f26b --- /dev/null +++ b/src/org/uic/ticket/api/spec/IUicTicketObjectFactory.java @@ -0,0 +1,51 @@ +package org.uic.ticket.api.spec; + +public interface IUicTicketObjectFactory { + + public abstract IBerth createBerth(); + public abstract ICarCarriageReservation createCarCarriageReservation(); + public abstract ICardReference createCardReference(); + public abstract ICompartmentDetails createCompartmentDetails(); + public abstract IControlDetail createControlDetail(); + public abstract ICounterMark createCounterMark(); + public abstract ICustomerCard createCustomerCard(); + public abstract ICustomerStatusDescription createCustomerStatusDescription(); + public abstract IDelayConfirmation createDelayConfirmation(); + public abstract IDocumentData createDocumentData(); + public abstract IExtension createExtension(); + public abstract IFipTicket createFipTicket(); + public abstract IGeoCoordinate createGeoCoordinate(); + public abstract IIncludedOpenTicket createIncludedOpenTicket(); + public abstract IIssuingDetail createIssuingDetail(); + public abstract ILine createLine(); + public abstract ILuggageRestriction createLuggageRestriction(); + public abstract IOpenTicket createOpenTicket(); + public abstract IParkingGround createParkingGround(); + public abstract IPass createPass(); + public abstract IPlaces createPlaces(); + public abstract IPolygone createPolygone(); + public abstract IRegisteredLuggage createRegisteredLuggage(); + public abstract IReservation createReservation(); + public abstract IReturnRouteDescription createReturnRouteDescription(); + public abstract IRouteSection createRouteSection(); + public abstract ISeriesDataDetails createSeriesDataDetails(); + public abstract IStationPassage createStationPassage(); + public abstract ITariff createTariff(); + public abstract ITicketLink createTicketLink(); + public abstract ITimeRange createTimeRange(); + public abstract IToken createToken(); + public abstract ITrainLink createTrainLink(); + public abstract ITraveler createTraveler(); + public abstract ITravelerDetail createTravelerDetail(); + public abstract IUicRailTicket createUicRailTicket(); + public abstract IValidityDetails createValidityDetails(); + public abstract IValidityRange createValidityRange(); + public abstract IViaStation createViaStation(); + public abstract IVoucher createVoucher(); + public abstract IZone createZone(); + public abstract IDocumentExtension createDocumentExtension(); + public abstract IServiceBrand createServiceBrand(); + public abstract IVatDetail createVatDetail(); + + +} diff --git a/src/org/uic/ticket/api/spec/IValidityDetails.java b/src/org/uic/ticket/api/spec/IValidityDetails.java new file mode 100644 index 0000000..3745009 --- /dev/null +++ b/src/org/uic/ticket/api/spec/IValidityDetails.java @@ -0,0 +1,45 @@ +package org.uic.ticket.api.spec; + +import java.util.Collection; + +/** + * The Interface IValidityDetails. + * + * IValidityDetails provides a more detailed validity description: + * + * a list of date/time ranges + * a list of excluded time ranges + * + */ +public interface IValidityDetails { + + + /** + * Gets the validity ranges. + * + * @return the validity ranges + */ + public Collection getValidityRanges(); + + /** + * Gets the time ranges. + * + * @return the time ranges + */ + public Collection getTimeRanges(); + + /** + * Adds the validity ranges. + * + * @param range the range + */ + public void addValidityRanges(IValidityRange range); + + /** + * Adds the time ranges. + * + * @param range the range + */ + public void addTimeRanges(ITimeRange range); + +} diff --git a/src/org/uic/ticket/api/spec/IValidityRange.java b/src/org/uic/ticket/api/spec/IValidityRange.java new file mode 100644 index 0000000..84bb3c1 --- /dev/null +++ b/src/org/uic/ticket/api/spec/IValidityRange.java @@ -0,0 +1,72 @@ +package org.uic.ticket.api.spec; + +import java.util.Date; + +/** + * The Interface IValidityRange. + * + * IValidityRange describes a validity range by from / until date and time + */ +public interface IValidityRange { + + + /** + * Gets the from date and time. + * + * @return the from date and time + */ + public Date getFromDate(); + + /** + * Gets the until date and time. + * + * @return the until date and time + */ + public Date getUntilDate(); + + + /** + * Sets the from date and time. + * + * @param date the new from date and time + */ + public void setFromDate(Date date); + + /** + * Sets the until date and time. + * + * @param date the new until date and time + */ + public void setUntilDate(Date date); + + + /** + * Gets the validFrom date time offset to UTC in units of 15 minutes. + * + * @return the validFrom date time UTC offset + */ + public Long getValidFromUTCoffset(); + + /** + * Sets the validFrom date time. + * + * @param validFromDateTime the new validFrom date time + */ + public void setValidFromUTCoffset(Long validFromUTCoffset) ; + + /** + * Gets the validUntil date time offset to UTC in units of 15 minutes. + * + * @return the validUntil date time UTC offset + */ + public Long getValidUntilUTCoffset(); + + /** + * Sets the validUntil date time. + * + * @param validUntilDateTime the new validUntil date time + */ + public void setValidUntilUTCoffset(Long validUntilUTCoffset) ; + + +} diff --git a/src/org/uic/ticket/api/spec/IVatDetail.java b/src/org/uic/ticket/api/spec/IVatDetail.java new file mode 100644 index 0000000..0fba019 --- /dev/null +++ b/src/org/uic/ticket/api/spec/IVatDetail.java @@ -0,0 +1,22 @@ +package org.uic.ticket.api.spec; + +public interface IVatDetail { + + public int getCountry(); + + public void setCountry(int country); + + public int getPercentage(); + + public void setPercentage(int percentage); + + public Long getAmount(); + + public void setAmount(Long amount); + + public String getVatId(); + + public void setVatId(String vatId); + + +} diff --git a/src/org/uic/ticket/api/spec/IViaStation.java b/src/org/uic/ticket/api/spec/IViaStation.java new file mode 100644 index 0000000..71ffbbc --- /dev/null +++ b/src/org/uic/ticket/api/spec/IViaStation.java @@ -0,0 +1,172 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +import java.util.Collection; + +import org.uic.ticket.api.asn.omv1.CodeTableType; + +// TODO: Auto-generated Javadoc +/** + * The Interface IViaStation. + * + * IViaStation describes a route description or a part of a route description by + * via station according to UIC leaflet 108.1 + * + * Note: as route description with via stations can contain alternative routes and can include + * other routes the data structure is used recursively! + * + * + * ViaStation could be + * - a simple station + * or + * - a list of alternative routes defined as a list of other IViaStations + * or + * - a route defined as a list of other IViaStations + * + * + * + */ +public interface IViaStation extends IRegionalValidity { + + /** + * Gets the station code table. + * + * Defines the station code table to be used to retrieve station information. + * Default in this case is the UIC station codes table for standard UIC + * station code from MERITS (UIC country code + 5 digit local code) + * + * The station code table should be included only in case it differs from the station + * code table used in the travel document! + * + * @return the station code table + */ + public CodeTableType getStationCodeTable(); + + /** + * Sets the station code table. + * + * Defines the station code table to be used to retrieve station information. + * Default in this case is the UIC station codes table for standard UIC + * station code from MERITS (UIC country code + 5 digit local code) + * + * The station code table should be included only in case it differs from the station + * code table used in the travel document! + * + * @param stationCodeTable the new station code table + */ + public void setStationCodeTable(CodeTableType stationCodeTable); + + /** + * Gets the station code. + * + * @return the station code + */ + public String getStation(); + + /** + * Sets the station code. + * + * @param station the new station code + */ + public void setStation(String station); + + + /** + * Gets the alternative routes. + * + * @return the alternative routes + */ + public Collection getAlternativeRoutes(); + + /** + * Adds an alternative route. + * + * @param route the alternative route + */ + public void addAlternativeRoute(IViaStation route); + + /** + * Gets the route. + * + * @return the route + */ + public Collection getRoute(); + + /** + * Adds the route station. + * + * @param viaStation the via station + */ + public void addRouteStation(IViaStation viaStation); + + /** + * Checks if the via station is a border point. + * + * @return true, if is border point + */ + public boolean isBorder(); + + /** + * Sets if the via station is a border point. + * + * @param border the new border point flag + */ + public void setBorder(boolean border); + + /** + * Gets the carriers. + * + * The carriers along the route should preferably be indicated as a list within + * the ticket, and not in the via stations. + * + * @return the carriers + */ + public Collection getCarriers(); + + /** + * Adds the carrier. + * + * The carriers along the route should preferably be indicated as a list within + * the ticket, and not in the via stations. + * * + * @param carrier the carrier + */ + public void addCarrier(String carrier); + + /** + * Gets the route id. + * + * A route id indicating the route in a lookup table. + * + * @return the route id + */ + public int getRouteId(); + + /** + * Sets the route id. + * + * A route id indicating the route in a lookup table. + * + * @param routeId the new route id + */ + public void setRouteId(int routeId); + + + /** + * Gets the series id as defined in the price data according to UIC leaflet 108.1. + * + * @return the series id as defined in the price data according to UIC leaflet 108.1. + */ + public int getSeriesId(); + + /** + * Sets the series id as defined in the price data according to UIC leaflet 108.1.. + * + * @param seriesId the new series id as defined in the price data according to UIC leaflet 108.1. + */ + public void setSeriesId(int seriesId); + + +} diff --git a/src/org/uic/ticket/api/spec/IVoucher.java b/src/org/uic/ticket/api/spec/IVoucher.java new file mode 100644 index 0000000..c1b59bc --- /dev/null +++ b/src/org/uic/ticket/api/spec/IVoucher.java @@ -0,0 +1,146 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +import java.util.Date; + +/** + * The Interface IVoucher. + * + * IVoucher provides the description of a voucher. + * + */ +public interface IVoucher extends IDocumentData { + + /** + * Gets the reference. + * + * @return the reference + */ + public String getReference() ; + + /** + * Sets the reference. + * + * @param reference the new reference + */ + public void setReference(String reference); + + /** + * Gets the product owner. + * + * @return the product owner + */ + public String getProductOwner(); + + /** + * Sets the product owner. + * + * @param productOwner the new product owner + */ + public void setProductOwner(String productOwner); + + + /** + * Gets the product type. + * + * @return the product type + */ + public String getProductId(); + + /** + * Sets the product type. + * + * @param id the new product id + */ + public void setProductId(String type); + + + /** + * Gets the valid from date. + * + * @return the valid from date + */ + public Date getValidFrom(); + + /** + * Sets the valid from date. + * + * @param validFrom the new valid from date + */ + public void setValidFrom(Date validFrom); + + /** + * Gets the valid until date. + * + * @return the valid until date + */ + public Date getValidUntil(); + + /** + * Sets the valid until date. + * + * @param validUntil the new valid until date + */ + public void setValidUntil(Date validUntil); + + + /** + * Gets the info text. + * + * @return the info text + */ + public String getInfoText(); + + /** + * Sets the info text. + * + * @param infoText the new info text + */ + public void setInfoText(String infoText) ; + + + /** + * Gets the amount in the currency and the fraction indicated in the issuer detail data. + * + * @return the amount in the currency and the fraction indicated in the issuer detail data + */ + public Integer getAmount() ; + + /** + * Sets the amount in the currency and the fraction indicated in the issuer detail data. + * + * @param amount the new amount in the currency and the fraction indicated in the issuer detail data + */ + public void setAmount(Integer amount); + + /** + * Gets the type of the voucher (code list defined by the product owner). + * + * @return the type of the voucher + */ + public Integer getType() ; + + /** + * Sets the type of the voucher (code list defined by the product owner). + * + * @param type the new type + */ + public void setType(Integer type); + + /** + * Gets the extension. + * + * @return the extension + */ + public IExtension getExtension(); + + /** + * Sets the extension. + * + * @param extensionData the new extension + */ + public void setExtension(IExtension extensionData); + +} diff --git a/src/org/uic/ticket/api/spec/IZone.java b/src/org/uic/ticket/api/spec/IZone.java new file mode 100644 index 0000000..296ecbb --- /dev/null +++ b/src/org/uic/ticket/api/spec/IZone.java @@ -0,0 +1,144 @@ +/* + * + */ +package org.uic.ticket.api.spec; + +import java.util.Collection; + +import org.uic.ticket.api.asn.omv1.CodeTableType; + +// TODO: Auto-generated Javadoc +/** + * The Interface IZone. + * + * + * IZone describes a regional validity in a zone. + * + */ +public interface IZone extends IRegionalValidity{ + + /** + * Gets the carrier. + * + * @return the carrier + */ + public String getCarrier(); + + /** + * Sets the carrier. + * + * @param carrier the new carrier + */ + public void setCarrier(String carrier); + + /** + * Gets the station code table. + * + * @return the station code table + */ + public CodeTableType getStationCodeTable(); + + /** + * Sets the station code table. + * + * @param stationCodeTable the new station code table + */ + public void setStationCodeTable(CodeTableType stationCodeTable); + + /** + * Gets the entry station in case the journey in the zone has to start at a specific station in the zone + * E.g. city traffic at the end of a train journey starting at the final train station. + * + * @return the entry station + */ + public String getEntryStation() ; + + /** + * Sets the entry station in case the journey in the zone has to start at a specific station in the zone + * E.g. city traffic at the end of a train journey starting at the final train station. + * + * @param entryStation the new entry station + */ + public void setEntryStation(String entryStation); + + /** + * Gets the terminating station in case the journey in the zone has to end at a specific station in the zone + * E.g. city traffic at the begin of a train journey starting at the first train station. + * + * @return the terminating station + */ + public String getTerminatingStation(); + + /** + * Sets the terminating station in case the journey in the zone has to end at a specific station in the zone + * E.g. city traffic at the begin of a train journey starting at the first train station. + * + * @param terminatingStation the new terminating station + */ + public void setTerminatingStation(String terminatingStation); + + /** + * Gets the city code of the local city in case the zone is part of regional + * city transport: code list of the local carrier. + * + * @return the city + */ + public int getCity() ; + + /** + * Sets the city code of the local city in case the zone is part of regional + * city transport: code list of the local carrier + * + * @param city the new city + */ + public void setCity(int city); + + /** + * Gets the binary zone id. + * binary encoding of zones, encoding specification provided by + * the local service provider + * + * @return the binary zone id + */ + public byte[] getBinaryZoneId() ; + + /** + * Sets the binary zone id. + * binary encoding of zones, encoding specification provided by + * the local service provider + * + * @param binatyZoneId the new binaty zone id + */ + public void setBinaryZoneId(byte[] binatyZoneId); + + /** + * Gets the zone ids. + * ids of the valid zones known by the local carriers in that zone + * + * @return the zone ids + */ + public Collection getZoneIds() ; + + /** + * Adds a zone id. + * id of the valid zones known by the local carriers in that zone + * + * @param zoneId the zone id + */ + public void addZoneId(int zoneId); + + /** + * Gets the European NUTS code in case this code is used to encode the zone. + * + * @return the NUTS code + */ + public String getNUTScode(); + + /** + * Sets the European NUTS code in case this code is used to encode the zone. + * + * @param code the new NUTS code + */ + public void setNUTScode(String code); + +} diff --git a/src/org/uic/ticket/api/spec/package.html b/src/org/uic/ticket/api/spec/package.html new file mode 100644 index 0000000..18d8b53 --- /dev/null +++ b/src/org/uic/ticket/api/spec/package.html @@ -0,0 +1,7 @@ + + +UIC ticket interface + + Provides the interface specification of the ticket data. Any ticket data implementation which wants to use the provided encoder / decoder function must implement this interface. A simple implementation is provided in package impl

. + + \ No newline at end of file diff --git a/src/org/uic/ticket/api/spec/uicBarcodeHeader0.1.asn b/src/org/uic/ticket/api/spec/uicBarcodeHeader0.1.asn new file mode 100644 index 0000000..2999d18 --- /dev/null +++ b/src/org/uic/ticket/api/spec/uicBarcodeHeader0.1.asn @@ -0,0 +1,151 @@ +-- Creator: ASN.1 Editor (http://asneditor.sourceforge.net) +-- Author: ClemensGantert +-- Created: Tue Aug 11 11:40:28 CEST 2015 +ASN-Module DEFINITIONS AUTOMATIC TAGS ::= BEGIN + +-- imports and exports +-- EXPORTS ALL; + + +-- ############################################################################################## +-- # +-- # UIC barcode header - first draft +-- # +-- ############################################################################################## + + +-- ############################################################################################## +-- # +-- # Naming and encoding conventions +-- # +-- # Elements included as String and as Numeric values: +-- # Some elements are included in different formats to reduce the data size. +-- # These elements must be included only once. +-- # These elements are named with the same name and appendix +-- # Num (numeric values) +-- # IA5 (String values according to ASN IA5String (7Bit)) +-- # +-- # RICS codes must be used to encode companies (issuer, product owner, ...) where available +-- # other codes are possible based on bilateral agreements +-- # the format is kept more flexible to cover upcoming extensions of the RICS code by ERA +-- # +-- # Stations can be coded using the UIC and upcoming ERA code lists. Proprietary codes are +-- # possible based on bilateral agreements. Format: 1..9999999 or alphanumeric without +-- # special character (IA5String) +-- # +-- # +-- # ! INTEGERS must not exceed the value of 9,223,372,036,854,775,807 (64 bit) even in case +-- # ! they are unrestricted!!! +-- # ! +-- # ! Some elements like ReferenceNum or cardIdNum are defined as an unrestricted integer. +-- # ! Unlike other numerical values the cardIdNum and referenceNum can be larger than a usual 32 bit Integer +-- # ! Some ASN.1 implementation tools are limited to 32 bit integers which is too small. +-- # ! Please ensure to use a tool capable of dealing with larger numbers. +-- # +-- # BOOLEAN is always non optional +-- # +-- # Encoding of time: +-- # time is encoded as the number of minutes of the day 0 = 00:00, 1440 = 24:00, +-- # time data elements end with "time" in their name +-- # +-- # Encoding of date: +-- # ......................................................................................................... +-- # The issuing date is given in UTC, but some other date values are given in local time where the exact time zone is not known. +-- # +-- # +-- # +-- # ASN.1 Extensions: +-- # +-- # The specification makes use of extension (",..."). +-- # These extesions might be defined in future versions of the UIC specification +-- # Implementations must support the extension feature of ASN.1, at least they must be able to ignore extensions while decoding the data +-- # ASN.1 extensions will be defined by UIC. It is not allowed to define bilateral extensions. +-- # +-- # Bilateral Extensions: +-- # Bilateral extensions can be included in the data element "ExtensionData". +-- # +-- # +-- # +-- ######################################################################################### + + +-- ############################################################################################ + + +-- type assignments + + -- ######################################################################################### + -- the basic entry point of the data structure + -- the data include: + -- -issuer informations + -- -the details of the transport document + -- -informations required for the control process + -- -informations on the travelers independent from the transport document + -- -proprietary extensions + -- + -- ########################################################################################## + UicBarcodeHeader ::= SEQUENCE { + -- format type + format IA5String, + -- "UIC" = UIC ticket + + version Integer (1..16), + + -- provider of the signature (RICS code) + securityProviderNum INTEGER (1..32000) OPTIONAL, + securityProviderIA5 IA5String OPTIONAL, + + + staticData SEQUENCE OF DataType, + staticSignature SignatureType OPTIONAL, + + + + -- additional dynamic data i.e. phone number, IMEI, timestamp , .... --> To be defined separately + dynamicDataFormat IA5String OPTIONAL, + dynamicData OCTET STRING OPTIONAL, + dynamicPublicKey OCTET STRING OPTIONAL, + dynamicSignature SignatureType OPTIONAL + + -- proprietary data defined bilaterally + extension SEQUENCE OF ExtensionData OPTIONAL + ,... + + } + + DataType ::= SEQUENCE { + staticDataFormat IA5String DEFAULT "FCB1", + -- FCB1 FCB version 1 + -- 1080XYZ + staticData OCTET STRING + } + + + + SignatureType ::= SEQUENCE { + signingAlg IA5String, + keyId IA5String (SIZE(1..5)), + signature OCTET STRING, + } + + + + -- ########################################################################################### + -- generic non standard extension element + -- the generic non - standard element contains: + -- - an extension id to distinguish different extensions + -- - the extension data as binary data + -- proprietary extensions are by definition proprietary. This standard provides + -- the means to identify these extensions + -- within the data and to skip these data. + -- the evaluation of these data and the unique identification of the extensions + -- via the extension id is in the + -- responsibility of the railways which use these extensions. + -- ########################################################################################### + ExtensionData ::= SEQUENCE { + extensionId IA5String, + extensionData OCTET STRING + } + + +END \ No newline at end of file diff --git a/src/org/uic/ticket/api/spec/uicBarcodeV1finalDelayConfirmation.asn b/src/org/uic/ticket/api/spec/uicBarcodeV1finalDelayConfirmation.asn new file mode 100644 index 0000000..b4d23a0 --- /dev/null +++ b/src/org/uic/ticket/api/spec/uicBarcodeV1finalDelayConfirmation.asn @@ -0,0 +1,1789 @@ +-- Creator: ASN.1 Editor (http://asneditor.sourceforge.net) +-- Author: ClemensGantert +-- Created: Tue Aug 11 11:40:28 CEST 2015 +ASN-Module DEFINITIONS AUTOMATIC TAGS ::= BEGIN + +-- imports and exports +-- EXPORTS ALL; + + +-- ############################################################################################## +-- # +-- # Final version 1.0 +-- # +-- ############################################################################################## + + +-- ############################################################################################## +-- # +-- # Naming and encoding conventions +-- # +-- # Elements included as String and as Numeric values: +-- # Some elements are included in different formats to reduce the data size. +-- # These elements must be included only once. +-- # These elements are named with the same name and appendix +-- # Num (numeric values) +-- # IA5 (String values according to ASN IA5String (7Bit)) +-- # Example: +-- # trainNum - in case of a numeric train number +-- # trainIA5 - in case of a alphanumeric train Id +-- # +-- # +-- # RICS codes must be used to encode companies (issuer, product owner, ...) where available +-- # other codes are possible based on bilateran agreements +-- # the format is kept more flexible to cover upcomng extensions of the RICS code by ERA +-- # encoding: binaby up to code 32000 or alphanumerical without +-- # special character (IA5String) +-- # +-- # Stations can be coded using the UIC and upcoming ERA code lists. Proprietary codes are +-- # possible based on bilateral agreements. Format: 1..9999999 or alphanumeric without +-- # special character (IA5String) +-- # +-- # +-- # INTEGERS must not exceed the value of 9,223,372,036,854,775,807 even in case +-- # they are unrestricted!!! +-- # +-- # BOOLEAN is always non optional +-- # +-- # Encoding of time: +-- # time is encoded as the number of minutes of the day 0 = 00:00, 1440 = 24:00, +-- # time data elements end with "time" in their name +-- # +-- ############################################################################################ + + +-- type assignments + + -- ######################################################################################### + -- the basic entry point of the data structure + -- the data include: + -- -issuer informations + -- -the details of the transport document + -- -informations required for the control process + -- -informations on the travelers independent from the transport document + -- -proprietary extensions + -- + -- ########################################################################################## + UicRailTicketData ::= SEQUENCE { + -- data specific to the issuer + issuingDetail IssuingData, + + -- data on the travelers + travelerDetail TravelerData OPTIONAL, + + -- data of the transport document + -- more than one document to be used on bilateral agreement only + transportDocument SEQUENCE OF DocumentData OPTIONAL, + + -- data specific to support the ticket control process + controlDetail ControlData OPTIONAL, + + -- proprietary data defined bilaterally + extension SEQUENCE OF ExtensionData OPTIONAL + ,... + } + + + + -- ########################################################################################### + -- the choice on the different transport documents that can be included in the bar code data: + -- - reservation of seat / couchette or berths (IRT, RES, BOA) + -- - reservation of car carriage (VET) + -- - open ticket (NRT including NRT group ticket) (NRT, GRT, SUP, UPD, COI) + -- - Rail passes (including Eurail, Interail and local passes) (RPT) + -- - Voucher (TRV) + -- - Customer Cards (including bonus cards and reduction cards) + -- - counter marks issued for group tickets + -- - parking ground tickets + -- - FIP tickets + -- - station access / station passage tickets + -- - proprietary documents as an extension + -- ############################################################################################ + DocumentData ::= SEQUENCE { + + -- token + token TokenType OPTIONAL, + + -- choice of the ticket + ticket CHOICE + { + + -- Reservation (without car carriage) (IRT and RES) + reservation ReservationData, + + -- Reservation of car carriage + carCarriageReservation CarCarriageReservationData, + + -- open ticket specification (NRT) + openTicket OpenTicketData, + + -- pass specification (RPT) including Eurail and Interrail + pass PassData, + + -- voucher + voucher VoucherData, + + -- customer card either to identify a customer and / or to provide reductions + customerCard CustomerCardData, + + -- countermark to accompagny a group ticket + counterMark CountermarkData, + + -- car parking slot + parkingGround ParkingGroundData, + + -- FIP duty ticket + fipTicket FIPTicketData, + + -- ticket to pass the gates at a station + stationPassage StationPassageData, + + -- proprietary data defined bilaterally + extension ExtensionData, + + -- delay confirmation + delayConfirmation DelayConfirmation + + ,... + } + ,... + } + + -- ######################################################################################## + -- confirmation of the delay of a train + -- + -- ######################################################################################## + DelayConfirmation ::= SEQUENCE { + + -- reference of the delay confirmation + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- train number of the delayed train - numeric or alphanumeric + trainNum INTEGER OPTIONAL, + trainIA5 IA5String OPTIONAL, + + -- departure date of the delayed train + -- number of year from 2015 onwards (2015 = 0) + departureYear INTEGER (1..200) OPTIONAL, + -- number of the day in the year (1.1. = 1) + departureDay INTEGER (1..366) OPTIONAL, + departureTime INTEGER (0..1440) OPTIONAL, + + -- station where the delay became relevant + stationCodeTable CodeTableType DEFAULT stationUIC, + stationNum INTEGER (1..9999999) OPTIONAL, + stationIA5 IA5String OPTIONAL, + + -- delay in minutes at the mentioned station + delay INTEGER (1..999), + + -- indication that the train was cancelled + trainCancelled BOOLEAN, + + -- type of confirmation provided + confirmationType ConfirmationType DEFAULT travelerDelayConfirmation, + + -- affected original ticket(s) + affectedTickets SEQUENCE OF TicketLinkType OPTIONAL, + + -- info text + infoText UTF8String OPTIONAL, + + -- proprietary data defined bilaterally + extension ExtensionData OPTIONAL + ,... + } + + ConfirmationType ::= ENUMERATED { + trainDelayConfirmation (0), -- confirmation of train delay, whether the traveler was on board in unconfirmed + travelerDelayConfirmation (1), -- confirmation that the traveler was on board of the delayed train + trainLinkedTicketDelay (2) -- confirmation that a ticket linked to the delayed train was issued + ,... + } + + + -- ######################################################################################## + -- Details of the issuer and the issue of the ticket + -- - details on the issuer + -- - indication of test tickets (specimen) + -- - payment details: method of payment, currency + -- - proprietary PNR of the issuer to be used to identify the sale within + -- the issuers ecosystem + -- - web link to display more information for the customer + -- - proprietary extension data + -- ######################################################################################## + IssuingData ::= SEQUENCE { + + -- provider of the signature (RICS code) + securityProviderNum INTEGER (1..32000) OPTIONAL, + securityProviderIA5 IA5String OPTIONAL, + + -- issuer of the transport document if different from the security provider + -- (RICS code) + issuerNum INTEGER (1..32000) OPTIONAL, + issuerIA5 IA5String OPTIONAL, + + -- issuing time stamp + -- number of year from 2015 onwards (2015 = 0) + issuingYear INTEGER (1..200) OPTIONAL, + -- number of the day in the year (1.1. = 1) + issuingDay INTEGER (1..366) OPTIONAL, + -- The number of the minutes of issue might be used in case of account + -- based ticketing whith a delay of n minutes for the replication of central + -- booking data to the control devices (e.g. at SBB) + -- The time can be compared with the last synchronization time of + -- the control device + issuingTime INTEGER (0..1440) OPTIONAL, + + -- name of the issuer (E.g. short name mentioned in RICS code table) + issuerName UTF8String OPTIONAL, + + -- specimen indicates a test specimen not valid for travelling + specimen BOOLEAN, + + -- secure paper indicates that this barcode is issued with a secure paper ticket + -- to ensure the uniqueness of the ticket. This allows to use the same control + -- procedure as for e-tickets also for anonymous tickets + -- the double use of the ticket is in this case excluded by the secure paper + securePaperTicket BOOLEAN, + + -- indicates that the ticket is valid for traveling or still needs activation + activated BOOLEAN, + + -- currency of the prices + currency IA5String (SIZE(3)) DEFAULT "EUR", + + -- fraction of the prices included + currencyFract INTEGER (1..3) DEFAULT 2, + + -- PNR used by the issuer to identify the document + issuerPNR IA5String OPTIONAL, + + -- proprietary data defined bilaterally + extension ExtensionData OPTIONAL, + + -- location of sale in case of a sale on board of a train + -- numeric train number or aphanumeric id of the train where the ticket was sold + issuedOnTrainNum INTEGER OPTIONAL, + issuedOnTrainIA5 IA5String OPTIONAL, + -- line number + issuedOnLine INTEGER OPTIONAL, + + -- point oof sale + pointOfSale GeoCoordinateType OPTIONAL + ,... + } + + -- ################################################################################### + -- data supporting the control process + -- - list of items which the travelder can use to identify himself or the unique + -- usage of the ticket + -- (card ids, parts or identity card numbers, credit card numbers,..) + -- - hints on the validation to be made on board + -- + -- ################################################################################### + ControlData ::= SEQUENCE { + + -- cards that can be used to identify the ticket holder + identificationByCardReference SEQUENCE OF CardReferenceType OPTIONAL, + + -- idcard id must be checked to identify the traveler + identificationByIdCard BOOLEAN, -- DEFAULT FALSE, + + -- passport id must be checked to identify the traveler + identificationByPassportId BOOLEAN, -- DEFAULT FALSE, + + -- other items which could be used to identify the ticket holder + -- (for future use, code list to be defined) + identificationItem INTEGER OPTIONAL, + + -- validation of the passport is required (e.g. in case of Eurail) + passportValidationRequired BOOLEAN, -- DEFAULT FALSE, + + -- online validation of the ticket required + onlineValidationRequired BOOLEAN, -- DEFAULT FALSE, + + -- percentage of the tickets to be validated in more detail + -- (i.e. via online check or detailed checks lateron) + randomDetailedValidationRequired INTEGER (0..99) OPTIONAL, + + -- manual validation of the traveler age required (in case of reductions) + ageCheckRequired BOOLEAN, -- DEFAULT FALSE, + + -- manual validation of the travelers reduction card required (in case of reductions) + reductionCardCheckRequired BOOLEAN, -- DEFAULT FALSE, + + -- controler info text + infoText UTF8String OPTIONAL, + + -- additional tickets that should be controlled + includedTickets SEQUENCE OF TicketLinkType OPTIONAL, + + -- proprietary data defined bilaterally + extension ExtensionData OPTIONAL + ,... + } + + -- ################################################################################ + -- Traveler data + -- these data do not include tariff details of the booked tariffs, + -- tariff data are included in the transport document details and might + -- have a reference to the traveler defined here. + -- - personal data of the travellers + -- - the index of the list can be used to identify the + -- traveler within other contexts (e.g. in assigned tariffs) + -- ################################################################################ + TravelerData ::= SEQUENCE { + -- traveler list + traveler SEQUENCE OF TravelerType OPTIONAL, + + -- ISO 639-1 coding of the language preferred for the traveler / ticket holder + preferedLanguage IA5String (SIZE(2)) OPTIONAL, + + -- name of the group in case of a group ticket + groupName UTF8String OPTIONAL + ,... + } + + -- #################################################################################### + -- the following part contains the different transport document specifications + -- #################################################################################### + + + -- #################################################################################### + -- reservations of seats , couchettes and berths + -- included are the data defined in: + -- - leaflet 918.1 for reservation data exchange + -- - a few additional data currently used by some railways via different interfaces + -- - information on trach an dplafoorm where the coach stops + -- - additional second coach for large groups + -- #################################################################################### + ReservationData ::= SEQUENCE { + + -- train number - numeric or alphanumeric + trainNum INTEGER OPTIONAL, + trainIA5 IA5String OPTIONAL, + + -- departure date + -- number of the days calculated from the issuing date + -- (0 = issuing date) + departureDate INTEGER (0..370) DEFAULT 0, + + -- reservation reference according ton 918.1 in case ade via Hermes + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code to be used as standard) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + serviceBrand INTEGER (0..32000) OPTIONAL, + serviceBrandAbrUTF8 UTF8String OPTIONAL, + serviceBrandNameUTF8 UTF8String OPTIONAL, + + -- service code list from 918.1 (seat couchette,..) + service ServiceType DEFAULT seat, + + -- code table used to encode stations + stationCodeTable CodeTableType DEFAULT stationUICReservation, + + -- origin station code + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, + + -- destination station code + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, + + -- origin station name + fromStationNameUTF8 UTF8String OPTIONAL, + + -- destination station name + toStationNameUTF8 UTF8String OPTIONAL, + + -- departure time + departureTime INTEGER (0..1440), + + -- arrival date and time + -- number of days counted from the departure date + arrivalDate INTEGER (0..20) DEFAULT 0, + arrivalTime INTEGER (0..1440) OPTIONAL, + + -- responsible carriers on the route + carrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carrierIA5 SEQUENCE OF IA5String OPTIONAL, + + -- travel class + classCode TravelClassType DEFAULT second, + + -- service level code list from 918.1 + serviceLevel IA5String (SIZE(1..2)) OPTIONAL, + + -- places + places PlacesType OPTIONAL, + + -- additional places in a second coach + additionalPlaces PlacesType OPTIONAL, + + --bicycle places + bicyclePlaces PlacesType OPTIONAL, + + -- compartment details (open space, wheelchair,..) + compartmentDetails CompartmentDetailsType OPTIONAL, + + -- number of persons on the ticket without place numbers (on IRT) + numberOfOverbooked INTEGER (0..200) DEFAULT 0, + + -- description of berths + berth SEQUENCE OF BerthDetailData OPTIONAL, + + -- tariffs included (Adult, Children,... ) + tariff SEQUENCE OF TariffType OPTIONAL, + + -- type of the price (supplement,... ) + priceType PriceTypeType DEFAULT travelPrice, + + -- type of supplement - code list from 018.1 + typeOfSupplement INTEGER (0..9) DEFAULT 0, + + numberOfSupplements INTEGER (0..200) DEFAULT 0, + + -- luggage restrictions and registered luggage + -- in case the luggage restrictions are general and do not depend on the + -- ticket type they should not be included + luggage LuggageRestrictionType OPTIONAL, + + infoText UTF8String OPTIONAL, + + -- bilaterally agreed proprietary extension + extension ExtensionData OPTIONAL + ,... + } + + -- ################################################################################# + -- reservations of car carriage + -- included are the data defined in: + -- - leaflet 918.1 for reservation data exchange + -- - a few additional data currently used by some railways via different interfaces + -- ################################################################################# + CarCarriageReservationData ::= SEQUENCE { + + trainNum INTEGER OPTIONAL, + trainIA5 IA5String OPTIONAL, + + + -- loading / unloading of the car + -- begin of loading (date) + -- number of the days calculated from the issuing date + -- (0 = issuing date) + beginLoadingDate INTEGER (0..370) DEFAULT 0, + beginLoadingTime INTEGER (0..1440) OPTIONAL, + endLoadingTime INTEGER (0..1440) OPTIONAL, + + -- reservation reference according on 918.1 in case ade via Hermes + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- organization responsible for the product definition (RICS Code/proprietary code) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + serviceBrand INTEGER (1..32000) OPTIONAL, + serviceBrandAbrUTF8 UTF8String OPTIONAL, + serviceBrandNameUTF8 UTF8String OPTIONAL, + + stationCodeTable CodeTableType DEFAULT stationUICReservation, + + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, + + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, + + fromStationNameUTF8 UTF8String OPTIONAL, + toStationNameUTF8 UTF8String OPTIONAL, + + coach IA5String OPTIONAL, + place IA5String OPTIONAL, + + compartmentDetails CompartmentDetailsType OPTIONAL, + + -- description of the car + numberPlate IA5String, + trailerPlate IA5String OPTIONAL, + carCategory INTEGER (0..9), + boatCategory INTEGER (0..6) OPTIONAL, + textileRoof BOOLEAN, + roofRackType RoofRackType DEFAULT norack, + + -- heigth of a roof rack in cm + roofRackHeight INTEGER (0..99) OPTIONAL, + + -- number of boats on a rack + attachedBoats INTEGER (0..2) OPTIONAL, + + -- number of biycles on a rack + attachedBicycles INTEGER (0..4) OPTIONAL, + + -- number of surf boards on a rack + attachedSurfboards INTEGER (0..5) OPTIONAL, + + -- reference to an entry on the loading list + loadingListEntry INTEGER (0..999) OPTIONAL, + loadingDeck LoadingDeckType DEFAULT upper, + + -- responsible carriers on the route + carrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carrierIA5 SEQUENCE OF IA5String OPTIONAL, + + tariff TariffType, + priceType PriceTypeType DEFAULT travelPrice, + + infoText UTF8String OPTIONAL, + extension ExtensionData OPTIONAL + ,... + } + + + -- ##################################################################################### + -- data for open tickets (NRT and group tickets) + -- included are the data defined in: + -- - the ticket layout (leaflet 918.2) + -- - the ticket bar code version 3 (leaflet 918.2) + -- - additional data based on 108.1 with some extensions as 108.1 + -- does not provide well structured data, + -- especially concerning regional validity + -- + -- ##################################################################################### + + OpenTicketData ::= SEQUENCE { + + -- reference must be given either in numeric or alphanumeric format + referenceNum INTEGER OPTIONAL, + referenceIA5 IA5String OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code/proprietary code) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- to support other content (e.g. VDV, UTPF, VÖV, CALYPSO) + -- issuer code using the default code table of the product owner + extIssuerId INTEGER OPTIONAL, + -- authorization id provided to the issuer by the product owner + issuerAutorizationId INTEGER OPTIONAL, + + -- ticket includes the return trip + returnIncluded BOOLEAN, -- DEFAULT FALSE, + + stationCodeTable CodeTableType DEFAULT stationUIC, + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, + + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, + + fromStationNameUTF8 UTF8String OPTIONAL, + toStationNameUTF8 UTF8String OPTIONAL, + + -- description for manual evaluation in case structured data are not available + validRegionDesc UTF8String OPTIONAL, + -- specification of the ordered sequence of valid regions + validRegion SEQUENCE OF RegionalValidityType OPTIONAL, + + -- return route description + -- the return route description can be omitted if it is identical to the + -- inversed outbound validRegion sequence + returnDescription ReturnRouteDescriptionType OPTIONAL, + + -- temporal validity data + -- number of days from issuing date + validFromDay INTEGER (0..700) DEFAULT 0, + validFromTime INTEGER (0..1440) OPTIONAL, + -- number of days from valid-from date, 0 = first day of validity + validUntilDay INTEGER (0..370) DEFAULT 0, + validUntilTime INTEGER (0..1440) OPTIONAL, + + -- number of activated days in case the entire ticket is not activated + -- the day is given by the number of days from the first day of validity + -- 1 = first day of validity + activatedDay SEQUENCE OF INTEGER (0..370) OPTIONAL, + + classCode TravelClassType DEFAULT second, + + -- servicelevel code according to leaflet 918.1 to encode other products + -- (e.g. PREMIUM, ...) + serviceLevel IA5String (SIZE(1..2)) OPTIONAL, + + -- carriers are mandatory on international routes, but can also + -- be included in via details + carriersNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carriersIA5 SEQUENCE OF IA5String OPTIONAL, + + includedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + excludedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + + tariffs SEQUENCE OF TariffType OPTIONAL, + infoText UTF8String OPTIONAL, + + -- additional included open tickets + -- e.g. to include local city traffic on parts of a the route + includedAddOns SEQUENCE OF IncludedOpenTicketType OPTIONAL, + + -- in case the luggage restrictions are general and do not depend + -- on the ticket type they should not be included + luggage LuggageRestrictionType OPTIONAL, + + extension ExtensionData OPTIONAL + ,... + } + + + + -- #################################################################################### + -- data for passes + -- included are the data defined in: + -- - the ticket layout (leaflet 918.2) + -- - the ticket bar code version 3 (leaflet 918.2) + -- #################################################################################### + PassData ::= SEQUENCE { + + -- reference must be given in numeric or alphanumeric format + referenceNum INTEGER OPTIONAL, + referenceIA5 IA5String OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code/proprietary code) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- type of the pass, code list provided by the product owner + -- in case of Eurail: + -- 1 = Interrail + -- 2 = Eurail + -- 3 = Eurail Global (all countries) + passType INTEGER (1..250) OPTIONAL, + + -- literal name of the pass + passDescription UTF8String OPTIONAL, + + classCode TravelClassType DEFAULT second, + + -- begin of validity + -- number of days from issuing date (0 = issuing date) + validFromDay INTEGER (0..700) DEFAULT 0, + validFromTime INTEGER (0..1440) OPTIONAL, + -- end of validity + -- number of days from valid from day, 0 = valid on valid-from-date + validUntilDay INTEGER (0..370) DEFAULT 0, + validUntilTime INTEGER (0..1440) OPTIONAL, + + -- additional validity periods and excluded time ranges + validityPeriodDetails ValidityPeriodDetailType OPTIONAL, + + -- max number of days of validity in case the valid from day is open + numberOfValidityDays INTEGER (0..370) OPTIONAL, + + -- max number of possible trips to be activated + numberOfPossibleTrips INTEGER (1..250) OPTIONAL, + numberOfDaysOfTravel INTEGER (1..250) OPTIONAL, + + -- number of activated days in case the entire ticket is not activated + -- the day is given by the number of days from the first day of validity + -- 1 = first day of validity + activatedDay SEQUENCE OF INTEGER (0..370) OPTIONAL, + + -- included countries, code table according to UIC leaflet 918.2 + countries SEQUENCE OF INTEGER (1..250) OPTIONAL, + + -- included carriers (RICS codes) + includedCarriersNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + includedCarriersIA5 SEQUENCE OF IA5String OPTIONAL, + + -- excluded carriers (RICS codes) + excludedCarriersNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + excludedCarriersIA5 SEQUENCE OF IA5String OPTIONAL, + + includedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + excludedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + + -- region description to cover local zones + validRegion SEQUENCE OF RegionalValidityType OPTIONAL, + + tariffs SEQUENCE OF TariffType OPTIONAL, + + infoText UTF8String OPTIONAL, + extension ExtensionData OPTIONAL + ,... + } + + ValidityPeriodDetailType ::= SEQUENCE { + validityPeriod SEQUENCE OF ValidityPeriodType OPTIONAL, + excludedTimeRange SEQUENCE OF TimeRangeType OPTIONAL + } + + ValidityPeriodType ::= SEQUENCE { + -- number of days from issuing date (0 = issuing date) + validFromDay INTEGER (0..700) DEFAULT 0, + validFromTime INTEGER (0..1440) OPTIONAL, + -- number of days from valid from day, 0 = valid on valid from date + validUntilDay INTEGER (0..370) DEFAULT 0, + validUntilTime INTEGER (0..1440) OPTIONAL + } + + TimeRangeType ::= SEQUENCE { + fromTime INTEGER (0..1440), + untilTime INTEGER (0..1440) + } + + -- ###################################################################################### + -- data for vouchers + -- included are quite basic further study is required + -- ###################################################################################### + VoucherData ::= SEQUENCE { + + -- reference must be given in numeric or alphanumeric format + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code/proprietary code) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- begin of validity + -- number of year from 2015 onwards (2015 = 0) + validFromYear INTEGER (1..200), + -- number of the day in the year (1.1. = 1) + validFromDay INTEGER (0..370), + -- end of validity + -- number of year from 2015 onwards (2015 = 0) + validUntilYear INTEGER (1..200), + -- number of the day in the year (1.1. = 1) + validUntilDay INTEGER (0..370), + + value INTEGER DEFAULT 0, + + -- type of the voucher, code list defined by the product owner + type INTEGER (1..32000) OPTIONAL, + + infoText UTF8String OPTIONAL, + extension ExtensionData OPTIONAL + ,... + } + -- ################################################################################### + -- data for FIP tickets + -- included are data from the FIP ticket layout, + -- ################################################################################### + FIPTicketData ::= SEQUENCE { + + -- reference must be given in numeric or alphanumeric format + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code/proprietary code) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- first day of validity + --- number of days from issuing date 0 = issuing day + validFromDay INTEGER (0..700) DEFAULT 0, + -- last day of validity + -- number of days from valid from day, 0 = first day of validity + validUntilDay INTEGER (0..370) DEFAULT 0, + + -- activated days + -- the day is given by the number of days from the first day of validity + -- 1 = first day of validity + activatedDay SEQUENCE OF INTEGER (0..370) OPTIONAL, + + -- included carriers + carrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carrierIA5 SEQUENCE OF IA5String OPTIONAL, + + -- number of travel days allowed + numberOfTravelDays INTEGER (1..200), + includesSupplements BOOLEAN, + + -- travel class + classCode TravelClassType DEFAULT second, + extension ExtensionData OPTIONAL + ,... + } + + -- ##################################################################################### + -- data station passage and access + -- ticket used to enter, exit or pass a station without travelling by train. + -- E.g. for staff working in a station. + -- ##################################################################################### + StationPassageData ::= SEQUENCE { + + -- reference must be given in numeric or alphanumeric format + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- organization responsible for the product definition (RICS Code/proprietary code) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + productName UTF8String OPTIONAL, + + -- code table used to encode he stations + stationCodeTable CodeTableType DEFAULT stationUIC, + -- list of station where the passage is allowed + stationNum SEQUENCE OF INTEGER OPTIONAL, + stationIA5 SEQUENCE OF IA5String OPTIONAL, + -- station names + stationNameUTF8 SEQUENCE OF UTF8String OPTIONAL, + + -- list of areas in a station where the access is allowed + areaCodeNum SEQUENCE OF INTEGER OPTIONAL, + areaCodeIA5 SEQUENCE OF IA5String OPTIONAL, + -- area names + areaNameUTF8 SEQUENCE OF UTF8String OPTIONAL, + + -- begin of validity + -- number of days from issiung date + validFromDay INTEGER (0..700), + validFromTime INTEGER (0..1440) OPTIONAL, + -- end of validity + -- number of days from valid from day, 0 = first day of validity + validUntilDay INTEGER (0..370) DEFAULT 0, + validUntilTime INTEGER (0..1440) OPTIONAL, + + -- number of days for station passage in case the number of days + -- is limited and less that the validity period + numberOfDaysValid INTEGER OPTIONAL, + + extension ExtensionData OPTIONAL + ,... + } + + -- ###################################################################################### + -- data for customer cards + -- included are data from: + -- - ÖBB requirements on card data + -- - DB Bahncard as HandyTicket + -- note: customer data are included in the traveler data structure + -- ###################################################################################### + CustomerCardData ::= SEQUENCE { + + -- customer details + -- optional, as there might be an anonymous cards + customer TravelerType OPTIONAL, + + -- card id might be numerical or alphanumerical + cardIdIA5 IA5String OPTIONAL, + cardIdNum INTEGER OPTIONAL, + + -- issuing date in case it is not given + -- number of year from 2015 onwards (2015 = 0) + validFromYear INTEGER (1..250), + --- number of the day in the year (1.1. = 1) + validFromDay INTEGER (0..370) OPTIONAL, + + --- number of year from valid from year onwards + validUntilYear INTEGER (0..250) DEFAULT 0, + --- number of the day in the year (1.1. = 1) + validUntilDay INTEGER (0..370) OPTIONAL, + + classCode TravelClassType OPTIONAL, + + -- code of the card type code list defined by the issuer + cardType INTEGER (1..1000) OPTIONAL, + + -- readable description of the card type + cardTypeDescr UTF8String OPTIONAL, + + -- customer status code + -- 1 = basic + -- 2 = premium + -- 3 = silver + -- 4 = gold + -- 5 = platinum + -- 6 = senator + -- > 50 - code table of the card issuer + customerStatus INTEGER OPTIONAL, + + -- readable customer status "e.g. gold", + customerStatusDescr IA5String OPTIONAL, + + -- list of included services, + -- 1 = Rail Plus + -- 2 = access to launch + -- > 50 code list of the issuer + includedServices SEQUENCE OF INTEGER OPTIONAL, + + extension ExtensionData OPTIONAL + ,... + } + + -- ###################################################################################### + -- data for customer cards + -- included are data from: + -- - DB parking ground reservation + -- ####################################################################################### + ParkingGroundData ::= SEQUENCE { + + -- booking reference + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + parkingGroundId IA5String, + + -- number of days from the issuing date + fromParkingDate INTEGER (0..370), + -- number of days from the from parking date in case it is different from that date + toParkingDate INTEGER (0..370) DEFAULT 0, + + -- organization responsible for the product definition + -- (RICS Code / proprietary code) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- code needed to access the parking lot + accessCode IA5String OPTIONAL, + + location UTF8String, + + stationCodeTable CodeTableType DEFAULT stationUIC, + -- in case the parking ground is associated with a station + stationNum INTEGER OPTIONAL, + stationIA5 UTF8String OPTIONAL, + + specialInformation UTF8String OPTIONAL, + entryTrack UTF8String OPTIONAL, + numberPlate IA5String OPTIONAL, + + extension ExtensionData OPTIONAL + ,... + } + + -- ####################################################################### + -- data for countermarks issued with group tickets + -- included are data from: + -- - version 3 bar code (leaflet 918.2) + -- - printed layout (leaflet 918.2) + -- ######################################################################## + CountermarkData ::= SEQUENCE { + + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- organization responsible for the product definition (RICS Code/proprietary code) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- reference of the group ticket + ticketReferenceIA5 IA5String OPTIONAL, + ticketReferenceNum INTEGER OPTIONAL, + + -- sequential number of the countermark + numberOfCountermark INTEGER (1..200), + -- total number of countermarks + totalOfCountermarks INTEGER (1..200), + -- name of the group + groupName UTF8String, + + + stationCodeTable CodeTableType DEFAULT stationUIC, + + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, + + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, + + fromStationNameUTF8 UTF8String OPTIONAL, + toStationNameUTF8 UTF8String OPTIONAL, + + -- description for manual evaluation in case structured data are not available + validRegionDesc UTF8String OPTIONAL, + -- specification of the ordered sequence of valid regions + validRegion SEQUENCE OF RegionalValidityType OPTIONAL, + + + -- ticket includes the return trip + returnIncluded BOOLEAN, -- DEFAULT FALSE, + -- retrurn route description + -- can be omitted if it is identical to the inversed outbound validRegion sequence + returnDescription ReturnRouteDescriptionType OPTIONAL, + + --- number of days from issiung date + validFromDay INTEGER (0..700) DEFAULT 0, + validFromTime INTEGER (0..1440) OPTIONAL, + -- number of days from valid from day, 0 = first day of validity + validUntilDay INTEGER (0..370) DEFAULT 0, + validUntilTime INTEGER (0..1440) OPTIONAL, + + classCode TravelClassType DEFAULT second, + + -- valid carriers + carriersNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carriersIA5 SEQUENCE OF IA5String OPTIONAL, + + includedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + excludedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + infoText UTF8String OPTIONAL, + + extension ExtensionData OPTIONAL + ,... + } + + + -- ########################################################################################### + -- generic non standard extension element + -- the generic non - standard element contains: + -- - an extension id to distinguish different extensions + -- - the extension data as binary data + -- proprietary extensions are by definition proprietary. This standard provides + -- the means to identify these extensions + -- within the data and to skip these data. + -- the evaluation of these data and the unique identification of the extensions + -- via the extension id is in the + -- responsibility of the railways which use these extensions. + -- ########################################################################################### + ExtensionData ::= SEQUENCE { + extensionId IA5String, + extensionData OCTET STRING + } + + -- ############################################################################################ + -- type definitions + -- ############################################################################################ + + -- ############################################################################################# + -- included open ticke for a part of the travel (e.g. local city trafic) + -- - data identically already included in the covering open ticket do not need to be + -- repeated here + -- - main source are the data required for included regional and city traffic tickets + -- ############################################################################################# + IncludedOpenTicketType ::= SEQUENCE { + + -- organization responsible for the product definition (RICS Code / proprietary code) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- issuer code using the default code table of the product owner (today used e.g. by VDV) + externalIssuerId INTEGER OPTIONAL, + -- authorization id provided to the issuer by the poroduct owner (today used e.g. by VDV) + issuerAutorizationId INTEGER OPTIONAL, + + -- regional validity data + stationCodeTable CodeTableType DEFAULT stationUIC, + -- specification of the ordered sequence of valid regions, ordered in the direction of travel + validRegion SEQUENCE OF RegionalValidityType OPTIONAL, + + -- temporal validity data + -- number of days from issuiung date + validFromDay INTEGER (0..700) DEFAULT 0, + validFromTime INTEGER (0..1440) OPTIONAL, + -- number of days from valid-from date, 0 = first day of validity + validUntilDay INTEGER (0..370) DEFAULT 0, + validUntilTime INTEGER (0..1440) OPTIONAL, + + -- travel class to be given in case it differs from the class of the main ticket + classCode TravelClassType OPTIONAL, + -- servicelevel code according to leaflet 918.1 to encode other products (e.g. PREMIUM, ...) + -- to be provided in case it differs from the main ticket + serviceLevel IA5String (SIZE(1..2)) OPTIONAL, + + -- valid carriers + includedCarriersNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + includedCarriersIA5 SEQUENCE OF IA5String OPTIONAL, + + includedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + excludedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + + tariffs SEQUENCE OF TariffType OPTIONAL, + infoText UTF8String OPTIONAL, + extension ExtensionData OPTIONAL + ,... + } + + -- ###################################################################################### + -- tariff data for open tickets + -- information included are: + -- - number of passengers + -- - optionally a link to the traveler data + -- ####################################################################################### + TariffType ::= SEQUENCE { + + -- number of passengers using the tariff + numberOfPassengers INTEGER (1..200) DEFAULT 1, + + -- type indication youth, adult, senior,.. + passengerType PassengerType OPTIONAL, + + -- age restrictions of the tariff + ageBelow INTEGER (1..40) OPTIONAL, + ageAbove INTEGER (2..120) OPTIONAL, + + -- named traveler list + -- link to the traveler in case the travelers have to be named (e.g. Eurail passes) + -- the number indicates the position in the traveler list starting from 1 + traverlerid SEQUENCE OF INTEGER (0..254) OPTIONAL, + + -- restriction on country of residence + -- this tariff is restricted to the country of residence given in the traveler data + restrictedToCountryOfResidence BOOLEAN, + + -- section in case the tariff applies to a part of the route only + restrictedToRouteSection RouteSectionType OPTIONAL, + + -- details on series according to lesaflet 108.1 + seriesDataDetails SeriesDetailType OPTIONAL, + + -- tariff code + tariffIdNum INTEGER OPTIONAL, + tariffIdIA5 IA5String OPTIONAL, + + -- tariff description + tariffDesc UTF8String OPTIONAL, + + -- reduction cards applied (incl. dicount cards, loaylty cards relevant for the tariff) + reductionCard SEQUENCE OF CardReferenceType OPTIONAL + ,... + } + + SeriesDetailType ::= SEQUENCE { + + -- data related to tariffs based on series according UIC leaflet 108.1 + -- supplying carrier according to UIC leaflet 108.1 + supplyingCarrier INTEGER (1..32000) OPTIONAL, + -- offer identifier of the carrier according to UIC leaflet 108.1 + offerIdentification INTEGER (1..99) OPTIONAL, + -- series of the carrier according to UIC leaflet 108.1 + series INTEGER OPTIONAL + } + + + RouteSectionType ::= SEQUENCE { + + stationCodeTable CodeTableType DEFAULT stationUIC, + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, -- IA5 of Num not both + + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, -- IA5 of Num not both + + fromStationNameUTF8 UTF8String OPTIONAL, + toStationNameUTF8 UTF8String OPTIONAL + } + + + -- ####################################################################################### + -- customer card reference + -- ####################################################################################### + CardReferenceType ::= SEQUENCE { + + -- RICS code for railways + cardIssuerNum INTEGER (1..32000) OPTIONAL, + cardIssuerIA5 IA5String OPTIONAL, + + cardIdNum INTEGER OPTIONAL, + cardIdIA5 IA5String OPTIONAL, + + cardName UTF8String OPTIONAL, + -- Name of the card e.g. "VISA-CARD" + + cardType INTEGER OPTIONAL, + -- type of the card, code list defined by the issuer + + leadingCardIdNum INTEGER OPTIONAL, + -- in case only the leading part of the number is provided + leadingCardIdIA5 IA5String OPTIONAL, + -- in case only the leading part of the code is provided + + trailingCardIdNum INTEGER OPTIONAL, + -- in case only the trailing part of the number is provided + + trailingCardIdIA5 IA5String OPTIONAL + -- in case only the trailing part of the code is provided + ,... + } + + -- ####################################################################################### + -- traveler data + -- - traveler data might contain all traveler details which are independent + -- from the type of travel document + -- e.g. it can include the date of birth as this is part of the traveler + -- but not the indication "Senior" as this is tariff dependent + -- ####################################################################################### + TravelerType ::= SEQUENCE { + + firstName UTF8String OPTIONAL, + secondName UTF8String OPTIONAL, + lastName UTF8String OPTIONAL, + idCard IA5String OPTIONAL, + passportId IA5String OPTIONAL, + title IA5String (SIZE(1..3)) OPTIONAL, + gender GenderType OPTIONAL, + + -- customer id might be numerical or alphanumerical + customerIdIA5 IA5String OPTIONAL, + customerIdNum INTEGER OPTIONAL, + + -- date of birth + -- number of year from 1900 onwards (1900 = 0) + yearOfBirth INTEGER (1..200) OPTIONAL, + -- number of the day in the year (1.1. = 1) + dayOfBirth INTEGER (0..370) OPTIONAL, + + -- indicates the ticket holder/group leader in case of groups + ticketHolder BOOLEAN, -- DEFAULT FALSE, + + passengerType PassengerType OPTIONAL, + + passengerWithReducedMobility BOOLEAN OPTIONAL, + + -- country of residence (numeric ISO country code) + countryOfResidence INTEGER (1..999) OPTIONAL, + countryOfPassport INTEGER (1..999) OPTIONAL, + countryOfIdCard INTEGER (1..999) OPTIONAL, + + status SEQUENCE OF CustomerStatusType OPTIONAL + ,... + } + + CustomerStatusType ::= SEQUENCE { + + -- compagny providing the status, default is the issuer + -- (RICS code / proprietary code) + statusProviderNum INTEGER (1..32000) OPTIONAL, + statusProviderIA5 IA5String OPTIONAL, + + -- customer status code + -- 1 = basic + -- 2 = premium + -- 3 = silver + -- 4 = gold + -- 5 = platinum + -- 6 = senator + -- > 50 - code table of the card issuer + customerStatus INTEGER OPTIONAL, + + -- customer status "gold" + customerStatusDescr IA5String OPTIONAL + } + + + ReturnRouteDescriptionType ::= SEQUENCE { + + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, + + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, + + fromStationNameUTF8 UTF8String OPTIONAL, + toStationNameUTF8 UTF8String OPTIONAL, + + -- description for manual evaluation in case structured data are not available + validReturnRegionDesc UTF8String OPTIONAL, + + -- specification of the ordered sequence of valid regions for the return trip + validReturnRegion SEQUENCE OF RegionalValidityType OPTIONAL + ,... + + } + + -- ###################################################################################### + -- regional validity of an open ticket + -- specification of the regional validity. + -- ###################################################################################### + + RegionalValidityType ::= CHOICE { + + trainLink TrainLinkType, + viaStations ViaStationType, + zones ZoneType, + lines LineType, + polygone PolygoneType + ,... + } + + + + -- ####################################################################################### + -- train link data + -- includes a restriction of an open ticket valid only on a specific train + -- and date on a part of the route + -- ####################################################################################### + TrainLinkType ::= SEQUENCE { + + trainNum INTEGER OPTIONAL, + trainIA5 IA5String OPTIONAL, + + travelDate INTEGER (0..370), -- days from the issuing date onwards + departureTime INTEGER (0..1440), -- time in minutes + + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, + + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, + + fromStationName UTF8String OPTIONAL, + toStationName UTF8String OPTIONAL + + } + + + + -- ###################################################################################### + -- regional validity using a set of lines + -- - based on data used in regional city trafic enviromnemnts + -- ###################################################################################### + LineType ::= SEQUENCE { + + -- local service provider / within the zone - RICS code/ proprietary code + carrierNum INTEGER (1..32000) OPTIONAL, + carrierIA5 IA5String OPTIONAL, + + -- ids of the valid lines known by the local carriers in that zone + lineId SEQUENCE OF INTEGER OPTIONAL, + + stationCodeTable CodeTableType DEFAULT stationUIC, + + -- in case the zone must be entered via a specific station + -- (e.g. local city trafic at the end of a journey + -- starting from the main train station) + entryStationNum INTEGER (1..9999999) OPTIONAL, + entryStationIA5 IA5String OPTIONAL, + + -- in case the zone must be left via a specific station + -- (e.g. local city trafic at the beginning of a journey + -- terminating at the main train station) + terminatingStationNum INTEGER (1..9999999) OPTIONAL, + terminatingStationIA5 IA5String OPTIONAL, + + -- code of the local city in case the zone is part of regional city transport + -- code list of the local carrier + city INTEGER (1..9999999) OPTIONAL, + + -- binary encoding of zones, encoding speciofication provided by + -- the local service provider + binaryZoneId OCTET STRING OPTIONAL + ,... + } + + + -- ################################################################################# + -- regional validity in a zone + -- - based on data used in regional city trafic enviromnemnts + -- ################################################################################# + ZoneType ::= SEQUENCE { + + -- local service provider / carrier within the zone - RICS code , + -- proprietary code (e.g. "RMV") + carrierNum INTEGER (1..32000) OPTIONAL, + carrierIA5 IA5String OPTIONAL, + + stationCodeTable CodeTableType DEFAULT stationUIC, + -- in case the zone must be entered via a specific station + -- (e.g. local city trafic at the end of a journey starting + -- from the main train station) + entryStationNum INTEGER (1..9999999) OPTIONAL, + entryStationIA5 IA5String OPTIONAL, + + -- in case the zone must be left via a specific station + -- (e.g. local city trafic at the beginning of a journey + -- terminating at the main train station) + terminatingStationNum INTEGER (1..9999999) OPTIONAL, + terminatingStationIA5 IA5String OPTIONAL, + + -- code of the local city in case the zone is part of regional + -- city transport code list of the local carrier + city INTEGER OPTIONAL, + + -- ids of the valid zones known by the local carriers in that zone + zoneId SEQUENCE OF INTEGER OPTIONAL, + + -- binary encoding of zones, encoding specification provided by + -- the local service provider + binaryZoneId OCTET STRING OPTIONAL, + + -- EU NUTS code for a region + nutsCode IA5String OPTIONAL + ,... + } + + + -- ################################################################################## + -- via station + -- includes a description of of the route by via stations. + -- Via stations follow the description in leaflet 108.1: + -- via stations can e mandatory to pass (but there does not need to be a + -- train stop at this stations): visible route description: "*station*" + -- there can be a list of alternative routes: + -- visible route description: "*(station1/station2)*" + -- there can also be alternative routes: + -- "*(station1*station2/station3*station4)*" although the + -- definition in 108.2 is not very precice on this option + -- ################################################################################### + ViaStationType ::= SEQUENCE { + + stationCodeTable CodeTableType DEFAULT stationUIC, + -- mandatory via station + stationNum INTEGER (1..9999999) OPTIONAL, + stationIA5 IA5String OPTIONAL, + + -- list of alternative routes, one of these has to be taken + alternativeRoutes SEQUENCE OF ViaStationType OPTIONAL, + + -- list of stations along the route + route SEQUENCE OF ViaStationType OPTIONAL, + border BOOLEAN, -- DEFAULT FALSE, + + -- in case the carrier is included here it might be omitted + -- in the carrier list of the region data + carriersNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carriersIA5 SEQUENCE OF IA5String OPTIONAL, + + -- the route id as series number as defined in 108.1 data + seriesId INTEGER OPTIONAL, + + -- route id of the route code list defined by the carrier on that route + routeId INTEGER OPTIONAL + ,... + } + + + PolygoneType ::= SEQUENCE { + firstEdge GeoCoordinateType, + edges SEQUENCE OF DeltaCoordinates + } + + TokenType ::= SEQUENCE { + -- provider of the token + tokenProviderNum INTEGER OPTIONAL, + -- provider of token (non-railway) + tokenProviderIA5 IA5String OPTIONAL, + -- in case the provider has multiple tokens + tokenSpecification IA5String OPTIONAL, + token OCTET STRING + } + + -- ########################################################################################### + -- TicketLinkType is used to define a link from the ticket in the bar code to another ticket + -- (requirement from Eurail) + -- use cases + -- - DB Alleo (open ticket + reservation) + -- - reservation of trailer and car carriage and traveller reservation + -- - link between open ticket and bicycle reservations or pass + -- - open ticket and vouchers for meals + -- ########################################################################################### + TicketLinkType ::= SEQUENCE { + + -- data to reference the external ticket + -- reference must be given in numeric or alphanumeric format + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + issuerName UTF8String OPTIONAL, -- name of the issuer + + -- organization responsible for the product definition + -- (RICS Code/proprietary non UIC code) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- type of linked ticket + ticketType TicketType DEFAULT openTicket, + -- type of link + linkMode LinkMode DEFAULT issuedTogether + ,... + } + + -- ############################################################################################ + -- code table used fort station codes + -- defines the code table used e.g. to define station code + -- - stationUIC = station codes as used in UIC leaflet 108.1 for open tickets + -- - stationUICReservation = station codes as used in Reservation leaflets 918.1 and 108.2 + -- ############################################################################################ + + CodeTableType ::= ENUMERATED { + -- standard UIC station code from MERITS (UIC country code + 5 digit local code) + stationUIC (0), + -- standard UIC station code for reservation + stationUICReservation (1), + -- future standard ERA station code + stationERA (2), + -- local carrier code list + -- e.g. in case of stations / stops of non-railways stops (city trafic) + localCarrierStationCodeTable (3), + + -- non standard code to be used within the issuer eco system only + -- not applicable for multi carrier travel documents + -- or in case issuer and carrier are different + proprietaryIssuerStationCodeTable (4) + + } + + + ServiceType ::= ENUMERATED { + seat (0), + couchette (1), + berth (2), + carcarriage (3) + } + + + PassengerType ::= ENUMERATED { + adult (0), + senior (1), + child (2), + youth (3), + dog (4), + bicycle (5), + freeAddonPassenger (6), + freeAddonChild (7) + ,... + } + + TicketType ::= ENUMERATED { + openTicket (0), + pass (1), + reservation (2), + carCarriageReservation (3) + ,... + } + + LinkMode ::= ENUMERATED { + issuedTogether (0), + onlyValidInCombination (1) + ,... + } + + + -- #################################################################################### + -- place data corresponding to leaflet 918.1 + -- placeString = place number ranges in case of groups + -- #################################################################################### + PlacesType ::= SEQUENCE { + coach IA5String OPTIONAL, + -- printable place string ("15-18, 21, 22" ) + placeString IA5String OPTIONAL, + -- printable place description + placeDescription UTF8String OPTIONAL, + + -- individual places + placeIA5 SEQUENCE OF IA5String OPTIONAL, + placeNum SEQUENCE OF INTEGER (1..254) OPTIONAL + } + + PriceTypeType ::= ENUMERATED { + noPrice (0), + reservationFee (1), + supplement (2), + travelPrice (3) + } + + BerthTypeType ::= ENUMERATED { + single (0), + special (1), + double (2), + t2 (3), + t3 (4), + t4 (5) + } + + CompartmentGenderType ::= ENUMERATED { + unspecified (0), + family (1), + female (2), + male (3), + mixed (4) + ,... + } + + GenderType ::= ENUMERATED { + unspecified (0), + female (1), + male (2), + other (3) + ,... + } + + TravelClassType ::= ENUMERATED { + notApplicabel (0), + first (1), + second (2), + tourist (3), + comfort (4), + premium (5), + business (6), + all (7) + ,... + } + + -- ######################################################################################## + -- sleeper compartment types corresponding to leaflet 918.1 + -- ######################################################################################## + BerthDetailData ::= SEQUENCE { + berthType BerthTypeType, + numberOfBerths INTEGER (1..999), + gender CompartmentGenderType DEFAULT family + ,... + } + + -- #################################################################################### + -- compartment details corresponding to leaflet 918.1 + -- #################################################################################### + CompartmentDetailsType ::= SEQUENCE { + coachType INTEGER (1..99) OPTIONAL, + compartmentType INTEGER (1..99) OPTIONAL, + specialAllocation INTEGER (1..99) OPTIONAL, + coachTypeDescr UTF8String OPTIONAL, + compartmentTypeDescr UTF8String OPTIONAL, + specialAllocationDescr UTF8String OPTIONAL, + position CompartmentPositionType DEFAULT unspecified + ,... + } + + + -- ##################################################################################### + -- luggage restrictions + -- the basis for these data is week: + -- SCIC mentions a maximum of three pieces of hand luggage but does not includes + -- a definition of hand luggaage + -- SCIC referes to special conditions on registered lluggage, but SCIC NRT does + -- not contain definitions on that and UIC 108.1 does not + -- contain data structures for luggage + -- - current THALYS luggage resrictions + -- ##################################################################################### + LuggageRestrictionType ::= SEQUENCE { + -- allowed hand luggage pieces on this ticket (3 = default in current NRT tariff) + maxHandLuggagePieces INTEGER(0..99) DEFAULT 3, + -- allowed hand luggage pieces on this ticket (3 = default in current NRT tariff) + maxNonHandLuggagePieces INTEGER(0..99) DEFAULT 1, + registeredLuggage SEQUENCE OF RegisteredLuggageType OPTIONAL + ,... + + } + + RegisteredLuggageType ::= SEQUENCE { + -- id of the additional registered luggage + registrationId IA5String OPTIONAL, + -- maximum weight in kg + maxWeight INTEGER (1..99) OPTIONAL, + -- sum of length with and height in cm + maxSize INTEGER (1..300) OPTIONAL + ,... + + } + + -- ########################################################################################## + -- generic type for geo coordinates + -- ########################################################################################## + GeoCoordinateType ::= SEQUENCE { + geoUnit GeoUnitType DEFAULT milliDegree, + coordinateSystem GeoCoordinateSystemType DEFAULT wgs84, + -- separate hemishpere flag reduces the data size + hemisphereLongitude HemisphereLongitudeType DEFAULT north, + -- separate hemishpere flag reduces the data size + hemisphereLatitude HemisphereLatitudeType DEFAULT east, + longitude INTEGER, + latitude INTEGER, + accuracy GeoUnitType OPTIONAL + } + + DeltaCoordinates ::= SEQUENCE { + -- logitude difference to a reference point + longitude INTEGER, + -- latitude difference to a reference point + latitude INTEGER + } + + GeoCoordinateSystemType ::= ENUMERATED { + wgs84 (0), -- WGS 84 standard system + grs80 (1) -- (outdated) GRS 80 coordinate system + } + + GeoUnitType ::= ENUMERATED { + microDegree (0), -- approx. 11 cm on earth surface + tenthmilliDegree (1), -- 1 / 100000 degree is approx. 1.1 meter on earth surface + milliDegree (2), -- approx 110 meter on earth surface + centiDegree (3), + deciDegree (4) + } + + HemisphereLongitudeType ::= ENUMERATED { + north (0), + south (1) + } + + HemisphereLatitudeType ::= ENUMERATED { + east (0), + west (1) + } + + LoadingDeckType ::= ENUMERATED { + unspecified (0), + upper (1), + lower (2) + } + + CompartmentPositionType ::= ENUMERATED { + unspecified (0), + upperLevel (1), + lowerLevel (2) + } + + RoofRackType ::= ENUMERATED { + norack (0), + roofRailing (1), + luggageRack (2), + skiRack (3), + boxRack (4), + rackWithOneBox (5), + rackWithTwoBoxes (6), + bicycleRack (7), + otherRack (8) + ,... + } + +END \ No newline at end of file diff --git a/src/org/uic/ticket/api/spec/uicBarcodeV1finalDelayConfirmation1.1.asn b/src/org/uic/ticket/api/spec/uicBarcodeV1finalDelayConfirmation1.1.asn new file mode 100644 index 0000000..efcd683 --- /dev/null +++ b/src/org/uic/ticket/api/spec/uicBarcodeV1finalDelayConfirmation1.1.asn @@ -0,0 +1,1976 @@ +-- Creator: ASN.1 Editor (http://asneditor.sourceforge.net) +-- Author: ClemensGantert +-- Created: Tue Aug 11 11:40:28 CEST 2015 +ASN-Module DEFINITIONS AUTOMATIC TAGS ::= BEGIN + +-- imports and exports +-- EXPORTS ALL; + + +-- ############################################################################################## +-- # +-- # Final version 1.2 - value 12 in the UIC bar code version element +-- # (see element 2 in U_FLEX record definition in leaflet 918.9) +-- # +-- ############################################################################################## + + +-- ############################################################################################## +-- # +-- # Naming and encoding conventions +-- # +-- # Elements included as String and as Numeric values: +-- # Some elements are included in different formats to reduce the data size. +-- # These elements must be included only once. +-- # These elements are named with the same name and appendix +-- # Num (numeric values) +-- # IA5 (String values according to ASN IA5String (7Bit)) +-- # Example: +-- # trainNum - in case of a numeric train number +-- # trainIA5 - in case of a alphanumeric train Id +-- # +-- # +-- # RICS codes must be used to encode companies (issuer, product owner, ...) where available +-- # other codes are possible based on bilateran agreements +-- # the format is kept more flexible to cover upcomng extensions of the RICS code by ERA +-- # +-- # Stations can be coded using the UIC and upcoming ERA code lists. Proprietary codes are +-- # possible based on bilateral agreements. Format: 1..9999999 or alphanumeric without +-- # special character (IA5String) +-- # +-- # +-- # ! INTEGERS must not exceed the value of 9,223,372,036,854,775,807 (64 bit) even in case +-- # ! they are unrestricted!!! +-- # ! +-- # ! Some elements like ReferenceNum or cardIdNum are defined as an unrestricted integer. +-- # ! Unlike other numerical values the cardIdNum and referenceNum can be larger than a usual 32 bit Integer +-- # ! Some ASN.1 implementation tools are limited to 32 bit integers which is too small. +-- # ! Please ensure to use a tool capable of dealing with larger numbers. +-- # +-- # BOOLEAN is always non optional +-- # +-- # Encoding of time: +-- # time is encoded as the number of minutes of the day 0 = 00:00, 1440 = 24:00, +-- # time data elements end with "time" in their name +-- # +-- # Encoding of date: +-- # ......................................................................................................... +-- # The issuing date is given in UTC, but some other date values are given in local time where the exact time zone is not known. +-- # +-- # For local dates the date is associated with the corresponding location: +-- # e.g.: +-- # valid from date -> location where the journey starts +-- # valid until date -> location where the journey covered by the ticket ends +-- # +-- # there could be rare cases where this is does not rovide a unique interpretation: +-- # e.g. open ticket or pass without start and end location for a collection of zones or countries with different time zones. +-- # in these cases the fare conditions must clarify the rules for these cases (e.g. by allowing to use the +-- # ticket a few hours after the end of validity). +-- # +-- # If these date values are given as the number of days from the issuing date the following rule applies: +-- # +-- # The difference in days is calculated by ignoring the time zone information. +-- # +-- # example 1: (31.12.2017 23:05 UTC == 01.01.2018 00:05 CET) : +-- # issuing date (UTC): 31.12.2017 23:05 +-- # local date (CET): 01.01.2018 00:05 +-- # -> difference in days = 1 +-- # +-- # example 1: (1.1.2018 22:05 UTC == 01.01.2018 23:05 CET) : +-- # issuing date (UTC): 31.12.2017 22:05 +-- # local date (CET): 01.01.2018 23:05 +-- # -> difference in days = 0 +-- # +-- # the day difference could become -1 although this can happen for localtions in America or New Zeeland only. +-- # +-- # implementation example: +-- # +-- # public static Long getDateDifference(Date issuingDate, Date localDate) { +-- # +-- # if (issuingDate == null || localDate == null) return null; +-- # +-- # Calendar issuingCal = Calendar.getInstance(); +-- # issuingCal.clear(); +-- # issuingCal.setTime(issuingDate); +-- # +-- # Calendar fromCal = Calendar.getInstance(); +-- # fromCal.clear(); +-- # fromCal.setTime(localDate); +-- # +-- # long diff = localDate.getTime() - issuingDate.getTime(); +-- # long dayDiff = TimeUnit.DAYS.convert(diff, TimeUnit.MILLISECONDS); +-- # +-- # return new Long(dayDiff); +-- # +-- # } +-- # +-- # public static Date getLocalDateFromDifference(Date issuingDate, int diff , Long time ) { +-- # +-- # if (issuingDate == null) return null; +-- # +-- # Calendar cal = Calendar.getInstance(); +-- # cal.clear(); +-- # cal.setTime(issuingDate); +-- # cal.add(Calendar.DAY_OF_YEAR, diff); +-- # +-- # if (time != null) { +-- # int hours = time.intValue() / 60; +-- # int minutes = time.intValue() - hours * 60; +-- # cal.set(Calendar.HOUR_OF_DAY, hours); +-- # cal.set(Calendar.MINUTE,minutes); +-- # } +-- # +-- # return cal.getTime(); +-- # +-- # } +-- # +-- # +-- # ASN.1 Extensions: +-- # +-- # The specification makes use of extension (",..."). +-- # These extesions might be defined in future versions of the UIC specification +-- # Implementations must support the extension feature of ASN.1, at least they must be able to ignore extensions while decoding the data +-- # ASN.1 extensions will be defined by UIC. It is not allowed to define bilateral extensions. +-- # +-- # Bilateral Extensions: +-- # Bilateral extensions can be included in the data element "ExtensionData". +-- # +-- # +-- # +-- ######################################################################################### + + +-- ############################################################################################ + + +-- type assignments + + -- ######################################################################################### + -- the basic entry point of the data structure + -- the data include: + -- -issuer informations + -- -the details of the transport document + -- -informations required for the control process + -- -informations on the travelers independent from the transport document + -- -proprietary extensions + -- + -- ########################################################################################## + UicRailTicketData ::= SEQUENCE { + -- data specific to the issuer + issuingDetail IssuingData, + + -- data on the travelers + travelerDetail TravelerData OPTIONAL, + + -- data of the transport document + -- more than one document to be used on bilateral agreement only + transportDocument SEQUENCE OF DocumentData OPTIONAL, + + -- data specific to support the ticket control process + controlDetail ControlData OPTIONAL, + + -- proprietary data defined bilaterally + extension SEQUENCE OF ExtensionData OPTIONAL + ,... + } + + + + -- ########################################################################################### + -- the choice on the different transport documents that can be included in the bar code data: + -- - reservation of seat / couchette or berths (IRT, RES, BOA) + -- - reservation of car carriage (VET) + -- - open ticket (NRT including NRT group ticket) (NRT, GRT, SUP, UPD, COI) + -- - Rail passes (including Eurail, Interail and local passes) (RPT) + -- - Voucher (TRV) + -- - Customer Cards (including bonus cards and reduction cards) + -- - counter marks issued for group tickets + -- - parking ground tickets + -- - FIP tickets + -- - station access / station passage tickets + -- - proprietary documents as an extension + -- ############################################################################################ + DocumentData ::= SEQUENCE { + + -- token + -- specific id to be exchanged with the ticket (e.g. id of the phone in case of tickets linked to a phone) + token TokenType OPTIONAL, + + -- choice of the ticket + ticket CHOICE + { + + -- Reservation (without car carriage) (IRT and RES) + reservation ReservationData, + + -- Reservation of car carriage + carCarriageReservation CarCarriageReservationData, + + -- open ticket specification (NRT) + openTicket OpenTicketData, + + -- pass specification (RPT) including Eurail and Interrail + pass PassData, + + -- voucher + voucher VoucherData, + + -- customer card either to identify a customer and / or to provide reductions + customerCard CustomerCardData, + + -- countermark to accompagny a group ticket + counterMark CountermarkData, + + -- car parking slot + parkingGround ParkingGroundData, + + -- FIP duty ticket + fipTicket FIPTicketData, + + -- ticket to pass the gates at a station + stationPassage StationPassageData, + + -- proprietary data defined bilaterally + extension ExtensionData, + + -- delay confirmation + delayConfirmation DelayConfirmation + + ,... + } + ,... + } + + -- ######################################################################################## + -- confirmation of the delay of a train + -- + -- ######################################################################################## + DelayConfirmation ::= SEQUENCE { + + -- reference of the delay confirmation + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- train number of the delayed train - numeric or alphanumeric + trainNum INTEGER OPTIONAL, + trainIA5 IA5String OPTIONAL, + + -- departure date of the delayed train in local time + -- number of year + departureYear INTEGER (2016..2269) OPTIONAL, + -- number of the day in the year (1.1. = 1) + departureDay INTEGER (1..366) OPTIONAL, + departureTime INTEGER (0..1440) OPTIONAL, + + -- station where the delay became relevant + stationCodeTable CodeTableType DEFAULT stationUIC, + stationNum INTEGER (1..9999999) OPTIONAL, + stationIA5 IA5String OPTIONAL, + + -- delay in minutes at the mentioned station + delay INTEGER (1..999), + + -- indication that the train was cancelled + trainCancelled BOOLEAN, + + -- type of confirmation provided + confirmationType ConfirmationType DEFAULT travelerDelayConfirmation, + + -- affected original ticket(s) + affectedTickets SEQUENCE OF TicketLinkType OPTIONAL, + + -- info text + infoText UTF8String OPTIONAL, + + -- proprietary data defined bilaterally + extension ExtensionData OPTIONAL + ,... + } + + ConfirmationType ::= ENUMERATED { + trainDelayConfirmation (0), -- confirmation of train delay, whether the traveler was on board in unconfirmed + travelerDelayConfirmation (1), -- confirmation that the traveler was on board of the delayed train + trainLinkedTicketDelay (2) -- confirmation that a ticket linked to the delayed train was issued + ,... + } + + + -- ######################################################################################## + -- Details of the issuer and the issue of the ticket + -- - details on the issuer + -- - indication of test tickets (specimen) + -- - payment details: method of payment, currency + -- - proprietary PNR of the issuer to be used to identify the sale within + -- the issuers ecosystem + -- - web link to display more information for the customer + -- - proprietary extension data + -- ######################################################################################## + IssuingData ::= SEQUENCE { + + -- provider of the signature (RICS code) + securityProviderNum INTEGER (1..32000) OPTIONAL, + securityProviderIA5 IA5String OPTIONAL, + + -- issuer of the transport document if the issuer is different from the security provider + -- (RICS code) + issuerNum INTEGER (1..32000) OPTIONAL, + issuerIA5 IA5String OPTIONAL, + + -- issuing time stamp in UTC + -- number of year + issuingYear INTEGER (2016..2269), + -- number of the day in the year (1.1. = 1) + issuingDay INTEGER (1..366), + -- The number of the minutes of issue might be used in case of account + -- based ticketing whith a delay of n minutes for the replication of central + -- booking data to the control devices (e.g. at SBB) + -- The time can be compared with the last synchronization time of + -- the control device + issuingTime INTEGER (0..1440) OPTIONAL, + + -- name of the issuer (E.g. short name mentioned in RICS code table) + issuerName UTF8String OPTIONAL, + + -- specimen indicates a test specimen not valid for travelling + specimen BOOLEAN, + + -- secure paper indicates that this barcode is issued with a secure paper ticket + -- to ensure the uniqueness of the ticket. This allows to use the same control + -- procedure as for e-tickets also for anonymous tickets + -- the double use of the ticket is in this case excluded by the secure paper + securePaperTicket BOOLEAN, + + -- indicates that the ticket is valid for traveling or still needs activation + activated BOOLEAN, + + -- currency of the price: ISO4217 currency codes + currency IA5String (SIZE(3)) DEFAULT "EUR", + + -- fraction of the prices included + currencyFract INTEGER (1..3) DEFAULT 2, + + -- PNR used by the issuer to identify the document + issuerPNR IA5String OPTIONAL, + + -- proprietary data defined bilaterally + extension ExtensionData OPTIONAL, + + -- location of sale in case of a sale on board of a train + -- numeric train number or aphanumeric id of the train where the ticket was sold + issuedOnTrainNum INTEGER OPTIONAL, + issuedOnTrainIA5 IA5String OPTIONAL, + -- line number + issuedOnLine INTEGER OPTIONAL, + + -- point oof sale + pointOfSale GeoCoordinateType OPTIONAL + ,... + } + + -- ################################################################################### + -- data supporting the control process + -- - list of items which the travelder can use to identify himself or the unique + -- usage of the ticket + -- (card ids, parts or identity card numbers, credit card numbers,..) + -- - hints on the validation to be made on board + -- + -- ################################################################################### + ControlData ::= SEQUENCE { + + -- cards that can be used to identify the ticket holder + identificationByCardReference SEQUENCE OF CardReferenceType OPTIONAL, + + -- idcard id must be checked to identify the traveler + identificationByIdCard BOOLEAN, + + -- passport id must be checked to identify the traveler + identificationByPassportId BOOLEAN, + + -- other items which could be used to identify the ticket holder + -- (for future use, code list to be defined) + identificationItem INTEGER OPTIONAL, + + -- validation of the passport is required (e.g. in case of Eurail) + passportValidationRequired BOOLEAN, + + -- online validation of the ticket required + onlineValidationRequired BOOLEAN, + + -- percentage of the tickets to be validated in more detail + -- (i.e. via online check or detailed checks lateron) + randomDetailedValidationRequired INTEGER (0..99) OPTIONAL, + + -- manual validation of the traveler age required (in case of reductions) + ageCheckRequired BOOLEAN, + + -- manual validation of the travelers reduction card required (in case of reductions) + reductionCardCheckRequired BOOLEAN, + + -- controler info text + infoText UTF8String OPTIONAL, + + -- additional tickets that should be controlled + includedTickets SEQUENCE OF TicketLinkType OPTIONAL, + + -- proprietary data defined bilaterally + extension ExtensionData OPTIONAL + ,... + } + + -- ################################################################################ + -- Traveler data + -- these data do not include tariff details of the booked tariffs, + -- tariff data are included in the transport document details and might + -- have a reference to the traveler defined here. + -- - personal data of the travellers + -- - the index of the list can be used to identify the + -- traveler within other contexts (e.g. in assigned tariffs) + -- ################################################################################ + TravelerData ::= SEQUENCE { + -- traveler list + traveler SEQUENCE OF TravelerType OPTIONAL, + + -- ISO 639-1 coding of the language preferred for the traveler / ticket holder + preferredLanguage IA5String (SIZE(2)) OPTIONAL, + + -- name of the group in case of a group ticket + groupName UTF8String OPTIONAL + ,... + } + + -- #################################################################################### + -- the following part contains the different transport document specifications + -- #################################################################################### + + + -- #################################################################################### + -- reservations of seats , couchettes and berths + -- included are the data defined in: + -- - leaflet 918.1 for reservation data exchange + -- - a few additional data currently used by some railways via different interfaces + -- - information on trach an dplafoorm where the coach stops + -- - additional second coach for large groups + -- #################################################################################### + ReservationData ::= SEQUENCE { + + -- train number - numeric or alphanumeric + trainNum INTEGER OPTIONAL, + trainIA5 IA5String OPTIONAL, + + -- departure date in local time + -- number of the days calculated from the issuing date + departureDate INTEGER (-1..370) DEFAULT 0, + + -- reservation reference according ton 918.1 in case ade via Hermes + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code to be used as standard) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- service brand: code list https://uic.org/service-brand-code-list + serviceBrand INTEGER (0..32000) OPTIONAL, + serviceBrandAbrUTF8 UTF8String OPTIONAL, + serviceBrandNameUTF8 UTF8String OPTIONAL, + + -- service code list from 918.1 (seat couchette,..) + service ServiceType DEFAULT seat, + + -- code table used to encode stations + stationCodeTable CodeTableType DEFAULT stationUICReservation, + + -- origin station code + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, + + -- destination station code + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, + + -- origin station name + fromStationNameUTF8 UTF8String OPTIONAL, + + -- destination station name + toStationNameUTF8 UTF8String OPTIONAL, + + -- departure time + departureTime INTEGER (0..1440), + + -- arrival date and time in local time + -- number of days counted from the departure date + arrivalDate INTEGER (0..20) DEFAULT 0, + arrivalTime INTEGER (0..1440) OPTIONAL, + + -- responsible carriers on the route + carrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carrierIA5 SEQUENCE OF IA5String OPTIONAL, + + -- travel class + classCode TravelClassType DEFAULT second, + + -- service level code list from 918.1 + serviceLevel IA5String (SIZE(1..2)) OPTIONAL, + + -- places + places PlacesType OPTIONAL, + + -- additional places in a second coach + additionalPlaces PlacesType OPTIONAL, + + --bicycle places + bicyclePlaces PlacesType OPTIONAL, + + -- compartment details (open space, wheelchair,..) + compartmentDetails CompartmentDetailsType OPTIONAL, + + -- number of persons on the ticket without place numbers (on IRT) + numberOfOverbooked INTEGER (0..200) DEFAULT 0, + + -- description of berths + berth SEQUENCE OF BerthDetailData OPTIONAL, + + -- tariffs included (Adult, Children,... ) + tariff SEQUENCE OF TariffType OPTIONAL, + + -- type of the price (supplement,... ) + priceType PriceTypeType DEFAULT travelPrice, + + price INTEGER OPTIONAL, + + vatDetail SEQUENCE OF VatDetailType OPTIONAL, + + -- type of supplement - code list from 018.1 + typeOfSupplement INTEGER (0..9) DEFAULT 0, + + numberOfSupplements INTEGER (0..200) DEFAULT 0, + + -- luggage restrictions and registered luggage + -- in case the luggage restrictions are general and do not depend on the + -- ticket type they should not be included + luggage LuggageRestrictionType OPTIONAL, + + infoText UTF8String OPTIONAL, + + + -- bilaterally agreed proprietary extension + extension ExtensionData OPTIONAL + ,... + } + + -- ################################################################################# + -- details on the VAT included to be used in after sale processes + -- ################################################################################# + VatDetailType ::= SEQUENCE { + + -- ISO 3166 numeric country code + country INTEGER (1..999), + + -- 1/10th of a percent + percentage INTEGER (0..999), + + -- amount of VAT, the currency and the currency fraction is included in the issuing data + amount INTEGER OPTIONAL, + + -- european tax id of the company paying VAT + vatId IA5String OPTIONAL + + } + + + -- ################################################################################# + -- reservations of car carriage + -- included are the data defined in: + -- - leaflet 918.1 for reservation data exchange + -- - a few additional data currently used by some railways via different interfaces + -- ################################################################################# + CarCarriageReservationData ::= SEQUENCE { + + trainNum INTEGER OPTIONAL, + trainIA5 IA5String OPTIONAL, + + + -- loading / unloading of the car in local date and time + -- number of the days calculated from the issuing date + beginLoadingDate INTEGER (-1..370) DEFAULT 0, + + beginLoadingTime INTEGER (0..1440) OPTIONAL, + endLoadingTime INTEGER (0..1440) OPTIONAL, + + -- reservation reference according on 918.1 in case ade via Hermes + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- service brand: code list https://uic.org/service-brand-code-list + serviceBrand INTEGER (1..32000) OPTIONAL, + serviceBrandAbrUTF8 UTF8String OPTIONAL, + serviceBrandNameUTF8 UTF8String OPTIONAL, + + stationCodeTable CodeTableType DEFAULT stationUICReservation, + + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, + + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, + + fromStationNameUTF8 UTF8String OPTIONAL, + toStationNameUTF8 UTF8String OPTIONAL, + + coach IA5String OPTIONAL, + place IA5String OPTIONAL, + + compartmentDetails CompartmentDetailsType OPTIONAL, + + -- description of the car + numberPlate IA5String, + trailerPlate IA5String OPTIONAL, + carCategory INTEGER (0..9), + boatCategory INTEGER (0..6) OPTIONAL, + textileRoof BOOLEAN, + roofRackType RoofRackType DEFAULT norack, + + -- heigth of a roof rack in cm + roofRackHeight INTEGER (0..99) OPTIONAL, + + -- number of boats on a rack + attachedBoats INTEGER (0..2) OPTIONAL, + + -- number of biycles on a rack + attachedBicycles INTEGER (0..4) OPTIONAL, + + -- number of surf boards on a rack + attachedSurfboards INTEGER (0..5) OPTIONAL, + + -- reference to an entry on the loading list + loadingListEntry INTEGER (0..999) OPTIONAL, + loadingDeck LoadingDeckType DEFAULT upper, + + -- responsible carriers on the route (RICS codes) + carrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carrierIA5 SEQUENCE OF IA5String OPTIONAL, + + tariff TariffType, + priceType PriceTypeType DEFAULT travelPrice, + + price INTEGER OPTIONAL, + + vatDetail SEQUENCE OF VatDetailType OPTIONAL, + + infoText UTF8String OPTIONAL, + extension ExtensionData OPTIONAL + ,... + } + + + -- ##################################################################################### + -- data for open tickets (NRT and group tickets) + -- included are the data defined in: + -- - the ticket layout (leaflet 918.2) + -- - the ticket bar code version 3 (leaflet 918.2) + -- - additional data based on 108.1 with some extensions as 108.1 + -- does not provide well structured data, + -- especially concerning regional validity + -- + -- ##################################################################################### + + OpenTicketData ::= SEQUENCE { + + -- reference must be given either in numeric or alphanumeric format + referenceNum INTEGER OPTIONAL, + referenceIA5 IA5String OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- to support other ticket content (e.g. VDV, UTPF, VÖV, CALYPSO) + -- issuer code using the default code table of the product owner + extIssuerId INTEGER OPTIONAL, + -- authorization id provided to the issuer by the product owner + issuerAutorizationId INTEGER OPTIONAL, + + -- ticket includes the return trip + returnIncluded BOOLEAN, + + stationCodeTable CodeTableType DEFAULT stationUIC, + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, + + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, + + fromStationNameUTF8 UTF8String OPTIONAL, + toStationNameUTF8 UTF8String OPTIONAL, + + -- description for manual evaluation in case structured data are not available + validRegionDesc UTF8String OPTIONAL, + -- specification of the ordered sequence of valid regions + validRegion SEQUENCE OF RegionalValidityType OPTIONAL, + + -- return route description + -- the return route description can be omitted if it is identical to the + -- inversed outbound validRegion sequence + returnDescription ReturnRouteDescriptionType OPTIONAL, + + -- temporal validity data in local time of the location where the jouney starts + -- number of days from issuing date + validFromDay INTEGER (-1..700) DEFAULT 0, + + validFromTime INTEGER (0..1440) OPTIONAL, + -- number of days from valid-from date, 0 = first day of validity + validUntilDay INTEGER (0..370) DEFAULT 0, + validUntilTime INTEGER (0..1440) OPTIONAL, + + -- list of activated days in case the entire ticket is not activated + -- the day is given by the number of days from the first day of validity + -- 1 = first day of validity + activatedDay SEQUENCE OF INTEGER (0..370) OPTIONAL, + + classCode TravelClassType DEFAULT second, + + -- servicelevel code according to leaflet 918.1 to encode other products + -- (e.g. PREMIUM, ...) + serviceLevel IA5String (SIZE(1..2)) OPTIONAL, + + -- carriers involved in the transport (RICS codes) + -- the indication of carriers is mandatory on international routes, + -- they can be listed here but can also be included in viaDetails + carrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carrierIA5 SEQUENCE OF IA5String OPTIONAL, + + + -- list of service brands for which the ticket is valid + -- in case the included service brands are listed all other brands are excluded + -- service brand: code list https://uic.org/service-brand-code-list + includedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + + -- list of service brands for which the ticket is not valid + -- service brand: code list https://uic.org/service-brand-code-list + excludedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + + tariffs SEQUENCE OF TariffType OPTIONAL, + + price INTEGER OPTIONAL, + + vatDetail SEQUENCE OF VatDetailType OPTIONAL, + + infoText UTF8String OPTIONAL, + + -- additional included open tickets + -- e.g. to include local city traffic on parts of a the route + includedAddOns SEQUENCE OF IncludedOpenTicketType OPTIONAL, + + -- in case the luggage restrictions are general and do not depend + -- on the ticket type they should not be included + luggage LuggageRestrictionType OPTIONAL, + + + + extension ExtensionData OPTIONAL + ,... + } + + + + -- #################################################################################### + -- data for passes + -- included are the data defined in: + -- - the ticket layout (leaflet 918.2) + -- - the ticket bar code version 3 (leaflet 918.2) + -- #################################################################################### + PassData ::= SEQUENCE { + + -- reference must be given in numeric or alphanumeric format + referenceNum INTEGER OPTIONAL, + referenceIA5 IA5String OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- type of the pass, code list provided by the product owner + -- in case of Eurail: + -- 1 = Interrail + -- 2 = Eurail + -- 3 = Eurail Global (all countries) + passType INTEGER (1..250) OPTIONAL, + + -- literal name of the pass + passDescription UTF8String OPTIONAL, + + classCode TravelClassType DEFAULT second, + + -- begin of validity + -- number of days from issuing date + validFromDay INTEGER (-1..700) DEFAULT 0, + + validFromTime INTEGER (0..1440) OPTIONAL, + -- end of validity + -- number of days from valid from day, 0 = valid on valid-from-date + validUntilDay INTEGER (0..370) DEFAULT 0, + validUntilTime INTEGER (0..1440) OPTIONAL, + + -- additional validity periods and excluded time ranges + validityPeriodDetails ValidityPeriodDetailType OPTIONAL, + + -- max number of days of validity in case the valid from day is open + numberOfValidityDays INTEGER (0..370) OPTIONAL, + + -- max number of possible trips to be activated + numberOfPossibleTrips INTEGER (1..250) OPTIONAL, + numberOfDaysOfTravel INTEGER (1..250) OPTIONAL, + + -- list of activated days in case the entire ticket is not activated + -- the day is given by the number of days from the first day of validity + -- 0 = first day of validity + activatedDay SEQUENCE OF INTEGER (0..370) OPTIONAL, + + -- included countries, code table according to UIC leaflet 918.2 + countries SEQUENCE OF INTEGER (1..250) OPTIONAL, + + -- included carriers (RICS codes) + includedCarrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + includedCarrierIA5 SEQUENCE OF IA5String OPTIONAL, + + -- excluded carriers (RICS codes) + excludedCarrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + excludedCarrierIA5 SEQUENCE OF IA5String OPTIONAL, + + -- service brand: code list https://uic.org/service-brand-code-list + includedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + excludedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + + -- region description to cover local zones + validRegion SEQUENCE OF RegionalValidityType OPTIONAL, + + tariffs SEQUENCE OF TariffType OPTIONAL, + + price INTEGER OPTIONAL, + + vatDetail SEQUENCE OF VatDetailType OPTIONAL, + + infoText UTF8String OPTIONAL, + extension ExtensionData OPTIONAL + ,... + } + + ValidityPeriodDetailType ::= SEQUENCE { + validityPeriod SEQUENCE OF ValidityPeriodType OPTIONAL, + excludedTimeRange SEQUENCE OF TimeRangeType OPTIONAL + } + + ValidityPeriodType ::= SEQUENCE { + -- number of days from issuing date + validFromDay INTEGER (-1..700) DEFAULT 0, + validFromTime INTEGER (0..1440) OPTIONAL, + -- number of days from valid from day, 0 = valid on valid from date + validUntilDay INTEGER (0..370) DEFAULT 0, + validUntilTime INTEGER (0..1440) OPTIONAL + } + + TimeRangeType ::= SEQUENCE { + fromTime INTEGER (0..1440), + untilTime INTEGER (0..1440) + } + + -- ###################################################################################### + -- data for vouchers + -- included are quite basic further study is required + -- ###################################################################################### + VoucherData ::= SEQUENCE { + + -- reference must be given in numeric or alphanumeric format + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- begin of validity in UTC + -- number of year + validFromYear INTEGER (2016..2269), + -- number of the day in the year (1.1. = 1) + validFromDay INTEGER (0..370), + -- end of validity + -- number of year + validUntilYear INTEGER (2016..2269), + -- number of the day in the year (1.1. = 1) + validUntilDay INTEGER (0..370), + + value INTEGER DEFAULT 0, + + -- type of the voucher, code list defined by the product owner + type INTEGER (1..32000) OPTIONAL, + + infoText UTF8String OPTIONAL, + extension ExtensionData OPTIONAL + ,... + } + -- ################################################################################### + -- data for FIP tickets + -- included are data from the FIP ticket layout, + -- ################################################################################### + FIPTicketData ::= SEQUENCE { + + -- reference must be given in numeric or alphanumeric format + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- first day of validity in UTC + --- number of days from issuing date + validFromDay INTEGER (-1..700) DEFAULT 0, + -- last day of validity + -- number of days from valid from day, 0 = first day of validity + validUntilDay INTEGER (0..370) DEFAULT 0, + + -- activated days: list of days for which the ticket is valid + -- the day is given by the number of days from the first day of validity + -- 0 = first day of validity + activatedDay SEQUENCE OF INTEGER (0..370) OPTIONAL, + + -- included carriers + carrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carrierIA5 SEQUENCE OF IA5String OPTIONAL, + + -- number of travel days allowed + numberOfTravelDays INTEGER (1..200), + includesSupplements BOOLEAN, + + -- travel class + classCode TravelClassType DEFAULT second, + extension ExtensionData OPTIONAL + ,... + } + + -- ##################################################################################### + -- data station passage and access + -- ticket used to enter, exit or pass a station without travelling by train. + -- E.g. for staff working in a station. + -- ##################################################################################### + StationPassageData ::= SEQUENCE { + + -- reference must be given in numeric or alphanumeric format + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + productName UTF8String OPTIONAL, + + -- code table used to encode he stations + stationCodeTable CodeTableType DEFAULT stationUIC, + -- list of station where the passage is allowed + stationNum SEQUENCE OF INTEGER OPTIONAL, + stationIA5 SEQUENCE OF IA5String OPTIONAL, + -- station names + stationNameUTF8 SEQUENCE OF UTF8String OPTIONAL, + + -- list of areas in a station where the access is allowed + areaCodeNum SEQUENCE OF INTEGER OPTIONAL, + areaCodeIA5 SEQUENCE OF IA5String OPTIONAL, + -- area names + areaNameUTF8 SEQUENCE OF UTF8String OPTIONAL, + + -- begin of validity in local date and time + -- number of days from issuing date + validFromDay INTEGER (-1..700), + validFromTime INTEGER (0..1440) OPTIONAL, + -- end of validity + -- number of days from valid from day, 0 = first day of validity + validUntilDay INTEGER (0..370) DEFAULT 0, + validUntilTime INTEGER (0..1440) OPTIONAL, + + -- number of days for station passage in case the number of days + -- is limited and less that the validity period + numberOfDaysValid INTEGER OPTIONAL, + + extension ExtensionData OPTIONAL + ,... + } + + -- ###################################################################################### + -- data for customer cards + -- included are data from: + -- - ÖBB requirements on card data + -- - DB Bahncard as HandyTicket + -- note: customer data are included in the traveler data structure + -- ###################################################################################### + CustomerCardData ::= SEQUENCE { + + -- customer details + -- optional, as there might be an anonymous cards + customer TravelerType OPTIONAL, + + -- card id might be numerical or alphanumerical + cardIdIA5 IA5String OPTIONAL, + cardIdNum INTEGER OPTIONAL, + + -- valid from date in UTC + -- number of year + validFromYear INTEGER (2016..2269), + --- number of the day in the year (1.1. = 1) + validFromDay INTEGER (0..370) OPTIONAL, + + --- number of year from valid from year onwards + validUntilYear INTEGER (0..250) DEFAULT 0, + --- number of the day in the year (1.1. = 1) + validUntilDay INTEGER (0..370) OPTIONAL, + + classCode TravelClassType OPTIONAL, + + -- code of the card type code list defined by the issuer + cardType INTEGER (1..1000) OPTIONAL, + + -- readable description of the card type + cardTypeDescr UTF8String OPTIONAL, + + -- customer status code + -- 1 = basic + -- 2 = premium + -- 3 = silver + -- 4 = gold + -- 5 = platinum + -- 6 = senator + -- > 50 - code table of the card issuer + customerStatus INTEGER OPTIONAL, + + -- readable customer status "e.g. gold", + customerStatusDescr IA5String OPTIONAL, + + -- list of included services, + -- 1 = Rail Plus + -- 2 = access to launch + -- > 50 code list of the issuer + includedServices SEQUENCE OF INTEGER OPTIONAL, + + extension ExtensionData OPTIONAL + ,... + } + + -- ###################################################################################### + -- data for customer cards + -- included are data from: + -- - DB parking ground reservation + -- ####################################################################################### + ParkingGroundData ::= SEQUENCE { + + -- booking reference + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + parkingGroundId IA5String, + + -- parking date in local date time + -- number of days from the issuing date + fromParkingDate INTEGER (-1..370), + -- number of days from the from parking date in case it is different from that date + toParkingDate INTEGER (0..370) DEFAULT 0, + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- code needed to access the parking lot + accessCode IA5String OPTIONAL, + + location UTF8String, + + stationCodeTable CodeTableType DEFAULT stationUIC, + -- in case the parking ground is associated with a station + stationNum INTEGER OPTIONAL, + stationIA5 UTF8String OPTIONAL, + + specialInformation UTF8String OPTIONAL, + entryTrack UTF8String OPTIONAL, + numberPlate IA5String OPTIONAL, + + price INTEGER OPTIONAL, + vatDetail SEQUENCE OF VatDetailType OPTIONAL, + + + extension ExtensionData OPTIONAL + ,... + } + + -- ####################################################################### + -- data for countermarks issued with group tickets + -- included are data from: + -- - version 3 bar code (leaflet 918.2) + -- - printed layout (leaflet 918.2) + -- ######################################################################## + CountermarkData ::= SEQUENCE { + + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- reference of the group ticket + ticketReferenceIA5 IA5String OPTIONAL, + ticketReferenceNum INTEGER OPTIONAL, + + -- sequential number of the countermark + numberOfCountermark INTEGER (1..200), + -- total number of countermarks + totalOfCountermarks INTEGER (1..200), + -- name of the group + groupName UTF8String, + + + stationCodeTable CodeTableType DEFAULT stationUIC, + + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, + + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, + + fromStationNameUTF8 UTF8String OPTIONAL, + toStationNameUTF8 UTF8String OPTIONAL, + + -- description for manual evaluation in case structured data are not available + validRegionDesc UTF8String OPTIONAL, + -- specification of the ordered sequence of valid regions + validRegion SEQUENCE OF RegionalValidityType OPTIONAL, + + + -- ticket includes the return trip + returnIncluded BOOLEAN, + -- retrurn route description + -- can be omitted if it is identical to the inversed outbound validRegion sequence + returnDescription ReturnRouteDescriptionType OPTIONAL, + + -- local date + -- number of days from issuing date + validFromDay INTEGER (-1..700) DEFAULT 0, + + validFromTime INTEGER (0..1440) OPTIONAL, + -- number of days from valid from day, 0 = first day of validity + validUntilDay INTEGER (0..370) DEFAULT 0, + validUntilTime INTEGER (0..1440) OPTIONAL, + + classCode TravelClassType DEFAULT second, + + -- valid carriers + carrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carrierIA5 SEQUENCE OF IA5String OPTIONAL, + + -- service brands where the ticket is valid + -- in case this list is provided the ticket is invalid on all other service brands + -- service brand: code list https://uic.org/service-brand-code-list + includedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + + -- service brands where the ticket is not valid + -- in case this list is provided the ticket is valid on all other service brands + excludedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + + infoText UTF8String OPTIONAL, + + extension ExtensionData OPTIONAL + ,... + } + + + -- ########################################################################################### + -- generic non standard extension element + -- the generic non - standard element contains: + -- - an extension id to distinguish different extensions + -- - the extension data as binary data + -- proprietary extensions are by definition proprietary. This standard provides + -- the means to identify these extensions + -- within the data and to skip these data. + -- the evaluation of these data and the unique identification of the extensions + -- via the extension id is in the + -- responsibility of the railways which use these extensions. + -- ########################################################################################### + ExtensionData ::= SEQUENCE { + extensionId IA5String, + extensionData OCTET STRING + } + + -- ############################################################################################ + -- type definitions + -- ############################################################################################ + + -- ############################################################################################# + -- included open ticke for a part of the travel (e.g. local city trafic) + -- - data identically already included in the covering open ticket do not need to be + -- repeated here + -- - main source are the data required for included regional and city traffic tickets + -- ############################################################################################# + IncludedOpenTicketType ::= SEQUENCE { + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- issuer code using the default code table of the product owner (today used e.g. by VDV) + externalIssuerId INTEGER OPTIONAL, + -- authorization id provided to the issuer by the poroduct owner (today used e.g. by VDV) + issuerAutorizationId INTEGER OPTIONAL, + + -- regional validity data + stationCodeTable CodeTableType DEFAULT stationUIC, + -- specification of the ordered sequence of valid regions, ordered in the direction of travel + validRegion SEQUENCE OF RegionalValidityType OPTIONAL, + + -- temporal validity data in local date and time + -- number of days from issuing date + validFromDay INTEGER (-1..700) DEFAULT 0, + + validFromTime INTEGER (0..1440) OPTIONAL, + -- number of days from valid-from date, 0 = first day of validity + validUntilDay INTEGER (0..370) DEFAULT 0, + validUntilTime INTEGER (0..1440) OPTIONAL, + + -- travel class to be given in case it differs from the class of the main ticket + classCode TravelClassType OPTIONAL, + -- servicelevel code according to leaflet 918.1 to encode other products (e.g. PREMIUM, ...) + -- to be provided in case it differs from the main ticket + serviceLevel IA5String (SIZE(1..2)) OPTIONAL, + + -- valid carriers (RICS codes) + carrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carrierIA5 SEQUENCE OF IA5String OPTIONAL, + + -- service brands where the ticket is valid + -- in case this list is provided the ticket is invalid on all other service brands + -- service brand: code list https://uic.org/service-brand-code-list + includedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + + -- service brands where the ticket is not valid + -- in case this list is provided the ticket is valid on all other service brands + excludedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + + tariffs SEQUENCE OF TariffType OPTIONAL, + infoText UTF8String OPTIONAL, + extension ExtensionData OPTIONAL + ,... + } + + -- ###################################################################################### + -- tariff data for open tickets + -- information included are: + -- - number of passengers + -- - optionally a link to the traveler data + -- ####################################################################################### + TariffType ::= SEQUENCE { + + -- number of passengers using the tariff + numberOfPassengers INTEGER (1..200) DEFAULT 1, + + -- type indication youth, adult, senior,.. + passengerType PassengerType OPTIONAL, + + -- age restrictions of the tariff + ageBelow INTEGER (1..64) OPTIONAL, + ageAbove INTEGER (1..128) OPTIONAL, + + + -- named traveler list + -- link to the traveler in case the travelers have to be named (e.g. Eurail passes) + -- the number indicates the position in the traveler list starting from 1 + travelerid SEQUENCE OF INTEGER (0..254) OPTIONAL, + + -- restriction on country of residence + -- this tariff is restricted by the country of residence given in the traveler data + -- (e.g. Eurail tickets are not valid in the contry of residence) + restrictedToCountryOfResidence BOOLEAN, + + -- section in case the tariff applies to a part of the route only + restrictedToRouteSection RouteSectionType OPTIONAL, + + -- details on series according to lesaflet 108.1 + seriesDataDetails SeriesDetailType OPTIONAL, + + -- tariff code + tariffIdNum INTEGER OPTIONAL, + tariffIdIA5 IA5String OPTIONAL, + + -- tariff description + tariffDesc UTF8String OPTIONAL, + + -- reduction cards applied (incl. dicount cards, loaylty cards relevant for the tariff) + reductionCard SEQUENCE OF CardReferenceType OPTIONAL + ,... + } + + SeriesDetailType ::= SEQUENCE { + + -- data related to tariffs based on series according UIC leaflet 108.1 + -- supplying carrier according to UIC leaflet 108.1 (RICS code) + supplyingCarrier INTEGER (1..32000) OPTIONAL, + + -- offer identifier of the carrier according to UIC leaflet 108.1 + offerIdentification INTEGER (1..99) OPTIONAL, + + -- series of the carrier according to UIC leaflet 108.1 + series INTEGER OPTIONAL + } + + + RouteSectionType ::= SEQUENCE { + + stationCodeTable CodeTableType DEFAULT stationUIC, + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, -- IA5 or Num not both + + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, -- IA5 or Num not both + + fromStationNameUTF8 UTF8String OPTIONAL, + toStationNameUTF8 UTF8String OPTIONAL + } + + + -- ####################################################################################### + -- customer card reference + -- ####################################################################################### + CardReferenceType ::= SEQUENCE { + + -- issuer of the card + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + cardIssuerNum INTEGER (1..32000) OPTIONAL, + cardIssuerIA5 IA5String OPTIONAL, + + cardIdNum INTEGER OPTIONAL, + cardIdIA5 IA5String OPTIONAL, + + -- Name of the card e.g. "VISA-CARD" + cardName UTF8String OPTIONAL, + + -- type of the card, code list defined by the issuer + cardType INTEGER OPTIONAL, + + -- in case only the leading part of the card number is provided + leadingCardIdNum INTEGER OPTIONAL, + leadingCardIdIA5 IA5String OPTIONAL, + + + -- in case only the trailing part of the card number is provided + trailingCardIdNum INTEGER OPTIONAL, + trailingCardIdIA5 IA5String OPTIONAL + + ,... + } + + -- ####################################################################################### + -- traveler data + -- - traveler data might contain all traveler details which are independent + -- from the type of travel document + -- e.g. it can include the date of birth as this is part of the traveler + -- but not the indication "Senior" as this is tariff dependent + -- + -- ####################################################################################### + TravelerType ::= SEQUENCE { + + firstName UTF8String OPTIONAL, + secondName UTF8String OPTIONAL, + lastName UTF8String OPTIONAL, + idCard IA5String OPTIONAL, + passportId IA5String OPTIONAL, + title IA5String (SIZE(1..3)) OPTIONAL, + gender GenderType OPTIONAL, + + -- customer id might be numerical or alphanumerical + customerIdIA5 IA5String OPTIONAL, + customerIdNum INTEGER OPTIONAL, + + -- date of birth + -- number of year + yearOfBirth INTEGER (1901..2155) OPTIONAL, + -- number of the day in the year (1.1. = 1) + dayOfBirth INTEGER (0..370) OPTIONAL, + + -- indicates the ticket holder/group leader in case of groups + ticketHolder BOOLEAN, + + passengerType PassengerType OPTIONAL, + + passengerWithReducedMobility BOOLEAN OPTIONAL, + + -- country of residence (numeric ISO country code) + -- to be used in case there product restrictions on the country of residence (e.g. Eurail passes) + countryOfResidence INTEGER (1..999) OPTIONAL, + + countryOfPassport INTEGER (1..999) OPTIONAL, + countryOfIdCard INTEGER (1..999) OPTIONAL, + + status SEQUENCE OF CustomerStatusType OPTIONAL + ,... + } + + CustomerStatusType ::= SEQUENCE { + + -- compagny providing the status, default is the issuer + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + statusProviderNum INTEGER (1..32000) OPTIONAL, + statusProviderIA5 IA5String OPTIONAL, + + -- customer status code + -- 1 = basic + -- 2 = premium + -- 3 = silver + -- 4 = gold + -- 5 = platinum + -- 6 = senator + -- > 50 - code table of the card issuer + customerStatus INTEGER OPTIONAL, + + -- customer status "gold" + customerStatusDescr IA5String OPTIONAL + } + + + ReturnRouteDescriptionType ::= SEQUENCE { + + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, + + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, + + fromStationNameUTF8 UTF8String OPTIONAL, + toStationNameUTF8 UTF8String OPTIONAL, + + -- description for manual evaluation in case structured data are not available + validReturnRegionDesc UTF8String OPTIONAL, + + -- specification of the ordered sequence of valid regions for the return trip + validReturnRegion SEQUENCE OF RegionalValidityType OPTIONAL + ,... + + } + + -- ###################################################################################### + -- regional validity of an open ticket + -- specification of the regional validity. + -- ###################################################################################### + + RegionalValidityType ::= CHOICE { + trainLink TrainLinkType, + viaStations ViaStationType, + zones ZoneType, + lines LineType, + polygone PolygoneType + ,... + } + + + + -- ####################################################################################### + -- train link data + -- includes a restriction of an open ticket valid only on a specific train + -- and date on a part of the route + -- ####################################################################################### + TrainLinkType ::= SEQUENCE { + + trainNum INTEGER OPTIONAL, + trainIA5 IA5String OPTIONAL, + + -- local date at the station where the train link starts + -- days from the issuing date onwards + travelDate INTEGER (-1..370), + departureTime INTEGER (0..1440), -- time in minutes + + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, + + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, + + fromStationNameUTF8 UTF8String OPTIONAL, + toStationNameUTF8 UTF8String OPTIONAL + + } + + + + -- ###################################################################################### + -- regional validity using a set of lines + -- - based on data used in regional city trafic enviromnemnts + -- ###################################################################################### + LineType ::= SEQUENCE { + + -- local service provider / carrier within the zone + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + carrierNum INTEGER (1..32000) OPTIONAL, + carrierIA5 IA5String OPTIONAL, + + -- ids of the valid lines known by the local carriers in that zone + lineId SEQUENCE OF INTEGER OPTIONAL, + + stationCodeTable CodeTableType DEFAULT stationUIC, + + -- in case the zone must be entered via a specific station + -- (e.g. local city trafic at the end of a journey + -- starting from the main train station) + entryStationNum INTEGER (1..9999999) OPTIONAL, + entryStationIA5 IA5String OPTIONAL, + + -- in case the zone must be left via a specific station + -- (e.g. local city trafic at the beginning of a journey + -- terminating at the main train station) + terminatingStationNum INTEGER (1..9999999) OPTIONAL, + terminatingStationIA5 IA5String OPTIONAL, + + -- code of the local city in case the zone is part of regional city transport + -- code list of the local carrier + city INTEGER (1..9999999) OPTIONAL, + + -- binary encoding of zones, encoding speciofication provided by + -- the local service provider + binaryZoneId OCTET STRING OPTIONAL + ,... + } + + + -- ################################################################################# + -- regional validity in a zone + -- - based on data used in regional city trafic enviromnemnts + -- ################################################################################# + ZoneType ::= SEQUENCE { + + -- local service provider / carrier within the zone + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + carrierNum INTEGER (1..32000) OPTIONAL, + carrierIA5 IA5String OPTIONAL, + + stationCodeTable CodeTableType DEFAULT stationUIC, + -- in case the zone must be entered via a specific station + -- (e.g. local city trafic at the end of a journey starting + -- from the main train station) + entryStationNum INTEGER (1..9999999) OPTIONAL, + entryStationIA5 IA5String OPTIONAL, + + -- in case the zone must be left via a specific station + -- (e.g. local city trafic at the beginning of a journey + -- terminating at the main train station) + terminatingStationNum INTEGER (1..9999999) OPTIONAL, + terminatingStationIA5 IA5String OPTIONAL, + + -- code of the local city in case the zone is part of regional + -- city transport code list of the local carrier + city INTEGER OPTIONAL, + + -- ids of the valid zones known by the local carriers in that zone + zoneId SEQUENCE OF INTEGER OPTIONAL, + + -- binary encoding of zones, encoding specification provided by + -- the local service provider + binaryZoneId OCTET STRING OPTIONAL, + + -- EU NUTS code for a region + nutsCode IA5String OPTIONAL + ,... + } + + + -- ################################################################################## + -- via station + -- includes a description of of the route by via stations. + -- Via stations follow the description in leaflet 108.1: + -- via stations can e mandatory to pass (but there does not need to be a + -- train stop at this stations): visible route description: "*station*" + -- there can be a list of alternative routes: + -- visible route description: "*(station1/station2)*" + -- there can also be alternative routes: + -- "*(station1*station2/station3*station4)*" although the + -- definition in 108.2 is not very precice on this option + -- ################################################################################### + ViaStationType ::= SEQUENCE { + + stationCodeTable CodeTableType DEFAULT stationUIC, + -- mandatory via station + stationNum INTEGER (1..9999999) OPTIONAL, + stationIA5 IA5String OPTIONAL, + + -- list of alternative routes, one of these has to be taken + alternativeRoutes SEQUENCE OF ViaStationType OPTIONAL, + + -- list of stations along the route + route SEQUENCE OF ViaStationType OPTIONAL, + border BOOLEAN, + + -- carrier responsible for the transport starting at this station (RICS-Code) + -- in case the carrier is included here it might be omitted + -- in the carrier list of the region data + carrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carrierIA5 SEQUENCE OF IA5String OPTIONAL, + + -- the route id as series number as defined in 108.1 data + seriesId INTEGER OPTIONAL, + + -- route id of the route code list defined by the carrier on that route + routeId INTEGER OPTIONAL + ,... + } + + + PolygoneType ::= SEQUENCE { + firstEdge GeoCoordinateType, + edges SEQUENCE OF DeltaCoordinates + } + + + -- ########################################################################################### + -- TokenType provides an additional identifier + -- known use cases + -- - identified of the mobile phone for tickets linked with a specific phone (e.g. VDV standard) + -- ########################################################################################### + TokenType ::= SEQUENCE { + -- provider of the token + tokenProviderNum INTEGER OPTIONAL, + tokenProviderIA5 IA5String OPTIONAL, + + -- in case the provider has multiple tokens + tokenSpecification IA5String OPTIONAL, + token OCTET STRING + } + + -- ########################################################################################### + -- TicketLinkType is used to define a link from the ticket in the bar code to another ticket + -- (requirement from Eurail) + -- use cases + -- - DB Alleo (open ticket + reservation) + -- - reservation of trailer and car carriage and traveller reservation + -- - link between open ticket and bicycle reservations or pass + -- - open ticket and vouchers for meals + -- ########################################################################################### + TicketLinkType ::= SEQUENCE { + + -- data to reference the external ticket + -- reference must be given in numeric or alphanumeric format + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + issuerName UTF8String OPTIONAL, -- name of the issuer + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- type of linked ticket + ticketType TicketType DEFAULT openTicket, + + -- type of link + linkMode LinkMode DEFAULT issuedTogether + ,... + } + + -- ############################################################################################ + -- code table used fort station codes + -- defines the code table used e.g. to define station code + -- - stationUIC = station codes as used in UIC leaflet 108.1 for open tickets + -- - stationUICReservation = station codes as used in Reservation leaflets 918.1 and 108.2 + -- ############################################################################################ + + CodeTableType ::= ENUMERATED { + -- standard UIC station code from MERITS (UIC country code + 5 digit local code) + stationUIC (0), + -- standard UIC station code for reservation + stationUICReservation (1), + -- future standard ERA station code + stationERA (2), + -- local carrier code list + -- e.g. in case of stations / stops of non-railways stops (city trafic) + localCarrierStationCodeTable (3), + + -- non standard code to be used within the issuer eco system only + -- not applicable for multi carrier travel documents + -- or in case issuer and carrier are different + proprietaryIssuerStationCodeTable (4) + + } + + + ServiceType ::= ENUMERATED { + seat (0), + couchette (1), + berth (2), + carcarriage (3) + } + + + PassengerType ::= ENUMERATED { + adult (0), + senior (1), + child (2), + youth (3), + dog (4), + bicycle (5), + freeAddonPassenger (6), + freeAddonChild (7) + ,... + } + + TicketType ::= ENUMERATED { + openTicket (0), + pass (1), + reservation (2), + carCarriageReservation (3) + ,... + } + + LinkMode ::= ENUMERATED { + issuedTogether (0), + onlyValidInCombination (1) + ,... + } + + + -- #################################################################################### + -- place data corresponding to leaflet 918.1 + -- placeString = place number ranges in case of groups + -- #################################################################################### + PlacesType ::= SEQUENCE { + coach IA5String OPTIONAL, + + -- printable place string ("15-18, 21, 22" ) + placeString IA5String OPTIONAL, + + -- printable place description + placeDescription UTF8String OPTIONAL, + + -- individual places + placeIA5 SEQUENCE OF IA5String OPTIONAL, + placeNum SEQUENCE OF INTEGER (1..254) OPTIONAL + } + + PriceTypeType ::= ENUMERATED { + noPrice (0), + reservationFee (1), + supplement (2), + travelPrice (3) + } + + BerthTypeType ::= ENUMERATED { + single (0), + special (1), + double (2), + t2 (3), + t3 (4), + t4 (5) + } + + CompartmentGenderType ::= ENUMERATED { + unspecified (0), + family (1), + female (2), + male (3), + mixed (4) + ,... + } + + GenderType ::= ENUMERATED { + unspecified (0), + female (1), + male (2), + other (3) + ,... + } + + TravelClassType ::= ENUMERATED { + notApplicable (0), + first (1), + second (2), + tourist (3), + comfort (4), + premium (5), + business (6), + all (7) + ,... + } + + -- ######################################################################################## + -- sleeper compartment types corresponding to leaflet 918.1 + -- ######################################################################################## + BerthDetailData ::= SEQUENCE { + berthType BerthTypeType, + numberOfBerths INTEGER (1..999), + gender CompartmentGenderType DEFAULT family + ,... + } + + -- #################################################################################### + -- compartment details corresponding to leaflet 918.1 + -- #################################################################################### + CompartmentDetailsType ::= SEQUENCE { + coachType INTEGER (1..99) OPTIONAL, + compartmentType INTEGER (1..99) OPTIONAL, + specialAllocation INTEGER (1..99) OPTIONAL, + coachTypeDescr UTF8String OPTIONAL, + compartmentTypeDescr UTF8String OPTIONAL, + specialAllocationDescr UTF8String OPTIONAL, + position CompartmentPositionType DEFAULT unspecified + ,... + } + + + -- ##################################################################################### + -- luggage restrictions + -- the basis for these data is week: + -- SCIC mentions a maximum of three pieces of hand luggage but does not includes + -- a definition of hand luggaage + -- SCIC referes to special conditions on registered lluggage, but SCIC NRT does + -- not contain definitions on that and UIC 108.1 does not + -- contain data structures for luggage + -- - current THALYS luggage resrictions + -- ##################################################################################### + LuggageRestrictionType ::= SEQUENCE { + -- allowed hand luggage pieces on this ticket (3 = default in current NRT tariff) + maxHandLuggagePieces INTEGER(0..99) DEFAULT 3, + -- allowed hand luggage pieces on this ticket (3 = default in current NRT tariff) + maxNonHandLuggagePieces INTEGER(0..99) DEFAULT 1, + registeredLuggage SEQUENCE OF RegisteredLuggageType OPTIONAL + ,... + + } + + RegisteredLuggageType ::= SEQUENCE { + -- id of the additional registered luggage + registrationId IA5String OPTIONAL, + -- maximum weight in kg + maxWeight INTEGER (1..99) OPTIONAL, + -- sum of length with and height in cm + maxSize INTEGER (1..300) OPTIONAL + ,... + + } + + -- ########################################################################################## + -- generic type for geo coordinates + -- ########################################################################################## + GeoCoordinateType ::= SEQUENCE { + geoUnit GeoUnitType DEFAULT milliDegree, + coordinateSystem GeoCoordinateSystemType DEFAULT wgs84, + -- separate hemishpere flag reduces the data size + hemisphereLongitude HemisphereLongitudeType DEFAULT north, + -- separate hemishpere flag reduces the data size + hemisphereLatitude HemisphereLatitudeType DEFAULT east, + longitude INTEGER, + latitude INTEGER, + accuracy GeoUnitType OPTIONAL + } + + DeltaCoordinates ::= SEQUENCE { + -- logitude difference to a reference point + longitude INTEGER, + -- latitude difference to a reference point + latitude INTEGER + } + + GeoCoordinateSystemType ::= ENUMERATED { + wgs84 (0), -- WGS 84 standard system + grs80 (1) -- (outdated) GRS 80 coordinate system + } + + GeoUnitType ::= ENUMERATED { + microDegree (0), -- approx. 11 cm on earth surface + tenthmilliDegree (1), -- 1 / 100000 degree is approx. 1.1 meter on earth surface + milliDegree (2), -- approx 110 meter on earth surface + centiDegree (3), + deciDegree (4) + } + + HemisphereLongitudeType ::= ENUMERATED { + north (0), + south (1) + } + + HemisphereLatitudeType ::= ENUMERATED { + east (0), + west (1) + } + + LoadingDeckType ::= ENUMERATED { + unspecified (0), + upper (1), + lower (2) + } + + CompartmentPositionType ::= ENUMERATED { + unspecified (0), + upperLevel (1), + lowerLevel (2) + } + + RoofRackType ::= ENUMERATED { + norack (0), + roofRailing (1), + luggageRack (2), + skiRack (3), + boxRack (4), + rackWithOneBox (5), + rackWithTwoBoxes (6), + bicycleRack (7), + otherRack (8) + ,... + } + +END \ No newline at end of file diff --git a/src/org/uic/ticket/api/spec/uicBarcodeV1finalDelayConfirmation1.2.asn b/src/org/uic/ticket/api/spec/uicBarcodeV1finalDelayConfirmation1.2.asn new file mode 100644 index 0000000..634e9a9 --- /dev/null +++ b/src/org/uic/ticket/api/spec/uicBarcodeV1finalDelayConfirmation1.2.asn @@ -0,0 +1,1986 @@ +-- Creator: ASN.1 Editor (http://asneditor.sourceforge.net) +-- Author: ClemensGantert +-- Created: Tue Aug 11 11:40:28 CEST 2015 +ASN-Module DEFINITIONS AUTOMATIC TAGS ::= BEGIN + +-- imports and exports +-- EXPORTS ALL; + + +-- ############################################################################################## +-- # +-- # Final version 1.2 - value 12 in the UIC bar code version element +-- # (see element 2 in U_FLEX record definition in leaflet 918.9) +-- # +-- ############################################################################################## + + +-- ############################################################################################## +-- # +-- # Naming and encoding conventions +-- # +-- # Elements included as String and as Numeric values: +-- # Some elements are included in different formats to reduce the data size. +-- # These elements must be included only once. +-- # These elements are named with the same name and appendix +-- # Num (numeric values) +-- # IA5 (String values according to ASN IA5String (7Bit)) +-- # Example: +-- # trainNum - in case of a numeric train number +-- # trainIA5 - in case of a alphanumeric train Id +-- # +-- # +-- # RICS codes must be used to encode companies (issuer, product owner, ...) where available +-- # other codes are possible based on bilateran agreements +-- # the format is kept more flexible to cover upcomng extensions of the RICS code by ERA +-- # +-- # Stations can be coded using the UIC and upcoming ERA code lists. Proprietary codes are +-- # possible based on bilateral agreements. Format: 1..9999999 or alphanumeric without +-- # special character (IA5String) +-- # +-- # +-- # ! INTEGERS must not exceed the value of 9,223,372,036,854,775,807 (64 bit) even in case +-- # ! they are unrestricted!!! +-- # ! +-- # ! Some elements like ReferenceNum or cardIdNum are defined as an unrestricted integer. +-- # ! Unlike other numerical values the cardIdNum and referenceNum can be larger than a usual 32 bit Integer +-- # ! Some ASN.1 implementation tools are limited to 32 bit integers which is too small. +-- # ! Please ensure to use a tool capable of dealing with larger numbers. +-- # +-- # BOOLEAN is always non optional +-- # +-- # Encoding of time: +-- # time is encoded as the number of minutes of the day 0 = 00:00, 1440 = 24:00, +-- # time data elements end with "time" in their name +-- # +-- # Encoding of date: +-- # ......................................................................................................... +-- # The issuing date is given in UTC, but some other date values are given in local time where the exact time zone is not known. +-- # +-- # For local dates the date is associated with the corresponding location: +-- # e.g.: +-- # valid from date -> location where the journey starts +-- # valid until date -> location where the journey covered by the ticket ends +-- # +-- # there could be rare cases where this is does not rovide a unique interpretation: +-- # e.g. open ticket or pass without start and end location for a collection of zones or countries with different time zones. +-- # in these cases the fare conditions must clarify the rules for these cases (e.g. by allowing to use the +-- # ticket a few hours after the end of validity). +-- # +-- # If these date values are given as the number of days from the issuing date the following rule applies: +-- # +-- # The difference in days is calculated by ignoring the time zone information. +-- # +-- # example 1: (31.12.2017 23:05 UTC == 01.01.2018 00:05 CET) : +-- # issuing date (UTC): 31.12.2017 23:05 +-- # local date (CET): 01.01.2018 00:05 +-- # -> difference in days = 1 +-- # +-- # example 1: (1.1.2018 22:05 UTC == 01.01.2018 23:05 CET) : +-- # issuing date (UTC): 31.12.2017 22:05 +-- # local date (CET): 01.01.2018 23:05 +-- # -> difference in days = 0 +-- # +-- # the day difference could become -1 although this can happen for localtions in America or New Zeeland only. +-- # +-- # implementation example: +-- # +-- # public static Long getDateDifference(Date issuingDate, Date localDate) { +-- # +-- # if (issuingDate == null || localDate == null) return null; +-- # +-- # Calendar issuingCal = Calendar.getInstance(); +-- # issuingCal.clear(); +-- # issuingCal.setTime(issuingDate); +-- # issuingCal.setTimeZone(TimeZone.getTimeZone("UTC")); +-- # issuingCal.set(Calendar.HOUR_OF_DAY, 0); +-- # issuingCal.set(Calendar.MINUTE, 0); +-- # issuingCal.set(Calendar.SECOND, 0); +-- # issuingCal.set(Calendar.MILLISECOND, 0); +-- # +-- # Calendar fromCal = Calendar.getInstance(); +-- # fromCal.clear(); +-- # fromCal.setTime(localDate); +-- # fromCal.setTimeZone(TimeZone.getTimeZone("UTC")); +-- # fromCal.set(Calendar.HOUR_OF_DAY, 0); +-- # fromCal.set(Calendar.MINUTE, 0); +-- # fromCal.set(Calendar.SECOND, 0); +-- # fromCal.set(Calendar.MILLISECOND, 0); +-- # +-- # long diff = localDate.getTime() - issuingDate.getTime(); +-- # long dayDiff = TimeUnit.DAYS.convert(diff, TimeUnit.MILLISECONDS); +-- # +-- # return new Long(dayDiff); +-- # +-- # } +-- # +-- # public static Date getLocalDateFromDifference(Date issuingDate, int diff , Long time ) { +-- # +-- # if (issuingDate == null) return null; +-- # +-- # Calendar cal = Calendar.getInstance(); +-- # cal.clear(); +-- # cal.setTime(issuingDate); +-- # cal.add(Calendar.DAY_OF_YEAR, diff); +-- # +-- # if (time != null) { +-- # int hours = time.intValue() / 60; +-- # int minutes = time.intValue() - hours * 60; +-- # cal.set(Calendar.HOUR_OF_DAY, hours); +-- # cal.set(Calendar.MINUTE,minutes); +-- # } +-- # +-- # return cal.getTime(); +-- # +-- # } +-- # +-- # +-- # ASN.1 Extensions: +-- # +-- # The specification makes use of extension (",..."). +-- # These extesions might be defined in future versions of the UIC specification +-- # Implementations must support the extension feature of ASN.1, at least they must be able to ignore extensions while decoding the data +-- # ASN.1 extensions will be defined by UIC. It is not allowed to define bilateral extensions. +-- # +-- # Bilateral Extensions: +-- # Bilateral extensions can be included in the data element "ExtensionData". +-- # +-- # +-- # +-- ######################################################################################### + + +-- ############################################################################################ + + +-- type assignments + + -- ######################################################################################### + -- the basic entry point of the data structure + -- the data include: + -- -issuer informations + -- -the details of the transport document + -- -informations required for the control process + -- -informations on the travelers independent from the transport document + -- -proprietary extensions + -- + -- ########################################################################################## + UicRailTicketData ::= SEQUENCE { + -- data specific to the issuer + issuingDetail IssuingData, + + -- data on the travelers + travelerDetail TravelerData OPTIONAL, + + -- data of the transport document + -- more than one document to be used on bilateral agreement only + transportDocument SEQUENCE OF DocumentData OPTIONAL, + + -- data specific to support the ticket control process + controlDetail ControlData OPTIONAL, + + -- proprietary data defined bilaterally + extension SEQUENCE OF ExtensionData OPTIONAL + ,... + } + + + + -- ########################################################################################### + -- the choice on the different transport documents that can be included in the bar code data: + -- - reservation of seat / couchette or berths (IRT, RES, BOA) + -- - reservation of car carriage (VET) + -- - open ticket (NRT including NRT group ticket) (NRT, GRT, SUP, UPD, COI) + -- - Rail passes (including Eurail, Interail and local passes) (RPT) + -- - Voucher (TRV) + -- - Customer Cards (including bonus cards and reduction cards) + -- - counter marks issued for group tickets + -- - parking ground tickets + -- - FIP tickets + -- - station access / station passage tickets + -- - proprietary documents as an extension + -- ############################################################################################ + DocumentData ::= SEQUENCE { + + -- token + -- specific id to be exchanged with the ticket (e.g. id of the phone in case of tickets linked to a phone) + token TokenType OPTIONAL, + + -- choice of the ticket + ticket CHOICE + { + + -- Reservation (without car carriage) (IRT and RES) + reservation ReservationData, + + -- Reservation of car carriage + carCarriageReservation CarCarriageReservationData, + + -- open ticket specification (NRT) + openTicket OpenTicketData, + + -- pass specification (RPT) including Eurail and Interrail + pass PassData, + + -- voucher + voucher VoucherData, + + -- customer card either to identify a customer and / or to provide reductions + customerCard CustomerCardData, + + -- countermark to accompagny a group ticket + counterMark CountermarkData, + + -- car parking slot + parkingGround ParkingGroundData, + + -- FIP duty ticket + fipTicket FIPTicketData, + + -- ticket to pass the gates at a station + stationPassage StationPassageData, + + -- proprietary data defined bilaterally + extension ExtensionData, + + -- delay confirmation + delayConfirmation DelayConfirmation + + ,... + } + ,... + } + + -- ######################################################################################## + -- confirmation of the delay of a train + -- + -- ######################################################################################## + DelayConfirmation ::= SEQUENCE { + + -- reference of the delay confirmation + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- train number of the delayed train - numeric or alphanumeric + trainNum INTEGER OPTIONAL, + trainIA5 IA5String OPTIONAL, + + -- departure date of the delayed train in local time + -- number of year + departureYear INTEGER (2016..2269) OPTIONAL, + -- number of the day in the year (1.1. = 1) + departureDay INTEGER (1..366) OPTIONAL, + departureTime INTEGER (0..1440) OPTIONAL, + + -- station where the delay became relevant + stationCodeTable CodeTableType DEFAULT stationUIC, + stationNum INTEGER (1..9999999) OPTIONAL, + stationIA5 IA5String OPTIONAL, + + -- delay in minutes at the mentioned station + delay INTEGER (1..999), + + -- indication that the train was cancelled + trainCancelled BOOLEAN, + + -- type of confirmation provided + confirmationType ConfirmationType DEFAULT travelerDelayConfirmation, + + -- affected original ticket(s) + affectedTickets SEQUENCE OF TicketLinkType OPTIONAL, + + -- info text + infoText UTF8String OPTIONAL, + + -- proprietary data defined bilaterally + extension ExtensionData OPTIONAL + ,... + } + + ConfirmationType ::= ENUMERATED { + trainDelayConfirmation (0), -- confirmation of train delay, whether the traveler was on board in unconfirmed + travelerDelayConfirmation (1), -- confirmation that the traveler was on board of the delayed train + trainLinkedTicketDelay (2) -- confirmation that a ticket linked to the delayed train was issued + ,... + } + + + -- ######################################################################################## + -- Details of the issuer and the issue of the ticket + -- - details on the issuer + -- - indication of test tickets (specimen) + -- - payment details: method of payment, currency + -- - proprietary PNR of the issuer to be used to identify the sale within + -- the issuers ecosystem + -- - web link to display more information for the customer + -- - proprietary extension data + -- ######################################################################################## + IssuingData ::= SEQUENCE { + + -- provider of the signature (RICS code) + securityProviderNum INTEGER (1..32000) OPTIONAL, + securityProviderIA5 IA5String OPTIONAL, + + -- issuer of the transport document if the issuer is different from the security provider + -- (RICS code) + issuerNum INTEGER (1..32000) OPTIONAL, + issuerIA5 IA5String OPTIONAL, + + -- issuing time stamp in UTC + -- number of year + issuingYear INTEGER (2016..2269), + -- number of the day in the year (1.1. = 1) + issuingDay INTEGER (1..366), + -- The number of the minutes of issue might be used in case of account + -- based ticketing whith a delay of n minutes for the replication of central + -- booking data to the control devices (e.g. at SBB) + -- The time can be compared with the last synchronization time of + -- the control device + issuingTime INTEGER (0..1440) OPTIONAL, + + -- name of the issuer (E.g. short name mentioned in RICS code table) + issuerName UTF8String OPTIONAL, + + -- specimen indicates a test specimen not valid for travelling + specimen BOOLEAN, + + -- secure paper indicates that this barcode is issued with a secure paper ticket + -- to ensure the uniqueness of the ticket. This allows to use the same control + -- procedure as for e-tickets also for anonymous tickets + -- the double use of the ticket is in this case excluded by the secure paper + securePaperTicket BOOLEAN, + + -- indicates that the ticket is valid for traveling or still needs activation + activated BOOLEAN, + + -- currency of the price: ISO4217 currency codes + currency IA5String (SIZE(3)) DEFAULT "EUR", + + -- fraction of the prices included + currencyFract INTEGER (1..3) DEFAULT 2, + + -- PNR used by the issuer to identify the document + issuerPNR IA5String OPTIONAL, + + -- proprietary data defined bilaterally + extension ExtensionData OPTIONAL, + + -- location of sale in case of a sale on board of a train + -- numeric train number or aphanumeric id of the train where the ticket was sold + issuedOnTrainNum INTEGER OPTIONAL, + issuedOnTrainIA5 IA5String OPTIONAL, + -- line number + issuedOnLine INTEGER OPTIONAL, + + -- point oof sale + pointOfSale GeoCoordinateType OPTIONAL + ,... + } + + -- ################################################################################### + -- data supporting the control process + -- - list of items which the travelder can use to identify himself or the unique + -- usage of the ticket + -- (card ids, parts or identity card numbers, credit card numbers,..) + -- - hints on the validation to be made on board + -- + -- ################################################################################### + ControlData ::= SEQUENCE { + + -- cards that can be used to identify the ticket holder + identificationByCardReference SEQUENCE OF CardReferenceType OPTIONAL, + + -- idcard id must be checked to identify the traveler + identificationByIdCard BOOLEAN, + + -- passport id must be checked to identify the traveler + identificationByPassportId BOOLEAN, + + -- other items which could be used to identify the ticket holder + -- (for future use, code list to be defined) + identificationItem INTEGER OPTIONAL, + + -- validation of the passport is required (e.g. in case of Eurail) + passportValidationRequired BOOLEAN, + + -- online validation of the ticket required + onlineValidationRequired BOOLEAN, + + -- percentage of the tickets to be validated in more detail + -- (i.e. via online check or detailed checks lateron) + randomDetailedValidationRequired INTEGER (0..99) OPTIONAL, + + -- manual validation of the traveler age required (in case of reductions) + ageCheckRequired BOOLEAN, + + -- manual validation of the travelers reduction card required (in case of reductions) + reductionCardCheckRequired BOOLEAN, + + -- controler info text + infoText UTF8String OPTIONAL, + + -- additional tickets that should be controlled + includedTickets SEQUENCE OF TicketLinkType OPTIONAL, + + -- proprietary data defined bilaterally + extension ExtensionData OPTIONAL + ,... + } + + -- ################################################################################ + -- Traveler data + -- these data do not include tariff details of the booked tariffs, + -- tariff data are included in the transport document details and might + -- have a reference to the traveler defined here. + -- - personal data of the travellers + -- - the index of the list can be used to identify the + -- traveler within other contexts (e.g. in assigned tariffs) + -- ################################################################################ + TravelerData ::= SEQUENCE { + -- traveler list + traveler SEQUENCE OF TravelerType OPTIONAL, + + -- ISO 639-1 coding of the language preferred for the traveler / ticket holder + preferredLanguage IA5String (SIZE(2)) OPTIONAL, + + -- name of the group in case of a group ticket + groupName UTF8String OPTIONAL + ,... + } + + -- #################################################################################### + -- the following part contains the different transport document specifications + -- #################################################################################### + + + -- #################################################################################### + -- reservations of seats , couchettes and berths + -- included are the data defined in: + -- - leaflet 918.1 for reservation data exchange + -- - a few additional data currently used by some railways via different interfaces + -- - information on trach an dplafoorm where the coach stops + -- - additional second coach for large groups + -- #################################################################################### + ReservationData ::= SEQUENCE { + + -- train number - numeric or alphanumeric + trainNum INTEGER OPTIONAL, + trainIA5 IA5String OPTIONAL, + + -- departure date in local time + -- number of the days calculated from the issuing date + departureDate INTEGER (-1..370) DEFAULT 0, + + -- reservation reference according ton 918.1 in case ade via Hermes + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code to be used as standard) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- service brand: code list https://uic.org/service-brand-code-list + serviceBrand INTEGER (0..32000) OPTIONAL, + serviceBrandAbrUTF8 UTF8String OPTIONAL, + serviceBrandNameUTF8 UTF8String OPTIONAL, + + -- service code list from 918.1 (seat couchette,..) + service ServiceType DEFAULT seat, + + -- code table used to encode stations + stationCodeTable CodeTableType DEFAULT stationUICReservation, + + -- origin station code + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, + + -- destination station code + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, + + -- origin station name + fromStationNameUTF8 UTF8String OPTIONAL, + + -- destination station name + toStationNameUTF8 UTF8String OPTIONAL, + + -- departure time + departureTime INTEGER (0..1440), + + -- arrival date and time in local time + -- number of days counted from the departure date + arrivalDate INTEGER (0..20) DEFAULT 0, + arrivalTime INTEGER (0..1440) OPTIONAL, + + -- responsible carriers on the route + carrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carrierIA5 SEQUENCE OF IA5String OPTIONAL, + + -- travel class + classCode TravelClassType DEFAULT second, + + -- service level code list from 918.1 + serviceLevel IA5String (SIZE(1..2)) OPTIONAL, + + -- places + places PlacesType OPTIONAL, + + -- additional places in a second coach + additionalPlaces PlacesType OPTIONAL, + + --bicycle places + bicyclePlaces PlacesType OPTIONAL, + + -- compartment details (open space, wheelchair,..) + compartmentDetails CompartmentDetailsType OPTIONAL, + + -- number of persons on the ticket without place numbers (on IRT) + numberOfOverbooked INTEGER (0..200) DEFAULT 0, + + -- description of berths + berth SEQUENCE OF BerthDetailData OPTIONAL, + + -- tariffs included (Adult, Children,... ) + tariff SEQUENCE OF TariffType OPTIONAL, + + -- type of the price (supplement,... ) + priceType PriceTypeType DEFAULT travelPrice, + + price INTEGER OPTIONAL, + + vatDetail SEQUENCE OF VatDetailType OPTIONAL, + + -- type of supplement - code list from 018.1 + typeOfSupplement INTEGER (0..9) DEFAULT 0, + + numberOfSupplements INTEGER (0..200) DEFAULT 0, + + -- luggage restrictions and registered luggage + -- in case the luggage restrictions are general and do not depend on the + -- ticket type they should not be included + luggage LuggageRestrictionType OPTIONAL, + + infoText UTF8String OPTIONAL, + + + -- bilaterally agreed proprietary extension + extension ExtensionData OPTIONAL + ,... + } + + -- ################################################################################# + -- details on the VAT included to be used in after sale processes + -- ################################################################################# + VatDetailType ::= SEQUENCE { + + -- ISO 3166 numeric country code + country INTEGER (1..999), + + -- 1/10th of a percent + percentage INTEGER (0..999), + + -- amount of VAT, the currency and the currency fraction is included in the issuing data + amount INTEGER OPTIONAL, + + -- european tax id of the company paying VAT + vatId IA5String OPTIONAL + + } + + + -- ################################################################################# + -- reservations of car carriage + -- included are the data defined in: + -- - leaflet 918.1 for reservation data exchange + -- - a few additional data currently used by some railways via different interfaces + -- ################################################################################# + CarCarriageReservationData ::= SEQUENCE { + + trainNum INTEGER OPTIONAL, + trainIA5 IA5String OPTIONAL, + + + -- loading / unloading of the car in local date and time + -- number of the days calculated from the issuing date + beginLoadingDate INTEGER (-1..370) DEFAULT 0, + + beginLoadingTime INTEGER (0..1440) OPTIONAL, + endLoadingTime INTEGER (0..1440) OPTIONAL, + + -- reservation reference according on 918.1 in case ade via Hermes + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- service brand: code list https://uic.org/service-brand-code-list + serviceBrand INTEGER (1..32000) OPTIONAL, + serviceBrandAbrUTF8 UTF8String OPTIONAL, + serviceBrandNameUTF8 UTF8String OPTIONAL, + + stationCodeTable CodeTableType DEFAULT stationUICReservation, + + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, + + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, + + fromStationNameUTF8 UTF8String OPTIONAL, + toStationNameUTF8 UTF8String OPTIONAL, + + coach IA5String OPTIONAL, + place IA5String OPTIONAL, + + compartmentDetails CompartmentDetailsType OPTIONAL, + + -- description of the car + numberPlate IA5String, + trailerPlate IA5String OPTIONAL, + carCategory INTEGER (0..9), + boatCategory INTEGER (0..6) OPTIONAL, + textileRoof BOOLEAN, + roofRackType RoofRackType DEFAULT norack, + + -- heigth of a roof rack in cm + roofRackHeight INTEGER (0..99) OPTIONAL, + + -- number of boats on a rack + attachedBoats INTEGER (0..2) OPTIONAL, + + -- number of biycles on a rack + attachedBicycles INTEGER (0..4) OPTIONAL, + + -- number of surf boards on a rack + attachedSurfboards INTEGER (0..5) OPTIONAL, + + -- reference to an entry on the loading list + loadingListEntry INTEGER (0..999) OPTIONAL, + loadingDeck LoadingDeckType DEFAULT upper, + + -- responsible carriers on the route (RICS codes) + carrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carrierIA5 SEQUENCE OF IA5String OPTIONAL, + + tariff TariffType, + priceType PriceTypeType DEFAULT travelPrice, + + price INTEGER OPTIONAL, + + vatDetail SEQUENCE OF VatDetailType OPTIONAL, + + infoText UTF8String OPTIONAL, + extension ExtensionData OPTIONAL + ,... + } + + + -- ##################################################################################### + -- data for open tickets (NRT and group tickets) + -- included are the data defined in: + -- - the ticket layout (leaflet 918.2) + -- - the ticket bar code version 3 (leaflet 918.2) + -- - additional data based on 108.1 with some extensions as 108.1 + -- does not provide well structured data, + -- especially concerning regional validity + -- + -- ##################################################################################### + + OpenTicketData ::= SEQUENCE { + + -- reference must be given either in numeric or alphanumeric format + referenceNum INTEGER OPTIONAL, + referenceIA5 IA5String OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- to support other ticket content (e.g. VDV, UTPF, VÖV, CALYPSO) + -- issuer code using the default code table of the product owner + extIssuerId INTEGER OPTIONAL, + -- authorization id provided to the issuer by the product owner + issuerAutorizationId INTEGER OPTIONAL, + + -- ticket includes the return trip + returnIncluded BOOLEAN, + + stationCodeTable CodeTableType DEFAULT stationUIC, + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, + + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, + + fromStationNameUTF8 UTF8String OPTIONAL, + toStationNameUTF8 UTF8String OPTIONAL, + + -- description for manual evaluation in case structured data are not available + validRegionDesc UTF8String OPTIONAL, + -- specification of the ordered sequence of valid regions + validRegion SEQUENCE OF RegionalValidityType OPTIONAL, + + -- return route description + -- the return route description can be omitted if it is identical to the + -- inversed outbound validRegion sequence + returnDescription ReturnRouteDescriptionType OPTIONAL, + + -- temporal validity data in local time of the location where the jouney starts + -- number of days from issuing date + validFromDay INTEGER (-1..700) DEFAULT 0, + + validFromTime INTEGER (0..1440) OPTIONAL, + -- number of days from valid-from date, 0 = first day of validity + validUntilDay INTEGER (0..370) DEFAULT 0, + validUntilTime INTEGER (0..1440) OPTIONAL, + + -- list of activated days in case the entire ticket is not activated + -- the day is given by the number of days from the first day of validity + -- 1 = first day of validity + activatedDay SEQUENCE OF INTEGER (0..370) OPTIONAL, + + classCode TravelClassType DEFAULT second, + + -- servicelevel code according to leaflet 918.1 to encode other products + -- (e.g. PREMIUM, ...) + serviceLevel IA5String (SIZE(1..2)) OPTIONAL, + + -- carriers involved in the transport (RICS codes) + -- the indication of carriers is mandatory on international routes, + -- they can be listed here but can also be included in viaDetails + carrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carrierIA5 SEQUENCE OF IA5String OPTIONAL, + + + -- list of service brands for which the ticket is valid + -- in case the included service brands are listed all other brands are excluded + -- service brand: code list https://uic.org/service-brand-code-list + includedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + + -- list of service brands for which the ticket is not valid + -- service brand: code list https://uic.org/service-brand-code-list + excludedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + + tariffs SEQUENCE OF TariffType OPTIONAL, + + price INTEGER OPTIONAL, + + vatDetail SEQUENCE OF VatDetailType OPTIONAL, + + infoText UTF8String OPTIONAL, + + -- additional included open tickets + -- e.g. to include local city traffic on parts of a the route + includedAddOns SEQUENCE OF IncludedOpenTicketType OPTIONAL, + + -- in case the luggage restrictions are general and do not depend + -- on the ticket type they should not be included + luggage LuggageRestrictionType OPTIONAL, + + + + extension ExtensionData OPTIONAL + ,... + } + + + + -- #################################################################################### + -- data for passes + -- included are the data defined in: + -- - the ticket layout (leaflet 918.2) + -- - the ticket bar code version 3 (leaflet 918.2) + -- #################################################################################### + PassData ::= SEQUENCE { + + -- reference must be given in numeric or alphanumeric format + referenceNum INTEGER OPTIONAL, + referenceIA5 IA5String OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- type of the pass, code list provided by the product owner + -- in case of Eurail: + -- 1 = Interrail + -- 2 = Eurail + -- 3 = Eurail Global (all countries) + passType INTEGER (1..250) OPTIONAL, + + -- literal name of the pass + passDescription UTF8String OPTIONAL, + + classCode TravelClassType DEFAULT second, + + -- begin of validity + -- number of days from issuing date + validFromDay INTEGER (-1..700) DEFAULT 0, + + validFromTime INTEGER (0..1440) OPTIONAL, + -- end of validity + -- number of days from valid from day, 0 = valid on valid-from-date + validUntilDay INTEGER (0..370) DEFAULT 0, + validUntilTime INTEGER (0..1440) OPTIONAL, + + -- additional validity periods and excluded time ranges + validityPeriodDetails ValidityPeriodDetailType OPTIONAL, + + -- max number of days of validity in case the valid from day is open + numberOfValidityDays INTEGER (0..370) OPTIONAL, + + -- max number of possible trips to be activated + numberOfPossibleTrips INTEGER (1..250) OPTIONAL, + numberOfDaysOfTravel INTEGER (1..250) OPTIONAL, + + -- list of activated days in case the entire ticket is not activated + -- the day is given by the number of days from the first day of validity + -- 0 = first day of validity + activatedDay SEQUENCE OF INTEGER (0..370) OPTIONAL, + + -- included countries, code table according to UIC leaflet 918.2 + countries SEQUENCE OF INTEGER (1..250) OPTIONAL, + + -- included carriers (RICS codes) + includedCarrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + includedCarrierIA5 SEQUENCE OF IA5String OPTIONAL, + + -- excluded carriers (RICS codes) + excludedCarrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + excludedCarrierIA5 SEQUENCE OF IA5String OPTIONAL, + + -- service brand: code list https://uic.org/service-brand-code-list + includedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + excludedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + + -- region description to cover local zones + validRegion SEQUENCE OF RegionalValidityType OPTIONAL, + + tariffs SEQUENCE OF TariffType OPTIONAL, + + price INTEGER OPTIONAL, + + vatDetail SEQUENCE OF VatDetailType OPTIONAL, + + infoText UTF8String OPTIONAL, + extension ExtensionData OPTIONAL + ,... + } + + ValidityPeriodDetailType ::= SEQUENCE { + validityPeriod SEQUENCE OF ValidityPeriodType OPTIONAL, + excludedTimeRange SEQUENCE OF TimeRangeType OPTIONAL + } + + ValidityPeriodType ::= SEQUENCE { + -- number of days from issuing date + validFromDay INTEGER (-1..700) DEFAULT 0, + validFromTime INTEGER (0..1440) OPTIONAL, + -- number of days from valid from day, 0 = valid on valid from date + validUntilDay INTEGER (0..370) DEFAULT 0, + validUntilTime INTEGER (0..1440) OPTIONAL + } + + TimeRangeType ::= SEQUENCE { + fromTime INTEGER (0..1440), + untilTime INTEGER (0..1440) + } + + -- ###################################################################################### + -- data for vouchers + -- included are quite basic further study is required + -- ###################################################################################### + VoucherData ::= SEQUENCE { + + -- reference must be given in numeric or alphanumeric format + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- begin of validity in UTC + -- number of year + validFromYear INTEGER (2016..2269), + -- number of the day in the year (1.1. = 1) + validFromDay INTEGER (0..370), + -- end of validity + -- number of year + validUntilYear INTEGER (2016..2269), + -- number of the day in the year (1.1. = 1) + validUntilDay INTEGER (0..370), + + value INTEGER DEFAULT 0, + + -- type of the voucher, code list defined by the product owner + type INTEGER (1..32000) OPTIONAL, + + infoText UTF8String OPTIONAL, + extension ExtensionData OPTIONAL + ,... + } + -- ################################################################################### + -- data for FIP tickets + -- included are data from the FIP ticket layout, + -- ################################################################################### + FIPTicketData ::= SEQUENCE { + + -- reference must be given in numeric or alphanumeric format + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- first day of validity in UTC + --- number of days from issuing date + validFromDay INTEGER (-1..700) DEFAULT 0, + -- last day of validity + -- number of days from valid from day, 0 = first day of validity + validUntilDay INTEGER (0..370) DEFAULT 0, + + -- activated days: list of days for which the ticket is valid + -- the day is given by the number of days from the first day of validity + -- 0 = first day of validity + activatedDay SEQUENCE OF INTEGER (0..370) OPTIONAL, + + -- included carriers + carrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carrierIA5 SEQUENCE OF IA5String OPTIONAL, + + -- number of travel days allowed + numberOfTravelDays INTEGER (1..200), + includesSupplements BOOLEAN, + + -- travel class + classCode TravelClassType DEFAULT second, + extension ExtensionData OPTIONAL + ,... + } + + -- ##################################################################################### + -- data station passage and access + -- ticket used to enter, exit or pass a station without travelling by train. + -- E.g. for staff working in a station. + -- ##################################################################################### + StationPassageData ::= SEQUENCE { + + -- reference must be given in numeric or alphanumeric format + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + productName UTF8String OPTIONAL, + + -- code table used to encode he stations + stationCodeTable CodeTableType DEFAULT stationUIC, + -- list of station where the passage is allowed + stationNum SEQUENCE OF INTEGER OPTIONAL, + stationIA5 SEQUENCE OF IA5String OPTIONAL, + -- station names + stationNameUTF8 SEQUENCE OF UTF8String OPTIONAL, + + -- list of areas in a station where the access is allowed + areaCodeNum SEQUENCE OF INTEGER OPTIONAL, + areaCodeIA5 SEQUENCE OF IA5String OPTIONAL, + -- area names + areaNameUTF8 SEQUENCE OF UTF8String OPTIONAL, + + -- begin of validity in local date and time + -- number of days from issuing date + validFromDay INTEGER (-1..700), + validFromTime INTEGER (0..1440) OPTIONAL, + -- end of validity + -- number of days from valid from day, 0 = first day of validity + validUntilDay INTEGER (0..370) DEFAULT 0, + validUntilTime INTEGER (0..1440) OPTIONAL, + + -- number of days for station passage in case the number of days + -- is limited and less that the validity period + numberOfDaysValid INTEGER OPTIONAL, + + extension ExtensionData OPTIONAL + ,... + } + + -- ###################################################################################### + -- data for customer cards + -- included are data from: + -- - ÖBB requirements on card data + -- - DB Bahncard as HandyTicket + -- note: customer data are included in the traveler data structure + -- ###################################################################################### + CustomerCardData ::= SEQUENCE { + + -- customer details + -- optional, as there might be an anonymous cards + customer TravelerType OPTIONAL, + + -- card id might be numerical or alphanumerical + cardIdIA5 IA5String OPTIONAL, + cardIdNum INTEGER OPTIONAL, + + -- valid from date in UTC + -- number of year + validFromYear INTEGER (2016..2269), + --- number of the day in the year (1.1. = 1) + validFromDay INTEGER (0..370) OPTIONAL, + + --- number of year from valid from year onwards + validUntilYear INTEGER (0..250) DEFAULT 0, + --- number of the day in the year (1.1. = 1) + validUntilDay INTEGER (0..370) OPTIONAL, + + classCode TravelClassType OPTIONAL, + + -- code of the card type code list defined by the issuer + cardType INTEGER (1..1000) OPTIONAL, + + -- readable description of the card type + cardTypeDescr UTF8String OPTIONAL, + + -- customer status code + -- 1 = basic + -- 2 = premium + -- 3 = silver + -- 4 = gold + -- 5 = platinum + -- 6 = senator + -- > 50 - code table of the card issuer + customerStatus INTEGER OPTIONAL, + + -- readable customer status "e.g. gold", + customerStatusDescr IA5String OPTIONAL, + + -- list of included services, + -- 1 = Rail Plus + -- 2 = access to launch + -- > 50 code list of the issuer + includedServices SEQUENCE OF INTEGER OPTIONAL, + + extension ExtensionData OPTIONAL + ,... + } + + -- ###################################################################################### + -- data for customer cards + -- included are data from: + -- - DB parking ground reservation + -- ####################################################################################### + ParkingGroundData ::= SEQUENCE { + + -- booking reference + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + parkingGroundId IA5String, + + -- parking date in local date time + -- number of days from the issuing date + fromParkingDate INTEGER (-1..370), + -- number of days from the from parking date in case it is different from that date + toParkingDate INTEGER (0..370) DEFAULT 0, + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- code needed to access the parking lot + accessCode IA5String OPTIONAL, + + location UTF8String, + + stationCodeTable CodeTableType DEFAULT stationUIC, + -- in case the parking ground is associated with a station + stationNum INTEGER OPTIONAL, + stationIA5 UTF8String OPTIONAL, + + specialInformation UTF8String OPTIONAL, + entryTrack UTF8String OPTIONAL, + numberPlate IA5String OPTIONAL, + + price INTEGER OPTIONAL, + vatDetail SEQUENCE OF VatDetailType OPTIONAL, + + + extension ExtensionData OPTIONAL + ,... + } + + -- ####################################################################### + -- data for countermarks issued with group tickets + -- included are data from: + -- - version 3 bar code (leaflet 918.2) + -- - printed layout (leaflet 918.2) + -- ######################################################################## + CountermarkData ::= SEQUENCE { + + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- reference of the group ticket + ticketReferenceIA5 IA5String OPTIONAL, + ticketReferenceNum INTEGER OPTIONAL, + + -- sequential number of the countermark + numberOfCountermark INTEGER (1..200), + -- total number of countermarks + totalOfCountermarks INTEGER (1..200), + -- name of the group + groupName UTF8String, + + + stationCodeTable CodeTableType DEFAULT stationUIC, + + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, + + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, + + fromStationNameUTF8 UTF8String OPTIONAL, + toStationNameUTF8 UTF8String OPTIONAL, + + -- description for manual evaluation in case structured data are not available + validRegionDesc UTF8String OPTIONAL, + -- specification of the ordered sequence of valid regions + validRegion SEQUENCE OF RegionalValidityType OPTIONAL, + + + -- ticket includes the return trip + returnIncluded BOOLEAN, + -- retrurn route description + -- can be omitted if it is identical to the inversed outbound validRegion sequence + returnDescription ReturnRouteDescriptionType OPTIONAL, + + -- local date + -- number of days from issuing date + validFromDay INTEGER (-1..700) DEFAULT 0, + + validFromTime INTEGER (0..1440) OPTIONAL, + -- number of days from valid from day, 0 = first day of validity + validUntilDay INTEGER (0..370) DEFAULT 0, + validUntilTime INTEGER (0..1440) OPTIONAL, + + classCode TravelClassType DEFAULT second, + + -- valid carriers + carrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carrierIA5 SEQUENCE OF IA5String OPTIONAL, + + -- service brands where the ticket is valid + -- in case this list is provided the ticket is invalid on all other service brands + -- service brand: code list https://uic.org/service-brand-code-list + includedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + + -- service brands where the ticket is not valid + -- in case this list is provided the ticket is valid on all other service brands + excludedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + + infoText UTF8String OPTIONAL, + + extension ExtensionData OPTIONAL + ,... + } + + + -- ########################################################################################### + -- generic non standard extension element + -- the generic non - standard element contains: + -- - an extension id to distinguish different extensions + -- - the extension data as binary data + -- proprietary extensions are by definition proprietary. This standard provides + -- the means to identify these extensions + -- within the data and to skip these data. + -- the evaluation of these data and the unique identification of the extensions + -- via the extension id is in the + -- responsibility of the railways which use these extensions. + -- ########################################################################################### + ExtensionData ::= SEQUENCE { + extensionId IA5String, + extensionData OCTET STRING + } + + -- ############################################################################################ + -- type definitions + -- ############################################################################################ + + -- ############################################################################################# + -- included open ticke for a part of the travel (e.g. local city trafic) + -- - data identically already included in the covering open ticket do not need to be + -- repeated here + -- - main source are the data required for included regional and city traffic tickets + -- ############################################################################################# + IncludedOpenTicketType ::= SEQUENCE { + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- issuer code using the default code table of the product owner (today used e.g. by VDV) + externalIssuerId INTEGER OPTIONAL, + -- authorization id provided to the issuer by the poroduct owner (today used e.g. by VDV) + issuerAutorizationId INTEGER OPTIONAL, + + -- regional validity data + stationCodeTable CodeTableType DEFAULT stationUIC, + -- specification of the ordered sequence of valid regions, ordered in the direction of travel + validRegion SEQUENCE OF RegionalValidityType OPTIONAL, + + -- temporal validity data in local date and time + -- number of days from issuing date + validFromDay INTEGER (-1..700) DEFAULT 0, + + validFromTime INTEGER (0..1440) OPTIONAL, + -- number of days from valid-from date, 0 = first day of validity + validUntilDay INTEGER (0..370) DEFAULT 0, + validUntilTime INTEGER (0..1440) OPTIONAL, + + -- travel class to be given in case it differs from the class of the main ticket + classCode TravelClassType OPTIONAL, + -- servicelevel code according to leaflet 918.1 to encode other products (e.g. PREMIUM, ...) + -- to be provided in case it differs from the main ticket + serviceLevel IA5String (SIZE(1..2)) OPTIONAL, + + -- valid carriers (RICS codes) + carrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carrierIA5 SEQUENCE OF IA5String OPTIONAL, + + -- service brands where the ticket is valid + -- in case this list is provided the ticket is invalid on all other service brands + -- service brand: code list https://uic.org/service-brand-code-list + includedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + + -- service brands where the ticket is not valid + -- in case this list is provided the ticket is valid on all other service brands + excludedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + + tariffs SEQUENCE OF TariffType OPTIONAL, + infoText UTF8String OPTIONAL, + extension ExtensionData OPTIONAL + ,... + } + + -- ###################################################################################### + -- tariff data for open tickets + -- information included are: + -- - number of passengers + -- - optionally a link to the traveler data + -- ####################################################################################### + TariffType ::= SEQUENCE { + + -- number of passengers using the tariff + numberOfPassengers INTEGER (1..200) DEFAULT 1, + + -- type indication youth, adult, senior,.. + passengerType PassengerType OPTIONAL, + + -- age restrictions of the tariff + ageBelow INTEGER (1..64) OPTIONAL, + ageAbove INTEGER (1..128) OPTIONAL, + + + -- named traveler list + -- link to the traveler in case the travelers have to be named (e.g. Eurail passes) + -- the number indicates the position in the traveler list starting from 1 + travelerid SEQUENCE OF INTEGER (0..254) OPTIONAL, + + -- restriction on country of residence + -- this tariff is restricted by the country of residence given in the traveler data + -- (e.g. Eurail tickets are not valid in the contry of residence) + restrictedToCountryOfResidence BOOLEAN, + + -- section in case the tariff applies to a part of the route only + restrictedToRouteSection RouteSectionType OPTIONAL, + + -- details on series according to lesaflet 108.1 + seriesDataDetails SeriesDetailType OPTIONAL, + + -- tariff code + tariffIdNum INTEGER OPTIONAL, + tariffIdIA5 IA5String OPTIONAL, + + -- tariff description + tariffDesc UTF8String OPTIONAL, + + -- reduction cards applied (incl. dicount cards, loaylty cards relevant for the tariff) + reductionCard SEQUENCE OF CardReferenceType OPTIONAL + ,... + } + + SeriesDetailType ::= SEQUENCE { + + -- data related to tariffs based on series according UIC leaflet 108.1 + -- supplying carrier according to UIC leaflet 108.1 (RICS code) + supplyingCarrier INTEGER (1..32000) OPTIONAL, + + -- offer identifier of the carrier according to UIC leaflet 108.1 + offerIdentification INTEGER (1..99) OPTIONAL, + + -- series of the carrier according to UIC leaflet 108.1 + series INTEGER OPTIONAL + } + + + RouteSectionType ::= SEQUENCE { + + stationCodeTable CodeTableType DEFAULT stationUIC, + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, -- IA5 or Num not both + + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, -- IA5 or Num not both + + fromStationNameUTF8 UTF8String OPTIONAL, + toStationNameUTF8 UTF8String OPTIONAL + } + + + -- ####################################################################################### + -- customer card reference + -- ####################################################################################### + CardReferenceType ::= SEQUENCE { + + -- issuer of the card + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + cardIssuerNum INTEGER (1..32000) OPTIONAL, + cardIssuerIA5 IA5String OPTIONAL, + + cardIdNum INTEGER OPTIONAL, + cardIdIA5 IA5String OPTIONAL, + + -- Name of the card e.g. "VISA-CARD" + cardName UTF8String OPTIONAL, + + -- type of the card, code list defined by the issuer + cardType INTEGER OPTIONAL, + + -- in case only the leading part of the card number is provided + leadingCardIdNum INTEGER OPTIONAL, + leadingCardIdIA5 IA5String OPTIONAL, + + + -- in case only the trailing part of the card number is provided + trailingCardIdNum INTEGER OPTIONAL, + trailingCardIdIA5 IA5String OPTIONAL + + ,... + } + + -- ####################################################################################### + -- traveler data + -- - traveler data might contain all traveler details which are independent + -- from the type of travel document + -- e.g. it can include the date of birth as this is part of the traveler + -- but not the indication "Senior" as this is tariff dependent + -- + -- ####################################################################################### + TravelerType ::= SEQUENCE { + + firstName UTF8String OPTIONAL, + secondName UTF8String OPTIONAL, + lastName UTF8String OPTIONAL, + idCard IA5String OPTIONAL, + passportId IA5String OPTIONAL, + title IA5String (SIZE(1..3)) OPTIONAL, + gender GenderType OPTIONAL, + + -- customer id might be numerical or alphanumerical + customerIdIA5 IA5String OPTIONAL, + customerIdNum INTEGER OPTIONAL, + + -- date of birth + -- number of year + yearOfBirth INTEGER (1901..2155) OPTIONAL, + -- number of the day in the year (1.1. = 1) + dayOfBirth INTEGER (0..370) OPTIONAL, + + -- indicates the ticket holder/group leader in case of groups + ticketHolder BOOLEAN, + + passengerType PassengerType OPTIONAL, + + passengerWithReducedMobility BOOLEAN OPTIONAL, + + -- country of residence (numeric ISO country code) + -- to be used in case there product restrictions on the country of residence (e.g. Eurail passes) + countryOfResidence INTEGER (1..999) OPTIONAL, + + countryOfPassport INTEGER (1..999) OPTIONAL, + countryOfIdCard INTEGER (1..999) OPTIONAL, + + status SEQUENCE OF CustomerStatusType OPTIONAL + ,... + } + + CustomerStatusType ::= SEQUENCE { + + -- compagny providing the status, default is the issuer + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + statusProviderNum INTEGER (1..32000) OPTIONAL, + statusProviderIA5 IA5String OPTIONAL, + + -- customer status code + -- 1 = basic + -- 2 = premium + -- 3 = silver + -- 4 = gold + -- 5 = platinum + -- 6 = senator + -- > 50 - code table of the card issuer + customerStatus INTEGER OPTIONAL, + + -- customer status "gold" + customerStatusDescr IA5String OPTIONAL + } + + + ReturnRouteDescriptionType ::= SEQUENCE { + + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, + + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, + + fromStationNameUTF8 UTF8String OPTIONAL, + toStationNameUTF8 UTF8String OPTIONAL, + + -- description for manual evaluation in case structured data are not available + validReturnRegionDesc UTF8String OPTIONAL, + + -- specification of the ordered sequence of valid regions for the return trip + validReturnRegion SEQUENCE OF RegionalValidityType OPTIONAL + ,... + + } + + -- ###################################################################################### + -- regional validity of an open ticket + -- specification of the regional validity. + -- ###################################################################################### + + RegionalValidityType ::= CHOICE { + trainLink TrainLinkType, + viaStations ViaStationType, + zones ZoneType, + lines LineType, + polygone PolygoneType + ,... + } + + + + -- ####################################################################################### + -- train link data + -- includes a restriction of an open ticket valid only on a specific train + -- and date on a part of the route + -- ####################################################################################### + TrainLinkType ::= SEQUENCE { + + trainNum INTEGER OPTIONAL, + trainIA5 IA5String OPTIONAL, + + -- local date at the station where the train link starts + -- days from the issuing date onwards + travelDate INTEGER (-1..370), + departureTime INTEGER (0..1440), -- time in minutes + + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, + + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, + + fromStationNameUTF8 UTF8String OPTIONAL, + toStationNameUTF8 UTF8String OPTIONAL + + } + + + + -- ###################################################################################### + -- regional validity using a set of lines + -- - based on data used in regional city trafic enviromnemnts + -- ###################################################################################### + LineType ::= SEQUENCE { + + -- local service provider / carrier within the zone + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + carrierNum INTEGER (1..32000) OPTIONAL, + carrierIA5 IA5String OPTIONAL, + + -- ids of the valid lines known by the local carriers in that zone + lineId SEQUENCE OF INTEGER OPTIONAL, + + stationCodeTable CodeTableType DEFAULT stationUIC, + + -- in case the zone must be entered via a specific station + -- (e.g. local city trafic at the end of a journey + -- starting from the main train station) + entryStationNum INTEGER (1..9999999) OPTIONAL, + entryStationIA5 IA5String OPTIONAL, + + -- in case the zone must be left via a specific station + -- (e.g. local city trafic at the beginning of a journey + -- terminating at the main train station) + terminatingStationNum INTEGER (1..9999999) OPTIONAL, + terminatingStationIA5 IA5String OPTIONAL, + + -- code of the local city in case the zone is part of regional city transport + -- code list of the local carrier + city INTEGER (1..9999999) OPTIONAL, + + -- binary encoding of zones, encoding speciofication provided by + -- the local service provider + binaryZoneId OCTET STRING OPTIONAL + ,... + } + + + -- ################################################################################# + -- regional validity in a zone + -- - based on data used in regional city trafic enviromnemnts + -- ################################################################################# + ZoneType ::= SEQUENCE { + + -- local service provider / carrier within the zone + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + carrierNum INTEGER (1..32000) OPTIONAL, + carrierIA5 IA5String OPTIONAL, + + stationCodeTable CodeTableType DEFAULT stationUIC, + -- in case the zone must be entered via a specific station + -- (e.g. local city trafic at the end of a journey starting + -- from the main train station) + entryStationNum INTEGER (1..9999999) OPTIONAL, + entryStationIA5 IA5String OPTIONAL, + + -- in case the zone must be left via a specific station + -- (e.g. local city trafic at the beginning of a journey + -- terminating at the main train station) + terminatingStationNum INTEGER (1..9999999) OPTIONAL, + terminatingStationIA5 IA5String OPTIONAL, + + -- code of the local city in case the zone is part of regional + -- city transport code list of the local carrier + city INTEGER OPTIONAL, + + -- ids of the valid zones known by the local carriers in that zone + zoneId SEQUENCE OF INTEGER OPTIONAL, + + -- binary encoding of zones, encoding specification provided by + -- the local service provider + binaryZoneId OCTET STRING OPTIONAL, + + -- EU NUTS code for a region + nutsCode IA5String OPTIONAL + ,... + } + + + -- ################################################################################## + -- via station + -- includes a description of of the route by via stations. + -- Via stations follow the description in leaflet 108.1: + -- via stations can e mandatory to pass (but there does not need to be a + -- train stop at this stations): visible route description: "*station*" + -- there can be a list of alternative routes: + -- visible route description: "*(station1/station2)*" + -- there can also be alternative routes: + -- "*(station1*station2/station3*station4)*" although the + -- definition in 108.2 is not very precice on this option + -- ################################################################################### + ViaStationType ::= SEQUENCE { + + stationCodeTable CodeTableType DEFAULT stationUIC, + -- mandatory via station + stationNum INTEGER (1..9999999) OPTIONAL, + stationIA5 IA5String OPTIONAL, + + -- list of alternative routes, one of these has to be taken + alternativeRoutes SEQUENCE OF ViaStationType OPTIONAL, + + -- list of stations along the route + route SEQUENCE OF ViaStationType OPTIONAL, + border BOOLEAN, + + -- carrier responsible for the transport starting at this station (RICS-Code) + -- in case the carrier is included here it might be omitted + -- in the carrier list of the region data + carrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carrierIA5 SEQUENCE OF IA5String OPTIONAL, + + -- the route id as series number as defined in 108.1 data + seriesId INTEGER OPTIONAL, + + -- route id of the route code list defined by the carrier on that route + routeId INTEGER OPTIONAL + ,... + } + + + PolygoneType ::= SEQUENCE { + firstEdge GeoCoordinateType, + edges SEQUENCE OF DeltaCoordinates + } + + + -- ########################################################################################### + -- TokenType provides an additional identifier + -- known use cases + -- - identified of the mobile phone for tickets linked with a specific phone (e.g. VDV standard) + -- ########################################################################################### + TokenType ::= SEQUENCE { + -- provider of the token + tokenProviderNum INTEGER OPTIONAL, + tokenProviderIA5 IA5String OPTIONAL, + + -- in case the provider has multiple tokens + tokenSpecification IA5String OPTIONAL, + token OCTET STRING + } + + -- ########################################################################################### + -- TicketLinkType is used to define a link from the ticket in the bar code to another ticket + -- (requirement from Eurail) + -- use cases + -- - DB Alleo (open ticket + reservation) + -- - reservation of trailer and car carriage and traveller reservation + -- - link between open ticket and bicycle reservations or pass + -- - open ticket and vouchers for meals + -- ########################################################################################### + TicketLinkType ::= SEQUENCE { + + -- data to reference the external ticket + -- reference must be given in numeric or alphanumeric format + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + issuerName UTF8String OPTIONAL, -- name of the issuer + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- type of linked ticket + ticketType TicketType DEFAULT openTicket, + + -- type of link + linkMode LinkMode DEFAULT issuedTogether + ,... + } + + -- ############################################################################################ + -- code table used fort station codes + -- defines the code table used e.g. to define station code + -- - stationUIC = station codes as used in UIC leaflet 108.1 for open tickets + -- - stationUICReservation = station codes as used in Reservation leaflets 918.1 and 108.2 + -- ############################################################################################ + + CodeTableType ::= ENUMERATED { + -- standard UIC station code from MERITS (UIC country code + 5 digit local code) + stationUIC (0), + -- standard UIC station code for reservation + stationUICReservation (1), + -- future standard ERA station code + stationERA (2), + -- local carrier code list + -- e.g. in case of stations / stops of non-railways stops (city trafic) + localCarrierStationCodeTable (3), + + -- non standard code to be used within the issuer eco system only + -- not applicable for multi carrier travel documents + -- or in case issuer and carrier are different + proprietaryIssuerStationCodeTable (4) + + } + + + ServiceType ::= ENUMERATED { + seat (0), + couchette (1), + berth (2), + carcarriage (3) + } + + + PassengerType ::= ENUMERATED { + adult (0), + senior (1), + child (2), + youth (3), + dog (4), + bicycle (5), + freeAddonPassenger (6), + freeAddonChild (7) + ,... + } + + TicketType ::= ENUMERATED { + openTicket (0), + pass (1), + reservation (2), + carCarriageReservation (3) + ,... + } + + LinkMode ::= ENUMERATED { + issuedTogether (0), + onlyValidInCombination (1) + ,... + } + + + -- #################################################################################### + -- place data corresponding to leaflet 918.1 + -- placeString = place number ranges in case of groups + -- #################################################################################### + PlacesType ::= SEQUENCE { + coach IA5String OPTIONAL, + + -- printable place string ("15-18, 21, 22" ) + placeString IA5String OPTIONAL, + + -- printable place description + placeDescription UTF8String OPTIONAL, + + -- individual places + placeIA5 SEQUENCE OF IA5String OPTIONAL, + placeNum SEQUENCE OF INTEGER (1..254) OPTIONAL + } + + PriceTypeType ::= ENUMERATED { + noPrice (0), + reservationFee (1), + supplement (2), + travelPrice (3) + } + + BerthTypeType ::= ENUMERATED { + single (0), + special (1), + double (2), + t2 (3), + t3 (4), + t4 (5) + } + + CompartmentGenderType ::= ENUMERATED { + unspecified (0), + family (1), + female (2), + male (3), + mixed (4) + ,... + } + + GenderType ::= ENUMERATED { + unspecified (0), + female (1), + male (2), + other (3) + ,... + } + + TravelClassType ::= ENUMERATED { + notApplicable (0), + first (1), + second (2), + tourist (3), + comfort (4), + premium (5), + business (6), + all (7) + ,... + } + + -- ######################################################################################## + -- sleeper compartment types corresponding to leaflet 918.1 + -- ######################################################################################## + BerthDetailData ::= SEQUENCE { + berthType BerthTypeType, + numberOfBerths INTEGER (1..999), + gender CompartmentGenderType DEFAULT family + ,... + } + + -- #################################################################################### + -- compartment details corresponding to leaflet 918.1 + -- #################################################################################### + CompartmentDetailsType ::= SEQUENCE { + coachType INTEGER (1..99) OPTIONAL, + compartmentType INTEGER (1..99) OPTIONAL, + specialAllocation INTEGER (1..99) OPTIONAL, + coachTypeDescr UTF8String OPTIONAL, + compartmentTypeDescr UTF8String OPTIONAL, + specialAllocationDescr UTF8String OPTIONAL, + position CompartmentPositionType DEFAULT unspecified + ,... + } + + + -- ##################################################################################### + -- luggage restrictions + -- the basis for these data is week: + -- SCIC mentions a maximum of three pieces of hand luggage but does not includes + -- a definition of hand luggaage + -- SCIC referes to special conditions on registered lluggage, but SCIC NRT does + -- not contain definitions on that and UIC 108.1 does not + -- contain data structures for luggage + -- - current THALYS luggage resrictions + -- ##################################################################################### + LuggageRestrictionType ::= SEQUENCE { + -- allowed hand luggage pieces on this ticket (3 = default in current NRT tariff) + maxHandLuggagePieces INTEGER(0..99) DEFAULT 3, + -- allowed hand luggage pieces on this ticket (3 = default in current NRT tariff) + maxNonHandLuggagePieces INTEGER(0..99) DEFAULT 1, + registeredLuggage SEQUENCE OF RegisteredLuggageType OPTIONAL + ,... + + } + + RegisteredLuggageType ::= SEQUENCE { + -- id of the additional registered luggage + registrationId IA5String OPTIONAL, + -- maximum weight in kg + maxWeight INTEGER (1..99) OPTIONAL, + -- sum of length with and height in cm + maxSize INTEGER (1..300) OPTIONAL + ,... + + } + + -- ########################################################################################## + -- generic type for geo coordinates + -- ########################################################################################## + GeoCoordinateType ::= SEQUENCE { + geoUnit GeoUnitType DEFAULT milliDegree, + coordinateSystem GeoCoordinateSystemType DEFAULT wgs84, + -- separate hemishpere flag reduces the data size + hemisphereLongitude HemisphereLongitudeType DEFAULT north, + -- separate hemishpere flag reduces the data size + hemisphereLatitude HemisphereLatitudeType DEFAULT east, + longitude INTEGER, + latitude INTEGER, + accuracy GeoUnitType OPTIONAL + } + + DeltaCoordinates ::= SEQUENCE { + -- logitude difference to a reference point + longitude INTEGER, + -- latitude difference to a reference point + latitude INTEGER + } + + GeoCoordinateSystemType ::= ENUMERATED { + wgs84 (0), -- WGS 84 standard system + grs80 (1) -- (outdated) GRS 80 coordinate system + } + + GeoUnitType ::= ENUMERATED { + microDegree (0), -- approx. 11 cm on earth surface + tenthmilliDegree (1), -- 1 / 100000 degree is approx. 1.1 meter on earth surface + milliDegree (2), -- approx 110 meter on earth surface + centiDegree (3), + deciDegree (4) + } + + HemisphereLongitudeType ::= ENUMERATED { + north (0), + south (1) + } + + HemisphereLatitudeType ::= ENUMERATED { + east (0), + west (1) + } + + LoadingDeckType ::= ENUMERATED { + unspecified (0), + upper (1), + lower (2) + } + + CompartmentPositionType ::= ENUMERATED { + unspecified (0), + upperLevel (1), + lowerLevel (2) + } + + RoofRackType ::= ENUMERATED { + norack (0), + roofRailing (1), + luggageRack (2), + skiRack (3), + boxRack (4), + rackWithOneBox (5), + rackWithTwoBoxes (6), + bicycleRack (7), + otherRack (8) + ,... + } + +END \ No newline at end of file diff --git a/src/org/uic/ticket/api/spec/uicBarcodeV1finalDelayConfirmation1.3.asn b/src/org/uic/ticket/api/spec/uicBarcodeV1finalDelayConfirmation1.3.asn new file mode 100644 index 0000000..6e5a486 --- /dev/null +++ b/src/org/uic/ticket/api/spec/uicBarcodeV1finalDelayConfirmation1.3.asn @@ -0,0 +1,2043 @@ +-- Creator: ASN.1 Editor (http://asneditor.sourceforge.net) +-- Author: ClemensGantert +-- Created: Tue Aug 11 11:40:28 CEST 2015 +ASN-Module DEFINITIONS AUTOMATIC TAGS ::= BEGIN + +-- imports and exports +-- EXPORTS ALL; + + +-- ############################################################################################## +-- # +-- # Final version 1.3 - value 1 in the UIC bar code version element +-- # (see element 2 in U_FLEX record definition in leaflet 918.9) +-- # +-- ############################################################################################## + + +-- ############################################################################################## +-- # +-- # Naming and encoding conventions +-- # +-- # Elements included as String and as Numeric values: +-- # Some elements are included in different formats to reduce the data size. +-- # These elements must be included only once. +-- # These elements are named with the same name and appendix +-- # Num (numeric values) +-- # IA5 (String values according to ASN IA5String (7Bit)) +-- # Example: +-- # trainNum - in case of a numeric train number +-- # trainIA5 - in case of a alphanumeric train Id +-- # +-- # +-- # RICS codes must be used to encode companies (issuer, product owner, ...) where available +-- # other codes are possible based on bilateral agreements +-- # the format is kept more flexible to cover upcoming extensions of the RICS code by ERA +-- # +-- # Stations can be coded using the UIC and upcoming ERA code lists. Proprietary codes are +-- # possible based on bilateral agreements. Format: 1..9999999 or alphanumeric without +-- # special character (IA5String) +-- # +-- # +-- # ! INTEGERS must not exceed the value of 9,223,372,036,854,775,807 (64 bit) even in case +-- # ! they are unrestricted!!! +-- # ! +-- # ! Some elements like ReferenceNum or cardIdNum are defined as an unrestricted integer. +-- # ! Unlike other numerical values the cardIdNum and referenceNum can be larger than a usual 32 bit Integer +-- # ! Some ASN.1 implementation tools are limited to 32 bit integers which is too small. +-- # ! Please ensure to use a tool capable of dealing with larger numbers. +-- # +-- # BOOLEAN is always non optional +-- # +-- # Encoding of time: +-- # time is encoded as the number of minutes of the day 0 = 00:00, 1440 = 24:00, +-- # time data elements end with "time" in their name +-- # +-- # Encoding of date: +-- # ......................................................................................................... +-- # The issuing date is given in UTC, but some other date values are given in local time where the exact time zone is not known. +-- # +-- # For local dates the date is associated with the corresponding location: +-- # e.g.: +-- # valid from date -> location where the journey starts +-- # valid until date -> location where the journey covered by the ticket ends +-- # +-- # there could be rare cases where this is does not rovide a unique interpretation: +-- # e.g. open ticket or pass without start and end location for a collection of zones or countries with different time zones. +-- # in these cases the fare conditions must clarify the rules for these cases (e.g. by allowing to use the +-- # ticket a few hours after the end of validity). +-- # +-- # If these date values are given as the number of days from the issuing date the following rule applies: +-- # +-- # The difference in days is calculated by ignoring the time zone information in the case no time zone offset is provided. +-- # +-- # example 1: (31.12.2017 23:05 UTC == 01.01.2018 00:05 CET) : +-- # issuing date (UTC): 31.12.2017 23:05 +-- # local date (CET): 01.01.2018 00:05 +-- # -> difference in days = 1 +-- # +-- # example 1: (1.1.2018 22:05 UTC == 01.01.2018 23:05 CET) : +-- # issuing date (UTC): 31.12.2017 22:05 +-- # local date (CET): 01.01.2018 23:05 +-- # -> difference in days = 0 +-- # +-- # the day difference could become -1 although this can happen for localtions in America or New Zeeland only. +-- # +-- # implementation example: +-- # +-- # public static Long getDateDifference(Date issuingDate, Date localDate) { +-- # +-- # if (issuingDate == null || localDate == null) return null; +-- # +-- # Calendar issuingCal = Calendar.getInstance(); +-- # issuingCal.clear(); +-- # issuingCal.setTime(issuingDate); +-- # issuingCal.setTimeZone(TimeZone.getTimeZone("UTC")); +-- # issuingCal.set(Calendar.HOUR_OF_DAY, 0); +-- # issuingCal.set(Calendar.MINUTE, 0); +-- # issuingCal.set(Calendar.SECOND, 0); +-- # issuingCal.set(Calendar.MILLISECOND, 0); +-- # +-- # Calendar fromCal = Calendar.getInstance(); +-- # fromCal.clear(); +-- # fromCal.setTime(localDate); +-- # fromCal.setTimeZone(TimeZone.getTimeZone("UTC")); +-- # fromCal.set(Calendar.HOUR_OF_DAY, 0); +-- # fromCal.set(Calendar.MINUTE, 0); +-- # fromCal.set(Calendar.SECOND, 0); +-- # fromCal.set(Calendar.MILLISECOND, 0); +-- # +-- # long diff = localDate.getTime() - issuingDate.getTime(); +-- # long dayDiff = TimeUnit.DAYS.convert(diff, TimeUnit.MILLISECONDS); +-- # +-- # return new Long(dayDiff); +-- # +-- # } +-- # +-- # public static Date getLocalDateFromDifference(Date issuingDate, int diff , Long time ) { +-- # +-- # if (issuingDate == null) return null; +-- # +-- # Calendar cal = Calendar.getInstance(); +-- # cal.clear(); +-- # cal.setTime(issuingDate); +-- # cal.add(Calendar.DAY_OF_YEAR, diff); +-- # +-- # if (time != null) { +-- # int hours = time.intValue() / 60; +-- # int minutes = time.intValue() - hours * 60; +-- # cal.set(Calendar.HOUR_OF_DAY, hours); +-- # cal.set(Calendar.MINUTE,minutes); +-- # } +-- # +-- # return cal.getTime(); +-- # +-- # } +-- # +-- # +-- # ASN.1 Extensions: +-- # +-- # The specification makes use of extension (",..."). +-- # These extesions might be defined in future versions of the UIC specification +-- # Implementations must support the extension feature of ASN.1, at least they must be able to ignore extensions while decoding the data +-- # ASN.1 extensions will be defined by UIC. It is not allowed to define bilateral extensions. +-- # +-- # Bilateral Extensions: +-- # Bilateral extensions can be included in the data element "ExtensionData". +-- # +-- # +-- # +-- ######################################################################################### + + +-- ############################################################################################ + + +-- type assignments + + -- ######################################################################################### + -- the basic entry point of the data structure + -- the data include: + -- -issuer informations + -- -the details of the transport document + -- -informations required for the control process + -- -informations on the travelers independent from the transport document + -- -proprietary extensions + -- + -- ########################################################################################## + UicRailTicketData ::= SEQUENCE { + -- data specific to the issuer + issuingDetail IssuingData, + + -- data on the travelers + travelerDetail TravelerData OPTIONAL, + + -- data of the transport document + -- more than one document to be used on bilateral agreement only + transportDocument SEQUENCE OF DocumentData OPTIONAL, + + -- data specific to support the ticket control process + controlDetail ControlData OPTIONAL, + + -- proprietary data defined bilaterally + extension SEQUENCE OF ExtensionData OPTIONAL + ,... + } + + + + -- ########################################################################################### + -- the choice on the different transport documents that can be included in the bar code data: + -- - reservation of seat / couchette or berths (IRT, RES, BOA) + -- - reservation of car carriage (VET) + -- - open ticket (NRT including NRT group ticket) (NRT, GRT, SUP, UPD, COI) + -- - Rail passes (including Eurail, Interail and local passes) (RPT) + -- - Voucher (TRV) + -- - Customer Cards (including bonus cards and reduction cards) + -- - counter marks issued for group tickets + -- - parking ground tickets + -- - FIP tickets + -- - station access / station passage tickets + -- - proprietary documents as an extension + -- ############################################################################################ + DocumentData ::= SEQUENCE { + + -- token + -- specific id to be exchanged with the ticket (e.g. id of the phone in case of tickets linked to a phone) + token TokenType OPTIONAL, + + -- choice of the ticket + ticket CHOICE + { + + -- Reservation (without car carriage) (IRT and RES) + reservation ReservationData, + + -- Reservation of car carriage + carCarriageReservation CarCarriageReservationData, + + -- open ticket specification (NRT) + openTicket OpenTicketData, + + -- pass specification (RPT) including Eurail and Interrail + pass PassData, + + -- voucher + voucher VoucherData, + + -- customer card either to identify a customer and / or to provide reductions + customerCard CustomerCardData, + + -- countermark to accompagny a group ticket + counterMark CountermarkData, + + -- car parking slot + parkingGround ParkingGroundData, + + -- FIP duty ticket + fipTicket FIPTicketData, + + -- ticket to pass the gates at a station + stationPassage StationPassageData, + + -- proprietary data defined bilaterally + extension ExtensionData, + + -- delay confirmation + delayConfirmation DelayConfirmation + + ,... + } + ,... + } + + -- ######################################################################################## + -- confirmation of the delay of a train + -- + -- ######################################################################################## + DelayConfirmation ::= SEQUENCE { + + -- reference of the delay confirmation + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- train number of the delayed train - numeric or alphanumeric + trainNum INTEGER OPTIONAL, + trainIA5 IA5String OPTIONAL, + + -- departure date of the delayed train in local time + -- number of year + departureYear INTEGER (2016..2269) OPTIONAL, + -- number of the day in the year (1.1. = 1) + departureDay INTEGER (1..366) OPTIONAL, + departureTime INTEGER (0..1440) OPTIONAL, + departureUTCOffset INTEGER (-60..60) OPTIONAL, -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + + + -- station where the delay became relevant + stationCodeTable CodeTableType DEFAULT stationUIC, + stationNum INTEGER (1..9999999) OPTIONAL, + stationIA5 IA5String OPTIONAL, + + -- delay in minutes at the mentioned station + delay INTEGER (1..999), + + -- indication that the train was cancelled + trainCancelled BOOLEAN, + + -- type of confirmation provided + confirmationType ConfirmationType DEFAULT travelerDelayConfirmation, + + -- affected original ticket(s) + affectedTickets SEQUENCE OF TicketLinkType OPTIONAL, + + -- info text + infoText UTF8String OPTIONAL, + + -- proprietary data defined bilaterally + extension ExtensionData OPTIONAL + ,... + } + + ConfirmationType ::= ENUMERATED { + trainDelayConfirmation (0), -- confirmation of train delay, whether the traveler was on board in unconfirmed + travelerDelayConfirmation (1), -- confirmation that the traveler was on board of the delayed train + trainLinkedTicketDelay (2) -- confirmation that a ticket linked to the delayed train was issued + ,... + } + + + -- ######################################################################################## + -- Details of the issuer and the issue of the ticket + -- - details on the issuer + -- - indication of test tickets (specimen) + -- - payment details: method of payment, currency + -- - proprietary PNR of the issuer to be used to identify the sale within + -- the issuers ecosystem + -- - web link to display more information for the customer + -- - proprietary extension data + -- ######################################################################################## + IssuingData ::= SEQUENCE { + + -- provider of the signature (RICS code) + securityProviderNum INTEGER (1..32000) OPTIONAL, + securityProviderIA5 IA5String OPTIONAL, + + -- issuer of the transport document if the issuer is different from the security provider + -- (RICS code) + issuerNum INTEGER (1..32000) OPTIONAL, + issuerIA5 IA5String OPTIONAL, + + -- issuing time stamp in UTC + -- number of year + issuingYear INTEGER (2016..2269), + -- number of the day in the year (1.1. = 1) + issuingDay INTEGER (1..366), + -- The number of the minutes of issue might be used in case of account + -- based ticketing whith a delay of n minutes for the replication of central + -- booking data to the control devices (e.g. at SBB) + -- The time can be compared with the last synchronization time of + -- the control device + issuingTime INTEGER (0..1440) OPTIONAL, + + -- name of the issuer (E.g. short name mentioned in RICS code table) + issuerName UTF8String OPTIONAL, + + -- specimen indicates a test specimen not valid for travelling + specimen BOOLEAN, + + -- secure paper indicates that this barcode is issued with a secure paper ticket + -- to ensure the uniqueness of the ticket. This allows to use the same control + -- procedure as for e-tickets also for anonymous tickets + -- the double use of the ticket is in this case excluded by the secure paper + securePaperTicket BOOLEAN, + + -- indicates that the ticket is valid for traveling or still needs activation + activated BOOLEAN, + + -- currency of the price: ISO4217 currency codes + currency IA5String (SIZE(3)) DEFAULT "EUR", + + -- fraction of the prices included + currencyFract INTEGER (1..3) DEFAULT 2, + + -- PNR used by the issuer to identify the document + issuerPNR IA5String OPTIONAL, + + -- proprietary data defined bilaterally + extension ExtensionData OPTIONAL, + + -- location of sale in case of a sale on board of a train + -- numeric train number or aphanumeric id of the train where the ticket was sold + issuedOnTrainNum INTEGER OPTIONAL, + issuedOnTrainIA5 IA5String OPTIONAL, + -- line number + issuedOnLine INTEGER OPTIONAL, + + -- point oof sale + pointOfSale GeoCoordinateType OPTIONAL + ,... + } + + -- ################################################################################### + -- data supporting the control process + -- - list of items which the travelder can use to identify himself or the unique + -- usage of the ticket + -- (card ids, parts or identity card numbers, credit card numbers,..) + -- - hints on the validation to be made on board + -- + -- ################################################################################### + ControlData ::= SEQUENCE { + + -- cards that can be used to identify the ticket holder + identificationByCardReference SEQUENCE OF CardReferenceType OPTIONAL, + + -- idcard id must be checked to identify the traveler + identificationByIdCard BOOLEAN, + + -- passport id must be checked to identify the traveler + identificationByPassportId BOOLEAN, + + -- other items which could be used to identify the ticket holder + -- (for future use, code list to be defined) + identificationItem INTEGER OPTIONAL, + + -- validation of the passport is required (e.g. in case of Eurail) + passportValidationRequired BOOLEAN, + + -- online validation of the ticket required + onlineValidationRequired BOOLEAN, + + -- percentage of the tickets to be validated in more detail + -- (i.e. via online check or detailed checks lateron) + randomDetailedValidationRequired INTEGER (0..99) OPTIONAL, + + -- manual validation of the traveler age required (in case of reductions) + ageCheckRequired BOOLEAN, + + -- manual validation of the travelers reduction card required (in case of reductions) + reductionCardCheckRequired BOOLEAN, + + -- controler info text + infoText UTF8String OPTIONAL, + + -- additional tickets that should be controlled + includedTickets SEQUENCE OF TicketLinkType OPTIONAL, + + -- proprietary data defined bilaterally + extension ExtensionData OPTIONAL + ,... + } + + -- ################################################################################ + -- Traveler data + -- these data do not include tariff details of the booked tariffs, + -- tariff data are included in the transport document details and might + -- have a reference to the traveler defined here. + -- - personal data of the travellers + -- - the index of the list can be used to identify the + -- traveler within other contexts (e.g. in assigned tariffs) + -- ################################################################################ + TravelerData ::= SEQUENCE { + -- traveler list + traveler SEQUENCE OF TravelerType OPTIONAL, + + -- ISO 639-1 coding of the language preferred for the traveler / ticket holder + preferredLanguage IA5String (SIZE(2)) OPTIONAL, + + -- name of the group in case of a group ticket + groupName UTF8String OPTIONAL + ,... + } + + -- #################################################################################### + -- the following part contains the different transport document specifications + -- #################################################################################### + + + -- #################################################################################### + -- reservations of seats , couchettes and berths + -- included are the data defined in: + -- - leaflet 918.1 for reservation data exchange + -- - a few additional data currently used by some railways via different interfaces + -- - information on trach an dplafoorm where the coach stops + -- - additional second coach for large groups + -- #################################################################################### + ReservationData ::= SEQUENCE { + + -- train number - numeric or alphanumeric + trainNum INTEGER OPTIONAL, + trainIA5 IA5String OPTIONAL, + + -- departure date in local time + -- number of the days calculated from the issuing date + departureDate INTEGER (-1..370) DEFAULT 0, + + + -- reservation reference according ton 918.1 in case ade via Hermes + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code to be used as standard) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- service brand: code list https://uic.org/service-brand-code-list + serviceBrand INTEGER (0..32000) OPTIONAL, + serviceBrandAbrUTF8 UTF8String OPTIONAL, + serviceBrandNameUTF8 UTF8String OPTIONAL, + + -- service code list from 918.1 (seat couchette,..) + service ServiceType DEFAULT seat, + + -- code table used to encode stations + stationCodeTable CodeTableType DEFAULT stationUICReservation, + + -- origin station code + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, + + -- destination station code + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, + + -- origin station name + fromStationNameUTF8 UTF8String OPTIONAL, + + -- destination station name + toStationNameUTF8 UTF8String OPTIONAL, + + -- departure time + departureTime INTEGER (0..1440), + departureUTCOffset INTEGER (-60..60) OPTIONAL, -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + + -- arrival date and time in local time + -- number of days counted from the departure date + arrivalDate INTEGER (0..20) DEFAULT 0, + arrivalTime INTEGER (0..1440) OPTIONAL, + arrivalUTCOffset INTEGER (-60..60) OPTIONAL, -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + -- should be omitted in case it is the same as for depature + + -- responsible carriers on the route + carrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carrierIA5 SEQUENCE OF IA5String OPTIONAL, + + -- travel class + classCode TravelClassType DEFAULT second, + + -- service level code list from 918.1 + serviceLevel IA5String (SIZE(1..2)) OPTIONAL, + + -- places + places PlacesType OPTIONAL, + + -- additional places in a second coach + additionalPlaces PlacesType OPTIONAL, + + --bicycle places + bicyclePlaces PlacesType OPTIONAL, + + -- compartment details (open space, wheelchair,..) + compartmentDetails CompartmentDetailsType OPTIONAL, + + -- number of persons on the ticket without place numbers (on IRT) + numberOfOverbooked INTEGER (0..200) DEFAULT 0, + + -- description of berths + berth SEQUENCE OF BerthDetailData OPTIONAL, + + -- tariffs included (Adult, Children,... ) + tariff SEQUENCE OF TariffType OPTIONAL, + + -- type of the price (supplement,... ) + priceType PriceTypeType DEFAULT travelPrice, + + price INTEGER OPTIONAL, + + vatDetail SEQUENCE OF VatDetailType OPTIONAL, + + -- type of supplement - code list from 018.1 + typeOfSupplement INTEGER (0..9) DEFAULT 0, + + numberOfSupplements INTEGER (0..200) DEFAULT 0, + + -- luggage restrictions and registered luggage + -- in case the luggage restrictions are general and do not depend on the + -- ticket type they should not be included + luggage LuggageRestrictionType OPTIONAL, + + infoText UTF8String OPTIONAL, + + + -- bilaterally agreed proprietary extension + extension ExtensionData OPTIONAL + ,... + } + + -- ################################################################################# + -- details on the VAT included to be used in after sale processes + -- ################################################################################# + VatDetailType ::= SEQUENCE { + + -- ISO 3166 numeric country code + country INTEGER (1..999), + + -- 1/10th of a percent + percentage INTEGER (0..999), + + -- amount of VAT, the currency and the currency fraction is included in the issuing data + amount INTEGER OPTIONAL, + + -- european tax id of the company paying VAT + vatId IA5String OPTIONAL + + } + + + -- ################################################################################# + -- reservations of car carriage + -- included are the data defined in: + -- - leaflet 918.1 for reservation data exchange + -- - a few additional data currently used by some railways via different interfaces + -- ################################################################################# + CarCarriageReservationData ::= SEQUENCE { + + trainNum INTEGER OPTIONAL, + trainIA5 IA5String OPTIONAL, + + + -- loading / unloading of the car in local date and time + -- number of the days calculated from the issuing date + beginLoadingDate INTEGER (-1..370) DEFAULT 0, + beginLoadingTime INTEGER (0..1440) OPTIONAL, + endLoadingTime INTEGER (0..1440) OPTIONAL, + loadingUTCOffset INTEGER (-60..60) OPTIONAL, -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + + + -- reservation reference according on 918.1 in case ade via Hermes + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- service brand: code list https://uic.org/service-brand-code-list + serviceBrand INTEGER (1..32000) OPTIONAL, + serviceBrandAbrUTF8 UTF8String OPTIONAL, + serviceBrandNameUTF8 UTF8String OPTIONAL, + + stationCodeTable CodeTableType DEFAULT stationUICReservation, + + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, + + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, + + fromStationNameUTF8 UTF8String OPTIONAL, + toStationNameUTF8 UTF8String OPTIONAL, + + coach IA5String OPTIONAL, + place IA5String OPTIONAL, + + compartmentDetails CompartmentDetailsType OPTIONAL, + + -- description of the car + numberPlate IA5String, + trailerPlate IA5String OPTIONAL, + carCategory INTEGER (0..9), + boatCategory INTEGER (0..6) OPTIONAL, + textileRoof BOOLEAN, + roofRackType RoofRackType DEFAULT norack, + + -- heigth of a roof rack in cm + roofRackHeight INTEGER (0..99) OPTIONAL, + + -- number of boats on a rack + attachedBoats INTEGER (0..2) OPTIONAL, + + -- number of biycles on a rack + attachedBicycles INTEGER (0..4) OPTIONAL, + + -- number of surf boards on a rack + attachedSurfboards INTEGER (0..5) OPTIONAL, + + -- reference to an entry on the loading list + loadingListEntry INTEGER (0..999) OPTIONAL, + loadingDeck LoadingDeckType DEFAULT upper, + + -- responsible carriers on the route (RICS codes) + carrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carrierIA5 SEQUENCE OF IA5String OPTIONAL, + + tariff TariffType, + priceType PriceTypeType DEFAULT travelPrice, + + price INTEGER OPTIONAL, + + vatDetail SEQUENCE OF VatDetailType OPTIONAL, + + infoText UTF8String OPTIONAL, + extension ExtensionData OPTIONAL + ,... + } + + + -- ##################################################################################### + -- data for open tickets (NRT and group tickets) + -- included are the data defined in: + -- - the ticket layout (leaflet 918.2) + -- - the ticket bar code version 3 (leaflet 918.2) + -- - additional data based on 108.1 with some extensions as 108.1 + -- does not provide well structured data, + -- especially concerning regional validity + -- + -- ##################################################################################### + + OpenTicketData ::= SEQUENCE { + + -- reference must be given either in numeric or alphanumeric format + referenceNum INTEGER OPTIONAL, + referenceIA5 IA5String OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- to support other ticket content (e.g. VDV, UTPF, VÖV, CALYPSO) + -- issuer code using the default code table of the product owner + extIssuerId INTEGER OPTIONAL, + -- authorization id provided to the issuer by the product owner + issuerAutorizationId INTEGER OPTIONAL, + + -- ticket includes the return trip + returnIncluded BOOLEAN, + + stationCodeTable CodeTableType DEFAULT stationUIC, + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, + + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, + + fromStationNameUTF8 UTF8String OPTIONAL, + toStationNameUTF8 UTF8String OPTIONAL, + + -- description for manual evaluation in case structured data are not available + validRegionDesc UTF8String OPTIONAL, + -- specification of the ordered sequence of valid regions + validRegion SEQUENCE OF RegionalValidityType OPTIONAL, + + -- return route description + -- the return route description can be omitted if it is identical to the + -- inversed outbound validRegion sequence + returnDescription ReturnRouteDescriptionType OPTIONAL, + + -- temporal validity data in local time of the location where the jouney starts + -- number of days from issuing date + validFromDay INTEGER (-1..700) DEFAULT 0, + validFromTime INTEGER (0..1440) OPTIONAL, + validFromUTCOffset INTEGER (-60..60) OPTIONAL, -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + + -- number of days from valid-from date, 0 = first day of validity + validUntilDay INTEGER (0..370) DEFAULT 0, + validUntilTime INTEGER (0..1440) OPTIONAL, + validUntilUTCOffset INTEGER (-60..60) OPTIONAL, -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + -- should be omtted in case it is the same as for depature + + -- list of activated days in case the entire ticket is not activated + -- the day is given by the number of days from the first day of validity + -- 1 = first day of validity + activatedDay SEQUENCE OF INTEGER (0..370) OPTIONAL, + + classCode TravelClassType DEFAULT second, + + -- servicelevel code according to leaflet 918.1 to encode other products + -- (e.g. PREMIUM, ...) + serviceLevel IA5String (SIZE(1..2)) OPTIONAL, + + -- carriers involved in the transport (RICS codes) + -- the indication of carriers is mandatory on international routes, + -- they can be listed here but can also be included in viaDetails + carrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carrierIA5 SEQUENCE OF IA5String OPTIONAL, + + + -- list of service brands for which the ticket is valid + -- in case the included service brands are listed all other brands are excluded + -- service brand: code list https://uic.org/service-brand-code-list + includedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + + -- list of service brands for which the ticket is not valid + -- service brand: code list https://uic.org/service-brand-code-list + excludedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + + tariffs SEQUENCE OF TariffType OPTIONAL, + + price INTEGER OPTIONAL, + + vatDetail SEQUENCE OF VatDetailType OPTIONAL, + + infoText UTF8String OPTIONAL, + + -- additional included open tickets + -- e.g. to include local city traffic on parts of a the route + includedAddOns SEQUENCE OF IncludedOpenTicketType OPTIONAL, + + -- in case the luggage restrictions are general and do not depend + -- on the ticket type they should not be included + luggage LuggageRestrictionType OPTIONAL, + + + + extension ExtensionData OPTIONAL + ,... + } + + + + -- #################################################################################### + -- data for passes + -- included are the data defined in: + -- - the ticket layout (leaflet 918.2) + -- - the ticket bar code version 3 (leaflet 918.2) + -- #################################################################################### + PassData ::= SEQUENCE { + + -- reference must be given in numeric or alphanumeric format + referenceNum INTEGER OPTIONAL, + referenceIA5 IA5String OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- type of the pass, code list provided by the product owner + -- in case of Eurail: + -- 1 = Interrail + -- 2 = Eurail + -- 3 = Eurail Global (all countries) + passType INTEGER (1..250) OPTIONAL, + + -- literal name of the pass + passDescription UTF8String OPTIONAL, + + classCode TravelClassType DEFAULT second, + + -- begin of validity (local time) + -- number of days from issuing date + validFromDay INTEGER (-1..700) DEFAULT 0, + validFromTime INTEGER (0..1440) OPTIONAL, + validFromUTCOffset INTEGER (-60..60) OPTIONAL, -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + + -- end of validity (local time) + -- number of days from valid from day, 0 = valid on valid-from-date + validUntilDay INTEGER (0..370) DEFAULT 0, + validUntilTime INTEGER (0..1440) OPTIONAL, + validUntilUTCOffset INTEGER (-60..60) OPTIONAL, -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + -- should be omtted in case it is the same as for depature + + + + -- additional validity periods and excluded time ranges + validityPeriodDetails ValidityPeriodDetailType OPTIONAL, + + -- max number of days of validity in case the valid from day is open + numberOfValidityDays INTEGER (0..370) OPTIONAL, + + -- max number of possible trips to be activated + numberOfPossibleTrips INTEGER (1..250) OPTIONAL, + numberOfDaysOfTravel INTEGER (1..250) OPTIONAL, + + -- list of activated days in case the entire ticket is not activated + -- the day is given by the number of days from the first day of validity + -- 0 = first day of validity + activatedDay SEQUENCE OF INTEGER (0..370) OPTIONAL, + + -- included countries, code table according to UIC leaflet 918.2 + countries SEQUENCE OF INTEGER (1..250) OPTIONAL, + + -- included carriers (RICS codes) + includedCarrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + includedCarrierIA5 SEQUENCE OF IA5String OPTIONAL, + + -- excluded carriers (RICS codes) + excludedCarrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + excludedCarrierIA5 SEQUENCE OF IA5String OPTIONAL, + + -- service brand: code list https://uic.org/service-brand-code-list + includedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + excludedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + + -- region description to cover local zones + validRegion SEQUENCE OF RegionalValidityType OPTIONAL, + + tariffs SEQUENCE OF TariffType OPTIONAL, + + price INTEGER OPTIONAL, + + vatDetail SEQUENCE OF VatDetailType OPTIONAL, + + infoText UTF8String OPTIONAL, + extension ExtensionData OPTIONAL + ,... + } + + ValidityPeriodDetailType ::= SEQUENCE { + validityPeriod SEQUENCE OF ValidityPeriodType OPTIONAL, + excludedTimeRange SEQUENCE OF TimeRangeType OPTIONAL + } + + ValidityPeriodType ::= SEQUENCE { + -- number of days from issuing date (local date) + validFromDay INTEGER (-1..700) DEFAULT 0, + validFromTime INTEGER (0..1440) OPTIONAL, + validFromUTCOffset INTEGER (-60..60) OPTIONAL, -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + + -- number of days from valid from day, 0 = valid on valid from date + validUntilDay INTEGER (0..370) DEFAULT 0, + validUntilTime INTEGER (0..1440) OPTIONAL, + validUntilUTCOffset INTEGER (-60..60) OPTIONAL -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + -- should be omtted in case it is the same as for depature + + } + + TimeRangeType ::= SEQUENCE { + fromTime INTEGER (0..1440), + untilTime INTEGER (0..1440) + } + + -- ###################################################################################### + -- data for vouchers + -- included are quite basic further study is required + -- ###################################################################################### + VoucherData ::= SEQUENCE { + + -- reference must be given in numeric or alphanumeric format + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- begin of validity in UTC + -- number of year + validFromYear INTEGER (2016..2269), + -- number of the day in the year (1.1. = 1) + validFromDay INTEGER (0..370), + -- end of validity + -- number of year + validUntilYear INTEGER (2016..2269), + -- number of the day in the year (1.1. = 1) + validUntilDay INTEGER (0..370), + + value INTEGER DEFAULT 0, + + -- type of the voucher, code list defined by the product owner + type INTEGER (1..32000) OPTIONAL, + + infoText UTF8String OPTIONAL, + extension ExtensionData OPTIONAL + ,... + } + -- ################################################################################### + -- data for FIP tickets + -- included are data from the FIP ticket layout, + -- ################################################################################### + FIPTicketData ::= SEQUENCE { + + -- reference must be given in numeric or alphanumeric format + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- first day of validity in UTC + --- number of days from issuing date + validFromDay INTEGER (-1..700) DEFAULT 0, + -- last day of validity + -- number of days from valid from day, 0 = first day of validity + validUntilDay INTEGER (0..370) DEFAULT 0, + + -- activated days: list of days for which the ticket is valid + -- the day is given by the number of days from the first day of validity + -- 0 = first day of validity + activatedDay SEQUENCE OF INTEGER (0..370) OPTIONAL, + + -- included carriers + carrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carrierIA5 SEQUENCE OF IA5String OPTIONAL, + + -- number of travel days allowed + numberOfTravelDays INTEGER (1..200), + includesSupplements BOOLEAN, + + -- travel class + classCode TravelClassType DEFAULT second, + extension ExtensionData OPTIONAL + ,... + } + + -- ##################################################################################### + -- data station passage and access + -- ticket used to enter, exit or pass a station without travelling by train. + -- E.g. for staff working in a station. + -- ##################################################################################### + StationPassageData ::= SEQUENCE { + + -- reference must be given in numeric or alphanumeric format + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + productName UTF8String OPTIONAL, + + -- code table used to encode he stations + stationCodeTable CodeTableType DEFAULT stationUIC, + -- list of station where the passage is allowed + stationNum SEQUENCE OF INTEGER OPTIONAL, + stationIA5 SEQUENCE OF IA5String OPTIONAL, + -- station names + stationNameUTF8 SEQUENCE OF UTF8String OPTIONAL, + + -- list of areas in a station where the access is allowed + areaCodeNum SEQUENCE OF INTEGER OPTIONAL, + areaCodeIA5 SEQUENCE OF IA5String OPTIONAL, + -- area names + areaNameUTF8 SEQUENCE OF UTF8String OPTIONAL, + + -- begin of validity in local date and time + -- number of days from issuing date + validFromDay INTEGER (-1..700), + validFromTime INTEGER (0..1440) OPTIONAL, + validFromUTCOffset INTEGER (-60..60) OPTIONAL, -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + + -- end of validity + -- number of days from valid from day, 0 = first day of validity + validUntilDay INTEGER (0..370) DEFAULT 0, + validUntilTime INTEGER (0..1440) OPTIONAL, + validUntilUTCOffset INTEGER (-60..60) OPTIONAL, -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + -- should be omtted in case it is the same as for depature + + + -- number of days for station passage in case the number of days + -- is limited and less that the validity period + numberOfDaysValid INTEGER OPTIONAL, + + extension ExtensionData OPTIONAL + ,... + } + + -- ###################################################################################### + -- data for customer cards + -- included are data from: + -- - ÖBB requirements on card data + -- - DB Bahncard as HandyTicket + -- note: customer data are included in the traveler data structure + -- ###################################################################################### + CustomerCardData ::= SEQUENCE { + + -- customer details + -- optional, as there might be an anonymous cards + customer TravelerType OPTIONAL, + + -- card id might be numerical or alphanumerical + cardIdIA5 IA5String OPTIONAL, + cardIdNum INTEGER OPTIONAL, + + -- valid from date in UTC + -- number of year + validFromYear INTEGER (2016..2269), + --- number of the day in the year (1.1. = 1) + validFromDay INTEGER (0..370) OPTIONAL, + + --- number of year from valid from year onwards + validUntilYear INTEGER (0..250) DEFAULT 0, + --- number of the day in the year (1.1. = 1) + validUntilDay INTEGER (0..370) OPTIONAL, + + classCode TravelClassType OPTIONAL, + + -- code of the card type code list defined by the issuer + cardType INTEGER (1..1000) OPTIONAL, + + -- readable description of the card type + cardTypeDescr UTF8String OPTIONAL, + + -- customer status code + -- 1 = basic + -- 2 = premium + -- 3 = silver + -- 4 = gold + -- 5 = platinum + -- 6 = senator + -- > 50 - code table of the card issuer + customerStatus INTEGER OPTIONAL, + + -- readable customer status "e.g. gold", + customerStatusDescr IA5String OPTIONAL, + + -- list of included services, + -- 1 = Rail Plus + -- 2 = access to launch + -- > 50 code list of the issuer + includedServices SEQUENCE OF INTEGER OPTIONAL, + + extension ExtensionData OPTIONAL + ,... + } + + -- ###################################################################################### + -- data for customer cards + -- included are data from: + -- - DB parking ground reservation + -- ####################################################################################### + ParkingGroundData ::= SEQUENCE { + + -- booking reference + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + parkingGroundId IA5String, + + -- parking date in local date time + -- number of days from the issuing date + fromParkingDate INTEGER (-1..370), + -- number of days from the from parking date in case it is different from that date + untilParkingDate INTEGER (0..370) DEFAULT 0, + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- code needed to access the parking lot + accessCode IA5String OPTIONAL, + + location UTF8String, + + stationCodeTable CodeTableType DEFAULT stationUIC, + -- in case the parking ground is associated with a station + stationNum INTEGER OPTIONAL, + stationIA5 UTF8String OPTIONAL, + + specialInformation UTF8String OPTIONAL, + entryTrack UTF8String OPTIONAL, + numberPlate IA5String OPTIONAL, + + price INTEGER OPTIONAL, + vatDetail SEQUENCE OF VatDetailType OPTIONAL, + + + extension ExtensionData OPTIONAL + ,... + } + + -- ####################################################################### + -- data for countermarks issued with group tickets + -- included are data from: + -- - version 3 bar code (leaflet 918.2) + -- - printed layout (leaflet 918.2) + -- ######################################################################## + CountermarkData ::= SEQUENCE { + + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- reference of the group ticket + ticketReferenceIA5 IA5String OPTIONAL, + ticketReferenceNum INTEGER OPTIONAL, + + -- sequential number of the countermark + numberOfCountermark INTEGER (1..200), + -- total number of countermarks + totalOfCountermarks INTEGER (1..200), + -- name of the group + groupName UTF8String, + + + stationCodeTable CodeTableType DEFAULT stationUIC, + + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, + + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, + + fromStationNameUTF8 UTF8String OPTIONAL, + toStationNameUTF8 UTF8String OPTIONAL, + + -- description for manual evaluation in case structured data are not available + validRegionDesc UTF8String OPTIONAL, + -- specification of the ordered sequence of valid regions + validRegion SEQUENCE OF RegionalValidityType OPTIONAL, + + + -- ticket includes the return trip + returnIncluded BOOLEAN, + -- retrurn route description + -- can be omitted if it is identical to the inversed outbound validRegion sequence + returnDescription ReturnRouteDescriptionType OPTIONAL, + + -- local date + -- number of days from issuing date + validFromDay INTEGER (-1..700) DEFAULT 0, + validFromTime INTEGER (0..1440) OPTIONAL, + validFromUTCOffset INTEGER (-60..60) OPTIONAL, -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + + + + -- number of days from valid from day, 0 = first day of validity + validUntilDay INTEGER (0..370) DEFAULT 0, + validUntilTime INTEGER (0..1440) OPTIONAL, + validUntilUTCOffset INTEGER (-60..60) OPTIONAL, -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + -- should be omtted in case it is the same as for depature + + + classCode TravelClassType DEFAULT second, + + -- valid carriers + carrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carrierIA5 SEQUENCE OF IA5String OPTIONAL, + + -- service brands where the ticket is valid + -- in case this list is provided the ticket is invalid on all other service brands + -- service brand: code list https://uic.org/service-brand-code-list + includedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + + -- service brands where the ticket is not valid + -- in case this list is provided the ticket is valid on all other service brands + excludedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + + infoText UTF8String OPTIONAL, + + extension ExtensionData OPTIONAL + ,... + } + + + -- ########################################################################################### + -- generic non standard extension element + -- the generic non - standard element contains: + -- - an extension id to distinguish different extensions + -- - the extension data as binary data + -- proprietary extensions are by definition proprietary. This standard provides + -- the means to identify these extensions + -- within the data and to skip these data. + -- the evaluation of these data and the unique identification of the extensions + -- via the extension id is in the + -- responsibility of the railways which use these extensions. + -- ########################################################################################### + ExtensionData ::= SEQUENCE { + extensionId IA5String, + extensionData OCTET STRING + } + + -- ############################################################################################ + -- type definitions + -- ############################################################################################ + + -- ############################################################################################# + -- included open ticke for a part of the travel (e.g. local city trafic) + -- - data identically already included in the covering open ticket do not need to be + -- repeated here + -- - main source are the data required for included regional and city traffic tickets + -- ############################################################################################# + IncludedOpenTicketType ::= SEQUENCE { + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- issuer code using the default code table of the product owner (today used e.g. by VDV) + externalIssuerId INTEGER OPTIONAL, + -- authorization id provided to the issuer by the poroduct owner (today used e.g. by VDV) + issuerAutorizationId INTEGER OPTIONAL, + + -- regional validity data + stationCodeTable CodeTableType DEFAULT stationUIC, + -- specification of the ordered sequence of valid regions, ordered in the direction of travel + validRegion SEQUENCE OF RegionalValidityType OPTIONAL, + + -- temporal validity data in local date and time + -- number of days from issuing date + validFromDay INTEGER (-1..700) DEFAULT 0, + validFromTime INTEGER (0..1440) OPTIONAL, + validFromUTCOffset INTEGER (-60..60) OPTIONAL, -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + + + -- number of days from valid-from date, 0 = first day of validity + validUntilDay INTEGER (0..370) DEFAULT 0, + validUntilTime INTEGER (0..1440) OPTIONAL, + validUntilUTCOffset INTEGER (-60..60) OPTIONAL, -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + -- should be omtted in case it is the same as for depature + + + -- travel class to be given in case it differs from the class of the main ticket + classCode TravelClassType OPTIONAL, + -- servicelevel code according to leaflet 918.1 to encode other products (e.g. PREMIUM, ...) + -- to be provided in case it differs from the main ticket + serviceLevel IA5String (SIZE(1..2)) OPTIONAL, + + -- valid carriers (RICS codes) + carrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carrierIA5 SEQUENCE OF IA5String OPTIONAL, + + -- service brands where the ticket is valid + -- in case this list is provided the ticket is invalid on all other service brands + -- service brand: code list https://uic.org/service-brand-code-list + includedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + + -- service brands where the ticket is not valid + -- in case this list is provided the ticket is valid on all other service brands + excludedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + + tariffs SEQUENCE OF TariffType OPTIONAL, + infoText UTF8String OPTIONAL, + extension ExtensionData OPTIONAL + ,... + } + + -- ###################################################################################### + -- tariff data for open tickets + -- information included are: + -- - number of passengers + -- - optionally a link to the traveler data + -- ####################################################################################### + TariffType ::= SEQUENCE { + + -- number of passengers using the tariff + numberOfPassengers INTEGER (1..200) DEFAULT 1, + + -- type indication youth, adult, senior,.. + passengerType PassengerType OPTIONAL, + + -- age restrictions of the tariff + ageBelow INTEGER (1..64) OPTIONAL, + ageAbove INTEGER (1..128) OPTIONAL, + + + -- named traveler list + -- link to the traveler in case the travelers have to be named (e.g. Eurail passes) + -- the number indicates the position in the traveler list starting from 1 + travelerid SEQUENCE OF INTEGER (0..254) OPTIONAL, + + -- restriction on country of residence + -- this tariff is restricted by the country of residence given in the traveler data + -- (e.g. Eurail tickets are not valid in the contry of residence) + restrictedToCountryOfResidence BOOLEAN, + + -- section in case the tariff applies to a part of the route only + restrictedToRouteSection RouteSectionType OPTIONAL, + + -- details on series according to lesaflet 108.1 + seriesDataDetails SeriesDetailType OPTIONAL, + + -- tariff code + tariffIdNum INTEGER OPTIONAL, + tariffIdIA5 IA5String OPTIONAL, + + -- tariff description + tariffDesc UTF8String OPTIONAL, + + -- reduction cards applied (incl. dicount cards, loaylty cards relevant for the tariff) + reductionCard SEQUENCE OF CardReferenceType OPTIONAL + ,... + } + + SeriesDetailType ::= SEQUENCE { + + -- data related to tariffs based on series according UIC leaflet 108.1 + -- supplying carrier according to UIC leaflet 108.1 (RICS code) + supplyingCarrier INTEGER (1..32000) OPTIONAL, + + -- offer identifier of the carrier according to UIC leaflet 108.1 + offerIdentification INTEGER (1..99) OPTIONAL, + + -- series of the carrier according to UIC leaflet 108.1 + series INTEGER OPTIONAL + } + + + RouteSectionType ::= SEQUENCE { + + stationCodeTable CodeTableType DEFAULT stationUIC, + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, -- IA5 or Num not both + + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, -- IA5 or Num not both + + fromStationNameUTF8 UTF8String OPTIONAL, + toStationNameUTF8 UTF8String OPTIONAL + } + + + -- ####################################################################################### + -- customer card reference + -- ####################################################################################### + CardReferenceType ::= SEQUENCE { + + -- issuer of the card + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + cardIssuerNum INTEGER (1..32000) OPTIONAL, + cardIssuerIA5 IA5String OPTIONAL, + + cardIdNum INTEGER OPTIONAL, + cardIdIA5 IA5String OPTIONAL, + + -- Name of the card e.g. "VISA-CARD" + cardName UTF8String OPTIONAL, + + -- type of the card, code list defined by the issuer + cardType INTEGER OPTIONAL, + + -- in case only the leading part of the card number is provided + leadingCardIdNum INTEGER OPTIONAL, + leadingCardIdIA5 IA5String OPTIONAL, + + + -- in case only the trailing part of the card number is provided + trailingCardIdNum INTEGER OPTIONAL, + trailingCardIdIA5 IA5String OPTIONAL + + ,... + } + + -- ####################################################################################### + -- traveler data + -- - traveler data might contain all traveler details which are independent + -- from the type of travel document + -- e.g. it can include the date of birth as this is part of the traveler + -- but not the indication "Senior" as this is tariff dependent + -- + -- ####################################################################################### + TravelerType ::= SEQUENCE { + + firstName UTF8String OPTIONAL, + secondName UTF8String OPTIONAL, + lastName UTF8String OPTIONAL, + idCard IA5String OPTIONAL, + passportId IA5String OPTIONAL, + title IA5String (SIZE(1..3)) OPTIONAL, + gender GenderType OPTIONAL, + + -- customer id might be numerical or alphanumerical + customerIdIA5 IA5String OPTIONAL, + customerIdNum INTEGER OPTIONAL, + + -- date of birth + -- number of year + yearOfBirth INTEGER (1901..2155) OPTIONAL, + -- number of the day in the year (1.1. = 1) + dayOfBirth INTEGER (0..370) OPTIONAL, + + -- indicates the ticket holder/group leader in case of groups + ticketHolder BOOLEAN, + + passengerType PassengerType OPTIONAL, + + passengerWithReducedMobility BOOLEAN OPTIONAL, + + -- country of residence (numeric ISO country code) + -- to be used in case there product restrictions on the country of residence (e.g. Eurail passes) + countryOfResidence INTEGER (1..999) OPTIONAL, + + countryOfPassport INTEGER (1..999) OPTIONAL, + countryOfIdCard INTEGER (1..999) OPTIONAL, + + status SEQUENCE OF CustomerStatusType OPTIONAL + ,... + } + + CustomerStatusType ::= SEQUENCE { + + -- compagny providing the status, default is the issuer + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + statusProviderNum INTEGER (1..32000) OPTIONAL, + statusProviderIA5 IA5String OPTIONAL, + + -- customer status code + -- 1 = basic + -- 2 = premium + -- 3 = silver + -- 4 = gold + -- 5 = platinum + -- 6 = senator + -- > 50 - code table of the card issuer + customerStatus INTEGER OPTIONAL, + + -- customer status "gold" + customerStatusDescr IA5String OPTIONAL + } + + + ReturnRouteDescriptionType ::= SEQUENCE { + + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, + + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, + + fromStationNameUTF8 UTF8String OPTIONAL, + toStationNameUTF8 UTF8String OPTIONAL, + + -- description for manual evaluation in case structured data are not available + validReturnRegionDesc UTF8String OPTIONAL, + + -- specification of the ordered sequence of valid regions for the return trip + validReturnRegion SEQUENCE OF RegionalValidityType OPTIONAL + ,... + + } + + -- ###################################################################################### + -- regional validity of an open ticket + -- specification of the regional validity. + -- ###################################################################################### + + RegionalValidityType ::= CHOICE { + trainLink TrainLinkType, + viaStations ViaStationType, + zones ZoneType, + lines LineType, + polygone PolygoneType + ,... + } + + + + -- ####################################################################################### + -- train link data + -- includes a restriction of an open ticket valid only on a specific train + -- and date on a part of the route + -- ####################################################################################### + TrainLinkType ::= SEQUENCE { + + trainNum INTEGER OPTIONAL, + trainIA5 IA5String OPTIONAL, + + -- local date at the station where the train link starts + -- days from the issuing date onwards + travelDate INTEGER (-1..370), + departureTime INTEGER (0..1440), -- time in minutes + departureUTCOffset INTEGER (-60..60) OPTIONAL, -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, + + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, + + fromStationNameUTF8 UTF8String OPTIONAL, + toStationNameUTF8 UTF8String OPTIONAL + + } + + + + -- ###################################################################################### + -- regional validity using a set of lines + -- - based on data used in regional city trafic enviromnemnts + -- ###################################################################################### + LineType ::= SEQUENCE { + + -- local service provider / carrier within the zone + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + carrierNum INTEGER (1..32000) OPTIONAL, + carrierIA5 IA5String OPTIONAL, + + -- ids of the valid lines known by the local carriers in that zone + lineId SEQUENCE OF INTEGER OPTIONAL, + + stationCodeTable CodeTableType DEFAULT stationUIC, + + -- in case the zone must be entered via a specific station + -- (e.g. local city trafic at the end of a journey + -- starting from the main train station) + entryStationNum INTEGER (1..9999999) OPTIONAL, + entryStationIA5 IA5String OPTIONAL, + + -- in case the zone must be left via a specific station + -- (e.g. local city trafic at the beginning of a journey + -- terminating at the main train station) + terminatingStationNum INTEGER (1..9999999) OPTIONAL, + terminatingStationIA5 IA5String OPTIONAL, + + -- code of the local city in case the zone is part of regional city transport + -- code list of the local carrier + city INTEGER (1..9999999) OPTIONAL, + + -- binary encoding of zones, encoding speciofication provided by + -- the local service provider + binaryZoneId OCTET STRING OPTIONAL + ,... + } + + + -- ################################################################################# + -- regional validity in a zone + -- - based on data used in regional city trafic enviromnemnts + -- ################################################################################# + ZoneType ::= SEQUENCE { + + -- local service provider / carrier within the zone + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + carrierNum INTEGER (1..32000) OPTIONAL, + carrierIA5 IA5String OPTIONAL, + + stationCodeTable CodeTableType DEFAULT stationUIC, + -- in case the zone must be entered via a specific station + -- (e.g. local city trafic at the end of a journey starting + -- from the main train station) + entryStationNum INTEGER (1..9999999) OPTIONAL, + entryStationIA5 IA5String OPTIONAL, + + -- in case the zone must be left via a specific station + -- (e.g. local city trafic at the beginning of a journey + -- terminating at the main train station) + terminatingStationNum INTEGER (1..9999999) OPTIONAL, + terminatingStationIA5 IA5String OPTIONAL, + + -- code of the local city in case the zone is part of regional + -- city transport code list of the local carrier + city INTEGER OPTIONAL, + + -- ids of the valid zones known by the local carriers in that zone + zoneId SEQUENCE OF INTEGER OPTIONAL, + + -- binary encoding of zones, encoding specification provided by + -- the local service provider + binaryZoneId OCTET STRING OPTIONAL, + + -- EU NUTS code for a region + nutsCode IA5String OPTIONAL + ,... + } + + + -- ################################################################################## + -- via station + -- includes a description of of the route by via stations. + -- Via stations follow the description in leaflet 108.1: + -- via stations can e mandatory to pass (but there does not need to be a + -- train stop at this stations): visible route description: "*station*" + -- there can be a list of alternative routes: + -- visible route description: "*(station1/station2)*" + -- there can also be alternative routes: + -- "*(station1*station2/station3*station4)*" although the + -- definition in 108.2 is not very precice on this option + -- ################################################################################### + ViaStationType ::= SEQUENCE { + + stationCodeTable CodeTableType DEFAULT stationUIC, + -- mandatory via station + stationNum INTEGER (1..9999999) OPTIONAL, + stationIA5 IA5String OPTIONAL, + + -- list of alternative routes, one of these has to be taken + alternativeRoutes SEQUENCE OF ViaStationType OPTIONAL, + + -- list of stations along the route + route SEQUENCE OF ViaStationType OPTIONAL, + border BOOLEAN, + + -- carrier responsible for the transport starting at this station (RICS-Code) + -- in case the carrier is included here it might be omitted + -- in the carrier list of the region data + carrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carrierIA5 SEQUENCE OF IA5String OPTIONAL, + + -- the route id as series number as defined in 108.1 data + seriesId INTEGER OPTIONAL, + + -- route id of the route code list defined by the carrier on that route + routeId INTEGER OPTIONAL + ,... + } + + + PolygoneType ::= SEQUENCE { + firstEdge GeoCoordinateType, + edges SEQUENCE OF DeltaCoordinates + } + + + -- ########################################################################################### + -- TokenType provides an additional identifier + -- known use cases + -- - identified of the mobile phone for tickets linked with a specific phone (e.g. VDV standard) + -- ########################################################################################### + TokenType ::= SEQUENCE { + -- provider of the token + tokenProviderNum INTEGER OPTIONAL, + tokenProviderIA5 IA5String OPTIONAL, + + -- in case the provider has multiple tokens + tokenSpecification IA5String OPTIONAL, + token OCTET STRING + } + + -- ########################################################################################### + -- TicketLinkType is used to define a link from the ticket in the bar code to another ticket + -- (requirement from Eurail) + -- use cases + -- - DB Alleo (open ticket + reservation) + -- - reservation of trailer and car carriage and traveller reservation + -- - link between open ticket and bicycle reservations or pass + -- - open ticket and vouchers for meals + -- ########################################################################################### + TicketLinkType ::= SEQUENCE { + + -- data to reference the external ticket + -- reference must be given in numeric or alphanumeric format + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + issuerName UTF8String OPTIONAL, -- name of the issuer + + issuerPNR IA5String OPTIONAL, -- in case the ticket can also be identified via + -- the issuer PNR + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- type of linked ticket + ticketType TicketType DEFAULT openTicket, + + -- type of link + linkMode LinkMode DEFAULT issuedTogether + ,... + } + + -- ############################################################################################ + -- code table used fort station codes + -- defines the code table used e.g. to define station code + -- - stationUIC = station codes as used in UIC leaflet 108.1 for open tickets + -- - stationUICReservation = station codes as used in Reservation leaflets 918.1 and 108.2 + -- ############################################################################################ + + CodeTableType ::= ENUMERATED { + -- standard UIC station code from MERITS (UIC country code + 5 digit local code) + stationUIC (0), + -- standard UIC station code for reservation + stationUICReservation (1), + -- future standard ERA station code + stationERA (2), + -- local carrier code list + -- e.g. in case of stations / stops of non-railways stops (city trafic) + localCarrierStationCodeTable (3), + + -- non standard code to be used within the issuer eco system only + -- not applicable for multi carrier travel documents + -- or in case issuer and carrier are different + proprietaryIssuerStationCodeTable (4) + + } + + + ServiceType ::= ENUMERATED { + seat (0), + couchette (1), + berth (2), + carcarriage (3) + } + + + PassengerType ::= ENUMERATED { + adult (0), + senior (1), + child (2), + youth (3), + dog (4), + bicycle (5), + freeAddonPassenger (6), + freeAddonChild (7) + ,... + } + + TicketType ::= ENUMERATED { + openTicket (0), + pass (1), + reservation (2), + carCarriageReservation (3) + ,... + } + + LinkMode ::= ENUMERATED { + issuedTogether (0), + onlyValidInCombination (1) + ,... + } + + + -- #################################################################################### + -- place data corresponding to leaflet 918.1 + -- placeString = place number ranges in case of groups + -- #################################################################################### + PlacesType ::= SEQUENCE { + coach IA5String OPTIONAL, + + -- printable place string ("15-18, 21, 22" ) + placeString IA5String OPTIONAL, + + -- printable place description + placeDescription UTF8String OPTIONAL, + + -- individual places + placeIA5 SEQUENCE OF IA5String OPTIONAL, + placeNum SEQUENCE OF INTEGER (1..254) OPTIONAL + } + + PriceTypeType ::= ENUMERATED { + noPrice (0), + reservationFee (1), + supplement (2), + travelPrice (3) + } + + BerthTypeType ::= ENUMERATED { + single (0), + special (1), + double (2), + t2 (3), + t3 (4), + t4 (5) + } + + CompartmentGenderType ::= ENUMERATED { + unspecified (0), + family (1), + female (2), + male (3), + mixed (4) + ,... + } + + GenderType ::= ENUMERATED { + unspecified (0), + female (1), + male (2), + other (3) + ,... + } + + TravelClassType ::= ENUMERATED { + notApplicable (0), + first (1), + second (2), + tourist (3), + comfort (4), + premium (5), + business (6), + all (7) + ,... + } + + -- ######################################################################################## + -- sleeper compartment types corresponding to leaflet 918.1 + -- ######################################################################################## + BerthDetailData ::= SEQUENCE { + berthType BerthTypeType, + numberOfBerths INTEGER (1..999), + gender CompartmentGenderType DEFAULT family + ,... + } + + -- #################################################################################### + -- compartment details corresponding to leaflet 918.1 + -- #################################################################################### + CompartmentDetailsType ::= SEQUENCE { + coachType INTEGER (1..99) OPTIONAL, + compartmentType INTEGER (1..99) OPTIONAL, + specialAllocation INTEGER (1..99) OPTIONAL, + coachTypeDescr UTF8String OPTIONAL, + compartmentTypeDescr UTF8String OPTIONAL, + specialAllocationDescr UTF8String OPTIONAL, + position CompartmentPositionType DEFAULT unspecified + ,... + } + + + -- ##################################################################################### + -- luggage restrictions + -- the basis for these data is week: + -- SCIC mentions a maximum of three pieces of hand luggage but does not includes + -- a definition of hand luggaage + -- SCIC referes to special conditions on registered lluggage, but SCIC NRT does + -- not contain definitions on that and UIC 108.1 does not + -- contain data structures for luggage + -- - current THALYS luggage resrictions + -- ##################################################################################### + LuggageRestrictionType ::= SEQUENCE { + -- allowed hand luggage pieces on this ticket (3 = default in current NRT tariff) + maxHandLuggagePieces INTEGER(0..99) DEFAULT 3, + -- allowed hand luggage pieces on this ticket (3 = default in current NRT tariff) + maxNonHandLuggagePieces INTEGER(0..99) DEFAULT 1, + registeredLuggage SEQUENCE OF RegisteredLuggageType OPTIONAL + ,... + + } + + RegisteredLuggageType ::= SEQUENCE { + -- id of the additional registered luggage + registrationId IA5String OPTIONAL, + -- maximum weight in kg + maxWeight INTEGER (1..99) OPTIONAL, + -- sum of length with and height in cm + maxSize INTEGER (1..300) OPTIONAL + ,... + + } + + -- ########################################################################################## + -- generic type for geo coordinates + -- ########################################################################################## + GeoCoordinateType ::= SEQUENCE { + geoUnit GeoUnitType DEFAULT milliDegree, + coordinateSystem GeoCoordinateSystemType DEFAULT wgs84, + -- separate hemishpere flag reduces the data size + hemisphereLongitude HemisphereLongitudeType DEFAULT north, + -- separate hemishpere flag reduces the data size + hemisphereLatitude HemisphereLatitudeType DEFAULT east, + longitude INTEGER, + latitude INTEGER, + accuracy GeoUnitType OPTIONAL + } + + DeltaCoordinates ::= SEQUENCE { + -- logitude difference to a reference point + longitude INTEGER, + -- latitude difference to a reference point + latitude INTEGER + } + + GeoCoordinateSystemType ::= ENUMERATED { + wgs84 (0), -- WGS 84 standard system + grs80 (1) -- (outdated) GRS 80 coordinate system + } + + GeoUnitType ::= ENUMERATED { + microDegree (0), -- approx. 11 cm on earth surface + tenthmilliDegree (1), -- 1 / 100000 degree is approx. 1.1 meter on earth surface + milliDegree (2), -- approx 110 meter on earth surface + centiDegree (3), + deciDegree (4) + } + + HemisphereLongitudeType ::= ENUMERATED { + north (0), + south (1) + } + + HemisphereLatitudeType ::= ENUMERATED { + east (0), + west (1) + } + + LoadingDeckType ::= ENUMERATED { + unspecified (0), + upper (1), + lower (2) + } + + CompartmentPositionType ::= ENUMERATED { + unspecified (0), + upperLevel (1), + lowerLevel (2) + } + + RoofRackType ::= ENUMERATED { + norack (0), + roofRailing (1), + luggageRack (2), + skiRack (3), + boxRack (4), + rackWithOneBox (5), + rackWithTwoBoxes (6), + bicycleRack (7), + otherRack (8) + ,... + } + +END \ No newline at end of file diff --git a/src/org/uic/ticket/api/spec/uicBarcodeV1finalDelayConfirmation2.0.asn b/src/org/uic/ticket/api/spec/uicBarcodeV1finalDelayConfirmation2.0.asn new file mode 100644 index 0000000..e508798 --- /dev/null +++ b/src/org/uic/ticket/api/spec/uicBarcodeV1finalDelayConfirmation2.0.asn @@ -0,0 +1,2047 @@ +-- Creator: ASN.1 Editor (http://asneditor.sourceforge.net) +-- Author: ClemensGantert +-- Created: Tue Aug 11 11:40:28 CEST 2015 +ASN-Module DEFINITIONS AUTOMATIC TAGS ::= BEGIN + +-- imports and exports +-- EXPORTS ALL; + + +-- ############################################################################################## +-- # +-- # Final version 1.5 - value 1 in the UIC bar code version element +-- # (see element 2 in U_FLEX record definition in leaflet 918.9) +-- # changes +-- # - date of birth ..366 (no change of format) +-- # - date of arrival starting from -1 breaking change: displayed date from before change will nbe 1 day more +-- # +-- ############################################################################################## + + +-- ############################################################################################## +-- # +-- # Naming and encoding conventions +-- # +-- # Elements included as String and as Numeric values: +-- # Some elements are included in different formats to reduce the data size. +-- # These elements must be included only once. +-- # These elements are named with the same name and appendix +-- # Num (numeric values) +-- # IA5 (String values according to ASN IA5String (7Bit)) +-- # Example: +-- # trainNum - in case of a numeric train number +-- # trainIA5 - in case of a alphanumeric train Id +-- # +-- # +-- # RICS codes must be used to encode companies (issuer, product owner, ...) where available +-- # other codes are possible based on bilateral agreements +-- # the format is kept more flexible to cover upcoming extensions of the RICS code by ERA +-- # +-- # Stations can be coded using the UIC and upcoming ERA code lists. Proprietary codes are +-- # possible based on bilateral agreements. Format: 1..9999999 or alphanumeric without +-- # special character (IA5String) +-- # +-- # +-- # ! INTEGERS must not exceed the value of 9,223,372,036,854,775,807 (64 bit) even in case +-- # ! they are unrestricted!!! +-- # ! +-- # ! Some elements like ReferenceNum or cardIdNum are defined as an unrestricted integer. +-- # ! Unlike other numerical values the cardIdNum and referenceNum can be larger than a usual 32 bit Integer +-- # ! Some ASN.1 implementation tools are limited to 32 bit integers which is too small. +-- # ! Please ensure to use a tool capable of dealing with larger numbers. +-- # +-- # BOOLEAN is always non optional +-- # +-- # Encoding of time: +-- # time is encoded as the number of minutes of the day 0 = 00:00, 1440 = 24:00, +-- # time data elements end with "time" in their name +-- # +-- # Encoding of date: +-- # ......................................................................................................... +-- # The issuing date is given in UTC, but some other date values are given in local time where the exact time zone is not known. +-- # +-- # For local dates the date is associated with the corresponding location: +-- # e.g.: +-- # valid from date -> location where the journey starts +-- # valid until date -> location where the journey covered by the ticket ends +-- # +-- # there could be rare cases where this is does not rovide a unique interpretation: +-- # e.g. open ticket or pass without start and end location for a collection of zones or countries with different time zones. +-- # in these cases the fare conditions must clarify the rules for these cases (e.g. by allowing to use the +-- # ticket a few hours after the end of validity). +-- # +-- # If these date values are given as the number of days from the issuing date the following rule applies: +-- # +-- # The difference in days is calculated by ignoring the time zone information in the case no time zone offset is provided. +-- # +-- # example 1: (31.12.2017 23:05 UTC == 01.01.2018 00:05 CET) : +-- # issuing date (UTC): 31.12.2017 23:05 +-- # local date (CET): 01.01.2018 00:05 +-- # -> difference in days = 1 +-- # +-- # example 1: (1.1.2018 22:05 UTC == 01.01.2018 23:05 CET) : +-- # issuing date (UTC): 31.12.2017 22:05 +-- # local date (CET): 01.01.2018 23:05 +-- # -> difference in days = 0 +-- # +-- # the day difference could become -1 although this can happen for localtions in America or New Zeeland only. +-- # +-- # implementation example: +-- # +-- # public static Long getDateDifference(Date issuingDate, Date localDate) { +-- # +-- # if (issuingDate == null || localDate == null) return null; +-- # +-- # Calendar issuingCal = Calendar.getInstance(); +-- # issuingCal.clear(); +-- # issuingCal.setTime(issuingDate); +-- # issuingCal.setTimeZone(TimeZone.getTimeZone("UTC")); +-- # issuingCal.set(Calendar.HOUR_OF_DAY, 0); +-- # issuingCal.set(Calendar.MINUTE, 0); +-- # issuingCal.set(Calendar.SECOND, 0); +-- # issuingCal.set(Calendar.MILLISECOND, 0); +-- # +-- # Calendar fromCal = Calendar.getInstance(); +-- # fromCal.clear(); +-- # fromCal.setTime(localDate); +-- # fromCal.setTimeZone(TimeZone.getTimeZone("UTC")); +-- # fromCal.set(Calendar.HOUR_OF_DAY, 0); +-- # fromCal.set(Calendar.MINUTE, 0); +-- # fromCal.set(Calendar.SECOND, 0); +-- # fromCal.set(Calendar.MILLISECOND, 0); +-- # +-- # long diff = localDate.getTime() - issuingDate.getTime(); +-- # long dayDiff = TimeUnit.DAYS.convert(diff, TimeUnit.MILLISECONDS); +-- # +-- # return new Long(dayDiff); +-- # +-- # } +-- # +-- # public static Date getLocalDateFromDifference(Date issuingDate, int diff , Long time ) { +-- # +-- # if (issuingDate == null) return null; +-- # +-- # Calendar cal = Calendar.getInstance(); +-- # cal.clear(); +-- # cal.setTime(issuingDate); +-- # cal.add(Calendar.DAY_OF_YEAR, diff); +-- # +-- # if (time != null) { +-- # int hours = time.intValue() / 60; +-- # int minutes = time.intValue() - hours * 60; +-- # cal.set(Calendar.HOUR_OF_DAY, hours); +-- # cal.set(Calendar.MINUTE,minutes); +-- # } +-- # +-- # return cal.getTime(); +-- # +-- # } +-- # +-- # +-- # ASN.1 Extensions: +-- # +-- # The specification makes use of extension (",..."). +-- # These extesions might be defined in future versions of the UIC specification +-- # Implementations must support the extension feature of ASN.1, at least they must be able to ignore extensions while decoding the data +-- # ASN.1 extensions will be defined by UIC. It is not allowed to define bilateral extensions. +-- # +-- # Bilateral Extensions: +-- # Bilateral extensions can be included in the data element "ExtensionData". +-- # +-- # +-- # +-- ######################################################################################### + + +-- ############################################################################################ + + +-- type assignments + + -- ######################################################################################### + -- the basic entry point of the data structure + -- the data include: + -- -issuer informations + -- -the details of the transport document + -- -informations required for the control process + -- -informations on the travelers independent from the transport document + -- -proprietary extensions + -- + -- ########################################################################################## + UicRailTicketData ::= SEQUENCE { + -- data specific to the issuer + issuingDetail IssuingData, + + -- data on the travelers + travelerDetail TravelerData OPTIONAL, + + -- data of the transport document + -- more than one document to be used on bilateral agreement only + transportDocument SEQUENCE OF DocumentData OPTIONAL, + + -- data specific to support the ticket control process + controlDetail ControlData OPTIONAL, + + -- proprietary data defined bilaterally + extension SEQUENCE OF ExtensionData OPTIONAL + ,... + } + + + + -- ########################################################################################### + -- the choice on the different transport documents that can be included in the bar code data: + -- - reservation of seat / couchette or berths (IRT, RES, BOA) + -- - reservation of car carriage (VET) + -- - open ticket (NRT including NRT group ticket) (NRT, GRT, SUP, UPD, COI) + -- - Rail passes (including Eurail, Interail and local passes) (RPT) + -- - Voucher (TRV) + -- - Customer Cards (including bonus cards and reduction cards) + -- - counter marks issued for group tickets + -- - parking ground tickets + -- - FIP tickets + -- - station access / station passage tickets + -- - proprietary documents as an extension + -- ############################################################################################ + DocumentData ::= SEQUENCE { + + -- token + -- specific id to be exchanged with the ticket (e.g. id of the phone in case of tickets linked to a phone) + token TokenType OPTIONAL, + + -- choice of the ticket + ticket CHOICE + { + + -- Reservation (without car carriage) (IRT and RES) + reservation ReservationData, + + -- Reservation of car carriage + carCarriageReservation CarCarriageReservationData, + + -- open ticket specification (NRT) + openTicket OpenTicketData, + + -- pass specification (RPT) including Eurail and Interrail + pass PassData, + + -- voucher + voucher VoucherData, + + -- customer card either to identify a customer and / or to provide reductions + customerCard CustomerCardData, + + -- countermark to accompagny a group ticket + counterMark CountermarkData, + + -- car parking slot + parkingGround ParkingGroundData, + + -- FIP duty ticket + fipTicket FIPTicketData, + + -- ticket to pass the gates at a station + stationPassage StationPassageData, + + -- proprietary data defined bilaterally + extension ExtensionData, + + -- delay confirmation + delayConfirmation DelayConfirmation + + ,... + } + ,... + } + + -- ######################################################################################## + -- confirmation of the delay of a train + -- + -- ######################################################################################## + DelayConfirmation ::= SEQUENCE { + + -- reference of the delay confirmation + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- train number of the delayed train - numeric or alphanumeric + trainNum INTEGER OPTIONAL, + trainIA5 IA5String OPTIONAL, + + -- departure date of the delayed train in local time + -- number of year + departureYear INTEGER (2016..2269) OPTIONAL, + -- number of the day in the year (1.1. = 1) + departureDay INTEGER (1..366) OPTIONAL, + departureTime INTEGER (0..1440) OPTIONAL, + departureUTCOffset INTEGER (-60..60) OPTIONAL, -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + + + -- station where the delay became relevant + stationCodeTable CodeTableType DEFAULT stationUIC, + stationNum INTEGER (1..9999999) OPTIONAL, + stationIA5 IA5String OPTIONAL, + + -- delay in minutes at the mentioned station + delay INTEGER (1..999), + + -- indication that the train was cancelled + trainCancelled BOOLEAN, + + -- type of confirmation provided + confirmationType ConfirmationType DEFAULT travelerDelayConfirmation, + + -- affected original ticket(s) + affectedTickets SEQUENCE OF TicketLinkType OPTIONAL, + + -- info text + infoText UTF8String OPTIONAL, + + -- proprietary data defined bilaterally + extension ExtensionData OPTIONAL + ,... + } + + ConfirmationType ::= ENUMERATED { + trainDelayConfirmation (0), -- confirmation of train delay, whether the traveler was on board in unconfirmed + travelerDelayConfirmation (1), -- confirmation that the traveler was on board of the delayed train + trainLinkedTicketDelay (2) -- confirmation that a ticket linked to the delayed train was issued + ,... + } + + + -- ######################################################################################## + -- Details of the issuer and the issue of the ticket + -- - details on the issuer + -- - indication of test tickets (specimen) + -- - payment details: method of payment, currency + -- - proprietary PNR of the issuer to be used to identify the sale within + -- the issuers ecosystem + -- - web link to display more information for the customer + -- - proprietary extension data + -- ######################################################################################## + IssuingData ::= SEQUENCE { + + -- provider of the signature (RICS code) + securityProviderNum INTEGER (1..32000) OPTIONAL, + securityProviderIA5 IA5String OPTIONAL, + + -- issuer of the transport document if the issuer is different from the security provider + -- (RICS code) + issuerNum INTEGER (1..32000) OPTIONAL, + issuerIA5 IA5String OPTIONAL, + + -- issuing time stamp in UTC + -- number of year + issuingYear INTEGER (2016..2269), + -- number of the day in the year (1.1. = 1) + issuingDay INTEGER (1..366), + -- The number of the minutes of issue might be used in case of account + -- based ticketing whith a delay of n minutes for the replication of central + -- booking data to the control devices (e.g. at SBB) + -- The time can be compared with the last synchronization time of + -- the control device + issuingTime INTEGER (0..1440) OPTIONAL, + + -- name of the issuer (E.g. short name mentioned in RICS code table) + issuerName UTF8String OPTIONAL, + + -- specimen indicates a test specimen not valid for travelling + specimen BOOLEAN, + + -- secure paper indicates that this barcode is issued with a secure paper ticket + -- to ensure the uniqueness of the ticket. This allows to use the same control + -- procedure as for e-tickets also for anonymous tickets + -- the double use of the ticket is in this case excluded by the secure paper + securePaperTicket BOOLEAN, + + -- indicates that the ticket is valid for traveling or still needs activation + activated BOOLEAN, + + -- currency of the price: ISO4217 currency codes + currency IA5String (SIZE(3)) DEFAULT "EUR", + + -- fraction of the prices included + currencyFract INTEGER (1..3) DEFAULT 2, + + -- PNR used by the issuer to identify the document + issuerPNR IA5String OPTIONAL, + + -- proprietary data defined bilaterally + extension ExtensionData OPTIONAL, + + -- location of sale in case of a sale on board of a train + -- numeric train number or aphanumeric id of the train where the ticket was sold + issuedOnTrainNum INTEGER OPTIONAL, + issuedOnTrainIA5 IA5String OPTIONAL, + -- line number + issuedOnLine INTEGER OPTIONAL, + + -- point oof sale + pointOfSale GeoCoordinateType OPTIONAL + ,... + } + + -- ################################################################################### + -- data supporting the control process + -- - list of items which the travelder can use to identify himself or the unique + -- usage of the ticket + -- (card ids, parts or identity card numbers, credit card numbers,..) + -- - hints on the validation to be made on board + -- + -- ################################################################################### + ControlData ::= SEQUENCE { + + -- cards that can be used to identify the ticket holder + identificationByCardReference SEQUENCE OF CardReferenceType OPTIONAL, + + -- idcard id must be checked to identify the traveler + identificationByIdCard BOOLEAN, + + -- passport id must be checked to identify the traveler + identificationByPassportId BOOLEAN, + + -- other items which could be used to identify the ticket holder + -- (for future use, code list to be defined) + identificationItem INTEGER OPTIONAL, + + -- validation of the passport is required (e.g. in case of Eurail) + passportValidationRequired BOOLEAN, + + -- online validation of the ticket required + onlineValidationRequired BOOLEAN, + + -- percentage of the tickets to be validated in more detail + -- (i.e. via online check or detailed checks lateron) + randomDetailedValidationRequired INTEGER (0..99) OPTIONAL, + + -- manual validation of the traveler age required (in case of reductions) + ageCheckRequired BOOLEAN, + + -- manual validation of the travelers reduction card required (in case of reductions) + reductionCardCheckRequired BOOLEAN, + + -- controler info text + infoText UTF8String OPTIONAL, + + -- additional tickets that should be controlled + includedTickets SEQUENCE OF TicketLinkType OPTIONAL, + + -- proprietary data defined bilaterally + extension ExtensionData OPTIONAL + ,... + } + + -- ################################################################################ + -- Traveler data + -- these data do not include tariff details of the booked tariffs, + -- tariff data are included in the transport document details and might + -- have a reference to the traveler defined here. + -- - personal data of the travellers + -- - the index of the list can be used to identify the + -- traveler within other contexts (e.g. in assigned tariffs) + -- ################################################################################ + TravelerData ::= SEQUENCE { + -- traveler list + traveler SEQUENCE OF TravelerType OPTIONAL, + + -- ISO 639-1 coding of the language preferred for the traveler / ticket holder + preferredLanguage IA5String (SIZE(2)) OPTIONAL, + + -- name of the group in case of a group ticket + groupName UTF8String OPTIONAL + ,... + } + + -- #################################################################################### + -- the following part contains the different transport document specifications + -- #################################################################################### + + + -- #################################################################################### + -- reservations of seats , couchettes and berths + -- included are the data defined in: + -- - leaflet 918.1 for reservation data exchange + -- - a few additional data currently used by some railways via different interfaces + -- - information on trach an dplafoorm where the coach stops + -- - additional second coach for large groups + -- #################################################################################### + ReservationData ::= SEQUENCE { + + -- train number - numeric or alphanumeric + trainNum INTEGER OPTIONAL, + trainIA5 IA5String OPTIONAL, + + -- departure date in local time + -- number of the days calculated from the issuing date + departureDate INTEGER (-1..370) DEFAULT 0, + + + -- reservation reference according ton 918.1 in case ade via Hermes + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code to be used as standard) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- service brand: code list https://uic.org/service-brand-code-list + serviceBrand INTEGER (0..32000) OPTIONAL, + serviceBrandAbrUTF8 UTF8String OPTIONAL, + serviceBrandNameUTF8 UTF8String OPTIONAL, + + -- service code list from 918.1 (seat couchette,..) + service ServiceType DEFAULT seat, + + -- code table used to encode stations + stationCodeTable CodeTableType DEFAULT stationUICReservation, + + -- origin station code + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, + + -- destination station code + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, + + -- origin station name + fromStationNameUTF8 UTF8String OPTIONAL, + + -- destination station name + toStationNameUTF8 UTF8String OPTIONAL, + + -- departure time + departureTime INTEGER (0..1440), + departureUTCOffset INTEGER (-60..60) OPTIONAL, -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + + -- arrival date and time in local time + -- number of days counted from the departure date + arrivalDate INTEGER (-1..20) DEFAULT 0, + arrivalTime INTEGER (0..1440) OPTIONAL, + arrivalUTCOffset INTEGER (-60..60) OPTIONAL, -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + -- should be omitted in case it is the same as for depature + + -- responsible carriers on the route + carrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carrierIA5 SEQUENCE OF IA5String OPTIONAL, + + -- travel class + classCode TravelClassType DEFAULT second, + + -- service level code list from 918.1 + serviceLevel IA5String (SIZE(1..2)) OPTIONAL, + + -- places + places PlacesType OPTIONAL, + + -- additional places in a second coach + additionalPlaces PlacesType OPTIONAL, + + --bicycle places + bicyclePlaces PlacesType OPTIONAL, + + -- compartment details (open space, wheelchair,..) + compartmentDetails CompartmentDetailsType OPTIONAL, + + -- number of persons on the ticket without place numbers (on IRT) + numberOfOverbooked INTEGER (0..200) DEFAULT 0, + + -- description of berths + berth SEQUENCE OF BerthDetailData OPTIONAL, + + -- tariffs included (Adult, Children,... ) + tariff SEQUENCE OF TariffType OPTIONAL, + + -- type of the price (supplement,... ) + priceType PriceTypeType DEFAULT travelPrice, + + price INTEGER OPTIONAL, + + vatDetail SEQUENCE OF VatDetailType OPTIONAL, + + -- type of supplement - code list from 018.1 + typeOfSupplement INTEGER (0..9) DEFAULT 0, + + numberOfSupplements INTEGER (0..200) DEFAULT 0, + + -- luggage restrictions and registered luggage + -- in case the luggage restrictions are general and do not depend on the + -- ticket type they should not be included + luggage LuggageRestrictionType OPTIONAL, + + infoText UTF8String OPTIONAL, + + + -- bilaterally agreed proprietary extension + extension ExtensionData OPTIONAL + ,... + } + + -- ################################################################################# + -- details on the VAT included to be used in after sale processes + -- ################################################################################# + VatDetailType ::= SEQUENCE { + + -- ISO 3166 numeric country code + country INTEGER (1..999), + + -- 1/10th of a percent + percentage INTEGER (0..999), + + -- amount of VAT, the currency and the currency fraction is included in the issuing data + amount INTEGER OPTIONAL, + + -- european tax id of the company paying VAT + vatId IA5String OPTIONAL + + } + + + -- ################################################################################# + -- reservations of car carriage + -- included are the data defined in: + -- - leaflet 918.1 for reservation data exchange + -- - a few additional data currently used by some railways via different interfaces + -- ################################################################################# + CarCarriageReservationData ::= SEQUENCE { + + trainNum INTEGER OPTIONAL, + trainIA5 IA5String OPTIONAL, + + + -- loading / unloading of the car in local date and time + -- number of the days calculated from the issuing date + beginLoadingDate INTEGER (-1..370) DEFAULT 0, + beginLoadingTime INTEGER (0..1440) OPTIONAL, + endLoadingTime INTEGER (0..1440) OPTIONAL, + loadingUTCOffset INTEGER (-60..60) OPTIONAL, -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + + + -- reservation reference according on 918.1 in case ade via Hermes + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- service brand: code list https://uic.org/service-brand-code-list + serviceBrand INTEGER (1..32000) OPTIONAL, + serviceBrandAbrUTF8 UTF8String OPTIONAL, + serviceBrandNameUTF8 UTF8String OPTIONAL, + + stationCodeTable CodeTableType DEFAULT stationUICReservation, + + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, + + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, + + fromStationNameUTF8 UTF8String OPTIONAL, + toStationNameUTF8 UTF8String OPTIONAL, + + coach IA5String OPTIONAL, + place IA5String OPTIONAL, + + compartmentDetails CompartmentDetailsType OPTIONAL, + + -- description of the car + numberPlate IA5String, + trailerPlate IA5String OPTIONAL, + carCategory INTEGER (0..9), + boatCategory INTEGER (0..6) OPTIONAL, + textileRoof BOOLEAN, + roofRackType RoofRackType DEFAULT norack, + + -- heigth of a roof rack in cm + roofRackHeight INTEGER (0..99) OPTIONAL, + + -- number of boats on a rack + attachedBoats INTEGER (0..2) OPTIONAL, + + -- number of biycles on a rack + attachedBicycles INTEGER (0..4) OPTIONAL, + + -- number of surf boards on a rack + attachedSurfboards INTEGER (0..5) OPTIONAL, + + -- reference to an entry on the loading list + loadingListEntry INTEGER (0..999) OPTIONAL, + loadingDeck LoadingDeckType DEFAULT upper, + + -- responsible carriers on the route (RICS codes) + carrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carrierIA5 SEQUENCE OF IA5String OPTIONAL, + + tariff TariffType, + priceType PriceTypeType DEFAULT travelPrice, + + price INTEGER OPTIONAL, + + vatDetail SEQUENCE OF VatDetailType OPTIONAL, + + infoText UTF8String OPTIONAL, + extension ExtensionData OPTIONAL + ,... + } + + + -- ##################################################################################### + -- data for open tickets (NRT and group tickets) + -- included are the data defined in: + -- - the ticket layout (leaflet 918.2) + -- - the ticket bar code version 3 (leaflet 918.2) + -- - additional data based on 108.1 with some extensions as 108.1 + -- does not provide well structured data, + -- especially concerning regional validity + -- + -- ##################################################################################### + + OpenTicketData ::= SEQUENCE { + + -- reference must be given either in numeric or alphanumeric format + referenceNum INTEGER OPTIONAL, + referenceIA5 IA5String OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- to support other ticket content (e.g. VDV, UTPF, VÖV, CALYPSO) + -- issuer code using the default code table of the product owner + extIssuerId INTEGER OPTIONAL, + -- authorization id provided to the issuer by the product owner + issuerAutorizationId INTEGER OPTIONAL, + + -- ticket includes the return trip + returnIncluded BOOLEAN, + + stationCodeTable CodeTableType DEFAULT stationUIC, + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, + + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, + + fromStationNameUTF8 UTF8String OPTIONAL, + toStationNameUTF8 UTF8String OPTIONAL, + + -- description for manual evaluation in case structured data are not available + validRegionDesc UTF8String OPTIONAL, + -- specification of the ordered sequence of valid regions + validRegion SEQUENCE OF RegionalValidityType OPTIONAL, + + -- return route description + -- the return route description can be omitted if it is identical to the + -- inversed outbound validRegion sequence + returnDescription ReturnRouteDescriptionType OPTIONAL, + + -- temporal validity data in local time of the location where the jouney starts + -- number of days from issuing date + validFromDay INTEGER (-1..700) DEFAULT 0, + validFromTime INTEGER (0..1440) OPTIONAL, + validFromUTCOffset INTEGER (-60..60) OPTIONAL, -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + + -- number of days from valid-from date, 0 = first day of validity + validUntilDay INTEGER (0..370) DEFAULT 0, + validUntilTime INTEGER (0..1440) OPTIONAL, + validUntilUTCOffset INTEGER (-60..60) OPTIONAL, -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + -- should be omtted in case it is the same as for depature + + -- list of activated days in case the entire ticket is not activated + -- the day is given by the number of days from the first day of validity + -- 1 = first day of validity + activatedDay SEQUENCE OF INTEGER (0..370) OPTIONAL, + + classCode TravelClassType DEFAULT second, + + -- servicelevel code according to leaflet 918.1 to encode other products + -- (e.g. PREMIUM, ...) + serviceLevel IA5String (SIZE(1..2)) OPTIONAL, + + -- carriers involved in the transport (RICS codes) + -- the indication of carriers is mandatory on international routes, + -- they can be listed here but can also be included in viaDetails + carrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carrierIA5 SEQUENCE OF IA5String OPTIONAL, + + + -- list of service brands for which the ticket is valid + -- in case the included service brands are listed all other brands are excluded + -- service brand: code list https://uic.org/service-brand-code-list + includedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + + -- list of service brands for which the ticket is not valid + -- service brand: code list https://uic.org/service-brand-code-list + excludedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + + tariffs SEQUENCE OF TariffType OPTIONAL, + + price INTEGER OPTIONAL, + + vatDetail SEQUENCE OF VatDetailType OPTIONAL, + + infoText UTF8String OPTIONAL, + + -- additional included open tickets + -- e.g. to include local city traffic on parts of a the route + includedAddOns SEQUENCE OF IncludedOpenTicketType OPTIONAL, + + -- in case the luggage restrictions are general and do not depend + -- on the ticket type they should not be included + luggage LuggageRestrictionType OPTIONAL, + + + + extension ExtensionData OPTIONAL + ,... + } + + + + -- #################################################################################### + -- data for passes + -- included are the data defined in: + -- - the ticket layout (leaflet 918.2) + -- - the ticket bar code version 3 (leaflet 918.2) + -- #################################################################################### + PassData ::= SEQUENCE { + + -- reference must be given in numeric or alphanumeric format + referenceNum INTEGER OPTIONAL, + referenceIA5 IA5String OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- type of the pass, code list provided by the product owner + -- in case of Eurail: + -- 1 = Interrail + -- 2 = Eurail + -- 3 = Eurail Global (all countries) + passType INTEGER (1..250) OPTIONAL, + + -- literal name of the pass + passDescription UTF8String OPTIONAL, + + classCode TravelClassType DEFAULT second, + + -- begin of validity (local time) + -- number of days from issuing date + validFromDay INTEGER (-1..700) DEFAULT 0, + validFromTime INTEGER (0..1440) OPTIONAL, + validFromUTCOffset INTEGER (-60..60) OPTIONAL, -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + + -- end of validity (local time) + -- number of days from valid from day, 0 = valid on valid-from-date + validUntilDay INTEGER (0..370) DEFAULT 0, + validUntilTime INTEGER (0..1440) OPTIONAL, + validUntilUTCOffset INTEGER (-60..60) OPTIONAL, -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + -- should be omtted in case it is the same as for depature + + + + -- additional validity periods and excluded time ranges + validityPeriodDetails ValidityPeriodDetailType OPTIONAL, + + -- max number of days of validity in case the valid from day is open + numberOfValidityDays INTEGER (0..370) OPTIONAL, + + -- max number of possible trips to be activated + numberOfPossibleTrips INTEGER (1..250) OPTIONAL, + numberOfDaysOfTravel INTEGER (1..250) OPTIONAL, + + -- list of activated days in case the entire ticket is not activated + -- the day is given by the number of days from the first day of validity + -- 0 = first day of validity + activatedDay SEQUENCE OF INTEGER (0..370) OPTIONAL, + + -- included countries, code table according to UIC leaflet 918.2 + countries SEQUENCE OF INTEGER (1..250) OPTIONAL, + + -- included carriers (RICS codes) + includedCarrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + includedCarrierIA5 SEQUENCE OF IA5String OPTIONAL, + + -- excluded carriers (RICS codes) + excludedCarrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + excludedCarrierIA5 SEQUENCE OF IA5String OPTIONAL, + + -- service brand: code list https://uic.org/service-brand-code-list + includedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + excludedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + + -- region description to cover local zones + validRegion SEQUENCE OF RegionalValidityType OPTIONAL, + + tariffs SEQUENCE OF TariffType OPTIONAL, + + price INTEGER OPTIONAL, + + vatDetail SEQUENCE OF VatDetailType OPTIONAL, + + infoText UTF8String OPTIONAL, + extension ExtensionData OPTIONAL + ,... + } + + ValidityPeriodDetailType ::= SEQUENCE { + validityPeriod SEQUENCE OF ValidityPeriodType OPTIONAL, + excludedTimeRange SEQUENCE OF TimeRangeType OPTIONAL + } + + ValidityPeriodType ::= SEQUENCE { + -- number of days from issuing date (local date) + validFromDay INTEGER (-1..700) DEFAULT 0, + validFromTime INTEGER (0..1440) OPTIONAL, + validFromUTCOffset INTEGER (-60..60) OPTIONAL, -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + + -- number of days from valid from day, 0 = valid on valid from date + validUntilDay INTEGER (0..370) DEFAULT 0, + validUntilTime INTEGER (0..1440) OPTIONAL, + validUntilUTCOffset INTEGER (-60..60) OPTIONAL -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + -- should be omtted in case it is the same as for depature + + } + + TimeRangeType ::= SEQUENCE { + fromTime INTEGER (0..1440), + untilTime INTEGER (0..1440) + } + + -- ###################################################################################### + -- data for vouchers + -- included are quite basic further study is required + -- ###################################################################################### + VoucherData ::= SEQUENCE { + + -- reference must be given in numeric or alphanumeric format + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- begin of validity in UTC + -- number of year + validFromYear INTEGER (2016..2269), + -- number of the day in the year (1.1. = 1) + validFromDay INTEGER (0..370), + -- end of validity + -- number of year + validUntilYear INTEGER (2016..2269), + -- number of the day in the year (1.1. = 1) + validUntilDay INTEGER (0..370), + + value INTEGER DEFAULT 0, + + -- type of the voucher, code list defined by the product owner + type INTEGER (1..32000) OPTIONAL, + + infoText UTF8String OPTIONAL, + extension ExtensionData OPTIONAL + ,... + } + -- ################################################################################### + -- data for FIP tickets + -- included are data from the FIP ticket layout, + -- ################################################################################### + FIPTicketData ::= SEQUENCE { + + -- reference must be given in numeric or alphanumeric format + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- first day of validity in UTC + --- number of days from issuing date + validFromDay INTEGER (-1..700) DEFAULT 0, + -- last day of validity + -- number of days from valid from day, 0 = first day of validity + validUntilDay INTEGER (0..370) DEFAULT 0, + + -- activated days: list of days for which the ticket is valid + -- the day is given by the number of days from the first day of validity + -- 0 = first day of validity + activatedDay SEQUENCE OF INTEGER (0..370) OPTIONAL, + + -- included carriers + carrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carrierIA5 SEQUENCE OF IA5String OPTIONAL, + + -- number of travel days allowed + numberOfTravelDays INTEGER (1..200), + includesSupplements BOOLEAN, + + -- travel class + classCode TravelClassType DEFAULT second, + extension ExtensionData OPTIONAL + ,... + } + + -- ##################################################################################### + -- data station passage and access + -- ticket used to enter, exit or pass a station without travelling by train. + -- E.g. for staff working in a station. + -- ##################################################################################### + StationPassageData ::= SEQUENCE { + + -- reference must be given in numeric or alphanumeric format + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + productName UTF8String OPTIONAL, + + -- code table used to encode he stations + stationCodeTable CodeTableType DEFAULT stationUIC, + -- list of station where the passage is allowed + stationNum SEQUENCE OF INTEGER OPTIONAL, + stationIA5 SEQUENCE OF IA5String OPTIONAL, + -- station names + stationNameUTF8 SEQUENCE OF UTF8String OPTIONAL, + + -- list of areas in a station where the access is allowed + areaCodeNum SEQUENCE OF INTEGER OPTIONAL, + areaCodeIA5 SEQUENCE OF IA5String OPTIONAL, + -- area names + areaNameUTF8 SEQUENCE OF UTF8String OPTIONAL, + + -- begin of validity in local date and time + -- number of days from issuing date + validFromDay INTEGER (-1..700), + validFromTime INTEGER (0..1440) OPTIONAL, + validFromUTCOffset INTEGER (-60..60) OPTIONAL, -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + + -- end of validity + -- number of days from valid from day, 0 = first day of validity + validUntilDay INTEGER (0..370) DEFAULT 0, + validUntilTime INTEGER (0..1440) OPTIONAL, + validUntilUTCOffset INTEGER (-60..60) OPTIONAL, -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + -- should be omtted in case it is the same as for depature + + + -- number of days for station passage in case the number of days + -- is limited and less that the validity period + numberOfDaysValid INTEGER OPTIONAL, + + extension ExtensionData OPTIONAL + ,... + } + + -- ###################################################################################### + -- data for customer cards + -- included are data from: + -- - ÖBB requirements on card data + -- - DB Bahncard as HandyTicket + -- note: customer data are included in the traveler data structure + -- ###################################################################################### + CustomerCardData ::= SEQUENCE { + + -- customer details + -- optional, as there might be an anonymous cards + customer TravelerType OPTIONAL, + + -- card id might be numerical or alphanumerical + cardIdIA5 IA5String OPTIONAL, + cardIdNum INTEGER OPTIONAL, + + -- valid from date in UTC + -- number of year + validFromYear INTEGER (2016..2269), + --- number of the day in the year (1.1. = 1) + validFromDay INTEGER (0..370) OPTIONAL, + + --- number of year from valid from year onwards + validUntilYear INTEGER (0..250) DEFAULT 0, + --- number of the day in the year (1.1. = 1) + validUntilDay INTEGER (0..370) OPTIONAL, + + classCode TravelClassType OPTIONAL, + + -- code of the card type code list defined by the issuer + cardType INTEGER (1..1000) OPTIONAL, + + -- readable description of the card type + cardTypeDescr UTF8String OPTIONAL, + + -- customer status code + -- 1 = basic + -- 2 = premium + -- 3 = silver + -- 4 = gold + -- 5 = platinum + -- 6 = senator + -- > 50 - code table of the card issuer + customerStatus INTEGER OPTIONAL, + + -- readable customer status "e.g. gold", + customerStatusDescr IA5String OPTIONAL, + + -- list of included services, + -- 1 = Rail Plus + -- 2 = access to launch + -- > 50 code list of the issuer + includedServices SEQUENCE OF INTEGER OPTIONAL, + + extension ExtensionData OPTIONAL + ,... + } + + -- ###################################################################################### + -- data for customer cards + -- included are data from: + -- - DB parking ground reservation + -- ####################################################################################### + ParkingGroundData ::= SEQUENCE { + + -- booking reference + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + parkingGroundId IA5String, + + -- parking date in local date time + -- number of days from the issuing date + fromParkingDate INTEGER (-1..370), + -- number of days from the from parking date in case it is different from that date + untilParkingDate INTEGER (0..370) DEFAULT 0, + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- code needed to access the parking lot + accessCode IA5String OPTIONAL, + + location UTF8String, + + stationCodeTable CodeTableType DEFAULT stationUIC, + -- in case the parking ground is associated with a station + stationNum INTEGER OPTIONAL, + stationIA5 UTF8String OPTIONAL, + + specialInformation UTF8String OPTIONAL, + entryTrack UTF8String OPTIONAL, + numberPlate IA5String OPTIONAL, + + price INTEGER OPTIONAL, + vatDetail SEQUENCE OF VatDetailType OPTIONAL, + + + extension ExtensionData OPTIONAL + ,... + } + + -- ####################################################################### + -- data for countermarks issued with group tickets + -- included are data from: + -- - version 3 bar code (leaflet 918.2) + -- - printed layout (leaflet 918.2) + -- ######################################################################## + CountermarkData ::= SEQUENCE { + + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- reference of the group ticket + ticketReferenceIA5 IA5String OPTIONAL, + ticketReferenceNum INTEGER OPTIONAL, + + -- sequential number of the countermark + numberOfCountermark INTEGER (1..200), + -- total number of countermarks + totalOfCountermarks INTEGER (1..200), + -- name of the group + groupName UTF8String, + + + stationCodeTable CodeTableType DEFAULT stationUIC, + + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, + + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, + + fromStationNameUTF8 UTF8String OPTIONAL, + toStationNameUTF8 UTF8String OPTIONAL, + + -- description for manual evaluation in case structured data are not available + validRegionDesc UTF8String OPTIONAL, + -- specification of the ordered sequence of valid regions + validRegion SEQUENCE OF RegionalValidityType OPTIONAL, + + + -- ticket includes the return trip + returnIncluded BOOLEAN, + -- retrurn route description + -- can be omitted if it is identical to the inversed outbound validRegion sequence + returnDescription ReturnRouteDescriptionType OPTIONAL, + + -- local date + -- number of days from issuing date + validFromDay INTEGER (-1..700) DEFAULT 0, + validFromTime INTEGER (0..1440) OPTIONAL, + validFromUTCOffset INTEGER (-60..60) OPTIONAL, -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + + + + -- number of days from valid from day, 0 = first day of validity + validUntilDay INTEGER (0..370) DEFAULT 0, + validUntilTime INTEGER (0..1440) OPTIONAL, + validUntilUTCOffset INTEGER (-60..60) OPTIONAL, -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + -- should be omtted in case it is the same as for depature + + + classCode TravelClassType DEFAULT second, + + -- valid carriers + carrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carrierIA5 SEQUENCE OF IA5String OPTIONAL, + + -- service brands where the ticket is valid + -- in case this list is provided the ticket is invalid on all other service brands + -- service brand: code list https://uic.org/service-brand-code-list + includedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + + -- service brands where the ticket is not valid + -- in case this list is provided the ticket is valid on all other service brands + excludedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + + infoText UTF8String OPTIONAL, + + extension ExtensionData OPTIONAL + ,... + } + + + -- ########################################################################################### + -- generic non standard extension element + -- the generic non - standard element contains: + -- - an extension id to distinguish different extensions + -- - the extension data as binary data + -- proprietary extensions are by definition proprietary. This standard provides + -- the means to identify these extensions + -- within the data and to skip these data. + -- the evaluation of these data and the unique identification of the extensions + -- via the extension id is in the + -- responsibility of the railways which use these extensions. + -- ########################################################################################### + ExtensionData ::= SEQUENCE { + extensionId IA5String, + extensionData OCTET STRING + } + + -- ############################################################################################ + -- type definitions + -- ############################################################################################ + + -- ############################################################################################# + -- included open ticke for a part of the travel (e.g. local city trafic) + -- - data identically already included in the covering open ticket do not need to be + -- repeated here + -- - main source are the data required for included regional and city traffic tickets + -- ############################################################################################# + IncludedOpenTicketType ::= SEQUENCE { + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- product id to identify the issued product codelist defined by the product owner + productIdNum INTEGER (0..32000) OPTIONAL, + productIdIA5 IA5String OPTIONAL, + + -- issuer code using the default code table of the product owner (today used e.g. by VDV) + externalIssuerId INTEGER OPTIONAL, + -- authorization id provided to the issuer by the poroduct owner (today used e.g. by VDV) + issuerAutorizationId INTEGER OPTIONAL, + + -- regional validity data + stationCodeTable CodeTableType DEFAULT stationUIC, + -- specification of the ordered sequence of valid regions, ordered in the direction of travel + validRegion SEQUENCE OF RegionalValidityType OPTIONAL, + + -- temporal validity data in local date and time + -- number of days from issuing date + validFromDay INTEGER (-1..700) DEFAULT 0, + validFromTime INTEGER (0..1440) OPTIONAL, + validFromUTCOffset INTEGER (-60..60) OPTIONAL, -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + + + -- number of days from valid-from date, 0 = first day of validity + validUntilDay INTEGER (0..370) DEFAULT 0, + validUntilTime INTEGER (0..1440) OPTIONAL, + validUntilUTCOffset INTEGER (-60..60) OPTIONAL, -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + -- should be omtted in case it is the same as for depature + + + -- travel class to be given in case it differs from the class of the main ticket + classCode TravelClassType OPTIONAL, + -- servicelevel code according to leaflet 918.1 to encode other products (e.g. PREMIUM, ...) + -- to be provided in case it differs from the main ticket + serviceLevel IA5String (SIZE(1..2)) OPTIONAL, + + -- valid carriers (RICS codes) + carrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carrierIA5 SEQUENCE OF IA5String OPTIONAL, + + -- service brands where the ticket is valid + -- in case this list is provided the ticket is invalid on all other service brands + -- service brand: code list https://uic.org/service-brand-code-list + includedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + + -- service brands where the ticket is not valid + -- in case this list is provided the ticket is valid on all other service brands + excludedServiceBrands SEQUENCE OF INTEGER (1..32000) OPTIONAL, + + tariffs SEQUENCE OF TariffType OPTIONAL, + infoText UTF8String OPTIONAL, + extension ExtensionData OPTIONAL + ,... + } + + -- ###################################################################################### + -- tariff data for open tickets + -- information included are: + -- - number of passengers + -- - optionally a link to the traveler data + -- ####################################################################################### + TariffType ::= SEQUENCE { + + -- number of passengers using the tariff + numberOfPassengers INTEGER (1..200) DEFAULT 1, + + -- type indication youth, adult, senior,.. + passengerType PassengerType OPTIONAL, + + -- age restrictions of the tariff + ageBelow INTEGER (1..64) OPTIONAL, + ageAbove INTEGER (1..128) OPTIONAL, + + + -- named traveler list + -- link to the traveler in case the travelers have to be named (e.g. Eurail passes) + -- the number indicates the position in the traveler list starting from 1 + travelerid SEQUENCE OF INTEGER (0..254) OPTIONAL, + + -- restriction on country of residence + -- this tariff is restricted by the country of residence given in the traveler data + -- (e.g. Eurail tickets are not valid in the contry of residence) + restrictedToCountryOfResidence BOOLEAN, + + -- section in case the tariff applies to a part of the route only + restrictedToRouteSection RouteSectionType OPTIONAL, + + -- details on series according to lesaflet 108.1 + seriesDataDetails SeriesDetailType OPTIONAL, + + -- tariff code + tariffIdNum INTEGER OPTIONAL, + tariffIdIA5 IA5String OPTIONAL, + + -- tariff description + tariffDesc UTF8String OPTIONAL, + + -- reduction cards applied (incl. dicount cards, loaylty cards relevant for the tariff) + reductionCard SEQUENCE OF CardReferenceType OPTIONAL + ,... + } + + SeriesDetailType ::= SEQUENCE { + + -- data related to tariffs based on series according UIC leaflet 108.1 + -- supplying carrier according to UIC leaflet 108.1 (RICS code) + supplyingCarrier INTEGER (1..32000) OPTIONAL, + + -- offer identifier of the carrier according to UIC leaflet 108.1 + offerIdentification INTEGER (1..99) OPTIONAL, + + -- series of the carrier according to UIC leaflet 108.1 + series INTEGER OPTIONAL + } + + + RouteSectionType ::= SEQUENCE { + + stationCodeTable CodeTableType DEFAULT stationUIC, + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, -- IA5 or Num not both + + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, -- IA5 or Num not both + + fromStationNameUTF8 UTF8String OPTIONAL, + toStationNameUTF8 UTF8String OPTIONAL + } + + + -- ####################################################################################### + -- customer card reference + -- ####################################################################################### + CardReferenceType ::= SEQUENCE { + + -- issuer of the card + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + cardIssuerNum INTEGER (1..32000) OPTIONAL, + cardIssuerIA5 IA5String OPTIONAL, + + cardIdNum INTEGER OPTIONAL, + cardIdIA5 IA5String OPTIONAL, + + -- Name of the card e.g. "VISA-CARD" + cardName UTF8String OPTIONAL, + + -- type of the card, code list defined by the issuer + cardType INTEGER OPTIONAL, + + -- in case only the leading part of the card number is provided + leadingCardIdNum INTEGER OPTIONAL, + leadingCardIdIA5 IA5String OPTIONAL, + + + -- in case only the trailing part of the card number is provided + trailingCardIdNum INTEGER OPTIONAL, + trailingCardIdIA5 IA5String OPTIONAL + + ,... + } + + -- ####################################################################################### + -- traveler data + -- - traveler data might contain all traveler details which are independent + -- from the type of travel document + -- e.g. it can include the date of birth as this is part of the traveler + -- but not the indication "Senior" as this is tariff dependent + -- + -- ####################################################################################### + TravelerType ::= SEQUENCE { + + firstName UTF8String OPTIONAL, + secondName UTF8String OPTIONAL, + lastName UTF8String OPTIONAL, + idCard IA5String OPTIONAL, + passportId IA5String OPTIONAL, + title IA5String (SIZE(1..3)) OPTIONAL, + gender GenderType OPTIONAL, + + -- customer id might be numerical or alphanumerical + customerIdIA5 IA5String OPTIONAL, + customerIdNum INTEGER OPTIONAL, + + -- date of birth + -- number of year + yearOfBirth INTEGER (1901..2155) OPTIONAL, + -- number of the day in the year (1.1. = 1) + dayOfBirth INTEGER (0..366) OPTIONAL, + + -- indicates the ticket holder/group leader in case of groups + ticketHolder BOOLEAN, + + passengerType PassengerType OPTIONAL, + + -- travelers might be PRM or not or the status is unknown, therefore the information is optional + passengerWithReducedMobility BOOLEAN OPTIONAL, + + -- country of residence (numeric ISO country code) + -- to be used in case there product restrictions on the country of residence (e.g. Eurail passes) + countryOfResidence INTEGER (1..999) OPTIONAL, + + countryOfPassport INTEGER (1..999) OPTIONAL, + countryOfIdCard INTEGER (1..999) OPTIONAL, + + status SEQUENCE OF CustomerStatusType OPTIONAL + ,... + } + + CustomerStatusType ::= SEQUENCE { + + -- compagny providing the status, default is the issuer + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + statusProviderNum INTEGER (1..32000) OPTIONAL, + statusProviderIA5 IA5String OPTIONAL, + + -- customer status code + -- 1 = basic + -- 2 = premium + -- 3 = silver + -- 4 = gold + -- 5 = platinum + -- 6 = senator + -- > 50 - code table of the card issuer + customerStatus INTEGER OPTIONAL, + + -- customer status "gold" + customerStatusDescr IA5String OPTIONAL + } + + + ReturnRouteDescriptionType ::= SEQUENCE { + + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, + + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, + + fromStationNameUTF8 UTF8String OPTIONAL, + toStationNameUTF8 UTF8String OPTIONAL, + + -- description for manual evaluation in case structured data are not available + validReturnRegionDesc UTF8String OPTIONAL, + + -- specification of the ordered sequence of valid regions for the return trip + validReturnRegion SEQUENCE OF RegionalValidityType OPTIONAL + ,... + + } + + -- ###################################################################################### + -- regional validity of an open ticket + -- specification of the regional validity. + -- ###################################################################################### + + RegionalValidityType ::= CHOICE { + trainLink TrainLinkType, + viaStations ViaStationType, + zones ZoneType, + lines LineType, + polygone PolygoneType + ,... + } + + + + -- ####################################################################################### + -- train link data + -- includes a restriction of an open ticket valid only on a specific train + -- and date on a part of the route + -- ####################################################################################### + TrainLinkType ::= SEQUENCE { + + trainNum INTEGER OPTIONAL, + trainIA5 IA5String OPTIONAL, + + -- local date at the station where the train link starts + -- days from the issuing date onwards + travelDate INTEGER (-1..370), + departureTime INTEGER (0..1440), -- time in minutes + departureUTCOffset INTEGER (-60..60) OPTIONAL, -- offset in units of 15 minutes from local time to UTC + -- (UTC = local + offset * 15 Minutes) + + fromStationNum INTEGER (1..9999999) OPTIONAL, + fromStationIA5 IA5String OPTIONAL, + + toStationNum INTEGER (1..9999999) OPTIONAL, + toStationIA5 IA5String OPTIONAL, + + fromStationNameUTF8 UTF8String OPTIONAL, + toStationNameUTF8 UTF8String OPTIONAL + + } + + + + -- ###################################################################################### + -- regional validity using a set of lines + -- - based on data used in regional city trafic enviromnemnts + -- ###################################################################################### + LineType ::= SEQUENCE { + + -- local service provider / carrier within the zone + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + carrierNum INTEGER (1..32000) OPTIONAL, + carrierIA5 IA5String OPTIONAL, + + -- ids of the valid lines known by the local carriers in that zone + lineId SEQUENCE OF INTEGER OPTIONAL, + + stationCodeTable CodeTableType DEFAULT stationUIC, + + -- in case the zone must be entered via a specific station + -- (e.g. local city trafic at the end of a journey + -- starting from the main train station) + entryStationNum INTEGER (1..9999999) OPTIONAL, + entryStationIA5 IA5String OPTIONAL, + + -- in case the zone must be left via a specific station + -- (e.g. local city trafic at the beginning of a journey + -- terminating at the main train station) + terminatingStationNum INTEGER (1..9999999) OPTIONAL, + terminatingStationIA5 IA5String OPTIONAL, + + -- code of the local city in case the zone is part of regional city transport + -- code list of the local carrier + city INTEGER (1..9999999) OPTIONAL, + + -- binary encoding of zones, encoding specification provided by + -- the local service provider + binaryZoneId OCTET STRING OPTIONAL + ,... + } + + + -- ################################################################################# + -- regional validity in a zone + -- - based on data used in regional city trafic enviromnemnts + -- ################################################################################# + ZoneType ::= SEQUENCE { + + -- local service provider / carrier within the zone + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + carrierNum INTEGER (1..32000) OPTIONAL, + carrierIA5 IA5String OPTIONAL, + + stationCodeTable CodeTableType DEFAULT stationUIC, + -- in case the zone must be entered via a specific station + -- (e.g. local city trafic at the end of a journey starting + -- from the main train station) + entryStationNum INTEGER (1..9999999) OPTIONAL, + entryStationIA5 IA5String OPTIONAL, + + -- in case the zone must be left via a specific station + -- (e.g. local city trafic at the beginning of a journey + -- terminating at the main train station) + terminatingStationNum INTEGER (1..9999999) OPTIONAL, + terminatingStationIA5 IA5String OPTIONAL, + + -- code of the local city in case the zone is part of regional + -- city transport code list of the local carrier + city INTEGER OPTIONAL, + + -- ids of the valid zones known by the local carriers in that zone + zoneId SEQUENCE OF INTEGER OPTIONAL, + + -- binary encoding of zones, encoding specification provided by + -- the local service provider + binaryZoneId OCTET STRING OPTIONAL, + + -- EU NUTS code for a region + nutsCode IA5String OPTIONAL + ,... + } + + + -- ################################################################################## + -- via station + -- includes a description of of the route by via stations. + -- Via stations follow the description in leaflet 108.1: + -- via stations can e mandatory to pass (but there does not need to be a + -- train stop at this stations): visible route description: "*station*" + -- there can be a list of alternative routes: + -- visible route description: "*(station1/station2)*" + -- there can also be alternative routes: + -- "*(station1*station2/station3*station4)*" although the + -- definition in 108.2 is not very precice on this option + -- ################################################################################### + ViaStationType ::= SEQUENCE { + + stationCodeTable CodeTableType DEFAULT stationUIC, + -- mandatory via station + stationNum INTEGER (1..9999999) OPTIONAL, + stationIA5 IA5String OPTIONAL, + + -- list of alternative routes, one of these has to be taken + alternativeRoutes SEQUENCE OF ViaStationType OPTIONAL, + + -- list of stations along the route + route SEQUENCE OF ViaStationType OPTIONAL, + border BOOLEAN, + + -- carrier responsible for the transport starting at this station (RICS-Code) + -- in case the carrier is included here it might be omitted + -- in the carrier list of the region data + carrierNum SEQUENCE OF INTEGER (1..32000) OPTIONAL, + carrierIA5 SEQUENCE OF IA5String OPTIONAL, + + -- the route id as series number as defined in 108.1 data + seriesId INTEGER OPTIONAL, + + -- route id of the route code list defined by the carrier on that route + routeId INTEGER OPTIONAL + ,... + } + + + PolygoneType ::= SEQUENCE { + firstEdge GeoCoordinateType, + edges SEQUENCE OF DeltaCoordinates + } + + + -- ########################################################################################### + -- TokenType provides an additional identifier + -- known use cases + -- - identified of the mobile phone for tickets linked with a specific phone (e.g. VDV standard) + -- ########################################################################################### + TokenType ::= SEQUENCE { + -- provider of the token + tokenProviderNum INTEGER OPTIONAL, + tokenProviderIA5 IA5String OPTIONAL, + + -- in case the provider has multiple tokens + tokenSpecification IA5String OPTIONAL, + token OCTET STRING + } + + -- ########################################################################################### + -- TicketLinkType is used to define a link from the ticket in the bar code to another ticket + -- (requirement from Eurail) + -- use cases + -- - DB Alleo (open ticket + reservation) + -- - reservation of trailer and car carriage and traveller reservation + -- - link between open ticket and bicycle reservations or pass + -- - open ticket and vouchers for meals + -- ########################################################################################### + TicketLinkType ::= SEQUENCE { + + -- data to reference the external ticket + -- reference must be given in numeric or alphanumeric format + referenceIA5 IA5String OPTIONAL, + referenceNum INTEGER OPTIONAL, + + issuerName UTF8String OPTIONAL, -- name of the issuer + + issuerPNR IA5String OPTIONAL, -- in case the ticket can also be identified via + -- the issuer PNR + + -- organization responsible for the product definition + -- (RICS Code / proprietary code in case no RICS code is defined, proprietary codes must ensure to be unique) + productOwnerNum INTEGER (1..32000) OPTIONAL, + productOwnerIA5 IA5String OPTIONAL, + + -- type of linked ticket + ticketType TicketType DEFAULT openTicket, + + -- type of link + linkMode LinkMode DEFAULT issuedTogether + ,... + } + + -- ############################################################################################ + -- code table used fort station codes + -- defines the code table used e.g. to define station code + -- - stationUIC = station codes as used in UIC leaflet 108.1 for open tickets + -- - stationUICReservation = station codes as used in Reservation leaflets 918.1 and 108.2 + -- ############################################################################################ + + CodeTableType ::= ENUMERATED { + -- standard UIC station code from MERITS (UIC country code + 5 digit local code) + stationUIC (0), + -- standard UIC station code for reservation + stationUICReservation (1), + -- future standard ERA station code + stationERA (2), + -- local carrier code list + -- e.g. in case of stations / stops of non-railways stops (city trafic) + localCarrierStationCodeTable (3), + + -- non standard code to be used within the issuer eco system only + -- not applicable for multi carrier travel documents + -- or in case issuer and carrier are different + proprietaryIssuerStationCodeTable (4) + + } + + + ServiceType ::= ENUMERATED { + seat (0), + couchette (1), + berth (2), + carcarriage (3) + } + + + PassengerType ::= ENUMERATED { + adult (0), + senior (1), + child (2), + youth (3), + dog (4), + bicycle (5), + freeAddonPassenger (6), + freeAddonChild (7) + ,... + } + + TicketType ::= ENUMERATED { + openTicket (0), + pass (1), + reservation (2), + carCarriageReservation (3) + ,... + } + + LinkMode ::= ENUMERATED { + issuedTogether (0), + onlyValidInCombination (1) + ,... + } + + + -- #################################################################################### + -- place data corresponding to leaflet 918.1 + -- placeString = place number ranges in case of groups + -- #################################################################################### + PlacesType ::= SEQUENCE { + coach IA5String OPTIONAL, + + -- printable place string ("15-18, 21, 22" ) + placeString IA5String OPTIONAL, + + -- printable place description + placeDescription UTF8String OPTIONAL, + + -- individual places + placeIA5 SEQUENCE OF IA5String OPTIONAL, + placeNum SEQUENCE OF INTEGER (1..254) OPTIONAL + } + + PriceTypeType ::= ENUMERATED { + noPrice (0), + reservationFee (1), + supplement (2), + travelPrice (3) + } + + BerthTypeType ::= ENUMERATED { + single (0), + special (1), + double (2), + t2 (3), + t3 (4), + t4 (5) + } + + CompartmentGenderType ::= ENUMERATED { + unspecified (0), + family (1), + female (2), + male (3), + mixed (4) + ,... + } + + GenderType ::= ENUMERATED { + unspecified (0), + female (1), + male (2), + other (3) + ,... + } + + TravelClassType ::= ENUMERATED { + notApplicable (0), + first (1), + second (2), + tourist (3), + comfort (4), + premium (5), + business (6), + all (7) + ,... + } + + -- ######################################################################################## + -- sleeper compartment types corresponding to leaflet 918.1 + -- ######################################################################################## + BerthDetailData ::= SEQUENCE { + berthType BerthTypeType, + numberOfBerths INTEGER (1..999), + gender CompartmentGenderType DEFAULT family + ,... + } + + -- #################################################################################### + -- compartment details corresponding to leaflet 918.1 + -- #################################################################################### + CompartmentDetailsType ::= SEQUENCE { + coachType INTEGER (1..99) OPTIONAL, + compartmentType INTEGER (1..99) OPTIONAL, + specialAllocation INTEGER (1..99) OPTIONAL, + coachTypeDescr UTF8String OPTIONAL, + compartmentTypeDescr UTF8String OPTIONAL, + specialAllocationDescr UTF8String OPTIONAL, + position CompartmentPositionType DEFAULT unspecified + ,... + } + + + -- ##################################################################################### + -- luggage restrictions + -- the basis for these data is week: + -- SCIC mentions a maximum of three pieces of hand luggage but does not includes + -- a definition of hand luggaage + -- SCIC referes to special conditions on registered lluggage, but SCIC NRT does + -- not contain definitions on that and UIC 108.1 does not + -- contain data structures for luggage + -- - current THALYS luggage resrictions + -- ##################################################################################### + LuggageRestrictionType ::= SEQUENCE { + -- allowed hand luggage pieces on this ticket (3 = default in current NRT tariff) + maxHandLuggagePieces INTEGER(0..99) DEFAULT 3, + -- allowed hand luggage pieces on this ticket (3 = default in current NRT tariff) + maxNonHandLuggagePieces INTEGER(0..99) DEFAULT 1, + registeredLuggage SEQUENCE OF RegisteredLuggageType OPTIONAL + ,... + + } + + RegisteredLuggageType ::= SEQUENCE { + -- id of the additional registered luggage + registrationId IA5String OPTIONAL, + -- maximum weight in kg + maxWeight INTEGER (1..99) OPTIONAL, + -- sum of length with and height in cm + maxSize INTEGER (1..300) OPTIONAL + ,... + + } + + -- ########################################################################################## + -- generic type for geo coordinates + -- ########################################################################################## + GeoCoordinateType ::= SEQUENCE { + geoUnit GeoUnitType DEFAULT milliDegree, + coordinateSystem GeoCoordinateSystemType DEFAULT wgs84, + -- separate hemishpere flag reduces the data size + hemisphereLongitude HemisphereLongitudeType DEFAULT north, + -- separate hemishpere flag reduces the data size + hemisphereLatitude HemisphereLatitudeType DEFAULT east, + longitude INTEGER, + latitude INTEGER, + accuracy GeoUnitType OPTIONAL + } + + DeltaCoordinates ::= SEQUENCE { + -- logitude difference to a reference point + longitude INTEGER, + -- latitude difference to a reference point + latitude INTEGER + } + + GeoCoordinateSystemType ::= ENUMERATED { + wgs84 (0), -- WGS 84 standard system + grs80 (1) -- (outdated) GRS 80 coordinate system + } + + GeoUnitType ::= ENUMERATED { + microDegree (0), -- approx. 11 cm on earth surface + tenthmilliDegree (1), -- 1 / 100000 degree is approx. 1.1 meter on earth surface + milliDegree (2), -- approx 110 meter on earth surface + centiDegree (3), + deciDegree (4) + } + + HemisphereLongitudeType ::= ENUMERATED { + north (0), + south (1) + } + + HemisphereLatitudeType ::= ENUMERATED { + east (0), + west (1) + } + + LoadingDeckType ::= ENUMERATED { + unspecified (0), + upper (1), + lower (2) + } + + CompartmentPositionType ::= ENUMERATED { + unspecified (0), + upperLevel (1), + lowerLevel (2) + } + + RoofRackType ::= ENUMERATED { + norack (0), + roofRailing (1), + luggageRack (2), + skiRack (3), + boxRack (4), + rackWithOneBox (5), + rackWithTwoBoxes (6), + bicycleRack (7), + otherRack (8) + ,... + } + +END \ No newline at end of file -- cgit v1.2.3