From 425bd35c736b7e1c0dbe5b3f9162e195b3be6018 Mon Sep 17 00:00:00 2001 From: CGantert345 <57003061+CGantert345@users.noreply.github.com> Date: Thu, 25 Feb 2021 11:02:26 +0100 Subject: - bug fix on TicketType Enum - duplicate function getDocument removed - issuedOnLine null value allowed - maven install added (required renaming of some packages) --- src/org/uic/barcode/ticket/api/spec/IBerth.java | 60 +++ .../barcode/ticket/api/spec/IBerthTypeType.java | 41 ++ .../ticket/api/spec/ICarCarriageReservation.java | 590 +++++++++++++++++++++ .../barcode/ticket/api/spec/ICardReference.java | 107 ++++ .../ticket/api/spec/ICompartmentDetails.java | 126 +++++ .../ticket/api/spec/ICompartmentGenderType.java | 42 ++ .../ticket/api/spec/ICompartmentPositionType.java | 38 ++ .../barcode/ticket/api/spec/IControlDetail.java | 249 +++++++++ .../uic/barcode/ticket/api/spec/ICounterMark.java | 397 ++++++++++++++ .../uic/barcode/ticket/api/spec/ICustomerCard.java | 171 ++++++ .../api/spec/ICustomerStatusDescription.java | 79 +++ .../ticket/api/spec/IDelayConfirmation.java | 266 ++++++++++ .../uic/barcode/ticket/api/spec/IDocumentData.java | 32 ++ .../ticket/api/spec/IDocumentExtension.java | 14 + .../uic/barcode/ticket/api/spec/IExtension.java | 58 ++ .../uic/barcode/ticket/api/spec/IFipTicket.java | 176 ++++++ .../uic/barcode/ticket/api/spec/IGenderType.java | 42 ++ .../barcode/ticket/api/spec/IGeoCoordinate.java | 133 +++++ .../ticket/api/spec/IGeoCoordinateSystemType.java | 38 ++ .../uic/barcode/ticket/api/spec/IGeoUnitType.java | 40 ++ .../ticket/api/spec/IHemisphereLatitudeType.java | 37 ++ .../ticket/api/spec/IHemisphereLongitudeType.java | 36 ++ .../ticket/api/spec/IIncludedOpenTicket.java | 433 +++++++++++++++ .../barcode/ticket/api/spec/IIssuingDetail.java | 189 +++++++ src/org/uic/barcode/ticket/api/spec/ILine.java | 114 ++++ src/org/uic/barcode/ticket/api/spec/ILinkMode.java | 39 ++ .../barcode/ticket/api/spec/ILoadingDeckType.java | 38 ++ .../ticket/api/spec/ILuggageRestriction.java | 56 ++ .../uic/barcode/ticket/api/spec/IOpenTicket.java | 561 ++++++++++++++++++++ .../barcode/ticket/api/spec/IParkingGround.java | 252 +++++++++ src/org/uic/barcode/ticket/api/spec/IPass.java | 412 ++++++++++++++ .../barcode/ticket/api/spec/IPassengerType.java | 46 ++ src/org/uic/barcode/ticket/api/spec/IPlaces.java | 80 +++ src/org/uic/barcode/ticket/api/spec/IPolygone.java | 32 ++ .../barcode/ticket/api/spec/IPriceTypeType.java | 39 ++ .../barcode/ticket/api/spec/IRegionalValidity.java | 15 + .../ticket/api/spec/IRegisteredLuggage.java | 56 ++ .../uic/barcode/ticket/api/spec/IReservation.java | 517 ++++++++++++++++++ .../ticket/api/spec/IReturnRouteDescription.java | 100 ++++ .../uic/barcode/ticket/api/spec/IRoofRackType.java | 46 ++ .../uic/barcode/ticket/api/spec/IRouteSection.java | 83 +++ .../ticket/api/spec/ISeriesDataDetails.java | 66 +++ .../uic/barcode/ticket/api/spec/IServiceBrand.java | 55 ++ .../uic/barcode/ticket/api/spec/IServiceType.java | 38 ++ .../barcode/ticket/api/spec/IStationCodeTable.java | 25 + .../barcode/ticket/api/spec/IStationPassage.java | 239 +++++++++ src/org/uic/barcode/ticket/api/spec/ITariff.java | 204 +++++++ .../uic/barcode/ticket/api/spec/ITicketLink.java | 97 ++++ .../uic/barcode/ticket/api/spec/ITicketType.java | 41 ++ .../uic/barcode/ticket/api/spec/ITimeRange.java | 72 +++ src/org/uic/barcode/ticket/api/spec/IToken.java | 52 ++ .../uic/barcode/ticket/api/spec/ITrainLink.java | 122 +++++ .../barcode/ticket/api/spec/ITravelClassType.java | 49 ++ src/org/uic/barcode/ticket/api/spec/ITraveler.java | 250 +++++++++ .../barcode/ticket/api/spec/ITravelerDetail.java | 61 +++ .../barcode/ticket/api/spec/IUicRailTicket.java | 184 +++++++ .../ticket/api/spec/IUicTicketObjectFactory.java | 51 ++ .../barcode/ticket/api/spec/IValidityDetails.java | 45 ++ .../barcode/ticket/api/spec/IValidityRange.java | 72 +++ .../uic/barcode/ticket/api/spec/IVatDetail.java | 22 + .../uic/barcode/ticket/api/spec/IViaStation.java | 170 ++++++ src/org/uic/barcode/ticket/api/spec/IVoucher.java | 146 +++++ src/org/uic/barcode/ticket/api/spec/IZone.java | 141 +++++ src/org/uic/barcode/ticket/api/spec/package.html | 7 + .../ticket/api/spec/uicBarcodeHeader0.1.asn | 151 ++++++ 65 files changed, 8240 insertions(+) create mode 100644 src/org/uic/barcode/ticket/api/spec/IBerth.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IBerthTypeType.java create mode 100644 src/org/uic/barcode/ticket/api/spec/ICarCarriageReservation.java create mode 100644 src/org/uic/barcode/ticket/api/spec/ICardReference.java create mode 100644 src/org/uic/barcode/ticket/api/spec/ICompartmentDetails.java create mode 100644 src/org/uic/barcode/ticket/api/spec/ICompartmentGenderType.java create mode 100644 src/org/uic/barcode/ticket/api/spec/ICompartmentPositionType.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IControlDetail.java create mode 100644 src/org/uic/barcode/ticket/api/spec/ICounterMark.java create mode 100644 src/org/uic/barcode/ticket/api/spec/ICustomerCard.java create mode 100644 src/org/uic/barcode/ticket/api/spec/ICustomerStatusDescription.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IDelayConfirmation.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IDocumentData.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IDocumentExtension.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IExtension.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IFipTicket.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IGenderType.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IGeoCoordinate.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IGeoCoordinateSystemType.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IGeoUnitType.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IHemisphereLatitudeType.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IHemisphereLongitudeType.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IIncludedOpenTicket.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IIssuingDetail.java create mode 100644 src/org/uic/barcode/ticket/api/spec/ILine.java create mode 100644 src/org/uic/barcode/ticket/api/spec/ILinkMode.java create mode 100644 src/org/uic/barcode/ticket/api/spec/ILoadingDeckType.java create mode 100644 src/org/uic/barcode/ticket/api/spec/ILuggageRestriction.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IOpenTicket.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IParkingGround.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IPass.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IPassengerType.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IPlaces.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IPolygone.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IPriceTypeType.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IRegionalValidity.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IRegisteredLuggage.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IReservation.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IReturnRouteDescription.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IRoofRackType.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IRouteSection.java create mode 100644 src/org/uic/barcode/ticket/api/spec/ISeriesDataDetails.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IServiceBrand.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IServiceType.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IStationCodeTable.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IStationPassage.java create mode 100644 src/org/uic/barcode/ticket/api/spec/ITariff.java create mode 100644 src/org/uic/barcode/ticket/api/spec/ITicketLink.java create mode 100644 src/org/uic/barcode/ticket/api/spec/ITicketType.java create mode 100644 src/org/uic/barcode/ticket/api/spec/ITimeRange.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IToken.java create mode 100644 src/org/uic/barcode/ticket/api/spec/ITrainLink.java create mode 100644 src/org/uic/barcode/ticket/api/spec/ITravelClassType.java create mode 100644 src/org/uic/barcode/ticket/api/spec/ITraveler.java create mode 100644 src/org/uic/barcode/ticket/api/spec/ITravelerDetail.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IUicRailTicket.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IUicTicketObjectFactory.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IValidityDetails.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IValidityRange.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IVatDetail.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IViaStation.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IVoucher.java create mode 100644 src/org/uic/barcode/ticket/api/spec/IZone.java create mode 100644 src/org/uic/barcode/ticket/api/spec/package.html create mode 100644 src/org/uic/barcode/ticket/api/spec/uicBarcodeHeader0.1.asn (limited to 'src/org/uic/barcode/ticket/api/spec') diff --git a/src/org/uic/barcode/ticket/api/spec/IBerth.java b/src/org/uic/barcode/ticket/api/spec/IBerth.java new file mode 100644 index 0000000..80f5304 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IBerth.java @@ -0,0 +1,60 @@ +/* + * + */ +package org.uic.barcode.ticket.api.spec; + +import org.uic.barcode.ticket.EncodingFormatException; + + + +/** + * 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 IBerthTypeType 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(IBerthTypeType 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 ICompartmentGenderType getGender(); + + /** + * Sets the gender information of the compartment reserved (family, male, female, mixed,..). + * + * @param gender the new gender + */ + public void setGender(ICompartmentGenderType gender) ; + +} diff --git a/src/org/uic/barcode/ticket/api/spec/IBerthTypeType.java b/src/org/uic/barcode/ticket/api/spec/IBerthTypeType.java new file mode 100644 index 0000000..4c4cb7c --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IBerthTypeType.java @@ -0,0 +1,41 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.spec; + +public enum IBerthTypeType { + single("single"), + special("special"), + double_("double_"), + t2("t2"), + t3("t3"), + t4("t4"); + + + public String text; + + IBerthTypeType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/org/uic/barcode/ticket/api/spec/ICarCarriageReservation.java b/src/org/uic/barcode/ticket/api/spec/ICarCarriageReservation.java new file mode 100644 index 0000000..21c03f3 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/ICarCarriageReservation.java @@ -0,0 +1,590 @@ +/* + * + */ +package org.uic.barcode.ticket.api.spec; + +import java.util.Collection; +import java.util.Date; + + +/** + * 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 IStationCodeTable 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(IStationCodeTable 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 IPriceTypeType 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(IPriceTypeType 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 IRoofRackType 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(IRoofRackType 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 ILoadingDeckType getLoadingDeck(); + + /** + * Sets the loading deck. + * + * @param loadingDeck the new loading deck + */ + public void setLoadingDeck(ILoadingDeckType 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/barcode/ticket/api/spec/ICardReference.java b/src/org/uic/barcode/ticket/api/spec/ICardReference.java new file mode 100644 index 0000000..b85acd6 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/ICardReference.java @@ -0,0 +1,107 @@ +/* + * + */ +package org.uic.barcode.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/barcode/ticket/api/spec/ICompartmentDetails.java b/src/org/uic/barcode/ticket/api/spec/ICompartmentDetails.java new file mode 100644 index 0000000..c65e094 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/ICompartmentDetails.java @@ -0,0 +1,126 @@ +/* + * + */ +package org.uic.barcode.ticket.api.spec; + +/** + * 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 ICompartmentPositionType getPosition(); + + /** + * Sets the position of the compartment in trains with different decks + * + * @param position the new position + */ + public void setPosition(ICompartmentPositionType position); + +} diff --git a/src/org/uic/barcode/ticket/api/spec/ICompartmentGenderType.java b/src/org/uic/barcode/ticket/api/spec/ICompartmentGenderType.java new file mode 100644 index 0000000..3b89947 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/ICompartmentGenderType.java @@ -0,0 +1,42 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.spec; + +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; + +@HasExtensionMarker +public enum ICompartmentGenderType { + unspecified("unspecified"), + family("family"), + female("female"), + male("male"), + mixed("mixed"); + + public String text; + + ICompartmentGenderType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } + +} \ No newline at end of file diff --git a/src/org/uic/barcode/ticket/api/spec/ICompartmentPositionType.java b/src/org/uic/barcode/ticket/api/spec/ICompartmentPositionType.java new file mode 100644 index 0000000..36effac --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/ICompartmentPositionType.java @@ -0,0 +1,38 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.spec; + + +public enum ICompartmentPositionType { + unspecified("unspecified"), + upperLevel("upperLevel"), + lowerLevel("lowerLevel"); + + public String text; + + ICompartmentPositionType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/org/uic/barcode/ticket/api/spec/IControlDetail.java b/src/org/uic/barcode/ticket/api/spec/IControlDetail.java new file mode 100644 index 0000000..7e24c8b --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IControlDetail.java @@ -0,0 +1,249 @@ +/* + * + */ +package org.uic.barcode.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/barcode/ticket/api/spec/ICounterMark.java b/src/org/uic/barcode/ticket/api/spec/ICounterMark.java new file mode 100644 index 0000000..43b7cc5 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/ICounterMark.java @@ -0,0 +1,397 @@ +/* + * + */ +package org.uic.barcode.ticket.api.spec; + +import java.util.Collection; +import java.util.Date; + +/** + * 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 IStationCodeTable 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(IStationCodeTable 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 ITravelClassType getClassCode(); + + /** + * Sets the class code. + * + * @param classCode the new class code + */ + public void setClassCode(ITravelClassType 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/barcode/ticket/api/spec/ICustomerCard.java b/src/org/uic/barcode/ticket/api/spec/ICustomerCard.java new file mode 100644 index 0000000..f4001e8 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/ICustomerCard.java @@ -0,0 +1,171 @@ +/* + * + */ +package org.uic.barcode.ticket.api.spec; + +import java.util.Collection; +import java.util.Date; + + + +/** + * 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 ITravelClassType getClassCode(); + + /** + * Sets the class code. + * + * @param classCode the new class code + */ + public void setClassCode(ITravelClassType 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/barcode/ticket/api/spec/ICustomerStatusDescription.java b/src/org/uic/barcode/ticket/api/spec/ICustomerStatusDescription.java new file mode 100644 index 0000000..487612c --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/ICustomerStatusDescription.java @@ -0,0 +1,79 @@ +/* + * + */ +package org.uic.barcode.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/barcode/ticket/api/spec/IDelayConfirmation.java b/src/org/uic/barcode/ticket/api/spec/IDelayConfirmation.java new file mode 100644 index 0000000..3d55a8b --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IDelayConfirmation.java @@ -0,0 +1,266 @@ +/* + * + */ +package org.uic.barcode.ticket.api.spec; + +import java.util.Collection; +import java.util.Date; + + +/** + * 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 IStationCodeTable 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(IStationCodeTable 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/barcode/ticket/api/spec/IDocumentData.java b/src/org/uic/barcode/ticket/api/spec/IDocumentData.java new file mode 100644 index 0000000..6bfe048 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IDocumentData.java @@ -0,0 +1,32 @@ +/* + * + */ +package org.uic.barcode.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/barcode/ticket/api/spec/IDocumentExtension.java b/src/org/uic/barcode/ticket/api/spec/IDocumentExtension.java new file mode 100644 index 0000000..4808dde --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IDocumentExtension.java @@ -0,0 +1,14 @@ +/* + * + */ +package org.uic.barcode.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/barcode/ticket/api/spec/IExtension.java b/src/org/uic/barcode/ticket/api/spec/IExtension.java new file mode 100644 index 0000000..c774e9e --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IExtension.java @@ -0,0 +1,58 @@ +/* + * + */ +package org.uic.barcode.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/barcode/ticket/api/spec/IFipTicket.java b/src/org/uic/barcode/ticket/api/spec/IFipTicket.java new file mode 100644 index 0000000..f67fa57 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IFipTicket.java @@ -0,0 +1,176 @@ +/* + * + */ +package org.uic.barcode.ticket.api.spec; + +import java.util.Collection; +import java.util.Date; + + +/** + * 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 ITravelClassType getClassCode(); + + /** + * Sets the class code. + * + * @param classCode the new class code + */ + public void setClassCode(ITravelClassType 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/barcode/ticket/api/spec/IGenderType.java b/src/org/uic/barcode/ticket/api/spec/IGenderType.java new file mode 100644 index 0000000..bbb8eef --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IGenderType.java @@ -0,0 +1,42 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.spec; + +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; + +@HasExtensionMarker +public enum IGenderType { + unspecified("unspecified"), + female("female"), + male("male"), + other("other"); + + + public String text; + + IGenderType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/org/uic/barcode/ticket/api/spec/IGeoCoordinate.java b/src/org/uic/barcode/ticket/api/spec/IGeoCoordinate.java new file mode 100644 index 0000000..5526afb --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IGeoCoordinate.java @@ -0,0 +1,133 @@ +/* + * + */ +package org.uic.barcode.ticket.api.spec; + + + +/** + * The Interface IGeoCoordinate. + * + * IGeoCoordinate provides the data for a geo coordinate. + * + */ +public interface IGeoCoordinate { + + /** + * Gets the unit. + * + * Default is milliDegree + * + * @return the unit + */ + public IGeoUnitType getUnit(); + + /** + * Sets the unit. + * + * Default is milliDegree + * + * @param unit the new unit + */ + public void setUnit(IGeoUnitType unit); + + /** + * Gets the accuracy. + * + * @return the accuracy + */ + public IGeoUnitType getAccuracy(); + + /** + * Sets the accuracy. + * + * @param accuracy the new accuracy + */ + public void setAccuracy(IGeoUnitType accuracy); + + /** + * Gets the geo coordinate system. + * + * Default is wgs84 + * + * @return the geo coordinate + */ + public IGeoCoordinateSystemType getSystem(); + + /** + * Sets the geo coordinate + * + * Default is wgs84 + * + * @param system the new geo coordinate + */ + public void setSystem(IGeoCoordinateSystemType system); + + /** + * Gets the longitude hemisphere. + * + * @return the longitude hemisphere + */ + public IHemisphereLongitudeType getHemisphereLongitude() ; + + /** + * Sets the longitude hemisphere. + * + * Default is north + * + * @param hemispherLongiture the new longitude hemisphere. + */ + public void setHemisphereLongitude(IHemisphereLongitudeType hemispherLongiture); + + /** + * Gets the latitude hemisphere. + * + * Default is east + * + * @return the latitude hemisphere. + */ + public IHemisphereLatitudeType getHemisphereLatitude(); + + /** + * Sets the latitude hemisphere. + * + * Default is east + * + * @param hemisphereLatitude the new latitude hemisphere. + */ + public void setHemisphereLatitude(IHemisphereLatitudeType 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/barcode/ticket/api/spec/IGeoCoordinateSystemType.java b/src/org/uic/barcode/ticket/api/spec/IGeoCoordinateSystemType.java new file mode 100644 index 0000000..d177657 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IGeoCoordinateSystemType.java @@ -0,0 +1,38 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.spec; + + +public enum IGeoCoordinateSystemType { + wgs84("wgs84"), + grs80("grs80"); + + + public String text; + + IGeoCoordinateSystemType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/org/uic/barcode/ticket/api/spec/IGeoUnitType.java b/src/org/uic/barcode/ticket/api/spec/IGeoUnitType.java new file mode 100644 index 0000000..796fad2 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IGeoUnitType.java @@ -0,0 +1,40 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.spec; + +public enum IGeoUnitType { + microDegree("microDegree"), + tenthmilliDegree("tenthmilliDegree"), + milliDegree("milliDegree"), + centiDegree("centiDegree"), + deciDegree("deciDegree"); + + + public String text; + + IGeoUnitType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/org/uic/barcode/ticket/api/spec/IHemisphereLatitudeType.java b/src/org/uic/barcode/ticket/api/spec/IHemisphereLatitudeType.java new file mode 100644 index 0000000..37b95b6 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IHemisphereLatitudeType.java @@ -0,0 +1,37 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.spec; + +public enum IHemisphereLatitudeType { + east("east"), + west("west"); + + + public String text; + + IHemisphereLatitudeType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/org/uic/barcode/ticket/api/spec/IHemisphereLongitudeType.java b/src/org/uic/barcode/ticket/api/spec/IHemisphereLongitudeType.java new file mode 100644 index 0000000..8344450 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IHemisphereLongitudeType.java @@ -0,0 +1,36 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.spec; + +public enum IHemisphereLongitudeType { + north("north"), + south("south"); + + public String text; + + IHemisphereLongitudeType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/org/uic/barcode/ticket/api/spec/IIncludedOpenTicket.java b/src/org/uic/barcode/ticket/api/spec/IIncludedOpenTicket.java new file mode 100644 index 0000000..f64d374 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IIncludedOpenTicket.java @@ -0,0 +1,433 @@ +/* + * + */ +package org.uic.barcode.ticket.api.spec; + +import java.util.Collection; +import java.util.Date; + + +/** + * 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 IStationCodeTable 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(IStationCodeTable 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 ITravelClassType getClassCode(); + + /** + * Sets the travel class code. + * + * @param classCode the new travel class code + */ + public void setClassCode(ITravelClassType 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 list of excluded Transport Types. + * + * The list should be omitted in case a complete + * list of included transport types is provided. + * + * @return the list of excluded transport types + */ + public Collection getExcludedTransportTypes(); + + /** + * Adds an excluded service brand. + * + * The list should be omitted in case a complete + * list of included TransportTypes is provided. + * + * @param excluded TransportType the excluded TransportTypes + */ + public void addExcludedTransportType(Integer excludedTransportType); + + + /** + * Gets the list of excluded Transport Types. + * + * The list should be omitted in case a complete + * list of included transport types is provided. + * + * @return the list of included transport types + */ + public Collection getIncludedTransportTypes(); + + /** + * Adds an excluded service brand. + * + * The list should be omitted in case a complete + * list of included TransportTypes is provided. + * + * @param excluded TransportType the excluded TransportTypes + */ + public void addInludedTransportType(Integer includedTransportType); + + /** + * 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/barcode/ticket/api/spec/IIssuingDetail.java b/src/org/uic/barcode/ticket/api/spec/IIssuingDetail.java new file mode 100644 index 0000000..ecaf9c7 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IIssuingDetail.java @@ -0,0 +1,189 @@ +/* + * + */ +package org.uic.barcode.ticket.api.spec; + +import java.util.Date; + + +/** + * 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 Integer getIssuedOnLine(); + + + /** + * Sets the line number or id in case the ticket was issued on a local transport line. + * + * @param issuedOnLine the new issued on line + */ + public void setIssuedOnLine(Integer 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/barcode/ticket/api/spec/ILine.java b/src/org/uic/barcode/ticket/api/spec/ILine.java new file mode 100644 index 0000000..525ffd7 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/ILine.java @@ -0,0 +1,114 @@ +/* + * + */ +package org.uic.barcode.ticket.api.spec; + +import java.util.HashSet; + + + +/** + * 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 IStationCodeTable getStationCodeTable(); + + /** + * Sets the station code table. + * + * @param stationCodeTable the new station code table + */ + public void setStationCodeTable( IStationCodeTable 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/barcode/ticket/api/spec/ILinkMode.java b/src/org/uic/barcode/ticket/api/spec/ILinkMode.java new file mode 100644 index 0000000..918510d --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/ILinkMode.java @@ -0,0 +1,39 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.spec; + +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; + +@HasExtensionMarker +public enum ILinkMode { + issuedTogether("issuedTogether"), + onlyValidInCombination("onlyValidInCombination"); + + public String text; + + ILinkMode(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/org/uic/barcode/ticket/api/spec/ILoadingDeckType.java b/src/org/uic/barcode/ticket/api/spec/ILoadingDeckType.java new file mode 100644 index 0000000..52e41a6 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/ILoadingDeckType.java @@ -0,0 +1,38 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.spec; + + +public enum ILoadingDeckType { + unspecified("unspecified"), + upper("upper"), + lower("lower"); + + public String text; + + ILoadingDeckType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/org/uic/barcode/ticket/api/spec/ILuggageRestriction.java b/src/org/uic/barcode/ticket/api/spec/ILuggageRestriction.java new file mode 100644 index 0000000..d915aaa --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/ILuggageRestriction.java @@ -0,0 +1,56 @@ +/* + * + */ +package org.uic.barcode.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/barcode/ticket/api/spec/IOpenTicket.java b/src/org/uic/barcode/ticket/api/spec/IOpenTicket.java new file mode 100644 index 0000000..174eb92 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IOpenTicket.java @@ -0,0 +1,561 @@ +/* + * + */ +package org.uic.barcode.ticket.api.spec; + +import java.util.Collection; +import java.util.Date; + + +// 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 IStationCodeTable 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( IStationCodeTable 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 ITravelClassType getClassCode(); + + /** + * Sets the travel class code. + * + * @param classCode the new travel class code + */ + public void setClassCode(ITravelClassType 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 list of excluded Transport Types. + * + * The list should be omitted in case a complete + * list of included transport types is provided. + * + * @return the list of excluded transport types + */ + public Collection getExcludedTransportTypes(); + + /** + * Adds an excluded service brand. + * + * The list should be omitted in case a complete + * list of included TransportTypes is provided. + * + * @param excluded TransportType the excluded TransportTypes + */ + public void addExcludedTransportType(Integer excludedTransportType); + + + /** + * Gets the list of excluded Transport Types. + * + * The list should be omitted in case a complete + * list of included transport types is provided. + * + * @return the list of included transport types + */ + public Collection getIncludedTransportTypes(); + + /** + * Adds an excluded service brand. + * + * The list should be omitted in case a complete + * list of included TransportTypes is provided. + * + * @param excluded TransportType the excluded TransportTypes + */ + public void addInludedTransportType(Integer includedTransportType); + + + /** + * 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/barcode/ticket/api/spec/IParkingGround.java b/src/org/uic/barcode/ticket/api/spec/IParkingGround.java new file mode 100644 index 0000000..8ef465d --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IParkingGround.java @@ -0,0 +1,252 @@ +/* + * + */ +package org.uic.barcode.ticket.api.spec; + +import java.util.Collection; +import java.util.Date; + + + +/** + * 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 IStationCodeTable getStationCodeTable(); + + /** + * Sets the station code table. + * + * @param stationCodeTable the new station code table + */ + public void setStationCodeTable( IStationCodeTable 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/barcode/ticket/api/spec/IPass.java b/src/org/uic/barcode/ticket/api/spec/IPass.java new file mode 100644 index 0000000..5968b03 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IPass.java @@ -0,0 +1,412 @@ +/* + * + */ +package org.uic.barcode.ticket.api.spec; + +import java.util.Collection; +import java.util.Date; + +/** + * 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 ITravelClassType getClassCode(); + + /** + * Sets the travel class code. + * + * @param classCode the new travel class code + */ + public void setClassCode(ITravelClassType 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/barcode/ticket/api/spec/IPassengerType.java b/src/org/uic/barcode/ticket/api/spec/IPassengerType.java new file mode 100644 index 0000000..1ef7ba0 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IPassengerType.java @@ -0,0 +1,46 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.spec; + +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; + +@HasExtensionMarker +public enum IPassengerType { + adult("adult"), + senior("senior"), + child("child"), + youth("youth"), + dog("dog"), + bicycle("bicycle"), + freeAddonPassenger("freeAddonPassenger"), + freeAddonChild("freeAddonChild"); + + public String text; + + IPassengerType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } + +} + diff --git a/src/org/uic/barcode/ticket/api/spec/IPlaces.java b/src/org/uic/barcode/ticket/api/spec/IPlaces.java new file mode 100644 index 0000000..3a468d5 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IPlaces.java @@ -0,0 +1,80 @@ +/* + * + */ +package org.uic.barcode.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/barcode/ticket/api/spec/IPolygone.java b/src/org/uic/barcode/ticket/api/spec/IPolygone.java new file mode 100644 index 0000000..41f9d9c --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IPolygone.java @@ -0,0 +1,32 @@ +/* + * + */ +package org.uic.barcode.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/barcode/ticket/api/spec/IPriceTypeType.java b/src/org/uic/barcode/ticket/api/spec/IPriceTypeType.java new file mode 100644 index 0000000..13b4c77 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IPriceTypeType.java @@ -0,0 +1,39 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.spec; + +public enum IPriceTypeType { + noPrice("noPrice"), + reservationFee("reservationFee"), + supplement("supplement"), + travelPrice("travelPrice"); + + + public String text; + + IPriceTypeType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/org/uic/barcode/ticket/api/spec/IRegionalValidity.java b/src/org/uic/barcode/ticket/api/spec/IRegionalValidity.java new file mode 100644 index 0000000..a188775 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IRegionalValidity.java @@ -0,0 +1,15 @@ +/* + * + */ +package org.uic.barcode.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/barcode/ticket/api/spec/IRegisteredLuggage.java b/src/org/uic/barcode/ticket/api/spec/IRegisteredLuggage.java new file mode 100644 index 0000000..00d0d24 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IRegisteredLuggage.java @@ -0,0 +1,56 @@ +/* + * + */ +package org.uic.barcode.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/barcode/ticket/api/spec/IReservation.java b/src/org/uic/barcode/ticket/api/spec/IReservation.java new file mode 100644 index 0000000..0dba3bb --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IReservation.java @@ -0,0 +1,517 @@ +/* + * + */ +package org.uic.barcode.ticket.api.spec; + +import java.util.Collection; +import java.util.Date; + + +/** + * 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 IServiceType getService(); + + /** + * Sets the service. + * + * Services according to UIC leaflet 918.1 + * + * @param service the new service + */ + public void setService(IServiceType service); + + + /** + * Gets the station code table. + * + * @return the station code table + */ + public IStationCodeTable 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(IStationCodeTable 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 ITravelClassType getClassCode(); + + /** + * Sets the travel class code. + * + * @param classCode the new travel class code + */ + public void setClassCode(ITravelClassType 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 IPriceTypeType getPriceType(); + + /** + * Sets the price type. + * + * @param priceType the new price type + */ + public void setPriceType(IPriceTypeType 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/barcode/ticket/api/spec/IReturnRouteDescription.java b/src/org/uic/barcode/ticket/api/spec/IReturnRouteDescription.java new file mode 100644 index 0000000..b24a9dd --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IReturnRouteDescription.java @@ -0,0 +1,100 @@ +/* + * + */ +package org.uic.barcode.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/barcode/ticket/api/spec/IRoofRackType.java b/src/org/uic/barcode/ticket/api/spec/IRoofRackType.java new file mode 100644 index 0000000..223dc22 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IRoofRackType.java @@ -0,0 +1,46 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.spec; + +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; + +@HasExtensionMarker +public enum IRoofRackType { + norack("norack"), + roofRailing("roofRailing"), + luggageRack("luggageRack"), + skiRack("skiRack"), + boxRack("boxRack"), + rackWithOneBox("rackWithOneBox"), + rackWithTwoBoxes("rackWithTwoBoxes"), + bicycleRack("bicycleRack"), + otherRack("otherRack"); + + public String text; + + IRoofRackType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/org/uic/barcode/ticket/api/spec/IRouteSection.java b/src/org/uic/barcode/ticket/api/spec/IRouteSection.java new file mode 100644 index 0000000..134ef5e --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IRouteSection.java @@ -0,0 +1,83 @@ +/* + * + */ +package org.uic.barcode.ticket.api.spec; + + +/** + * 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 IStationCodeTable getStationCodeTable(); + + /** + * Sets the station code table. + * + * @param stationCodeTable the new station code table + */ + public void setStationCodeTable(IStationCodeTable 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/barcode/ticket/api/spec/ISeriesDataDetails.java b/src/org/uic/barcode/ticket/api/spec/ISeriesDataDetails.java new file mode 100644 index 0000000..af7623b --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/ISeriesDataDetails.java @@ -0,0 +1,66 @@ +/* + * + */ +package org.uic.barcode.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/barcode/ticket/api/spec/IServiceBrand.java b/src/org/uic/barcode/ticket/api/spec/IServiceBrand.java new file mode 100644 index 0000000..38923b6 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IServiceBrand.java @@ -0,0 +1,55 @@ +package org.uic.barcode.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/barcode/ticket/api/spec/IServiceType.java b/src/org/uic/barcode/ticket/api/spec/IServiceType.java new file mode 100644 index 0000000..173d0ab --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IServiceType.java @@ -0,0 +1,38 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.spec; + +public enum IServiceType { + seat("seat"), + couchette("couchette"), + berth("berth"), + carcarriage("carcarriage"); + + public String text; + + IServiceType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/org/uic/barcode/ticket/api/spec/IStationCodeTable.java b/src/org/uic/barcode/ticket/api/spec/IStationCodeTable.java new file mode 100644 index 0000000..9e27fd0 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IStationCodeTable.java @@ -0,0 +1,25 @@ +package org.uic.barcode.ticket.api.spec; + + public enum IStationCodeTable { + + stationUIC("stationUIC"), + stationUICReservation("stationUICReservation"), + stationERA("stationERA"), + localCarrierStationCodeTable("localCarrierStationCodeTable"), + proprietaryIssuerStationCodeTable("proprietaryIssuerStationCodeTable"); + + public String text; + + IStationCodeTable(String text) { + this.text = text; + } + + public String toString(){ + return text; + } + + + } + + + diff --git a/src/org/uic/barcode/ticket/api/spec/IStationPassage.java b/src/org/uic/barcode/ticket/api/spec/IStationPassage.java new file mode 100644 index 0000000..e5acc18 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IStationPassage.java @@ -0,0 +1,239 @@ +/* + * + */ +package org.uic.barcode.ticket.api.spec; + +import java.util.Collection; +import java.util.Date; + + +/** + * 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 IStationCodeTable getStationCodeTable(); + + /** + * Sets the station code table. + * + * @param stationCodeTable the new station code table + */ + public void setStationCodeTable(IStationCodeTable 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/barcode/ticket/api/spec/ITariff.java b/src/org/uic/barcode/ticket/api/spec/ITariff.java new file mode 100644 index 0000000..6561430 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/ITariff.java @@ -0,0 +1,204 @@ +/* + * + */ +package org.uic.barcode.ticket.api.spec; + +import java.util.Collection; + +/** + * 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 IPassengerType getPassengerType(); + + + /** + * Sets the passenger type. + * + * @param passengerType the new passenger type + */ + public void setPassengerType(IPassengerType 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/barcode/ticket/api/spec/ITicketLink.java b/src/org/uic/barcode/ticket/api/spec/ITicketLink.java new file mode 100644 index 0000000..87e418e --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/ITicketLink.java @@ -0,0 +1,97 @@ +/* + * + */ +package org.uic.barcode.ticket.api.spec; + + +/** + * 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 ITicketType getTicketType(); + + /** + * Sets the ticket type. + * + * @param ticketType the new ticket type + */ + public void setTicketType(ITicketType ticketType); + + /** + * Gets the link mode. + * + * @return the link mode + */ + public ILinkMode getLinkMode(); + + /** + * Sets the link mode. + * + * @param linkMode the new link mode + */ + public void setLinkMode(ILinkMode 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/barcode/ticket/api/spec/ITicketType.java b/src/org/uic/barcode/ticket/api/spec/ITicketType.java new file mode 100644 index 0000000..269c9a4 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/ITicketType.java @@ -0,0 +1,41 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.spec; + +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; + +@HasExtensionMarker +public enum ITicketType { + openTicket("openTicket"), + pass("pass"), + reservation("reservation"), + carCarriageReservation("carCarriageReservation"); + + public String text; + + ITicketType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/org/uic/barcode/ticket/api/spec/ITimeRange.java b/src/org/uic/barcode/ticket/api/spec/ITimeRange.java new file mode 100644 index 0000000..5602330 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/ITimeRange.java @@ -0,0 +1,72 @@ +/* + * + */ +package org.uic.barcode.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/barcode/ticket/api/spec/IToken.java b/src/org/uic/barcode/ticket/api/spec/IToken.java new file mode 100644 index 0000000..96b1bf7 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IToken.java @@ -0,0 +1,52 @@ +package org.uic.barcode.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/barcode/ticket/api/spec/ITrainLink.java b/src/org/uic/barcode/ticket/api/spec/ITrainLink.java new file mode 100644 index 0000000..79fd963 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/ITrainLink.java @@ -0,0 +1,122 @@ +/* + * + */ +package org.uic.barcode.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/barcode/ticket/api/spec/ITravelClassType.java b/src/org/uic/barcode/ticket/api/spec/ITravelClassType.java new file mode 100644 index 0000000..c064d42 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/ITravelClassType.java @@ -0,0 +1,49 @@ +/* + * This file was generated by openASN.1 - an open source ASN.1 toolkit for java + * + * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland + * + * openASN.1 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * openASN.1 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with openASN.1. If not, see . + * + */ +package org.uic.barcode.ticket.api.spec; + +import org.uic.barcode.asn1.datatypes.HasExtensionMarker; + +@HasExtensionMarker +public enum ITravelClassType { + notApplicabel("notApplicabel"), + first("first"), + second("second"), + tourist("tourist"), + comfort("comfort"), + premium("premium"), + business("business"), + all("all"), + premiumFirst("A"), + standardFirst("B"), + premiumSecond("C"), + standardSecond("D"); + + public String text; + + ITravelClassType(String text) { + this.text = text; + } + + public String toString(){ + return text; + } +} + diff --git a/src/org/uic/barcode/ticket/api/spec/ITraveler.java b/src/org/uic/barcode/ticket/api/spec/ITraveler.java new file mode 100644 index 0000000..7734bc4 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/ITraveler.java @@ -0,0 +1,250 @@ +/* + * + */ +package org.uic.barcode.ticket.api.spec; + +import java.util.Collection; +import java.util.Date; + + +/** + * 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 IGenderType getGender(); + + /** + * Sets the gender. + * + * @param gender the new gender + */ + public void setGender(IGenderType 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 IPassengerType getPassengerType(); + + /** + * Sets the passenger type. + * + * @param passengerType the new passenger type + */ + public void setPassengerType(IPassengerType 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/barcode/ticket/api/spec/ITravelerDetail.java b/src/org/uic/barcode/ticket/api/spec/ITravelerDetail.java new file mode 100644 index 0000000..af9278c --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/ITravelerDetail.java @@ -0,0 +1,61 @@ +/* + * + */ +package org.uic.barcode.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/barcode/ticket/api/spec/IUicRailTicket.java b/src/org/uic/barcode/ticket/api/spec/IUicRailTicket.java new file mode 100644 index 0000000..a361a26 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IUicRailTicket.java @@ -0,0 +1,184 @@ +/* + * + */ +package org.uic.barcode.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); + + /** + * 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/barcode/ticket/api/spec/IUicTicketObjectFactory.java b/src/org/uic/barcode/ticket/api/spec/IUicTicketObjectFactory.java new file mode 100644 index 0000000..075ee81 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IUicTicketObjectFactory.java @@ -0,0 +1,51 @@ +package org.uic.barcode.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/barcode/ticket/api/spec/IValidityDetails.java b/src/org/uic/barcode/ticket/api/spec/IValidityDetails.java new file mode 100644 index 0000000..92c055d --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IValidityDetails.java @@ -0,0 +1,45 @@ +package org.uic.barcode.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/barcode/ticket/api/spec/IValidityRange.java b/src/org/uic/barcode/ticket/api/spec/IValidityRange.java new file mode 100644 index 0000000..b81a38c --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IValidityRange.java @@ -0,0 +1,72 @@ +package org.uic.barcode.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/barcode/ticket/api/spec/IVatDetail.java b/src/org/uic/barcode/ticket/api/spec/IVatDetail.java new file mode 100644 index 0000000..4739415 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IVatDetail.java @@ -0,0 +1,22 @@ +package org.uic.barcode.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/barcode/ticket/api/spec/IViaStation.java b/src/org/uic/barcode/ticket/api/spec/IViaStation.java new file mode 100644 index 0000000..34900a8 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IViaStation.java @@ -0,0 +1,170 @@ +/* + * + */ +package org.uic.barcode.ticket.api.spec; + +import java.util.Collection; + + +/** + * 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 IStationCodeTable 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(IStationCodeTable 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/barcode/ticket/api/spec/IVoucher.java b/src/org/uic/barcode/ticket/api/spec/IVoucher.java new file mode 100644 index 0000000..a276b04 --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IVoucher.java @@ -0,0 +1,146 @@ +/* + * + */ +package org.uic.barcode.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/barcode/ticket/api/spec/IZone.java b/src/org/uic/barcode/ticket/api/spec/IZone.java new file mode 100644 index 0000000..75fc69d --- /dev/null +++ b/src/org/uic/barcode/ticket/api/spec/IZone.java @@ -0,0 +1,141 @@ +/* + * + */ +package org.uic.barcode.ticket.api.spec; + +import java.util.Collection; + +/** + * 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 IStationCodeTable getStationCodeTable(); + + /** + * Sets the station code table. + * + * @param stationCodeTable the new station code table + */ + public void setStationCodeTable(IStationCodeTable 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/barcode/ticket/api/spec/package.html b/src/org/uic/barcode/ticket/api/spec/package.html new file mode 100644 index 0000000..18d8b53 --- /dev/null +++ b/src/org/uic/barcode/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/barcode/ticket/api/spec/uicBarcodeHeader0.1.asn b/src/org/uic/barcode/ticket/api/spec/uicBarcodeHeader0.1.asn new file mode 100644 index 0000000..2999d18 --- /dev/null +++ b/src/org/uic/barcode/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 -- cgit v1.2.3