From c3ee0f35f58125a7a2b2e29ac8db8abc169f1b87 Mon Sep 17 00:00:00 2001 From: CGantert345 <57003061+CGantert345@users.noreply.github.com> Date: Fri, 3 Jan 2020 10:47:21 +0100 Subject: api implementation --- src/org/uic/ticket/api/impl/SimpleBerth.java | 70 +++ .../api/impl/SimpleCarCarriageReservation.java | 656 +++++++++++++++++++++ .../uic/ticket/api/impl/SimpleCardReference.java | 133 +++++ .../ticket/api/impl/SimpleCompartmentDetails.java | 137 +++++ .../uic/ticket/api/impl/SimpleControlDetail.java | 229 +++++++ src/org/uic/ticket/api/impl/SimpleCounterMark.java | 482 +++++++++++++++ .../uic/ticket/api/impl/SimpleCustomerCard.java | 209 +++++++ .../api/impl/SimpleCustomerStatusDescription.java | 69 +++ .../ticket/api/impl/SimpleDelayConfirmation.java | 327 ++++++++++ .../uic/ticket/api/impl/SimpleDocumentData.java | 31 + .../ticket/api/impl/SimpleDocumentExtension.java | 35 ++ src/org/uic/ticket/api/impl/SimpleExtension.java | 50 ++ src/org/uic/ticket/api/impl/SimpleFipTicket.java | 218 +++++++ .../uic/ticket/api/impl/SimpleGeoCoordinate.java | 206 +++++++ .../ticket/api/impl/SimpleIncludedOpenTicket.java | 439 ++++++++++++++ .../uic/ticket/api/impl/SimpleIssuingDetail.java | 231 ++++++++ src/org/uic/ticket/api/impl/SimpleLine.java | 139 +++++ .../ticket/api/impl/SimpleLuggageRestriction.java | 71 +++ src/org/uic/ticket/api/impl/SimpleOpenTicket.java | 577 ++++++++++++++++++ .../uic/ticket/api/impl/SimpleParkingGround.java | 291 +++++++++ src/org/uic/ticket/api/impl/SimplePass.java | 486 +++++++++++++++ src/org/uic/ticket/api/impl/SimplePlaces.java | 89 +++ src/org/uic/ticket/api/impl/SimplePolygone.java | 37 ++ .../ticket/api/impl/SimpleRegisteredLuggage.java | 67 +++ src/org/uic/ticket/api/impl/SimpleReservation.java | 611 +++++++++++++++++++ .../api/impl/SimpleReturnRouteDescription.java | 122 ++++ .../uic/ticket/api/impl/SimpleRouteSection.java | 106 ++++ .../ticket/api/impl/SimpleSeriesDataDetails.java | 64 ++ .../uic/ticket/api/impl/SimpleServiceBrand.java | 43 ++ .../uic/ticket/api/impl/SimpleStationPassage.java | 296 ++++++++++ src/org/uic/ticket/api/impl/SimpleTariff.java | 238 ++++++++ src/org/uic/ticket/api/impl/SimpleTicketLink.java | 122 ++++ src/org/uic/ticket/api/impl/SimpleTimeRange.java | 56 ++ src/org/uic/ticket/api/impl/SimpleToken.java | 68 +++ src/org/uic/ticket/api/impl/SimpleTrainLink.java | 138 +++++ src/org/uic/ticket/api/impl/SimpleTraveler.java | 290 +++++++++ .../uic/ticket/api/impl/SimpleTravelerDetail.java | 83 +++ .../uic/ticket/api/impl/SimpleUicRailTicket.java | 234 ++++++++ .../api/impl/SimpleUicTicketObjectFactory.java | 243 ++++++++ .../uic/ticket/api/impl/SimpleValidityDetails.java | 37 ++ .../uic/ticket/api/impl/SimpleValidityRange.java | 90 +++ src/org/uic/ticket/api/impl/SimpleVatDetail.java | 54 ++ src/org/uic/ticket/api/impl/SimpleViaStation.java | 157 +++++ src/org/uic/ticket/api/impl/SimpleVoucher.java | 180 ++++++ src/org/uic/ticket/api/impl/SimpleZone.java | 155 +++++ src/org/uic/ticket/api/impl/package.html | 7 + 46 files changed, 8673 insertions(+) create mode 100644 src/org/uic/ticket/api/impl/SimpleBerth.java create mode 100644 src/org/uic/ticket/api/impl/SimpleCarCarriageReservation.java create mode 100644 src/org/uic/ticket/api/impl/SimpleCardReference.java create mode 100644 src/org/uic/ticket/api/impl/SimpleCompartmentDetails.java create mode 100644 src/org/uic/ticket/api/impl/SimpleControlDetail.java create mode 100644 src/org/uic/ticket/api/impl/SimpleCounterMark.java create mode 100644 src/org/uic/ticket/api/impl/SimpleCustomerCard.java create mode 100644 src/org/uic/ticket/api/impl/SimpleCustomerStatusDescription.java create mode 100644 src/org/uic/ticket/api/impl/SimpleDelayConfirmation.java create mode 100644 src/org/uic/ticket/api/impl/SimpleDocumentData.java create mode 100644 src/org/uic/ticket/api/impl/SimpleDocumentExtension.java create mode 100644 src/org/uic/ticket/api/impl/SimpleExtension.java create mode 100644 src/org/uic/ticket/api/impl/SimpleFipTicket.java create mode 100644 src/org/uic/ticket/api/impl/SimpleGeoCoordinate.java create mode 100644 src/org/uic/ticket/api/impl/SimpleIncludedOpenTicket.java create mode 100644 src/org/uic/ticket/api/impl/SimpleIssuingDetail.java create mode 100644 src/org/uic/ticket/api/impl/SimpleLine.java create mode 100644 src/org/uic/ticket/api/impl/SimpleLuggageRestriction.java create mode 100644 src/org/uic/ticket/api/impl/SimpleOpenTicket.java create mode 100644 src/org/uic/ticket/api/impl/SimpleParkingGround.java create mode 100644 src/org/uic/ticket/api/impl/SimplePass.java create mode 100644 src/org/uic/ticket/api/impl/SimplePlaces.java create mode 100644 src/org/uic/ticket/api/impl/SimplePolygone.java create mode 100644 src/org/uic/ticket/api/impl/SimpleRegisteredLuggage.java create mode 100644 src/org/uic/ticket/api/impl/SimpleReservation.java create mode 100644 src/org/uic/ticket/api/impl/SimpleReturnRouteDescription.java create mode 100644 src/org/uic/ticket/api/impl/SimpleRouteSection.java create mode 100644 src/org/uic/ticket/api/impl/SimpleSeriesDataDetails.java create mode 100644 src/org/uic/ticket/api/impl/SimpleServiceBrand.java create mode 100644 src/org/uic/ticket/api/impl/SimpleStationPassage.java create mode 100644 src/org/uic/ticket/api/impl/SimpleTariff.java create mode 100644 src/org/uic/ticket/api/impl/SimpleTicketLink.java create mode 100644 src/org/uic/ticket/api/impl/SimpleTimeRange.java create mode 100644 src/org/uic/ticket/api/impl/SimpleToken.java create mode 100644 src/org/uic/ticket/api/impl/SimpleTrainLink.java create mode 100644 src/org/uic/ticket/api/impl/SimpleTraveler.java create mode 100644 src/org/uic/ticket/api/impl/SimpleTravelerDetail.java create mode 100644 src/org/uic/ticket/api/impl/SimpleUicRailTicket.java create mode 100644 src/org/uic/ticket/api/impl/SimpleUicTicketObjectFactory.java create mode 100644 src/org/uic/ticket/api/impl/SimpleValidityDetails.java create mode 100644 src/org/uic/ticket/api/impl/SimpleValidityRange.java create mode 100644 src/org/uic/ticket/api/impl/SimpleVatDetail.java create mode 100644 src/org/uic/ticket/api/impl/SimpleViaStation.java create mode 100644 src/org/uic/ticket/api/impl/SimpleVoucher.java create mode 100644 src/org/uic/ticket/api/impl/SimpleZone.java create mode 100644 src/org/uic/ticket/api/impl/package.html (limited to 'src/org') diff --git a/src/org/uic/ticket/api/impl/SimpleBerth.java b/src/org/uic/ticket/api/impl/SimpleBerth.java new file mode 100644 index 0000000..7bae1d3 --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleBerth.java @@ -0,0 +1,70 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import org.uic.ticket.api.asn.omv1.BerthTypeType; +import org.uic.ticket.api.asn.omv1.CompartmentGenderType; +import org.uic.ticket.api.spec.IBerth; + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleBerth. + */ +public class SimpleBerth implements IBerth { + + + /** The type. */ + protected BerthTypeType type; + + /** The number of berths. */ + protected int numberOfBerths; + + /** The gender. */ + protected CompartmentGenderType gender = CompartmentGenderType.family; + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IBerth#getType() + */ + public BerthTypeType getType() { + return type; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IBerth#setType(org.uic.ticket.api.asn.om.BerthTypeType) + */ + public void setType(BerthTypeType type) { + this.type = type; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IBerth#getNumberOfBerths() + */ + public int getNumberOfBerths() { + return numberOfBerths; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IBerth#setNumberOfBerths(int) + */ + public void setNumberOfBerths(int numberOfBerths) { + this.numberOfBerths = numberOfBerths; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IBerth#getGender() + */ + public CompartmentGenderType getGender() { + return gender; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IBerth#setGender(org.uic.ticket.api.asn.om.CompartmentGenderType) + */ + public void setGender(CompartmentGenderType gender) { + this.gender = gender; + } + + + +} diff --git a/src/org/uic/ticket/api/impl/SimpleCarCarriageReservation.java b/src/org/uic/ticket/api/impl/SimpleCarCarriageReservation.java new file mode 100644 index 0000000..9fff600 --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleCarCarriageReservation.java @@ -0,0 +1,656 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import java.util.Collection; +import java.util.Date; +import java.util.LinkedHashSet; + +import org.uic.ticket.api.asn.omv1.CodeTableType; +import org.uic.ticket.api.asn.omv1.LoadingDeckType; +import org.uic.ticket.api.asn.omv1.PriceTypeType; +import org.uic.ticket.api.asn.omv1.RoofRackType; +import org.uic.ticket.api.spec.ICarCarriageReservation; +import org.uic.ticket.api.spec.ICompartmentDetails; +import org.uic.ticket.api.spec.IExtension; +import org.uic.ticket.api.spec.IServiceBrand; +import org.uic.ticket.api.spec.ITariff; +import org.uic.ticket.api.spec.IVatDetail; + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleCarCarriageReservation. + */ +public class SimpleCarCarriageReservation extends SimpleDocumentData implements ICarCarriageReservation { + + /** The train. */ + protected String train; + + + /** The reference. */ + protected String reference; + + /** The product id. */ + protected String productId; + + /** The product owner. */ + protected String productOwner; + + /** The service brand. */ + protected IServiceBrand serviceBrand; + + + /** The station code table. */ + protected CodeTableType stationCodeTable = CodeTableType.stationUICReservation; + + /** The from station. */ + protected String fromStation; + + /** The to station. */ + protected String toStation; + + /** The from station name. */ + protected String fromStationName; + + /** The to station name. */ + protected String toStationName; + + /** The coach. */ + protected String coach; + + /** The place. */ + protected String place; + + /** The carriers. */ + protected Collectioncarriers = new LinkedHashSet(); + + + /** The tariff. */ + protected ITariff tariff; + + /** The service level. */ + protected String serviceLevel; + + /** The compartment details. */ + protected ICompartmentDetails compartmentDetails; + + /** The number plate. */ + protected String numberPlate; + + /** The trailer plate. */ + protected String trailerPlate; + + /** The car category. */ + protected int carCategory; + + /** The boat category. */ + protected int boatCategory; + + /** The textile roof. */ + protected boolean textileRoof = false; + + /** The roof rack type. */ + protected RoofRackType roofRackType = RoofRackType.norack; + + /** The roof rack height. */ + protected int roofRackHeight; + + /** The attached boats. */ + protected int attachedBoats; + + /** The attached bicycles. */ + protected int attachedBicycles; + + /** The attached surfboards. */ + protected int attachedSurfboards; + + + /** The begin loading. */ + protected Date beginLoading; + + /** The end loading. */ + protected Date endLoading; + + /** The loading list entry. */ + protected int loadingListEntry; + + /** The loading deck. */ + protected LoadingDeckType loadingDeck = LoadingDeckType.upper; + + /** The price type. */ + protected PriceTypeType priceType = PriceTypeType.travelPrice; + + /** The VAT details. */ + protected CollectionvatDetails = new LinkedHashSet(); + + /** The price. */ + protected Long price; + + + /** The info text. */ + protected String infoText; + + /** The extension. */ + protected IExtension extension; + + /** The loading time ut coffset. */ + protected Long loadingTimeUTCoffset; + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getTrain() + */ + public String getTrain() { + return train; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setTrain(java.lang.String) + */ + public void setTrain(String train) { + this.train = train.trim(); + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getReference() + */ + public String getReference() { + return reference; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setReference(java.lang.String) + */ + public void setReference(String reference) { + this.reference = reference; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getProductId() + */ + public String getProductId() { + return productId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setProductId(java.lang.String) + */ + public void setProductId(String productId) { + this.productId = productId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getServiceBrand() + */ + public IServiceBrand getServiceBrand() { + return serviceBrand; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setServiceBrand(int) + */ + public void setServiceBrand(IServiceBrand serviceBrand) { + this.serviceBrand = serviceBrand; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getStationCodeTable() + */ + public CodeTableType getStationCodeTable() { + return stationCodeTable; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setStationCodeTable(org.uic.ticket.api.asn.om.CodeTableType) + */ + public void setStationCodeTable(CodeTableType stationCodeTable) { + this.stationCodeTable = stationCodeTable; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getFromStation() + */ + public String getFromStation() { + return fromStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setFromStation(java.lang.String) + */ + public void setFromStation(String fromStation) { + this.fromStation = fromStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getToStation() + */ + public String getToStation() { + return toStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setToStation(java.lang.String) + */ + public void setToStation(String toStation) { + this.toStation = toStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getFromStationName() + */ + public String getFromStationName() { + return fromStationName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setFromStationName(java.lang.String) + */ + public void setFromStationName(String fromStationName) { + this.fromStationName = fromStationName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getToStationName() + */ + public String getToStationName() { + return toStationName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setToStationName(java.lang.String) + */ + public void setToStationName(String toStationName) { + this.toStationName = toStationName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getCarriers() + */ + public Collection getCarriers() { + return carriers; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#addCarrier(java.lang.Integer) + */ + public void addCarrier(String carrier) { + this.carriers.add(carrier); + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getServiceLevel() + */ + public String getServiceLevel() { + return serviceLevel; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setServiceLevel(java.lang.String) + */ + public void setServiceLevel(String serviceLevel) { + this.serviceLevel = serviceLevel; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getCompartmentDetails() + */ + public ICompartmentDetails getCompartmentDetails() { + return compartmentDetails; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setCompartmentDetails(org.uic.ticket.api.spec.ICompartmentDetails) + */ + public void setCompartmentDetails(ICompartmentDetails compartmentDetails) { + this.compartmentDetails = compartmentDetails; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getPriceType() + */ + public PriceTypeType getPriceType() { + return priceType; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setPriceType(org.uic.ticket.api.asn.om.PriceTypeType) + */ + public void setPriceType(PriceTypeType priceType) { + this.priceType = priceType; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getInfoText() + */ + public String getInfoText() { + return infoText; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setInfoText(java.lang.String) + */ + public void setInfoText(String infoText) { + this.infoText = infoText; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getExtension() + */ + public IExtension getExtension() { + return extension; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setExtension(org.uic.ticket.api.spec.IExtension) + */ + public void setExtension(IExtension extension) { + this.extension = extension; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getCoach() + */ + public String getCoach() { + return coach; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setCoach(java.lang.String) + */ + public void setCoach(String coach) { + this.coach = coach; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getPlace() + */ + public String getPlace() { + return place; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setPlace(java.lang.String) + */ + public void setPlace(String place) { + this.place = place; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getTariff() + */ + public ITariff getTariff() { + return tariff; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setTariff(org.uic.ticket.api.spec.ITariff) + */ + public void setTariff(ITariff tariff) { + this.tariff = tariff; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getNumberPlate() + */ + public String getNumberPlate() { + return numberPlate; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setNumberPlate(java.lang.String) + */ + public void setNumberPlate(String numberPlate) { + this.numberPlate = numberPlate; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getTrailerPlate() + */ + public String getTrailerPlate() { + return trailerPlate; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setTrailerPlate(java.lang.String) + */ + public void setTrailerPlate(String trailerPlate) { + this.trailerPlate = trailerPlate; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getCarCategory() + */ + public int getCarCategory() { + return carCategory; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setCarCategory(int) + */ + public void setCarCategory(int carCategory) { + this.carCategory = carCategory; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getBoatCategory() + */ + public int getBoatCategory() { + return boatCategory; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setBoatCategory(int) + */ + public void setBoatCategory(int boatCategory) { + this.boatCategory = boatCategory; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#isTextileRoof() + */ + public boolean isTextileRoof() { + return textileRoof; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setTextileRoof(boolean) + */ + public void setTextileRoof(boolean textileRoof) { + this.textileRoof = textileRoof; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getRoofRackType() + */ + public RoofRackType getRoofRackType() { + return roofRackType; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setRoofRackType(org.uic.ticket.api.asn.om.RoofRackType) + */ + public void setRoofRackType(RoofRackType roofRackType) { + this.roofRackType = roofRackType; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getRoofRackHeight() + */ + public int getRoofRackHeight() { + return roofRackHeight; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setRoofRackHeight(int) + */ + public void setRoofRackHeight(int roofRackHeight) { + this.roofRackHeight = roofRackHeight; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getAttachedBoats() + */ + public int getAttachedBoats() { + return attachedBoats; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setAttachedBoats(int) + */ + public void setAttachedBoats(int attachedBoats) { + this.attachedBoats = attachedBoats; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getAttachedBicycles() + */ + public int getAttachedBicycles() { + return attachedBicycles; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setAttachedBicycles(int) + */ + public void setAttachedBicycles(int attachedBicycles) { + this.attachedBicycles = attachedBicycles; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getAttachedSurfboards() + */ + public int getAttachedSurfboards() { + return attachedSurfboards; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setAttachedSurfboards(int) + */ + public void setAttachedSurfboards(int attachedSurfboards) { + this.attachedSurfboards = attachedSurfboards; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getBeginLoading() + */ + public Date getBeginLoading() { + return beginLoading; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setBeginLoading(java.util.Date) + */ + public void setBeginLoading(Date beginLoading) { + this.beginLoading = beginLoading; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getEndLoading() + */ + public Date getEndLoading() { + return endLoading; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setEndLoading(java.util.Date) + */ + public void setEndLoading(Date endLoading) { + this.endLoading = endLoading; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getLoadingListEntry() + */ + public int getLoadingListEntry() { + return loadingListEntry; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setLoadingListEntry(int) + */ + public void setLoadingListEntry(int loadingListEntry) { + this.loadingListEntry = loadingListEntry; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getLoadingDeck() + */ + public LoadingDeckType getLoadingDeck() { + return loadingDeck; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setLoadingDeck(org.uic.ticket.api.asn.om.LoadingDeckType) + */ + public void setLoadingDeck(LoadingDeckType loadingDeck) { + this.loadingDeck = loadingDeck; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getProductOwner() + */ + public String getProductOwner() { + return productOwner; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setProductOwner(java.lang.String) + */ + public void setProductOwner(String productOwner) { + this.productOwner = productOwner; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setPrice(java.lang.Long) + */ + @Override + public void setPrice(Long price) { + this.price = price; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getPrice() + */ + @Override + public Long getPrice() { + return price; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getVatDetails() + */ + @Override + public Collection getVatDetails() { + return vatDetails; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#addVatDetail(org.uic.ticket.api.spec.IVatDetail) + */ + @Override + public void addVatDetail(IVatDetail vatDetail) { + this.vatDetails.add(vatDetail); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#getLoadingTimeUTCoffset() + */ + public Long getLoadingTimeUTCoffset() { + return loadingTimeUTCoffset; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICarCarriageReservation#setLoadingTimeUTCoffset(java.lang.Long) + */ + public void setLoadingTimeUTCoffset(Long loadingTimeUTCoffset) { + this.loadingTimeUTCoffset = loadingTimeUTCoffset; + } + + + +} diff --git a/src/org/uic/ticket/api/impl/SimpleCardReference.java b/src/org/uic/ticket/api/impl/SimpleCardReference.java new file mode 100644 index 0000000..72ab152 --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleCardReference.java @@ -0,0 +1,133 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import org.uic.ticket.api.spec.ICardReference; + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleCardReference. + */ +public class SimpleCardReference implements ICardReference { + + + /** The card issuer. */ + protected String cardIssuer; + + /** The card id. */ + protected String cardId; + + /** The card name. */ + protected String cardName; + + /** The card type. */ + protected int cardType; + + /** The leading card id. */ + protected String leadingCardId; + + /** The trailing card id. */ + protected String trailingCardId; + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICardReference#getCardIssuer() + */ + public String getCardIssuer() { + return cardIssuer; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICardReference#setCardIssuer(java.lang.String) + */ + public void setCardIssuer(String cardIssuer) { + this.cardIssuer = cardIssuer; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICardReference#getCardId() + */ + public String getCardId() { + return cardId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICardReference#setCardId(java.lang.String) + */ + public void setCardId(String cardId) { + if (cardId != null && cardId.trim().length() > 0) { + this.cardId = cardId.trim(); + } else { + this.cardId = null; + } + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICardReference#getCardName() + */ + public String getCardName() { + return cardName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICardReference#setCardName(java.lang.String) + */ + public void setCardName(String cardName) { + this.cardName = cardName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICardReference#getCardType() + */ + public int getCardType() { + return cardType; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICardReference#setCardType(int) + */ + public void setCardType(int cardType) { + this.cardType = cardType; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICardReference#getLeadingCardId() + */ + public String getLeadingCardId() { + return leadingCardId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICardReference#setLeadingCardId(java.lang.String) + */ + public void setLeadingCardId(String leadingCardId) { + if (leadingCardId != null && leadingCardId.trim().length() > 0) { + this.leadingCardId = leadingCardId.trim(); + } else { + this.leadingCardId = null; + } + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICardReference#getTrailingCardId() + */ + public String getTrailingCardId() { + return trailingCardId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICardReference#setTrailingCardId(java.lang.String) + */ + public void setTrailingCardId(String trailingCardId) { + if (trailingCardId != null && trailingCardId.trim().length() > 0) { + this.trailingCardId = trailingCardId.trim(); + } else { + this.trailingCardId = null; + } + } + + + + + +} diff --git a/src/org/uic/ticket/api/impl/SimpleCompartmentDetails.java b/src/org/uic/ticket/api/impl/SimpleCompartmentDetails.java new file mode 100644 index 0000000..35a2add --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleCompartmentDetails.java @@ -0,0 +1,137 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import org.uic.ticket.api.asn.omv1.CompartmentPositionType; +import org.uic.ticket.api.spec.ICompartmentDetails; + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleCompartmentDetails. + */ +public class SimpleCompartmentDetails implements ICompartmentDetails { + + + /** The coach type. */ + protected int coachType ; + + /** The compartment type. */ + protected int compartmentType; + + /** The special allocation. */ + protected int specialAllocation; + + /** The coach type descr. */ + protected String coachTypeDescr; + + /** The compartment type descr. */ + protected String compartmentTypeDescr; + + /** The special allocation descr. */ + protected String specialAllocationDescr; + + /** The position. */ + protected CompartmentPositionType position = CompartmentPositionType.unspecified; + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICompartmentDetails#getCoachType() + */ + public int getCoachType() { + return coachType; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICompartmentDetails#setCoachType(int) + */ + public void setCoachType(int coachType) { + this.coachType = coachType; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICompartmentDetails#getCompartmentType() + */ + public int getCompartmentType() { + return compartmentType; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICompartmentDetails#setCompartmentType(int) + */ + public void setCompartmentType(int compartmentType) { + this.compartmentType = compartmentType; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICompartmentDetails#getSpecialAllocation() + */ + public int getSpecialAllocation() { + return specialAllocation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICompartmentDetails#setSpecialAllocation(int) + */ + public void setSpecialAllocation(int specialAllocation) { + this.specialAllocation = specialAllocation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICompartmentDetails#getCoachTypeDescr() + */ + public String getCoachTypeDescr() { + return coachTypeDescr; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICompartmentDetails#setCoachTypeDescr(java.lang.String) + */ + public void setCoachTypeDescr(String coachTypeDescr) { + this.coachTypeDescr = coachTypeDescr; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICompartmentDetails#getComparttmentTypeDescr() + */ + public String getCompartmentTypeDescr() { + return compartmentTypeDescr; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICompartmentDetails#setComparttmentTypeDescr(java.lang.String) + */ + public void setCompartmentTypeDescr(String comparttmentTypeDescr) { + this.compartmentTypeDescr = comparttmentTypeDescr; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICompartmentDetails#getSpecialAllocationDescr() + */ + public String getSpecialAllocationDescr() { + return specialAllocationDescr; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICompartmentDetails#setSpecialAllocationDescr(java.lang.String) + */ + public void setSpecialAllocationDescr(String specialAllocationDescr) { + this.specialAllocationDescr = specialAllocationDescr; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICompartmentDetails#getPosition() + */ + public CompartmentPositionType getPosition() { + return position; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICompartmentDetails#setPosition(org.uic.ticket.api.asn.om.CompartmentPositionType) + */ + public void setPosition(CompartmentPositionType position) { + this.position = position; + } + + + +} diff --git a/src/org/uic/ticket/api/impl/SimpleControlDetail.java b/src/org/uic/ticket/api/impl/SimpleControlDetail.java new file mode 100644 index 0000000..6e4471a --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleControlDetail.java @@ -0,0 +1,229 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import java.util.Collection; +import java.util.HashSet; +import java.util.LinkedHashSet; + +import org.uic.ticket.api.spec.ICardReference; +import org.uic.ticket.api.spec.IControlDetail; +import org.uic.ticket.api.spec.IExtension; +import org.uic.ticket.api.spec.ITicketLink; + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleControlDetail. + */ +public class SimpleControlDetail implements IControlDetail { + + + /** The identification by card reference. */ + protected Collection identificationByCardReference = new LinkedHashSet(); + + /** The identification by id card. */ + protected boolean identificationByIdCard = false; + + /** The identification by passport id. */ + protected boolean identificationByPassportId = false; + + /** The identification item. */ + protected int identificationItem = 0; + + /** The passport validation required. */ + protected boolean passportValidationRequired = false; + + /** The online validation required. */ + protected boolean onlineValidationRequired = false; + + /** The random online validation required. */ + protected int randomDetailedValidationRequired = 0; + + /** The age check required. */ + protected boolean ageCheckRequired = false; + + /** The reduction card check required. */ + protected boolean reductionCardCheckRequired = false; + + /** The info text. */ + protected String infoText ; + + /** The linked tickets. */ + protected Collection linkedTickets = new HashSet(); + + /** The extension. */ + protected IExtension extension ; + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IControlDetail#getIdentificationByCardReference() + */ + public Collection getIdentificationByCardReference() { + return identificationByCardReference; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IControlDetail#addIdentificationByCardReference(org.uic.ticket.api.spec.ICardReference) + */ + public void addIdentificationByCardReference(ICardReference cardReference) { + this.identificationByCardReference.add(cardReference); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IControlDetail#isIdentificationByIdCard() + */ + public boolean isIdentificationByIdCard() { + return identificationByIdCard; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IControlDetail#setIdentificationByIdCard(boolean) + */ + public void setIdentificationByIdCard(boolean identificationByIdCard) { + this.identificationByIdCard = identificationByIdCard; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IControlDetail#isIdentificationByPassportId() + */ + public boolean isIdentificationByPassportId() { + return identificationByPassportId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IControlDetail#setIdentificationByPassportId(boolean) + */ + public void setIdentificationByPassportId(boolean identificationByPassportId) { + this.identificationByPassportId = identificationByPassportId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IControlDetail#getIdentificationItem() + */ + public int getIdentificationItem() { + return identificationItem; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IControlDetail#setIdentificationItem(int) + */ + public void setIdentificationItem(int identificationItem) { + this.identificationItem = identificationItem; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IControlDetail#isPassportValidationRequired() + */ + public boolean isPassportValidationRequired() { + return passportValidationRequired; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IControlDetail#setPassportValidationRequired(boolean) + */ + public void setPassportValidationRequired(boolean passportValidationRequired) { + this.passportValidationRequired = passportValidationRequired; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IControlDetail#isOnlineValidationRequired() + */ + public boolean isOnlineValidationRequired() { + return onlineValidationRequired; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IControlDetail#setOnlineValidationRequired(boolean) + */ + public void setOnlineValidationRequired(boolean onlineValidationRequired) { + this.onlineValidationRequired = onlineValidationRequired; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IControlDetail#getRandomOnlineValidationRequired() + */ + public int getRandomDetailedValidationRequired() { + return randomDetailedValidationRequired; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IControlDetail#setRandomOnlineValidationRequired(int) + */ + public void setRandomDetailedValidationRequired(int randomDetailedValidationRequired) { + this.randomDetailedValidationRequired = randomDetailedValidationRequired; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IControlDetail#isAgeCheckRequired() + */ + public boolean isAgeCheckRequired() { + return ageCheckRequired; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IControlDetail#setAgeCheckRequired(boolean) + */ + public void setAgeCheckRequired(boolean ageCheckRequired) { + this.ageCheckRequired = ageCheckRequired; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IControlDetail#isReductionCardCheckRequired() + */ + public boolean isReductionCardCheckRequired() { + return reductionCardCheckRequired; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IControlDetail#setReductionCardCheckRequired(boolean) + */ + public void setReductionCardCheckRequired(boolean reductionCardCheckRequired) { + this.reductionCardCheckRequired = reductionCardCheckRequired; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IControlDetail#getInfoText() + */ + public String getInfoText() { + return infoText; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IControlDetail#setInfoText(java.lang.String) + */ + public void setInfoText(String infoText) { + this.infoText = infoText; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IControlDetail#getLinkedTickets() + */ + public Collection getLinkedTickets() { + return linkedTickets; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IControlDetail#addLinkedTicket(org.uic.ticket.api.spec.ITicketLink) + */ + public void addLinkedTicket(ITicketLink linkedTicket) { + this.linkedTickets.add(linkedTicket); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IControlDetail#getExtension() + */ + public IExtension getExtension() { + return extension; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IControlDetail#setExtension(org.uic.ticket.api.spec.IExtension) + */ + public void setExtension(IExtension extension) { + this.extension = extension; + } + + + +} diff --git a/src/org/uic/ticket/api/impl/SimpleCounterMark.java b/src/org/uic/ticket/api/impl/SimpleCounterMark.java new file mode 100644 index 0000000..ce0ecd5 --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleCounterMark.java @@ -0,0 +1,482 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import java.util.Collection; +import java.util.Date; +import java.util.LinkedHashSet; + +import org.uic.ticket.api.asn.omv1.CodeTableType; +import org.uic.ticket.api.asn.omv1.TravelClassType; +import org.uic.ticket.api.spec.ICounterMark; +import org.uic.ticket.api.spec.IExtension; +import org.uic.ticket.api.spec.IRegionalValidity; +import org.uic.ticket.api.spec.IReturnRouteDescription; + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleCounterMark. + */ +public class SimpleCounterMark extends SimpleDocumentData implements ICounterMark { + + /** The departure date. */ + protected Date departureDate; + + /** The arrival date. */ + protected Date arrivalDate; + + /** The reference. */ + protected String reference; + + /** The product owner. */ + protected String productOwner; + + + /** The product id. */ + protected String productId; + + /** The number of countermark. */ + protected int numberOfCountermark; + + /** The total of countermarks. */ + protected int totalOfCountermarks; + + /** The group name. */ + protected String groupName; + + /** The return included. */ + protected boolean returnIncluded = false; + + /** The station code table. */ + protected CodeTableType stationCodeTable = CodeTableType.stationUIC; + + /** The from station. */ + protected String fromStation; + + /** The to station. */ + protected String toStation; + + /** The from station name. */ + protected String fromStationName; + + /** The to station name. */ + protected String toStationName; + + /** The valid region desc. */ + protected String validRegionDesc; + + /** The valid region list. */ + protected Collection validRegionList = new LinkedHashSet(); + + /** The return description. */ + protected IReturnRouteDescription returnDescription; + + /** The valid from. */ + protected Date validFrom; + + /** The valid until. */ + protected Date validUntil; + + /** The class code. */ + protected TravelClassType classCode = TravelClassType.second; + + /** The included carriers. */ + protected CollectionincludedCarriers = new LinkedHashSet(); + + /** The included service brands. */ + protected CollectionincludedServiceBrands = new LinkedHashSet(); + + /** The excluded service brands. */ + protected CollectionexcludedServiceBrands = new LinkedHashSet(); + + /** The info text. */ + protected String infoText; + + + /** The extension. */ + protected IExtension extension; + + + /** The ticket reference. */ + protected String ticketReference; + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#getReference() + */ + public String getReference() { + return reference; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#setReference(java.lang.String) + */ + public void setReference(String reference) { + this.reference = reference; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#isReturnIncluded() + */ + public boolean isReturnIncluded() { + return returnIncluded; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#setReturnIncluded(boolean) + */ + public void setReturnIncluded(boolean returnIncluded) { + this.returnIncluded = returnIncluded; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#getStationCodeTable() + */ + public CodeTableType getStationCodeTable() { + return stationCodeTable; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#setStationCodeTable(org.uic.ticket.api.asn.om.CodeTableType) + */ + public void setStationCodeTable(CodeTableType stationCodeTable) { + this.stationCodeTable = stationCodeTable; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#getFromStation() + */ + public String getFromStation() { + return fromStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#setFromStation(java.lang.String) + */ + public void setFromStation(String fromStation) { + this.fromStation = fromStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#getToStation() + */ + public String getToStation() { + return toStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#setToStation(java.lang.String) + */ + public void setToStation(String toStation) { + this.toStation = toStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#getFromStationName() + */ + public String getFromStationName() { + return fromStationName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#setFromStationName(java.lang.String) + */ + public void setFromStationName(String fromStationName) { + this.fromStationName = fromStationName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#getToStationName() + */ + public String getToStationName() { + return toStationName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#setToStationName(java.lang.String) + */ + public void setToStationName(String toStationName) { + this.toStationName = toStationName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#getValidRegionDesc() + */ + public String getValidRegionDesc() { + return validRegionDesc; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#setValidRegionDesc(java.lang.String) + */ + public void setValidRegionDesc(String validRegionDesc) { + this.validRegionDesc = validRegionDesc; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#getValidRegionList() + */ + public Collection getValidRegionList() { + return validRegionList; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#addValidRegionList(org.uic.ticket.api.spec.IRegionalValidity) + */ + public void addValidRegionList(IRegionalValidity validRegion) { + this.validRegionList.add(validRegion); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#getReturnDescription() + */ + public IReturnRouteDescription getReturnDescription() { + return returnDescription; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#setReturnDescription(org.uic.ticket.api.spec.IReturnRouteDescription) + */ + public void setReturnDescription(IReturnRouteDescription returnDescription) { + this.returnDescription = returnDescription; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#getValidFrom() + */ + public Date getValidFrom() { + return validFrom; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#setValidFrom(java.util.Date) + */ + public void setValidFrom(Date validFrom) { + this.validFrom = validFrom; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#getValidUntil() + */ + public Date getValidUntil() { + return validUntil; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#setValidUntil(java.util.Date) + */ + public void setValidUntil(Date validUntil) { + this.validUntil = validUntil; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#getClassCode() + */ + public TravelClassType getClassCode() { + return classCode; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#setClassCode(org.uic.ticket.api.asn.om.TravelClassType) + */ + public void setClassCode(TravelClassType classCode) { + this.classCode = classCode; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#getIncludedCarriers() + */ + public Collection getIncludedCarriers() { + return includedCarriers; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#addIncludedCarrier(java.lang.Integer) + */ + public void addIncludedCarrier(String carrier) { + this.includedCarriers.add(carrier); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#getIncludedServiceBrands() + */ + public Collection getIncludedServiceBrands() { + return includedServiceBrands; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#addIncludedServiceBrand(java.lang.Integer) + */ + public void addIncludedServiceBrand(Integer includedServiceBrand) { + this.includedServiceBrands.add(includedServiceBrand); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#getExcludedServiceBrands() + */ + public Collection getExcludedServiceBrands() { + return excludedServiceBrands; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#addExcludedServiceBrand(java.lang.Integer) + */ + public void addExcludedServiceBrand(Integer excludedServiceBrand) { + this.excludedServiceBrands.add(excludedServiceBrand); + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#getInfoText() + */ + public String getInfoText() { + return infoText; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#setInfoText(java.lang.String) + */ + public void setInfoText(String infoText) { + this.infoText = infoText; + } + + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#getExtension() + */ + public IExtension getExtension() { + return extension; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#setExtension(org.uic.ticket.api.spec.IExtension) + */ + public void setExtension(IExtension extension) { + this.extension = extension; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#getTotalOfCountermarks() + */ + public int getTotalOfCountermarks() { + return totalOfCountermarks; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#setTotalOfCountermarks(int) + */ + public void setTotalOfCountermarks(int totalOfCountermarks) { + this.totalOfCountermarks = totalOfCountermarks; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#getGroupName() + */ + public String getGroupName() { + return groupName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#setGroupName(java.lang.String) + */ + public void setGroupName(String groupName) { + this.groupName = groupName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#getNumberOfCountermark() + */ + public int getNumberOfCountermark() { + return numberOfCountermark; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#setNumberOfCountermark(int) + */ + public void setNumberOfCountermark(int numberOfCountermark) { + this.numberOfCountermark = numberOfCountermark; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#getProductOwner() + */ + public String getProductOwner() { + return productOwner; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#setProductOwner(java.lang.String) + */ + public void setProductOwner(String productOwner) { + this.productOwner = productOwner; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#getTicketReference() + */ + public String getTicketReference() { + return ticketReference; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#setTicketReference(java.lang.String) + */ + public void setTicketReference(String ticketReference) { + this.ticketReference = ticketReference; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#getProductId() + */ + public String getProductId() { + return productId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#setProductId(java.lang.String) + */ + public void setProductId(String productId) { + this.productId = productId; + } + + /** The valid from utc coffset. */ + protected Long validFromUTCoffset; + + /** The valid until utc coffset. */ + protected Long validUntilUTCoffset; + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#getValidFromUTCoffset() + */ + public Long getValidFromUTCoffset() { + return validFromUTCoffset; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#setValidFromUTCoffset(java.lang.Long) + */ + public void setValidFromUTCoffset(Long validFromUTCoffset) { + this.validFromUTCoffset = validFromUTCoffset; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#getValidUntilUTCoffset() + */ + public Long getValidUntilUTCoffset() { + return validUntilUTCoffset; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICounterMark#setValidUntilUTCoffset(java.lang.Long) + */ + public void setValidUntilUTCoffset(Long validUntilUTCoffset) { + this.validUntilUTCoffset = validUntilUTCoffset; + } + +} diff --git a/src/org/uic/ticket/api/impl/SimpleCustomerCard.java b/src/org/uic/ticket/api/impl/SimpleCustomerCard.java new file mode 100644 index 0000000..9d6db3d --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleCustomerCard.java @@ -0,0 +1,209 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import java.util.Collection; +import java.util.Date; +import java.util.LinkedHashSet; + +import org.uic.ticket.api.asn.omv1.TravelClassType; +import org.uic.ticket.api.spec.ICustomerCard; +import org.uic.ticket.api.spec.IExtension; +import org.uic.ticket.api.spec.ITraveler; + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleCustomerCard. + */ +public class SimpleCustomerCard extends SimpleDocumentData implements ICustomerCard { + + /** The customer type. */ + protected ITraveler customer; + + /** The card id. */ + protected String cardId; + + /** The valid from. */ + protected Date validFrom; + + /** The valid until. */ + protected Date validUntil; + + /** The class code. */ + protected TravelClassType classCode; + + /** The extension. */ + protected IExtension extension; + + + /** The card type. */ + protected int cardType; + + /** The card type descr. */ + protected String cardTypeDescr; + + /** The customer status. */ + protected int customerStatus; + + /** The customer status descr. */ + protected String customerStatusDescr; + + /** The included services. */ + protected Collection includedServices = new LinkedHashSet(); + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICustomerCard#getCustomer() + */ + public ITraveler getCustomer() { + return customer; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICustomerCard#setCustomer(org.uic.ticket.api.spec.ITraveler) + */ + public void setCustomer(ITraveler customer) { + this.customer = customer; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICustomerCard#getCardId() + */ + public String getCardId() { + return cardId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICustomerCard#setCardId(java.lang.String) + */ + public void setCardId(String cardId) { + this.cardId = cardId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICustomerCard#getValidFrom() + */ + public Date getValidFrom() { + return validFrom; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICustomerCard#setValidFrom(java.util.Date) + */ + public void setValidFrom(Date validFrom) { + this.validFrom = validFrom; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICustomerCard#getValidUntil() + */ + public Date getValidUntil() { + return validUntil; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICustomerCard#setValidUntil(java.util.Date) + */ + public void setValidUntil(Date validUntil) { + this.validUntil = validUntil; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICustomerCard#getClassCode() + */ + public TravelClassType getClassCode() { + return classCode; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICustomerCard#setClassCode(org.uic.ticket.api.asn.om.TravelClassType) + */ + public void setClassCode(TravelClassType classCode) { + this.classCode = classCode; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICustomerCard#getCardType() + */ + public int getCardType() { + return cardType; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICustomerCard#setCardType(int) + */ + public void setCardType(int cardType) { + this.cardType = cardType; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICustomerCard#getCardTypeDescr() + */ + public String getCardTypeDescr() { + return cardTypeDescr; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICustomerCard#setCardTypeDescr(java.lang.String) + */ + public void setCardTypeDescr(String cardTypeDescr) { + this.cardTypeDescr = cardTypeDescr; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICustomerCard#getCustomerStatus() + */ + public int getCustomerStatus() { + return customerStatus; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICustomerCard#setCustomerStatus(int) + */ + public void setCustomerStatus(int customerStatus) { + this.customerStatus = customerStatus; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICustomerCard#getCustomerStatusDescr() + */ + public String getCustomerStatusDescr() { + return customerStatusDescr; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICustomerCard#setCustomerStatusDescr(java.lang.String) + */ + public void setCustomerStatusDescr(String customerStatusDescr) { + this.customerStatusDescr = customerStatusDescr; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICustomerCard#getIncludedServices() + */ + public Collection getIncludedServices() { + return includedServices; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICustomerCard#addIncludedService(java.lang.Integer) + */ + public void addIncludedService(Integer includedService) { + this.includedServices.add(includedService); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICustomerCard#getExtension() + */ + public IExtension getExtension() { + return extension; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICustomerCard#setExtension(org.uic.ticket.api.spec.IExtension) + */ + public void setExtension(IExtension extension) { + this.extension = extension; + } + +} diff --git a/src/org/uic/ticket/api/impl/SimpleCustomerStatusDescription.java b/src/org/uic/ticket/api/impl/SimpleCustomerStatusDescription.java new file mode 100644 index 0000000..3f037ad --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleCustomerStatusDescription.java @@ -0,0 +1,69 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import org.uic.ticket.api.spec.ICustomerStatusDescription; + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleCustomerStatusDescription. + */ +public class SimpleCustomerStatusDescription implements ICustomerStatusDescription { + + + /** The status provider. */ + protected String statusProvider; + + /** The description. */ + protected String description; + + /** The status. */ + protected int status; + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICustomerStatusDescription#getStatusProvider() + */ + public String getStatusProvider() { + return statusProvider; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICustomerStatusDescription#setStatusProvider(java.lang.String) + */ + public void setStatusProvider(String statusProvider) { + this.statusProvider = statusProvider; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICustomerStatusDescription#getDescription() + */ + public String getDescription() { + return description; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICustomerStatusDescription#setDescription(java.lang.String) + */ + public void setDescription(String description) { + this.description = description; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICustomerStatusDescription#getStatus() + */ + public int getStatus() { + return status; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ICustomerStatusDescription#setStatus(org.uic.ticket.api.asn.om.CustomerStatusType) + */ + public void setStatus(int status) { + this.status = status; + } + + + + +} diff --git a/src/org/uic/ticket/api/impl/SimpleDelayConfirmation.java b/src/org/uic/ticket/api/impl/SimpleDelayConfirmation.java new file mode 100644 index 0000000..3171072 --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleDelayConfirmation.java @@ -0,0 +1,327 @@ +package org.uic.ticket.api.impl; + +import java.util.Collection; +import java.util.Date; +import java.util.HashSet; + +import org.uic.ticket.api.asn.omv1.CodeTableType; +import org.uic.ticket.api.spec.IDelayConfirmation; +import org.uic.ticket.api.spec.IExtension; +import org.uic.ticket.api.spec.ITicketLink; + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleDelayConfirmation. + */ +public class SimpleDelayConfirmation extends SimpleDocumentData implements IDelayConfirmation { + + /** The train. */ + protected String train; + + /** The reference. */ + protected String reference; + + /** The station code table. */ + protected CodeTableType stationCodeTable = CodeTableType.stationUICReservation; + + /** The station. */ + protected String station; + + /** The station name. */ + protected String stationName; + + + /** The info text. */ + protected String infoText; + + /** The extension. */ + protected IExtension extension; + + + /** The arrival date. */ + protected Date arrivalDate; + + /** The arrival ut coffset. */ + protected Long arrivalUTCoffset; + + /** The cancelled train. */ + protected boolean cancelledTrain = false; + + /** The delay. */ + protected int delay = 0; + + /** The confirmation type. */ + protected int confirmationType = 0; + + /** The linked tickets. */ + protected Collection linkedTickets = new HashSet(); + + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDelayConfirmation#getReference() + */ + @Override + public String getReference() { + return reference; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDelayConfirmation#setReference(java.lang.String) + */ + @Override + public void setReference(String reference) { + this.reference = reference; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDelayConfirmation#getTrain() + */ + @Override + public String getTrain() { + return train; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDelayConfirmation#setTrain(java.lang.String) + */ + @Override + public void setTrain(String train) { + this.train = train; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDelayConfirmation#getStationCodeTable() + */ + @Override + public CodeTableType getStationCodeTable() { + return stationCodeTable; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDelayConfirmation#setStationCodeTable(org.uic.ticket.api.asn.omv1.CodeTableType) + */ + @Override + public void setStationCodeTable(CodeTableType stationCodeTable) { + this.stationCodeTable = stationCodeTable; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDelayConfirmation#getStation() + */ + @Override + public String getStation() { + return station; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDelayConfirmation#setStation(java.lang.String) + */ + @Override + public void setStation(String station) { + this.station = station; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDelayConfirmation#setStationName(java.lang.String) + */ + @Override + public void setStationName(String name) { + this.stationName = name; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDelayConfirmation#getStationName() + */ + @Override + public String getStationName() { + return stationName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDelayConfirmation#getArrivalDate() + */ + @Override + public Date getArrivalDate() { + return arrivalDate; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDelayConfirmation#setArrivalDate(java.util.Date) + */ + @Override + public void setArrivalDate(Date arrivalDate) { + this.arrivalDate = arrivalDate; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDelayConfirmation#isTrainCancelled() + */ + @Override + public boolean isTrainCancelled() { + return cancelledTrain; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDelayConfirmation#setTrainCancelled(boolean) + */ + @Override + public void setTrainCancelled(boolean trainIsCancelled) { + this.cancelledTrain = trainIsCancelled; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDelayConfirmation#getDelay() + */ + @Override + public int getDelay() { + return delay; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDelayConfirmation#setDelay(int) + */ + @Override + public void setDelay(int delay) { + this.delay = delay; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDelayConfirmation#getConfirmationType() + */ + @Override + public int getConfirmationType() { + return this.confirmationType; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDelayConfirmation#setConfirmationType(int) + */ + @Override + public void setConfirmationType(int type) { + this.confirmationType = type; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDelayConfirmation#setTravelerOnBoardDelayed(boolean) + */ + @Override + public void setTravelerOnBoardDelayed(boolean travelerOnBoardDelayed) { + this.confirmationType = 0; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDelayConfirmation#setTrainDelayed(boolean) + */ + @Override + public void setTrainDelayed(boolean trainDelayed) { + this.confirmationType = 1; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDelayConfirmation#setTrainDelayedTravelerHasTrainTicket(boolean) + */ + @Override + public void setTrainDelayedTravelerHasTrainTicket( + boolean trainOfTravelerDelayed) { + this.confirmationType = 2; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDelayConfirmation#isTravelerOnBoardDelayed() + */ + @Override + public boolean isTravelerOnBoardDelayed() { + if (this.confirmationType == 0) { + return true; + } + return false; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDelayConfirmation#isTrainDelayed() + */ + @Override + public boolean isTrainDelayed() { + if (this.confirmationType == 1) { + return true; + } + return false; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDelayConfirmation#isTrainDelayedTravelerHasTrainTicket() + */ + @Override + public boolean isTrainDelayedTravelerHasTrainTicket() { + if (this.confirmationType == 2) { + return true; + } + return false; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDelayConfirmation#getLinkedTickets() + */ + @Override + public Collection getLinkedTickets() { + return linkedTickets; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDelayConfirmation#addLinkedTicket(org.uic.ticket.api.spec.ITicketLink) + */ + @Override + public void addLinkedTicket(ITicketLink linkedTicket) { + this.linkedTickets.add(linkedTicket); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDelayConfirmation#getInfoText() + */ + @Override + public String getInfoText() { + return infoText; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDelayConfirmation#setInfoText(java.lang.String) + */ + @Override + public void setInfoText(String text) { + this.infoText = text; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDelayConfirmation#getExtension() + */ + @Override + public IExtension getExtension() { + return extension; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDelayConfirmation#setExtension(org.uic.ticket.api.spec.IExtension) + */ + @Override + public void setExtension(IExtension extension) { + this.extension = extension; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDelayConfirmation#getArrivalUTCoffset() + */ + public Long getArrivalUTCoffset() { + return arrivalUTCoffset; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDelayConfirmation#setArrivalUTCoffset(java.lang.Long) + */ + public void setArrivalUTCoffset(Long arrivalUTCoffset) { + this.arrivalUTCoffset = arrivalUTCoffset; + } + + + +} diff --git a/src/org/uic/ticket/api/impl/SimpleDocumentData.java b/src/org/uic/ticket/api/impl/SimpleDocumentData.java new file mode 100644 index 0000000..d32d5be --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleDocumentData.java @@ -0,0 +1,31 @@ +package org.uic.ticket.api.impl; + +import org.uic.ticket.api.spec.IDocumentData; +import org.uic.ticket.api.spec.IToken; + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleDocumentData. + */ +public class SimpleDocumentData implements IDocumentData { + + /** The token. */ + protected IToken token; + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDocumentData#getToken() + */ + @Override + public IToken getToken() { + return token; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDocumentData#setToken(org.uic.ticket.api.spec.IToken) + */ + @Override + public void setToken(IToken token) { + this.token = token; + } + +} diff --git a/src/org/uic/ticket/api/impl/SimpleDocumentExtension.java b/src/org/uic/ticket/api/impl/SimpleDocumentExtension.java new file mode 100644 index 0000000..0e4604f --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleDocumentExtension.java @@ -0,0 +1,35 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import org.uic.ticket.api.spec.IDocumentExtension; +import org.uic.ticket.api.spec.IToken; + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleDocumentExtension. + */ +public class SimpleDocumentExtension extends SimpleExtension implements IDocumentExtension { + + /** The token. */ + protected IToken token; + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDocumentData#getToken() + */ + @Override + public IToken getToken() { + return token; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IDocumentData#setToken(org.uic.ticket.api.spec.IToken) + */ + @Override + public void setToken(IToken token) { + this.token = token; + } + + +} diff --git a/src/org/uic/ticket/api/impl/SimpleExtension.java b/src/org/uic/ticket/api/impl/SimpleExtension.java new file mode 100644 index 0000000..ceafb58 --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleExtension.java @@ -0,0 +1,50 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import org.uic.ticket.api.spec.IExtension; + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleExtension. + */ +public class SimpleExtension implements IExtension{ + + /** The id. */ + protected String id; + + /** The binarydata. */ + protected byte[] binarydata; + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IExtension#getId() + */ + public String getId() { + return id; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IExtension#setId(java.lang.String) + */ + public void setId(String id) { + this.id = id; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IExtension#getBinarydata() + */ + public byte[] getBinarydata() { + return binarydata; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IExtension#setBinarydata(byte[]) + */ + public void setBinarydata(byte[] binarydata) { + this.binarydata = binarydata; + } + + + +} diff --git a/src/org/uic/ticket/api/impl/SimpleFipTicket.java b/src/org/uic/ticket/api/impl/SimpleFipTicket.java new file mode 100644 index 0000000..6bd5f99 --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleFipTicket.java @@ -0,0 +1,218 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import java.util.Collection; +import java.util.Date; + +import java.util.LinkedHashSet; + +import org.uic.ticket.api.asn.omv1.TravelClassType; +import org.uic.ticket.api.spec.IExtension; +import org.uic.ticket.api.spec.IFipTicket; + + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleFipTicket. + */ +public class SimpleFipTicket extends SimpleDocumentData implements IFipTicket { + + + /** The reference. */ + protected String reference; + + /** The product id. */ + protected String productId; + + /** The product owner. */ + protected String productOwner; + + /** The class code. */ + protected TravelClassType classCode = TravelClassType.second; + + /** The valid from. */ + protected Date validFrom; + + /** The valid until. */ + protected Date validUntil; + + + /** The number of travel dates. */ + protected int numberOfTravelDates; + + /** The includes suplements. */ + protected boolean includesSupplements = true; + + /** The carriers. */ + protected Collectioncarriers = new LinkedHashSet(); + + /** The extension data. */ + protected IExtension extensionData; + + protected Collection activatedDays = new LinkedHashSet(); + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IFipTicket#getNumberOfTravelDates() + */ + public int getNumberOfTravelDates() { + return numberOfTravelDates; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IFipTicket#setNumberOfTravelDates(int) + */ + public void setNumberOfTravelDates(int numberOfTravelDates) { + this.numberOfTravelDates = numberOfTravelDates; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IFipTicket#isIncludesSuplements() + */ + public boolean isIncludesSupplements() { + return includesSupplements; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IFipTicket#setIncludesSuplements(boolean) + */ + public void setIncludesSupplements(boolean includesSuplements) { + this.includesSupplements = includesSuplements; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IFipTicket#getCarriers() + */ + public Collection getCarriers() { + return carriers; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IFipTicket#addCarrier(java.lang.Integer) + */ + public void addCarrier(String carrier) { + this.carriers.add(carrier); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IFipTicket#getReference() + */ + public String getReference() { + return reference; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IFipTicket#setReference(java.lang.String) + */ + public void setReference(String reference) { + this.reference = reference; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IFipTicket#getProductId() + */ + public String getProductId() { + return productId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IFipTicket#setProductId(java.lang.String) + */ + public void setProductId(String productId) { + this.productId = productId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IFipTicket#getProductOwner() + */ + public String getProductOwner() { + return productOwner; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IFipTicket#setProductOwner(java.lang.String) + */ + public void setProductOwner(String productOwner) { + this.productOwner = productOwner; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IFipTicket#getClassCode() + */ + public TravelClassType getClassCode() { + return classCode; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IFipTicket#setClassCode(org.uic.ticket.api.asn.om.TravelClassType) + */ + public void setClassCode(TravelClassType classCode) { + this.classCode = classCode; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IFipTicket#getValidFrom() + */ + public Date getValidFrom() { + return validFrom; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IFipTicket#setValidFrom(java.util.Date) + */ + public void setValidFrom(Date validFrom) { + this.validFrom = validFrom; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IFipTicket#getValidUntil() + */ + public Date getValidUntil() { + return validUntil; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IFipTicket#setValidUntil(java.util.Date) + */ + public void setValidUntil(Date validUntil) { + this.validUntil = validUntil; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IFipTicket#getExtension() + */ + @Override + public IExtension getExtension() { + return extensionData; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IFipTicket#setExtension(org.uic.ticket.api.spec.IExtension) + */ + @Override + public void setExtension(IExtension extensionData) { + this.extensionData = extensionData; + } + + @Override + public Collection getActivatedDays() { + return activatedDays; + } + + @Override + public void addActivatedDay(Date day) { + this.activatedDays.add(day); + } + + + + + + + + + + + +} diff --git a/src/org/uic/ticket/api/impl/SimpleGeoCoordinate.java b/src/org/uic/ticket/api/impl/SimpleGeoCoordinate.java new file mode 100644 index 0000000..a591e29 --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleGeoCoordinate.java @@ -0,0 +1,206 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import org.uic.ticket.api.asn.omv1.GeoCoordinateSystemType; +import org.uic.ticket.api.asn.omv1.GeoUnitType; +import org.uic.ticket.api.asn.omv1.HemisphereLatitudeType; +import org.uic.ticket.api.asn.omv1.HemisphereLongitudeType; +import org.uic.ticket.api.spec.IGeoCoordinate; + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleGeoCoordinate. + */ +public class SimpleGeoCoordinate implements IGeoCoordinate { + + /** The unit. */ + protected GeoUnitType unit = GeoUnitType.milliDegree; + + /** The accuracy. */ + protected GeoUnitType accuracy; + + /** The system. */ + protected GeoCoordinateSystemType system = GeoCoordinateSystemType.wgs84; + + /** The hemispher longiture. */ + protected HemisphereLongitudeType hemispherLongiture = HemisphereLongitudeType.north; + + /** The hemisphere latitude. */ + protected HemisphereLatitudeType hemisphereLatitude = HemisphereLatitudeType.east; + + /** The longitude. */ + protected Long longitude; + + /** The latitude. */ + protected Long latitude; + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IGeoCoordinate#getUnit() + */ + public GeoUnitType getUnit() { + return unit; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IGeoCoordinate#setUnit(org.uic.ticket.api.asn.om.GeoUnitType) + */ + public void setUnit(GeoUnitType unit) { + this.unit = unit; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IGeoCoordinate#getAccuracy() + */ + public GeoUnitType getAccuracy() { + return accuracy; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IGeoCoordinate#setAccuracy(org.uic.ticket.api.asn.om.GeoUnitType) + */ + public void setAccuracy(GeoUnitType accuracy) { + this.accuracy = accuracy; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IGeoCoordinate#getSystem() + */ + public GeoCoordinateSystemType getSystem() { + return system; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IGeoCoordinate#setSystem(org.uic.ticket.api.asn.om.GeoCoordinateSystemType) + */ + public void setSystem(GeoCoordinateSystemType system) { + this.system = system; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IGeoCoordinate#getHemispherLongitude() + */ + public HemisphereLongitudeType getHemisphereLongitude() { + return hemispherLongiture; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IGeoCoordinate#setHemispherLongitude(org.uic.ticket.api.asn.om.HemisphereLongitudeType) + */ + public void setHemisphereLongitude(HemisphereLongitudeType hemispherLongiture) { + this.hemispherLongiture = hemispherLongiture; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IGeoCoordinate#getHemisphereLatitude() + */ + public HemisphereLatitudeType getHemisphereLatitude() { + return hemisphereLatitude; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IGeoCoordinate#setHemisphereLatitude(org.uic.ticket.api.asn.om.HemisphereLatitudeType) + */ + public void setHemisphereLatitude(HemisphereLatitudeType hemisphereLatitude) { + this.hemisphereLatitude = hemisphereLatitude; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IGeoCoordinate#getLongitude() + */ + public Long getLongitude() { + return limitValues(longitude); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IGeoCoordinate#setLongitude(long) + */ + public void setLongitude(long longitude) { + this.longitude = longitude; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IGeoCoordinate#getLatitude() + */ + public Long getLatitude() { + + return limitValues(latitude); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IGeoCoordinate#setLatitude(long) + */ + public void setLatitude(long latitude) { + this.latitude = latitude; + } + + public long limitValues(long value){ + + while (value < 0) { + value = value + getFullCircle(); + } + + return value % getFullCircle(); + + } + + public long getFullCircle(){ + if (unit == GeoUnitType.centiDegree) { + return 100 * 360; + } else if (unit == GeoUnitType.deciDegree) { + return 10 * 360; + } else if (unit == GeoUnitType.milliDegree) { + return 1000 * 360; + } else if (unit == GeoUnitType.tenthmilliDegree) { + return 10000 * 360; + } else if (unit == GeoUnitType.milliDegree) { + return 100000 * 360; + } else { + return 360; + } + + } + + + /* (nicht-Javadoc) + * @see java.lang.Object#clone() + */ + public SimpleGeoCoordinate clone(){ + + SimpleGeoCoordinate clone = new SimpleGeoCoordinate(); + + clone.setSystem(this.getSystem()); + clone.setAccuracy(this.getAccuracy()); + clone.setHemisphereLatitude(this.getHemisphereLatitude()); + clone.setHemisphereLongitude(this.getHemisphereLongitude()); + clone.setLatitude(this.getLatitude()); + clone.setLongitude(this.getLongitude()); + clone.setUnit(this.getUnit()); + + return clone; + + + } + + /** + * Adds the longitude. + * + * @param l the longitude + */ + public void addLongitude(Long l) { + long value = this.longitude + longitude; + this.longitude = limitValues(value); + } + + /** + * Adds the latitude. + * + * @param latitude the latitude + */ + public void addLatitude(Long latitude) { + long value = this.latitude + latitude; + this.latitude = limitValues(value); + } + +} diff --git a/src/org/uic/ticket/api/impl/SimpleIncludedOpenTicket.java b/src/org/uic/ticket/api/impl/SimpleIncludedOpenTicket.java new file mode 100644 index 0000000..601e818 --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleIncludedOpenTicket.java @@ -0,0 +1,439 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import java.util.Collection; +import java.util.Date; +import java.util.LinkedHashSet; + +import org.uic.ticket.api.asn.omv1.CodeTableType; +import org.uic.ticket.api.asn.omv1.TravelClassType; +import org.uic.ticket.api.spec.IExtension; +import org.uic.ticket.api.spec.IIncludedOpenTicket; +import org.uic.ticket.api.spec.IRegionalValidity; +import org.uic.ticket.api.spec.ITariff; + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleIncludedOpenTicket. + */ +public class SimpleIncludedOpenTicket implements IIncludedOpenTicket { + + /** The departure date. */ + protected Date departureDate; + + /** The arrival date. */ + protected Date arrivalDate; + + /** The product id. */ + protected String productId; + + /** The product owner. */ + protected String productOwner; + + /** The external issuer. */ + protected int externalIssuer; + + /** The authorization code. */ + protected int authorizationCode; + + /** The station code table. */ + protected CodeTableType stationCodeTable = CodeTableType.stationUIC; + + /** The from station. */ + protected String fromStation; + + /** The to station. */ + protected String toStation; + + /** The from station name. */ + protected String fromStationName; + + /** The to station name. */ + protected String toStationName; + + /** The valid region desc. */ + protected String validRegionDesc; + + /** The valid region list. */ + protected Collection validRegionList = new LinkedHashSet(); + + /** The valid from. */ + protected Date validFrom; + + /** The valid until. */ + protected Date validUntil; + + /** The class code. */ + protected TravelClassType classCode = TravelClassType.second; + + /** The included carriers. */ + protected CollectionincludedCarriers = new LinkedHashSet(); + + /** The included service brands. */ + protected CollectionincludedServiceBrands = new LinkedHashSet(); + + /** The excluded service brands. */ + protected CollectionexcludedServiceBrands = new LinkedHashSet(); + + /** The tariffs. */ + protected Collection tariffs = new LinkedHashSet(); + + + /** The info text. */ + protected String infoText; + + /** The extension. */ + protected IExtension extension; + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#getDepartureDate() + */ + public Date getDepartureDate() { + return departureDate; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#setDepartureDate(java.util.Date) + */ + public void setDepartureDate(Date departureDate) { + this.departureDate = departureDate; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#getArrivalDate() + */ + public Date getArrivalDate() { + return arrivalDate; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#setArrivalDate(java.util.Date) + */ + public void setArrivalDate(Date arrivalDate) { + this.arrivalDate = arrivalDate; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#getProductId() + */ + public String getProductId() { + return productId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#setProductId(java.lang.String) + */ + public void setProductId(String productId) { + this.productId = productId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#getProductOwner() + */ + public String getProductOwner() { + return productOwner; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#setProductOwner(java.lang.String) + */ + public void setProductOwner(String productOwner) { + this.productOwner = productOwner; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#getExternalIssuer() + */ + public int getExternalIssuer() { + return externalIssuer; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#setExternalIssuer(int) + */ + public void setExternalIssuer(int externalIssuer) { + this.externalIssuer = externalIssuer; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#getAuthorizationCode() + */ + public int getAuthorizationCode() { + return authorizationCode; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#setAuthorizationCode(int) + */ + public void setAuthorizationCode(int authorizationCode) { + this.authorizationCode = authorizationCode; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#getStationCodeTable() + */ + public CodeTableType getStationCodeTable() { + return stationCodeTable; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#setStationCodeTable(org.uic.ticket.api.asn.om.CodeTableType) + */ + public void setStationCodeTable(CodeTableType stationCodeTable) { + this.stationCodeTable = stationCodeTable; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#getFromStation() + */ + public String getFromStation() { + return fromStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#setFromStation(java.lang.String) + */ + public void setFromStation(String fromStation) { + this.fromStation = fromStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#getToStation() + */ + public String getToStation() { + return toStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#setToStation(java.lang.String) + */ + public void setToStation(String toStation) { + this.toStation = toStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#getFromStationName() + */ + public String getFromStationName() { + return fromStationName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#setFromStationName(java.lang.String) + */ + public void setFromStationName(String fromStationName) { + this.fromStationName = fromStationName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#getToStationName() + */ + public String getToStationName() { + return toStationName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#setToStationName(java.lang.String) + */ + public void setToStationName(String toStationName) { + this.toStationName = toStationName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#getValidRegionDesc() + */ + public String getValidRegionDesc() { + return validRegionDesc; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#setValidRegionDesc(java.lang.String) + */ + public void setValidRegionDesc(String validRegionDesc) { + this.validRegionDesc = validRegionDesc; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#getValidRegionList() + */ + public Collection getValidRegionList() { + return validRegionList; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#addValidRegionList(org.uic.ticket.api.spec.IRegionalValidity) + */ + public void addValidRegionList(IRegionalValidity validRegion) { + this.validRegionList.add(validRegion); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#getValidFrom() + */ + public Date getValidFrom() { + return validFrom; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#setValidFrom(java.util.Date) + */ + public void setValidFrom(Date validFrom) { + this.validFrom = validFrom; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#getValidUntil() + */ + public Date getValidUntil() { + return validUntil; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#setValidUntil(java.util.Date) + */ + public void setValidUntil(Date validUntil) { + this.validUntil = validUntil; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#getClassCode() + */ + public TravelClassType getClassCode() { + return classCode; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#setClassCode(org.uic.ticket.api.asn.om.TravelClassType) + */ + public void setClassCode(TravelClassType classCode) { + this.classCode = classCode; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#getIncludedCarriers() + */ + public Collection getIncludedCarriers() { + return includedCarriers; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#addIncludedCarrier(java.lang.Integer) + */ + public void addIncludedCarrier(String carrier) { + this.includedCarriers.add(carrier); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#getIncludedServiceBrands() + */ + public Collection getIncludedServiceBrands() { + return includedServiceBrands; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#addIncludedServiceBrand(java.lang.Integer) + */ + public void addIncludedServiceBrand(Integer includedServiceBrand) { + this.includedServiceBrands.add(includedServiceBrand); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#getExcludedServiceBrands() + */ + public Collection getExcludedServiceBrands() { + return excludedServiceBrands; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#addExcludedServiceBrand(java.lang.Integer) + */ + public void addExcludedServiceBrand(Integer excludedServiceBrand) { + this.excludedServiceBrands.add(excludedServiceBrand); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#getTariffs() + */ + public Collection getTariffs() { + return tariffs; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#addTariff(org.uic.ticket.api.spec.ITariff) + */ + public void addTariff(ITariff tariff) { + this.tariffs.add(tariff); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#getInfoText() + */ + public String getInfoText() { + return infoText; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#setInfoText(java.lang.String) + */ + public void setInfoText(String infoText) { + this.infoText = infoText; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#getExtension() + */ + public IExtension getExtension() { + return extension; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#setExtension(org.uic.ticket.api.spec.IExtension) + */ + public void setExtension(IExtension extension) { + this.extension = extension; + } + + /** The valid from utc coffset. */ + protected Long validFromUTCoffset; + + /** The valid until utc coffset. */ + protected Long validUntilUTCoffset; + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#getValidFromUTCoffset() + */ + public Long getValidFromUTCoffset() { + return validFromUTCoffset; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#setValidFromUTCoffset(java.lang.Long) + */ + public void setValidFromUTCoffset(Long validFromUTCoffset) { + this.validFromUTCoffset = validFromUTCoffset; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#getValidUntilUTCoffset() + */ + public Long getValidUntilUTCoffset() { + return validUntilUTCoffset; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIncludedOpenTicket#setValidUntilUTCoffset(java.lang.Long) + */ + public void setValidUntilUTCoffset(Long validUntilUTCoffset) { + this.validUntilUTCoffset = validUntilUTCoffset; + } + + @Override + public void setUntilDate(Date date) { + this.validUntil = date; + } + +} diff --git a/src/org/uic/ticket/api/impl/SimpleIssuingDetail.java b/src/org/uic/ticket/api/impl/SimpleIssuingDetail.java new file mode 100644 index 0000000..c74c247 --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleIssuingDetail.java @@ -0,0 +1,231 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import java.util.Date; + +import org.uic.ticket.api.spec.IExtension; +import org.uic.ticket.api.spec.IGeoCoordinate; +import org.uic.ticket.api.spec.IIssuingDetail; + + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleIssuerDetails. + */ +public class SimpleIssuingDetail implements IIssuingDetail{ + + + /** The issuer. */ + protected String issuer; + + /** The issuing date. */ + protected Date issuingDate; + + /** The security provider. */ + protected String securityProvider; + + /** The issuer name. */ + protected String issuerName; + + /** The specimen. */ + protected boolean specimen = false; + + /** The activated. */ + protected boolean activated = true; + + /** The issuer pnr. */ + protected String issuerPNR; + + /** The extension. */ + protected IExtension extension; + + /** The issued on train. */ + protected String issuedOnTrain; + + /** The issued on line. */ + int issuedOnLine = 0; + + /** The point of sale. */ + protected IGeoCoordinate pointOfSale; + + /** The secure paper ticket. */ + protected boolean securePaperTicket; + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.IIssuingDetail#getIssuer() + */ + public String getIssuer() { + if (issuer == null || issuer.length() == 0){ + return this.securityProvider; + } + return issuer; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.IIssuingDetail#setIssuer(java.lang.String) + */ + public void setIssuer(String issuer) { + this.issuer = issuer; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.IIssuingDetail#getIssuingDate() + */ + public Date getIssuingDate() { + return issuingDate; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.IIssuingDetail#setIssuingDate(java.util.Date) + */ + public void setIssuingDate(Date issuingDate) { + this.issuingDate = issuingDate; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIssuingDetail#getSecurityProvider() + */ + public String getSecurityProvider() { + return securityProvider; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIssuingDetail#setSecurityProvider(int) + */ + public void setSecurityProvider(String securityProvider) { + this.securityProvider = securityProvider; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIssuingDetail#getIssuerName() + */ + public String getIssuerName() { + return issuerName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIssuingDetail#setIssuerName(java.lang.String) + */ + public void setIssuerName(String issuerName) { + this.issuerName = issuerName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIssuingDetail#isSpecimen() + */ + public boolean isSpecimen() { + return specimen; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIssuingDetail#setSpecimen(boolean) + */ + public void setSpecimen(boolean specimen) { + this.specimen = specimen; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIssuingDetail#isActivated() + */ + public boolean isActivated() { + return activated; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIssuingDetail#setActivated(boolean) + */ + public void setActivated(boolean activated) { + this.activated = activated; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIssuingDetail#getIssuerPNR() + */ + public String getIssuerPNR() { + return issuerPNR; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIssuingDetail#setIssuerPNR(java.lang.String) + */ + public void setIssuerPNR(String issuerPNR) { + this.issuerPNR = issuerPNR; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIssuingDetail#getExtension() + */ + public IExtension getExtension() { + return extension; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIssuingDetail#setExtension(org.uic.ticket.api.spec.IExtension) + */ + public void setExtension(IExtension extension) { + this.extension = extension; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIssuingDetail#getIssuedOnTrain() + */ + public String getIssuedOnTrain() { + return issuedOnTrain; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIssuingDetail#setIssuedOnTrain(java.lang.String) + */ + public void setIssuedOnTrain(String issuedOnTrain) { + this.issuedOnTrain = issuedOnTrain; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIssuingDetail#getIssuedOnLine() + */ + public int getIssuedOnLine() { + return issuedOnLine; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIssuingDetail#setIssuedOnLine(int) + */ + public void setIssuedOnLine(int issuedOnLine) { + this.issuedOnLine = issuedOnLine; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIssuingDetail#getPointOfSale() + */ + public IGeoCoordinate getPointOfSale() { + return pointOfSale; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIssuingDetail#setPointOfSale(org.uic.ticket.api.spec.IGeoCoordinate) + */ + public void setPointOfSale(IGeoCoordinate pointOfSale) { + this.pointOfSale = pointOfSale; + } + + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIssuingDetail#isSecurePaperTicket() + */ + public boolean isSecurePaperTicket() { + return securePaperTicket; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IIssuingDetail#setSecurePaperTicket(boolean) + */ + public void setSecurePaperTicket(boolean securePaperTicket) { + this.securePaperTicket = securePaperTicket; + } + + + +} diff --git a/src/org/uic/ticket/api/impl/SimpleLine.java b/src/org/uic/ticket/api/impl/SimpleLine.java new file mode 100644 index 0000000..620dc65 --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleLine.java @@ -0,0 +1,139 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import java.util.HashSet; + +import org.uic.ticket.api.asn.omv1.CodeTableType; +import org.uic.ticket.api.spec.ILine; + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleLine. + */ +public class SimpleLine implements ILine { + + /** The carrier. */ + protected String carrier; + + /** The line ids. */ + protected HashSet lineIds = new HashSet(); + + /** The station code table. */ + protected CodeTableType stationCodeTable = CodeTableType.stationUIC; + + /** The entry station. */ + protected String entryStation; + + /** The terminating station. */ + protected String terminatingStation; + + /** The city. */ + protected int city; + + /** The binary zone id. */ + protected byte[] binaryZoneId; + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ILine#getCarrier() + */ + public String getCarrier() { + return carrier; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ILine#setCarrier(java.lang.String) + */ + public void setCarrier(String carrier) { + this.carrier = carrier; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ILine#getLineIds() + */ + public HashSet getLineIds() { + return lineIds; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ILine#addLineId(java.lang.Integer) + */ + public void addLineId(Integer lineId) { + this.lineIds.add(lineId); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ILine#getStationCodeTable() + */ + public CodeTableType getStationCodeTable() { + return stationCodeTable; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ILine#setStationCodeTable(org.uic.ticket.api.asn.om.CodeTableType) + */ + public void setStationCodeTable(CodeTableType stationCodeTable) { + this.stationCodeTable = stationCodeTable; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ILine#getEntryStation() + */ + public String getEntryStation() { + return entryStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ILine#setEntryStation(java.lang.String) + */ + public void setEntryStation(String entryStation) { + this.entryStation = entryStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ILine#getTerminatingStation() + */ + public String getTerminatingStation() { + return terminatingStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ILine#setTerminatingStation(java.lang.String) + */ + public void setTerminatingStation(String terminatingStation) { + this.terminatingStation = terminatingStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ILine#getCity() + */ + public int getCity() { + return city; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ILine#setCity(int) + */ + public void setCity(int city) { + this.city = city; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ILine#getBinaryZoneId() + */ + public byte[] getBinaryZoneId() { + return binaryZoneId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ILine#setBinaryZoneId(byte[]) + */ + public void setBinaryZoneId(byte[] binatyZoneId) { + this.binaryZoneId = binatyZoneId; + } + + + + +} diff --git a/src/org/uic/ticket/api/impl/SimpleLuggageRestriction.java b/src/org/uic/ticket/api/impl/SimpleLuggageRestriction.java new file mode 100644 index 0000000..71d0173 --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleLuggageRestriction.java @@ -0,0 +1,71 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import java.util.Collection; +import java.util.HashSet; + +import org.uic.ticket.api.spec.ILuggageRestriction; +import org.uic.ticket.api.spec.IRegisteredLuggage; + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleLuggageRestriction. + */ +public class SimpleLuggageRestriction implements ILuggageRestriction { + + /** The max hand luggage pieces. */ + protected int maxHandLuggagePieces = 3; + + /** The max non hand luggage pieces. */ + protected int maxNonHandLuggagePieces= 1; + + /** The registered luggage. */ + protected Collection registeredLuggage = new HashSet(); + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ILuggageRestriction#getMaxHandLuggagePieces() + */ + public int getMaxHandLuggagePieces() { + return maxHandLuggagePieces; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ILuggageRestriction#setMaxHandLuggagePieces(int) + */ + public void setMaxHandLuggagePieces(int maxHandLuggagePieces) { + this.maxHandLuggagePieces = maxHandLuggagePieces; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ILuggageRestriction#getMaxNonHandLuggagePieces() + */ + public int getMaxNonHandLuggagePieces() { + return maxNonHandLuggagePieces; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ILuggageRestriction#setMaxNonHandLuggagePieces(int) + */ + public void setMaxNonHandLuggagePieces(int maxNonHandLuggagePieces) { + this.maxNonHandLuggagePieces = maxNonHandLuggagePieces; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ILuggageRestriction#getRegisteredLuggage() + */ + public Collection getRegisteredLuggage() { + return registeredLuggage; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ILuggageRestriction#addRegisteredLuggage(org.uic.ticket.api.spec.IRegisteredLuggage) + */ + public void addRegisteredLuggage(IRegisteredLuggage registeredLuggage) { + this.registeredLuggage.add(registeredLuggage); + } + + + +} diff --git a/src/org/uic/ticket/api/impl/SimpleOpenTicket.java b/src/org/uic/ticket/api/impl/SimpleOpenTicket.java new file mode 100644 index 0000000..24b887b --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleOpenTicket.java @@ -0,0 +1,577 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import java.util.Collection; +import java.util.Date; +import java.util.LinkedHashSet; + +import org.uic.ticket.api.asn.omv1.CodeTableType; +import org.uic.ticket.api.asn.omv1.TravelClassType; +import org.uic.ticket.api.spec.IExtension; +import org.uic.ticket.api.spec.IIncludedOpenTicket; +import org.uic.ticket.api.spec.ILuggageRestriction; +import org.uic.ticket.api.spec.IOpenTicket; +import org.uic.ticket.api.spec.IRegionalValidity; +import org.uic.ticket.api.spec.IReturnRouteDescription; +import org.uic.ticket.api.spec.ITariff; +import org.uic.ticket.api.spec.IVatDetail; + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleOpenTicket. + */ +public class SimpleOpenTicket extends SimpleDocumentData implements IOpenTicket { + + /** The reference. */ + protected String reference; + + /** The product id. */ + protected String productId; + + /** The product owner. */ + protected String productOwner; + + + /** The valid from. */ + protected Date validFrom; + + /** The valid until. */ + protected Date validUntil; + + /** The info text. */ + protected String infoText; + + /** The extension. */ + protected IExtension extension; + + + /** The departure date. */ + protected Date departureDate; + + /** The arrival date. */ + protected Date arrivalDate; + + /** The external issuer. */ + protected int externalIssuer; + + /** The authorization code. */ + protected int authorizationCode; + + /** The return included. */ + protected boolean returnIncluded = false; + + /** The station code table. */ + protected CodeTableType stationCodeTable = CodeTableType.stationUIC; + + /** The from station. */ + protected String fromStation; + + /** The to station. */ + protected String toStation; + + /** The from station name. */ + protected String fromStationName; + + /** The to station name. */ + protected String toStationName; + + /** The valid region desc. */ + protected String validRegionDesc; + + /** The valid region list. */ + protected Collection validRegionList = new LinkedHashSet(); + + /** The return description. */ + protected IReturnRouteDescription returnDescription; + + + /** The activated days. */ + protected Collection activatedDays = new LinkedHashSet(); + + /** The class code. */ + protected TravelClassType classCode = TravelClassType.second; + + + /** The service level. */ + protected String serviceLevel; + + /** The included carriers. */ + protected CollectionincludedCarriers = new LinkedHashSet(); + + /** The included service brands. */ + protected CollectionincludedServiceBrands = new LinkedHashSet(); + + /** The excluded service brands. */ + protected CollectionexcludedServiceBrands = new LinkedHashSet(); + + /** The tariffs. */ + protected Collection tariffs = new LinkedHashSet(); + + /** The included add ons. */ + protected CollectionincludedAddOns = new LinkedHashSet(); + + + /** The luggage restriction. */ + protected ILuggageRestriction luggageRestriction; + + /** The price. */ + protected Long price; + + /** The included add ons. */ + protected Collection vatDetails = new LinkedHashSet(); + + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#getExternalIssuer() + */ + public int getExternalIssuer() { + return externalIssuer; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#setExternalIssuer(int) + */ + public void setExternalIssuer(int externalIssuer) { + this.externalIssuer = externalIssuer; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#getAuthorizationCode() + */ + public int getAuthorizationCode() { + return authorizationCode; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#setAuthorizationCode(int) + */ + public void setAuthorizationCode(int authorizationCode) { + this.authorizationCode = authorizationCode; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#isReturnIncluded() + */ + public boolean isReturnIncluded() { + return returnIncluded; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#setReturnIncluded(boolean) + */ + public void setReturnIncluded(boolean returnIncluded) { + this.returnIncluded = returnIncluded; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#getStationCodeTable() + */ + public CodeTableType getStationCodeTable() { + return stationCodeTable; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#setStationCodeTable(org.uic.ticket.api.asn.om.CodeTableType) + */ + public void setStationCodeTable(CodeTableType stationCodeTable) { + this.stationCodeTable = stationCodeTable; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#getFromStation() + */ + public String getFromStation() { + return fromStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#setFromStation(java.lang.String) + */ + public void setFromStation(String fromStation) { + this.fromStation = fromStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#getToStation() + */ + public String getToStation() { + return toStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#setToStation(java.lang.String) + */ + public void setToStation(String toStation) { + this.toStation = toStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#getFromStationName() + */ + public String getFromStationName() { + return fromStationName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#setFromStationName(java.lang.String) + */ + public void setFromStationName(String fromStationName) { + this.fromStationName = fromStationName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#getToStationName() + */ + public String getToStationName() { + return toStationName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#setToStationName(java.lang.String) + */ + public void setToStationName(String toStationName) { + this.toStationName = toStationName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#getValidRegionDesc() + */ + public String getValidRegionDesc() { + return validRegionDesc; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#setValidRegionDesc(java.lang.String) + */ + public void setValidRegionDesc(String validRegionDesc) { + this.validRegionDesc = validRegionDesc; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#getValidRegionList() + */ + public Collection getValidRegionList() { + return validRegionList; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#addValidRegionList(org.uic.ticket.api.spec.IRegionalValidity) + */ + public void addValidRegionList(IRegionalValidity validRegion) { + this.validRegionList.add(validRegion); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#getReturnDescription() + */ + public IReturnRouteDescription getReturnDescription() { + return returnDescription; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#setReturnDescription(org.uic.ticket.api.spec.IReturnRouteDescription) + */ + public void setReturnDescription(IReturnRouteDescription returnDescription) { + this.returnDescription = returnDescription; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#getActivatedDays() + */ + public Collection getActivatedDays() { + return activatedDays; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#addActivatedDay(java.util.Date) + */ + public void addActivatedDay(Date activatedDay) { + this.activatedDays.add(activatedDay); + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#getIncludedCarriers() + */ + public Collection getIncludedCarriers() { + return includedCarriers; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#addIncludedCarrier(java.lang.Integer) + */ + public void addIncludedCarrier(String includedCarrier) { + this.includedCarriers.add(includedCarrier); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#getIncludedServiceBrands() + */ + public Collection getIncludedServiceBrands() { + return includedServiceBrands; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#addIncludedServiceBrand(java.lang.Integer) + */ + public void addIncludedServiceBrand(Integer includedServiceBrand) { + this.includedServiceBrands.add(includedServiceBrand); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#getExcludedServiceBrands() + */ + public Collection getExcludedServiceBrands() { + return excludedServiceBrands; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#addExcludedServiceBrand(java.lang.Integer) + */ + public void addExcludedServiceBrand(Integer excludedServiceBrand) { + this.excludedServiceBrands.add(excludedServiceBrand); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#getTariffs() + */ + public Collection getTariffs() { + return tariffs; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#addTariff(org.uic.ticket.api.spec.ITariff) + */ + public void addTariff(ITariff tariff) { + this.tariffs.add(tariff); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#getIncludedAddOns() + */ + public Collection getIncludedAddOns() { + return includedAddOns; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#addIncludedAddOn(org.uic.ticket.api.spec.IIncludedOpenTicket) + */ + public void addIncludedAddOn(IIncludedOpenTicket includedAddOn) { + this.includedAddOns.add(includedAddOn); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#getLuggageRestriction() + */ + public ILuggageRestriction getLuggageRestriction() { + return luggageRestriction; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#setLuggageRestriction(org.uic.ticket.api.spec.ILuggageRestriction) + */ + public void setLuggageRestriction(ILuggageRestriction luggageRestriction) { + this.luggageRestriction = luggageRestriction; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#getReference() + */ + public String getReference() { + return reference; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#setReference(java.lang.String) + */ + public void setReference(String reference) { + this.reference = reference; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#getProductId() + */ + public String getProductId() { + return productId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#setProductId(java.lang.String) + */ + public void setProductId(String productId) { + this.productId = productId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#getProductOwner() + */ + public String getProductOwner() { + return productOwner; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#setProductOwner(java.lang.String) + */ + public void setProductOwner(String productOwner) { + this.productOwner = productOwner; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#getValidFrom() + */ + public Date getValidFrom() { + return validFrom; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#setValidFrom(java.util.Date) + */ + public void setValidFrom(Date validFrom) { + this.validFrom = validFrom; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#getValidUntil() + */ + public Date getValidUntil() { + return validUntil; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#setValidUntil(java.util.Date) + */ + public void setValidUntil(Date validUntil) { + this.validUntil = validUntil; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#getInfoText() + */ + public String getInfoText() { + return infoText; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#setInfoText(java.lang.String) + */ + public void setInfoText(String infoText) { + this.infoText = infoText; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#getExtension() + */ + public IExtension getExtension() { + return extension; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#setExtension(org.uic.ticket.api.spec.IExtension) + */ + public void setExtension(IExtension extension) { + this.extension = extension; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#getClassCode() + */ + public TravelClassType getClassCode() { + return classCode; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#setClassCode(org.uic.ticket.api.asn.om.TravelClassType) + */ + public void setClassCode(TravelClassType classCode) { + this.classCode = classCode; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#setServiceLevel(java.lang.String) + */ + @Override + public void setServiceLevel(String serviceLevel) { + this.serviceLevel = serviceLevel; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#getServiceLevel() + */ + @Override + public String getServiceLevel() { + return serviceLevel; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#setPrice(java.lang.Long) + */ + @Override + public void setPrice(Long price) { + this.price = price; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#getPrice() + */ + @Override + public Long getPrice() { + return this.price; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#getVatDetails() + */ + @Override + public Collection getVatDetails() { + return this.vatDetails; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#addVatDetail(org.uic.ticket.api.spec.IVatDetail) + */ + @Override + public void addVatDetail(IVatDetail vatDetail) { + this.vatDetails.add(vatDetail); + } + + + /** The valid from utc coffset. */ + protected Long validFromUTCoffset; + + /** The valid until utc coffset. */ + protected Long validUntilUTCoffset; + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#getValidFromUTCoffset() + */ + public Long getValidFromUTCoffset() { + return validFromUTCoffset; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#setValidFromUTCoffset(java.lang.Long) + */ + public void setValidFromUTCoffset(Long validFromUTCoffset) { + this.validFromUTCoffset = validFromUTCoffset; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#getValidUntilUTCoffset() + */ + public Long getValidUntilUTCoffset() { + return validUntilUTCoffset; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IOpenTicket#setValidUntilUTCoffset(java.lang.Long) + */ + public void setValidUntilUTCoffset(Long validUntilUTCoffset) { + this.validUntilUTCoffset = validUntilUTCoffset; + } + +} diff --git a/src/org/uic/ticket/api/impl/SimpleParkingGround.java b/src/org/uic/ticket/api/impl/SimpleParkingGround.java new file mode 100644 index 0000000..9e77989 --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleParkingGround.java @@ -0,0 +1,291 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import java.util.Collection; +import java.util.Date; +import java.util.LinkedHashSet; + +import org.uic.ticket.api.asn.omv1.CodeTableType; +import org.uic.ticket.api.spec.IExtension; +import org.uic.ticket.api.spec.IParkingGround; +import org.uic.ticket.api.spec.IVatDetail; + + +/** + * The Class SimpleParkingGround. + */ +public class SimpleParkingGround extends SimpleDocumentData implements IParkingGround { + + /** The parking ground id. */ + protected String parkingGroundId; + + /** The product owner. */ + protected String productOwner; + + /** The product id. */ + protected String productId; + + /** The from parking date. */ + protected Date fromParkingDate; + + /** The to parking date. */ + protected Date toParkingDate; + + /** The reference. */ + protected String reference; + + /** The access code. */ + protected String accessCode; + + /** The location. */ + protected String location; + + /** The station. */ + protected String station; + + /** The special information. */ + protected String specialInformation; + + /** The entry track. */ + protected String entryTrack; + + /** The number plate. */ + protected String numberPlate; + + /** The station code table. */ + protected CodeTableType stationCodeTable = CodeTableType.stationUIC; + + /** The extension data. */ + protected IExtension extensionData; + + /** The VAT details. */ + protected CollectionvatDetails = new LinkedHashSet(); + + protected Long price; + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IParkingGround#getParkingGroundId() + */ + public String getParkingGroundId() { + return parkingGroundId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IParkingGround#setParkingGroundId(java.lang.String) + */ + public void setParkingGroundId(String parkingGroundId) { + this.parkingGroundId = parkingGroundId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IParkingGround#getFromParkingDate() + */ + public Date getFromParkingDate() { + return fromParkingDate; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IParkingGround#setFromParkingDate(java.util.Date) + */ + public void setFromParkingDate(Date parkingDate) { + this.fromParkingDate = parkingDate; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IParkingGround#getToParkingDate() + */ + public Date getToParkingDate() { + if (toParkingDate==null) { + return fromParkingDate; + } + + return toParkingDate; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IParkingGround#setToParkingDate(java.util.Date) + */ + public void setToParkingDate(Date parkingDate) { + this.toParkingDate = parkingDate; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IParkingGround#getReference() + */ + public String getReference() { + return reference; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IParkingGround#setReference(java.lang.String) + */ + public void setReference(String reference) { + this.reference = reference; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IParkingGround#getAccessCode() + */ + public String getAccessCode() { + return accessCode; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IParkingGround#setAccessCode(java.lang.String) + */ + public void setAccessCode(String accessCode) { + this.accessCode = accessCode; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IParkingGround#getLocation() + */ + public String getLocation() { + return location; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IParkingGround#setLocation(java.lang.String) + */ + public void setLocation(String location) { + this.location = location; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IParkingGround#getStation() + */ + public String getStation() { + return station; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IParkingGround#setStation(java.lang.String) + */ + public void setStation(String station) { + this.station = station; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IParkingGround#getSpecialInformation() + */ + public String getSpecialInformation() { + return specialInformation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IParkingGround#setSpecialInformation(java.lang.String) + */ + public void setSpecialInformation(String specialInformation) { + this.specialInformation = specialInformation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IParkingGround#getEntryTrack() + */ + public String getEntryTrack() { + return entryTrack; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IParkingGround#setEntryTrack(java.lang.String) + */ + public void setEntryTrack(String entryTrack) { + this.entryTrack = entryTrack; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IParkingGround#getNumberPlate() + */ + public String getNumberPlate() { + return numberPlate; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IParkingGround#setNumberPlate(java.lang.String) + */ + public void setNumberPlate(String numberPlate) { + this.numberPlate = numberPlate; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IParkingGround#getExtension() + */ + public IExtension getExtension() { + return extensionData; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IParkingGround#setExtension(org.uic.ticket.api.spec.IExtension) + */ + public void setExtension(IExtension extensionData) { + this.extensionData = extensionData; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IParkingGround#getStationCodeTable() + */ + public CodeTableType getStationCodeTable() { + return stationCodeTable; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IParkingGround#setStationCodeTable(org.uic.ticket.api.asn.om.CodeTableType) + */ + public void setStationCodeTable(CodeTableType stationCodeTable) { + this.stationCodeTable = stationCodeTable; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IParkingGround#getProductOwner() + */ + public String getProductOwner() { + return productOwner; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IParkingGround#setProductOwner(java.lang.String) + */ + public void setProductOwner(String productOwner) { + this.productOwner = productOwner; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IParkingGround#getProductId() + */ + @Override + public String getProductId() { + return productId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IParkingGround#setProductId(java.lang.String) + */ + @Override + public void setProductId(String productId) { + this.productId = productId; + } + + @Override + public void setPrice(Long price) { + this.price = price; + } + + @Override + public Long getPrice() { + return price; + } + + @Override + public Collection getVatDetails() { + return vatDetails; + } + + @Override + public void addVatDetail(IVatDetail vatDetail) { + this.vatDetails.add(vatDetail); + } + +} diff --git a/src/org/uic/ticket/api/impl/SimplePass.java b/src/org/uic/ticket/api/impl/SimplePass.java new file mode 100644 index 0000000..d1704ac --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimplePass.java @@ -0,0 +1,486 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import java.util.Collection; +import java.util.Date; +import java.util.LinkedHashSet; + +import org.uic.ticket.api.asn.omv1.*; +import org.uic.ticket.api.spec.IExtension; +import org.uic.ticket.api.spec.IPass; +import org.uic.ticket.api.spec.IRegionalValidity; +import org.uic.ticket.api.spec.ITariff; +import org.uic.ticket.api.spec.IValidityDetails; +import org.uic.ticket.api.spec.IVatDetail; + + +// TODO: Auto-generated Javadoc +/** + * The Class SimplePass. + */ +public class SimplePass extends SimpleDocumentData implements IPass { + + /** The reference. */ + protected String reference; + + /** The product id. */ + protected String productId; + + /** The product owner. */ + protected String productOwner; + + /** The class code. */ + protected TravelClassType classCode = TravelClassType.second; + + /** The valid from. */ + protected Date validFrom; + + /** The valid until. */ + protected Date validUntil; + + /** The info text. */ + protected String infoText; + + /** The extension. */ + protected IExtension extension; + + + /** The pass type. */ + protected int passType; + + /** The pass description. */ + protected String passDescription; + + + /** The number of validity days. */ + protected int numberOfValidityDays; + + /** The number of possible trips. */ + protected int numberOfPossibleTrips; + + /** The number of days of travel. */ + protected int numberOfDaysOfTravel; + + + /** The activated days. */ + protected Collection activatedDays = new LinkedHashSet(); + + /** The countries. */ + protected Collectioncountries = new LinkedHashSet(); + + /** The included carriers. */ + protected CollectionincludedCarriers = new LinkedHashSet(); + + /** The excluded carriers. */ + protected CollectionexcludedCarriers = new LinkedHashSet(); + + /** The included service brands. */ + protected CollectionincludedServiceBrands = new LinkedHashSet(); + + /** The excluded service brands. */ + protected CollectionexcludedServiceBrands = new LinkedHashSet(); + + /** The valid region list. */ + protected Collection validRegionList = new LinkedHashSet(); + + /** The tariffs. */ + protected Collection tariffs = new LinkedHashSet(); + + + + /** The validity details. */ + protected IValidityDetails validityDetails; + + /** The VAT details. */ + protected CollectionvatDetails = new LinkedHashSet(); + + /** The price. */ + protected Long price; + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#getPassType() + */ + public int getPassType() { + return passType; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#setPassType(int) + */ + public void setPassType(int passType) { + this.passType = passType; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#getPassDescription() + */ + public String getPassDescription() { + return passDescription; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#setPassDescription(java.lang.String) + */ + public void setPassDescription(String passDescription) { + this.passDescription = passDescription; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#getNumberOfValidityDays() + */ + public int getNumberOfValidityDays() { + return numberOfValidityDays; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#setNumberOfValidityDays(int) + */ + public void setNumberOfValidityDays(int numberOfValidityDays) { + this.numberOfValidityDays = numberOfValidityDays; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#getNumberOfPossibleTrips() + */ + public int getNumberOfPossibleTrips() { + return numberOfPossibleTrips; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#setNumberOfPossibleTrips(int) + */ + public void setNumberOfPossibleTrips(int numberOfPossibleTrips) { + this.numberOfPossibleTrips = numberOfPossibleTrips; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#getNumberOfDaysOfTravel() + */ + public int getNumberOfDaysOfTravel() { + return numberOfDaysOfTravel; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#setNumberOfDaysOfTravel(int) + */ + public void setNumberOfDaysOfTravel(int numberOfDaysOfTravel) { + this.numberOfDaysOfTravel = numberOfDaysOfTravel; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#getActivatedDays() + */ + public Collection getActivatedDays() { + return activatedDays; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#addActivatedDay(java.util.Date) + */ + public void addActivatedDay(Date activatedDay) { + this.activatedDays.add(activatedDay); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#getCountries() + */ + public Collection getCountries() { + return countries; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#addCountry(java.lang.Integer) + */ + public void addCountry(Integer country) { + this.countries.add(country); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#getIncludedCarriers() + */ + public Collection getIncludedCarriers() { + return includedCarriers; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#addIncludedCarrier(java.lang.Integer) + */ + public void addIncludedCarrier(String carrier) { + this.includedCarriers.add(carrier); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#getExcludedCarriers() + */ + public Collection getExcludedCarriers() { + return excludedCarriers; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#addIncludedCarrier(java.lang.Integer) + */ + public void addExcludedCarrier(String carrier) { + this.excludedCarriers.add(carrier); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#getIncludedServiceBrands() + */ + public Collection getIncludedServiceBrands() { + return includedServiceBrands; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#addIncludedServiceBrand(java.lang.Integer) + */ + public void addIncludedServiceBrand(Integer includedServiceBrand) { + this.includedServiceBrands.add(includedServiceBrand); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#getExcludedServiceBrands() + */ + public Collection getExcludedServiceBrands() { + return excludedServiceBrands; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#addExcludedServiceBrand(java.lang.Integer) + */ + public void addExcludedServiceBrand(Integer excludedServiceBrand) { + this.excludedServiceBrands.add(excludedServiceBrand); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#getValidRegionList() + */ + public Collection getValidRegionList() { + return validRegionList; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#addValidRegion(org.uic.ticket.api.spec.IRegionalValidity) + */ + public void addValidRegion(IRegionalValidity validRegion) { + this.validRegionList.add(validRegion); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#getTariffs() + */ + public Collection getTariffs() { + return tariffs; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#addTariff(org.uic.ticket.api.spec.ITariff) + */ + public void addTariff(ITariff tariff) { + this.tariffs.add(tariff); + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#getReference() + */ + public String getReference() { + return reference; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#setReference(java.lang.String) + */ + public void setReference(String reference) { + this.reference = reference; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#getProductId() + */ + public String getProductId() { + return productId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#setProductId(java.lang.String) + */ + public void setProductId(String productId) { + this.productId = productId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#getProductOwner() + */ + public String getProductOwner() { + return productOwner; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#setProductOwner(java.lang.String) + */ + public void setProductOwner(String productOwner) { + this.productOwner = productOwner; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#getClassCode() + */ + public TravelClassType getClassCode() { + return classCode; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#setClassCode(org.uic.ticket.api.asn.om.TravelClassType) + */ + public void setClassCode(TravelClassType classCode) { + this.classCode = classCode; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#getValidFrom() + */ + public Date getValidFrom() { + return validFrom; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#setValidFrom(java.util.Date) + */ + public void setValidFrom(Date validFrom) { + this.validFrom = validFrom; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#getValidUntil() + */ + public Date getValidUntil() { + return validUntil; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#setValidUntil(java.util.Date) + */ + public void setValidUntil(Date validUntil) { + this.validUntil = validUntil; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#getInfoText() + */ + public String getInfoText() { + return infoText; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#setInfoText(java.lang.String) + */ + public void setInfoText(String infoText) { + this.infoText = infoText; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#getExtension() + */ + public IExtension getExtension() { + return extension; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#setExtension(org.uic.ticket.api.spec.IExtension) + */ + public void setExtension(IExtension extension) { + this.extension = extension; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#setValidityDetails(org.uic.ticket.api.spec.IValidityDetails) + */ + @Override + public void setValidityDetails(IValidityDetails validityDetails) { + this.validityDetails = validityDetails; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#getValidityDetails() + */ + @Override + public IValidityDetails getValidityDetails() { + return validityDetails; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#setPrice(java.lang.Long) + */ + @Override + public void setPrice(Long price) { + this.price = price; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#getPrice() + */ + @Override + public Long getPrice() { + return price; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#getVatDetails() + */ + @Override + public Collection getVatDetails() { + return vatDetails; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#addVatDetail(org.uic.ticket.api.spec.IVatDetail) + */ + @Override + public void addVatDetail(IVatDetail vatDetail) { + this.vatDetails.add(vatDetail); + } + + /** The valid from utc coffset. */ + protected Long validFromUTCoffset; + + /** The valid until utc coffset. */ + protected Long validUntilUTCoffset; + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#getValidFromUTCoffset() + */ + public Long getValidFromUTCoffset() { + return validFromUTCoffset; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#setValidFromUTCoffset(java.lang.Long) + */ + public void setValidFromUTCoffset(Long validFromUTCoffset) { + this.validFromUTCoffset = validFromUTCoffset; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#getValidUntilUTCoffset() + */ + public Long getValidUntilUTCoffset() { + return validUntilUTCoffset; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPass#setValidUntilUTCoffset(java.lang.Long) + */ + public void setValidUntilUTCoffset(Long validUntilUTCoffset) { + this.validUntilUTCoffset = validUntilUTCoffset; + } + + @Override + public void setUntilDate(Date date) { + this.setValidUntil(date); + } + +} diff --git a/src/org/uic/ticket/api/impl/SimplePlaces.java b/src/org/uic/ticket/api/impl/SimplePlaces.java new file mode 100644 index 0000000..94b2777 --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimplePlaces.java @@ -0,0 +1,89 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import java.util.Collection; +import java.util.LinkedHashSet; + +import org.uic.ticket.api.spec.IPlaces; + +// TODO: Auto-generated Javadoc +/** + * The Class SimplePlaces. + */ +public class SimplePlaces implements IPlaces { + + /** The coach. */ + protected String coach; + + /** The place string. */ + protected String placeString; + + /** The place description. */ + protected String placeDescription; + + /** The places. */ + protected Collection places = new LinkedHashSet(); + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPlaces#getCoach() + */ + public String getCoach() { + return coach; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPlaces#setCoach(java.lang.String) + */ + public void setCoach(String coach) { + this.coach = coach; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPlaces#getPlaceString() + */ + public String getPlaceString() { + return placeString; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPlaces#setPlaceString(java.lang.String) + */ + public void setPlaceString(String placeString) { + this.placeString = placeString; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPlaces#getPlaceDescription() + */ + public String getPlaceDescription() { + return placeDescription; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPlaces#setPlaceDescription(java.lang.String) + */ + public void setPlaceDescription(String placeDescription) { + this.placeDescription = placeDescription; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPlaces#getPlaces() + */ + public Collection getPlaces() { + return places; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPlaces#addPlace(java.lang.String) + */ + public void addPlace(String place) { + this.places.add(place); + } + + + + + +} diff --git a/src/org/uic/ticket/api/impl/SimplePolygone.java b/src/org/uic/ticket/api/impl/SimplePolygone.java new file mode 100644 index 0000000..86f3e77 --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimplePolygone.java @@ -0,0 +1,37 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import java.util.Collection; +import java.util.LinkedHashSet; + +import org.uic.ticket.api.spec.IGeoCoordinate; +import org.uic.ticket.api.spec.IPolygone; + +// TODO: Auto-generated Javadoc +/** + * The Class SimplePolygone. + */ +public class SimplePolygone implements IPolygone{ + + /** The edges. */ + protected Collection edges = new LinkedHashSet(); + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPolygone#getEdges() + */ + public Collection getEdges() { + return edges; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IPolygone#addEdge(org.uic.ticket.api.spec.IGeoCoordinate) + */ + public void addEdge(IGeoCoordinate edge) { + this.edges.add(edge); + } + + + +} diff --git a/src/org/uic/ticket/api/impl/SimpleRegisteredLuggage.java b/src/org/uic/ticket/api/impl/SimpleRegisteredLuggage.java new file mode 100644 index 0000000..801cd37 --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleRegisteredLuggage.java @@ -0,0 +1,67 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import org.uic.ticket.api.spec.IRegisteredLuggage; + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleRegisteredLuggage. + */ +public class SimpleRegisteredLuggage implements IRegisteredLuggage{ + + /** The registration id. */ + protected String registrationId; + + /** The max weight. */ + protected int maxWeight; + + /** The max size. */ + protected int maxSize; + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IRegisteredLuggage#getRegistrationId() + */ + public String getRegistrationId() { + return registrationId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IRegisteredLuggage#setRegistrationId(java.lang.String) + */ + public void setRegistrationId(String registrationId) { + this.registrationId = registrationId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IRegisteredLuggage#getMaxWeight() + */ + public int getMaxWeight() { + return maxWeight; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IRegisteredLuggage#setMaxWeight(int) + */ + public void setMaxWeight(int maxWeight) { + this.maxWeight = maxWeight; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IRegisteredLuggage#getMaxSize() + */ + public int getMaxSize() { + return maxSize; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IRegisteredLuggage#setMaxSize(int) + */ + public void setMaxSize(int maxSize) { + this.maxSize = maxSize; + } + + + +} diff --git a/src/org/uic/ticket/api/impl/SimpleReservation.java b/src/org/uic/ticket/api/impl/SimpleReservation.java new file mode 100644 index 0000000..2aa22de --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleReservation.java @@ -0,0 +1,611 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import java.util.Collection; +import java.util.Date; +import java.util.LinkedHashSet; + +import org.uic.ticket.api.asn.omv1.CodeTableType; +import org.uic.ticket.api.asn.omv1.PriceTypeType; +import org.uic.ticket.api.asn.omv1.ServiceType; +import org.uic.ticket.api.asn.omv1.TravelClassType; +import org.uic.ticket.api.spec.IBerth; +import org.uic.ticket.api.spec.ICompartmentDetails; +import org.uic.ticket.api.spec.IExtension; +import org.uic.ticket.api.spec.ILuggageRestriction; +import org.uic.ticket.api.spec.IPlaces; +import org.uic.ticket.api.spec.IReservation; +import org.uic.ticket.api.spec.IServiceBrand; +import org.uic.ticket.api.spec.ITariff; +import org.uic.ticket.api.spec.IVatDetail; + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleReservation. + */ +public class SimpleReservation extends SimpleDocumentData implements IReservation { + + /** The train. */ + protected String train; + + /** The departure date. */ + protected Date departureDate; + + /** The arrival date. */ + protected Date arrivalDate; + + /** The reference. */ + protected String reference; + + /** The product id. */ + protected String productId; + + /** The product owner. */ + protected String productOwner; + + /** The service brand. */ + protected IServiceBrand serviceBrand; + + /** The service. */ + protected ServiceType service = ServiceType.seat; + + /** The service brand description. */ + protected String serviceBrandDescription; + + /** The service brand abbreviation. */ + protected String serviceBrandAbbreviation; + + + /** The station code table. */ + protected CodeTableType stationCodeTable = CodeTableType.stationUICReservation; + + /** The from station. */ + protected String fromStation; + + /** The to station. */ + protected String toStation; + + /** The from station name. */ + protected String fromStationName; + + /** The to station name. */ + protected String toStationName; + + /** The carriers. */ + protected Collectioncarriers = new LinkedHashSet(); + + /** The berths. */ + protected Collection berths = new LinkedHashSet(); + + /** The tariffs. */ + protected Collection tariffs = new LinkedHashSet(); + + /** The class code. */ + protected TravelClassType classCode = TravelClassType.second; + + /** The service level. */ + protected String serviceLevel; + + /** The additional places of a second coach. */ + protected IPlaces additionalPlaces; + + /** The places. */ + protected IPlaces places; + + /** The bicycle places. */ + protected IPlaces bicyclePlaces; + + /** The compartment details. */ + protected ICompartmentDetails compartmentDetails; + + /** The number of overbooked. */ + protected int numberOfOverbooked; + + + + /** The price type. */ + protected PriceTypeType priceType = PriceTypeType.travelPrice; + + /** The type of supplement. */ + protected int typeOfSupplement; + + /** The number of supplements. */ + protected int numberOfSupplements; + + /** The VAT details. */ + protected CollectionvatDetails = new LinkedHashSet(); + + /** The price. */ + protected Long price; + + /** The info text. */ + protected String infoText; + + /** The luggage restriction. */ + protected ILuggageRestriction luggageRestriction; + + /** The extension. */ + protected IExtension extension; + + /** The departure ut coffset. */ + protected Long departureUTCoffset; + + /** The arrival ut coffset. */ + protected Long arrivalUTCoffset; + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#getTrain() + */ + public String getTrain() { + return train; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#setTrain(java.lang.String) + */ + public void setTrain(String train) { + this.train = train.trim(); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#getDepartureDate() + */ + public Date getDepartureDate() { + return departureDate; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#setDepartureDate(java.util.Date) + */ + public void setDepartureDate(Date departureDate) { + this.departureDate = departureDate; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#getArrivalDate() + */ + public Date getArrivalDate() { + return arrivalDate; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#setArrivalDate(java.util.Date) + */ + public void setArrivalDate(Date arrivalDate) { + this.arrivalDate = arrivalDate; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#getReference() + */ + public String getReference() { + return reference; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#setReference(java.lang.String) + */ + public void setReference(String reference) { + this.reference = reference; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#getProductId() + */ + public String getProductId() { + return productId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#setProductId(java.lang.String) + */ + public void setProductId(String productId) { + this.productId = productId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#getServiceBrand() + */ + public IServiceBrand getServiceBrand() { + return serviceBrand; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#setServiceBrand(int) + */ + public void setServiceBrand(IServiceBrand serviceBrand) { + this.serviceBrand = serviceBrand; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#getService() + */ + public ServiceType getService() { + return service; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#setService(org.uic.ticket.api.asn.om.ServiceType) + */ + public void setService(ServiceType service) { + this.service = service; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#getStationCodeTable() + */ + public CodeTableType getStationCodeTable() { + return stationCodeTable; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#setStationCodeTable(org.uic.ticket.api.asn.om.CodeTableType) + */ + public void setStationCodeTable(CodeTableType stationCodeTable) { + this.stationCodeTable = stationCodeTable; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#getFromStation() + */ + public String getFromStation() { + return fromStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#setFromStation(java.lang.String) + */ + public void setFromStation(String fromStation) { + this.fromStation = fromStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#getToStation() + */ + public String getToStation() { + return toStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#setToStation(java.lang.String) + */ + public void setToStation(String toStation) { + this.toStation = toStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#getFromStationName() + */ + public String getFromStationName() { + return fromStationName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#setFromStationName(java.lang.String) + */ + public void setFromStationName(String fromStationName) { + this.fromStationName = fromStationName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#getToStationName() + */ + public String getToStationName() { + return toStationName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#setToStationName(java.lang.String) + */ + public void setToStationName(String toStationName) { + this.toStationName = toStationName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#getCarriers() + */ + public Collection getCarriers() { + return carriers; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#addCarrier(java.lang.Integer) + */ + public void addCarrier(String carrier) { + this.carriers.add(carrier); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#getClassCode() + */ + public TravelClassType getClassCode() { + return classCode; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#setClassCode(org.uic.ticket.api.asn.om.TravelClassType) + */ + public void setClassCode(TravelClassType classCode) { + this.classCode = classCode; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#getServiceLevel() + */ + public String getServiceLevel() { + return serviceLevel; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#setServiceLevel(java.lang.String) + */ + public void setServiceLevel(String serviceLevel) { + this.serviceLevel = serviceLevel; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#getPlaces() + */ + public IPlaces getPlaces() { + return places; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#setPlaces(org.uic.ticket.api.spec.IPlaces) + */ + public void setPlaces(IPlaces places) { + this.places = places; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#getAdditionalPlaces() + */ + public IPlaces getAdditionalPlaces() { + return additionalPlaces; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#setAdditionalPlaces(org.uic.ticket.api.spec.IPlaces) + */ + public void setAdditionalPlaces(IPlaces places) { + this.additionalPlaces = places; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#getBicyclePlaces() + */ + public IPlaces getBicyclePlaces() { + return bicyclePlaces; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#setBicyclePlaces(org.uic.ticket.api.spec.IPlaces) + */ + public void setBicyclePlaces(IPlaces bicyclePlaces) { + this.bicyclePlaces = bicyclePlaces; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#getCompartmentDetails() + */ + public ICompartmentDetails getCompartmentDetails() { + return compartmentDetails; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#setCompartmentDetails(org.uic.ticket.api.spec.ICompartmentDetails) + */ + public void setCompartmentDetails(ICompartmentDetails compartmentDetails) { + this.compartmentDetails = compartmentDetails; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#getNumberOfOverbooked() + */ + public int getNumberOfOverbooked() { + return numberOfOverbooked; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#setNumberOfOverbooked(int) + */ + public void setNumberOfOverbooked(int numberOfOverbooked) { + this.numberOfOverbooked = numberOfOverbooked; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#getBerths() + */ + public Collection getBerths() { + return berths; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#addBerth(org.uic.ticket.api.spec.IBerth) + */ + public void addBerth(IBerth berth) { + this.berths.add(berth); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#getTariffs() + */ + public Collection getTariffs() { + return tariffs; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#addTariff(org.uic.ticket.api.spec.ITariff) + */ + public void addTariff(ITariff tariff) { + this.tariffs.add(tariff); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#getPriceType() + */ + public PriceTypeType getPriceType() { + return priceType; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#setPriceType(org.uic.ticket.api.asn.om.PriceTypeType) + */ + public void setPriceType(PriceTypeType priceType) { + this.priceType = priceType; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#getTypeOfSupplement() + */ + public int getTypeOfSupplement() { + return typeOfSupplement; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#setTypeOfSupplement(int) + */ + public void setTypeOfSupplement(int typeOfSupplement) { + this.typeOfSupplement = typeOfSupplement; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#getNumberOfSupplements() + */ + public int getNumberOfSupplements() { + return numberOfSupplements; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#setNumberOfSupplements(int) + */ + public void setNumberOfSupplements(int numberOfSupplements) { + this.numberOfSupplements = numberOfSupplements; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#getInfoText() + */ + public String getInfoText() { + return infoText; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#setInfoText(java.lang.String) + */ + public void setInfoText(String infoText) { + this.infoText = infoText; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#getLuggageRestriction() + */ + public ILuggageRestriction getLuggageRestriction() { + return luggageRestriction; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#setLuggageRestriction(org.uic.ticket.api.spec.ILuggageRestriction) + */ + public void setLuggageRestriction(ILuggageRestriction luggageRestriction) { + this.luggageRestriction = luggageRestriction; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#getExtension() + */ + public IExtension getExtension() { + return extension; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#setExtension(org.uic.ticket.api.spec.IExtension) + */ + public void setExtension(IExtension extension) { + this.extension = extension; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#getProductOwner() + */ + public String getProductOwner() { + return productOwner; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#setProductOwner(java.lang.String) + */ + public void setProductOwner(String productOwner) { + this.productOwner = productOwner; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#setPrice(java.lang.Long) + */ + @Override + public void setPrice(Long price) { + this.price = price; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#getPrice() + */ + @Override + public Long getPrice() { + return price; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#getVatDetails() + */ + @Override + public Collection getVatDetails() { + return vatDetails; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#addVatDetail(org.uic.ticket.api.spec.IVatDetail) + */ + @Override + public void addVatDetail(IVatDetail vatDetail) { + this.vatDetails.add(vatDetail); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#getDepartureUTCoffset() + */ + public Long getDepartureUTCoffset() { + return departureUTCoffset; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#setDepartureUTCoffset(java.lang.Long) + */ + public void setDepartureUTCoffset(Long departureUTCoffset) { + this.departureUTCoffset = departureUTCoffset; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#getArrivalUTCoffset() + */ + public Long getArrivalUTCoffset() { + return arrivalUTCoffset; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReservation#setArrivalUTCoffset(java.lang.Long) + */ + public void setArrivalUTCoffset(Long arrivalUTCoffset) { + this.arrivalUTCoffset = arrivalUTCoffset; + } + + + + +} diff --git a/src/org/uic/ticket/api/impl/SimpleReturnRouteDescription.java b/src/org/uic/ticket/api/impl/SimpleReturnRouteDescription.java new file mode 100644 index 0000000..bff80a4 --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleReturnRouteDescription.java @@ -0,0 +1,122 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import java.util.Collection; +import java.util.LinkedHashSet; + +import org.uic.ticket.api.spec.IRegionalValidity; +import org.uic.ticket.api.spec.IReturnRouteDescription; + +/** + * The Class SimpleReturnRouteDescription. + */ +public class SimpleReturnRouteDescription implements IReturnRouteDescription{ + + /** The from station. */ + protected String fromStation; + + /** The to station. */ + protected String toStation; + + /** The from station name. */ + protected String fromStationName; + + /** The to station name. */ + protected String toStationName; + + + /** The valid region desc. */ + protected String validRegionDesc; + + /** The valid region list. */ + protected Collection validRegionList = new LinkedHashSet(); + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReturnRouteDescription#getFromStation() + */ + public String getFromStation() { + return fromStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReturnRouteDescription#setFromStation(java.lang.String) + */ + public void setFromStation(String fromStation) { + this.fromStation = fromStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReturnRouteDescription#getToStation() + */ + public String getToStation() { + return toStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReturnRouteDescription#setToStation(java.lang.String) + */ + public void setToStation(String toStation) { + this.toStation = toStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReturnRouteDescription#getFromStationName() + */ + public String getFromStationName() { + return fromStationName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReturnRouteDescription#setFromStationName(java.lang.String) + */ + public void setFromStationName(String fromStationName) { + this.fromStationName = fromStationName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReturnRouteDescription#getToStationName() + */ + public String getToStationName() { + return toStationName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReturnRouteDescription#setToStationName(java.lang.String) + */ + public void setToStationName(String toStationName) { + this.toStationName = toStationName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReturnRouteDescription#getValidRegionDesc() + */ + public String getValidRegionDesc() { + return validRegionDesc; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReturnRouteDescription#setValidRegionDesc(java.lang.String) + */ + public void setValidRegionDesc(String validRegionDesc) { + this.validRegionDesc = validRegionDesc; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReturnRouteDescription#getValidRegionList() + */ + public Collection getValidRegionList() { + return validRegionList; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IReturnRouteDescription#addValidRegionList(org.uic.ticket.api.spec.IRegionalValidity) + */ + public void addValidRegionList(IRegionalValidity validRegion) { + this.validRegionList.add(validRegion); + } + + + +} diff --git a/src/org/uic/ticket/api/impl/SimpleRouteSection.java b/src/org/uic/ticket/api/impl/SimpleRouteSection.java new file mode 100644 index 0000000..079ae61 --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleRouteSection.java @@ -0,0 +1,106 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import org.uic.ticket.api.asn.omv1.CodeTableType; +import org.uic.ticket.api.spec.IRouteSection; + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleRouteSection. + */ +public class SimpleRouteSection implements IRouteSection { + + + /** The station code table. */ + protected CodeTableType stationCodeTable = CodeTableType.stationUIC; + + /** The from station. */ + protected String fromStation; + + /** The to station. */ + protected String toStation; + + /** The from station name. */ + protected String fromStationName; + + /** The to station name. */ + protected String toStationName; + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IRouteSection#getStationCodeTable() + */ + public CodeTableType getStationCodeTable() { + return stationCodeTable; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IRouteSection#setStationCodeTable(org.uic.ticket.api.asn.om.CodeTableType) + */ + public void setStationCodeTable(CodeTableType stationCodeTable) { + this.stationCodeTable = stationCodeTable; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IRouteSection#getFromStation() + */ + public String getFromStation() { + return fromStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IRouteSection#setFromStation(java.lang.String) + */ + public void setFromStation(String fromStation) { + this.fromStation = fromStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IRouteSection#getToStation() + */ + public String getToStation() { + return toStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IRouteSection#setToStation(java.lang.String) + */ + public void setToStation(String toStation) { + this.toStation = toStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IRouteSection#getFromStationName() + */ + public String getFromStationName() { + return fromStationName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IRouteSection#setFromStationName(java.lang.String) + */ + public void setFromStationName(String fromStationName) { + this.fromStationName = fromStationName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IRouteSection#getToStationName() + */ + public String getToStationName() { + return toStationName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IRouteSection#setToStationName(java.lang.String) + */ + public void setToStationName(String toStationName) { + this.toStationName = toStationName; + } + + + + + + +} diff --git a/src/org/uic/ticket/api/impl/SimpleSeriesDataDetails.java b/src/org/uic/ticket/api/impl/SimpleSeriesDataDetails.java new file mode 100644 index 0000000..726b069 --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleSeriesDataDetails.java @@ -0,0 +1,64 @@ +package org.uic.ticket.api.impl; + +import org.uic.ticket.api.spec.ISeriesDataDetails; + +public class SimpleSeriesDataDetails implements ISeriesDataDetails { + + + protected int offerIdentification; + + /** The supplying carrier. */ + protected int supplyingCarrier; + + /** The series. */ + protected int series; + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITariff#getSupplyingCarrier() + */ + public int getSupplyingCarrier() { + return supplyingCarrier; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITariff#setSupplyingCarrier(int) + */ + public void setSupplyingCarrier(int supplyingCarrier) { + this.supplyingCarrier = supplyingCarrier; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITariff#getOfferIdentification() + */ + public int getOfferIdentification() { + return offerIdentification; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITariff#setOfferIdentification(int) + */ + public void setOfferIdentification(int offerIdentification) { + this.offerIdentification = offerIdentification; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITariff#getSeries() + */ + public int getSeries() { + return series; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITariff#setSeries(int) + */ + public void setSeries(int series) { + this.series = series; + } + +} diff --git a/src/org/uic/ticket/api/impl/SimpleServiceBrand.java b/src/org/uic/ticket/api/impl/SimpleServiceBrand.java new file mode 100644 index 0000000..7b1e0cc --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleServiceBrand.java @@ -0,0 +1,43 @@ +package org.uic.ticket.api.impl; + +import org.uic.ticket.api.spec.IServiceBrand; + + + +public class SimpleServiceBrand implements IServiceBrand { + + /** The service brand. */ + protected int serviceBrand; + + /** The service brand description. */ + protected String serviceBrandDescription; + + /** The service brand abbreviation. */ + protected String serviceBrandAbbreviation; + + public int getServiceBrand() { + return serviceBrand; + } + + public void setServiceBrand(int serviceBrand) { + this.serviceBrand = serviceBrand; + } + + public String getServiceBrandDescription() { + return serviceBrandDescription; + } + + public void setServiceBrandDescription(String serviceBrandDescription) { + this.serviceBrandDescription = serviceBrandDescription; + } + + public String getServiceBrandAbbreviation() { + return serviceBrandAbbreviation; + } + + public void setServiceBrandAbbreviation(String serviceBrandAbbreviation) { + this.serviceBrandAbbreviation = serviceBrandAbbreviation; + } + + +} diff --git a/src/org/uic/ticket/api/impl/SimpleStationPassage.java b/src/org/uic/ticket/api/impl/SimpleStationPassage.java new file mode 100644 index 0000000..334d528 --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleStationPassage.java @@ -0,0 +1,296 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import java.util.Collection; +import java.util.Date; +import java.util.LinkedHashSet; + +import org.uic.ticket.api.asn.omv1.CodeTableType; +import org.uic.ticket.api.spec.IExtension; +import org.uic.ticket.api.spec.IStationPassage; + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleStationPassage. + */ +public class SimpleStationPassage extends SimpleDocumentData implements IStationPassage { + + /** The reference. */ + protected String reference; + + /** The product name. */ + protected String productName; + + /** The product type. */ + protected String productId; + + /** The product owner. */ + protected String productOwner; + + /** The valid from. */ + protected Date validFrom; + + /** The valid until. */ + protected Date validUntil; + + /** The station code table. */ + protected CodeTableType stationCodeTable = CodeTableType.stationUIC; + + /** The station name. */ + protected String stationName; + + /** The number ofdays allowed. */ + protected int numberOfdaysAllowed; + + /** The stations. */ + protected Collection stations = new LinkedHashSet(); + + /** The station names. */ + protected Collection stationNames = new LinkedHashSet(); + + + /** The extension data. */ + protected IExtension extensionData; + + + /** The area codes. */ + protected Collection areaCodes = new LinkedHashSet(); + + /** The area names. */ + protected Collection areaNames = new LinkedHashSet(); + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IStationPassage#getReference() + */ + public String getReference() { + return reference; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IStationPassage#setReference(java.lang.String) + */ + public void setReference(String reference) { + this.reference = reference; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IStationPassage#getProductName() + */ + public String getProductName() { + return productName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IStationPassage#setProductName(java.lang.String) + */ + public void setProductName(String name) { + this.productName = name; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IStationPassage#getProductType() + */ + public String getProductId() { + return productId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IStationPassage#setProductType(int) + */ + public void setProductId(String id) { + this.productId = id; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IStationPassage#getProductOwner() + */ + public String getProductOwner() { + return productOwner; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IStationPassage#setProductOwner(java.lang.String) + */ + public void setProductOwner(String productOwner) { + this.productOwner = productOwner; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IStationPassage#getValidFrom() + */ + public Date getValidFrom() { + return validFrom; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IStationPassage#setValidFrom(java.util.Date) + */ + public void setValidFrom(Date validFrom) { + this.validFrom = validFrom; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IStationPassage#getValidUntil() + */ + public Date getValidUntil() { + return validUntil; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IStationPassage#setValidUntil(java.util.Date) + */ + public void setValidUntil(Date validUntil) { + this.validUntil = validUntil; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IStationPassage#getStationCodeTable() + */ + public CodeTableType getStationCodeTable() { + return stationCodeTable; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IStationPassage#setStationCodeTable(org.uic.ticket.api.asn.om.CodeTableType) + */ + public void setStationCodeTable(CodeTableType stationCodeTable) { + this.stationCodeTable = stationCodeTable; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IStationPassage#getStations() + */ + public Collection getStations() { + return stations; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IStationPassage#addStation(java.lang.String) + */ + public void addStation(String station) { + this.stations.add(station); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IStationPassage#addStationName(java.lang.String) + */ + public void addStationName(String name) { + this.stationNames.add(name); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IStationPassage#getStationNames() + */ + public Collection getStationNames() { + return stationNames; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IStationPassage#getNumberOfdaysAllowed() + */ + public int getNumberOfdaysAllowed() { + return numberOfdaysAllowed; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IStationPassage#setNumberOfdaysAllowed(int) + */ + public void setNumberOfdaysAllowed(int numberOfdaysAllowed) { + this.numberOfdaysAllowed = numberOfdaysAllowed; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IStationPassage#getExtension() + */ + @Override + public IExtension getExtension() { + return extensionData; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IStationPassage#setExtension(org.uic.ticket.api.spec.IExtension) + */ + @Override + public void setExtension(IExtension extensionData) { + this.extensionData = extensionData; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IStationPassage#getAreaCodes() + */ + @Override + public Collection getAreaCodes() { + return areaCodes; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IStationPassage#getAreaNames() + */ + @Override + public Collection getAreaNames() { + return areaNames; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IStationPassage#addAreaCode(java.lang.String) + */ + @Override + public void addAreaCode(String code) { + areaCodes.add(code); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IStationPassage#addAreaName(java.lang.String) + */ + @Override + public void addAreaName(String name) { + areaNames.add(name); + } + + + /** The valid from utc coffset. */ + protected Long validFromUTCoffset; + + /** The valid until utc coffset. */ + protected Long validUntilUTCoffset; + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IStationPassage#getValidFromUTCoffset() + */ + public Long getValidFromUTCoffset() { + return validFromUTCoffset; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IStationPassage#setValidFromUTCoffset(java.lang.Long) + */ + public void setValidFromUTCoffset(Long validFromUTCoffset) { + this.validFromUTCoffset = validFromUTCoffset; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IStationPassage#getValidUntilUTCoffset() + */ + public Long getValidUntilUTCoffset() { + return validUntilUTCoffset; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IStationPassage#setValidUntilUTCoffset(java.lang.Long) + */ + public void setValidUntilUTCoffset(Long validUntilUTCoffset) { + this.validUntilUTCoffset = validUntilUTCoffset; + } + + @Override + public void setUntilDate(Date date) { + // TODO Automatisch generierter Methodenstub + this.validUntil = date; + } + + + +} diff --git a/src/org/uic/ticket/api/impl/SimpleTariff.java b/src/org/uic/ticket/api/impl/SimpleTariff.java new file mode 100644 index 0000000..e7fe371 --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleTariff.java @@ -0,0 +1,238 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import java.util.Collection; +import java.util.LinkedHashSet; + +import org.uic.ticket.api.asn.omv1.PassengerType; +import org.uic.ticket.api.spec.ICardReference; +import org.uic.ticket.api.spec.IRouteSection; +import org.uic.ticket.api.spec.ISeriesDataDetails; +import org.uic.ticket.api.spec.ITariff; + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleTariff. + */ +public class SimpleTariff implements ITariff { + + /** The number of passengers. */ + protected int numberOfPassengers = 1; + + /** The passenger type. */ + protected PassengerType passengerType ; + + + /** The age below. */ + protected int ageBelow; + + /** The age above. */ + protected int ageAbove; + + + /** The traveler ids. */ + protected CollectiontravelerIds = new LinkedHashSet(); + + + /** The restricted to country of residence. */ + protected boolean restrictedToCountryOfResidence = false; + + + protected ISeriesDataDetails seriesDataDetails; + + + /** The restricted to route section. */ + protected IRouteSection restrictedToRouteSection; + + + /** The tariff id. */ + protected String tariffId; + + /** The tariff description. */ + protected String tariffDescription; + + + /** The reduction cards. */ + protected Collection reductionCards = new LinkedHashSet(); + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITariff#getNumberOfPassengers() + */ + public int getNumberOfPassengers() { + return numberOfPassengers; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITariff#setNumberOfPassengers(int) + */ + public void setNumberOfPassengers(int numberOfPassengers) { + this.numberOfPassengers = numberOfPassengers; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITariff#getPassengerType() + */ + public PassengerType getPassengerType() { + return passengerType; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITariff#setPassengerType(org.uic.ticket.api.asn.om.PassengerType) + */ + public void setPassengerType(PassengerType passengerType) { + this.passengerType = passengerType; + } + + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITariff#getAgeBelow() + */ + public int getAgeBelow() { + return ageBelow; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITariff#setAgeBelow(int) + */ + public void setAgeBelow(int ageBelow) { + this.ageBelow = ageBelow; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITariff#getAgeAbove() + */ + public int getAgeAbove() { + return ageAbove; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITariff#setAgeAbove(int) + */ + public void setAgeAbove(int ageAbove) { + this.ageAbove = ageAbove; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITariff#getTravelerIds() + */ + public Collection getTravelerIds() { + return travelerIds; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITariff#addTravelerId(java.lang.Integer) + */ + public void addTravelerId(Integer travelerId) { + this.travelerIds.add(travelerId); + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITariff#isRestrictedToCountryOfResidence() + */ + public boolean isRestrictedToCountryOfResidence() { + return restrictedToCountryOfResidence; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITariff#setRestrictedToCountryOfResidence(boolean) + */ + public void setRestrictedToCountryOfResidence( + boolean restrictedToCountryOfResidence) { + this.restrictedToCountryOfResidence = restrictedToCountryOfResidence; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITariff#getRestrictedToRouteSection() + */ + public IRouteSection getRestrictedToRouteSection() { + return restrictedToRouteSection; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITariff#setRestrictedToRouteSection(org.uic.ticket.api.spec.IRouteSection) + */ + public void setRestrictedToRouteSection(IRouteSection restrictedToRouteSection) { + this.restrictedToRouteSection = restrictedToRouteSection; + } + + + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITariff#getTariffId() + */ + public String getTariffId() { + return tariffId; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITariff#setTariffId(java.lang.String) + */ + public void setTariffId(String tariffId) { + this.tariffId = tariffId; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITariff#getTariffDescription() + */ + public String getTariffDescription() { + return tariffDescription; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITariff#setTariffDescription(java.lang.String) + */ + public void setTariffDescription(String tariffDescription) { + this.tariffDescription = tariffDescription; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITariff#getReductionCards() + */ + public Collection getReductionCards() { + return reductionCards; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITariff#addReductionCard(org.uic.ticket.api.spec.ICardReference) + */ + public void addReductionCard(ICardReference reductionCard) { + this.reductionCards.add(reductionCard); + } + + + @Override + public void setSeriesDataDetails(ISeriesDataDetails seriesDataDetails) { + this.seriesDataDetails = seriesDataDetails; + } + + + @Override + public ISeriesDataDetails getSeriesDataDetails() { + return seriesDataDetails; + } + + + +} diff --git a/src/org/uic/ticket/api/impl/SimpleTicketLink.java b/src/org/uic/ticket/api/impl/SimpleTicketLink.java new file mode 100644 index 0000000..3262caa --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleTicketLink.java @@ -0,0 +1,122 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import org.uic.ticket.api.asn.omv1.LinkMode; +import org.uic.ticket.api.asn.omv1.TicketType; +import org.uic.ticket.api.spec.ITicketLink; + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleTicketLink. + */ +public class SimpleTicketLink implements ITicketLink { + + /** The reference. */ + protected String reference; + + /** The issuer. */ + protected String issuer; + + /** The issuer PNR. */ + protected String issuerPNR; + + /** The product owner. */ + protected String productOwner; + + /** The ticket type. */ + protected TicketType ticketType = TicketType.openTicket; + + /** The link mode. */ + protected LinkMode linkMode = LinkMode.issuedTogether; + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITicketLink#getReference() + */ + public String getReference() { + return reference; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITicketLink#setReference(java.lang.String) + */ + public void setReference(String reference) { + this.reference = reference; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITicketLink#getIssuer() + */ + public String getIssuer() { + return issuer; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITicketLink#setIssuer(java.lang.String) + */ + public void setIssuer(String issuer) { + this.issuer = issuer; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITicketLink#getProductOwner() + */ + public String getProductOwner() { + return productOwner; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITicketLink#setProductOwner(java.lang.String) + */ + public void setProductOwner(String productOwner) { + this.productOwner = productOwner; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITicketLink#getTicketType() + */ + public TicketType getTicketType() { + return ticketType; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITicketLink#setTicketType(org.uic.ticket.api.asn.om.TicketType) + */ + public void setTicketType(TicketType ticketType) { + this.ticketType = ticketType; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITicketLink#getLinkMode() + */ + public LinkMode getLinkMode() { + return linkMode; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITicketLink#setLinkMode(org.uic.ticket.api.asn.om.LinkMode) + */ + public void setLinkMode(LinkMode linkMode) { + this.linkMode = linkMode; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITicketLink#getIssuerPNR() + */ + public String getIssuerPNR() { + return issuerPNR; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITicketLink#setIssuerPNR(java.lang.String) + */ + public void setIssuerPNR(String issuerPNR) { + this.issuerPNR = issuerPNR; + } + + + + + +} diff --git a/src/org/uic/ticket/api/impl/SimpleTimeRange.java b/src/org/uic/ticket/api/impl/SimpleTimeRange.java new file mode 100644 index 0000000..f42b637 --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleTimeRange.java @@ -0,0 +1,56 @@ +package org.uic.ticket.api.impl; + + + +import org.uic.ticket.api.spec.ITimeRange; + +public class SimpleTimeRange implements ITimeRange { + + int fromTime = 0; + int untilTime = 1440; + + @Override + public int getFromTime() { + return fromTime; + } + + @Override + public int getUntilTime() { + return untilTime; + } + + @Override + public void setFromTime(int minutes) { + this.fromTime = minutes; + } + + @Override + public void setUntilTime(int minutes) { + this.untilTime = minutes; + } + + /** The valid from utc coffset. */ + protected Long validFromUTCoffset; + + /** The valid until utc coffset. */ + protected Long validUntilUTCoffset; + + public Long getValidFromUTCoffset() { + return validFromUTCoffset; + } + + public void setValidFromUTCoffset(Long validFromUTCoffset) { + this.validFromUTCoffset = validFromUTCoffset; + } + + public Long getValidUntilUTCoffset() { + return validUntilUTCoffset; + } + + public void setValidUntilUTCoffset(Long validUntilUTCoffset) { + this.validUntilUTCoffset = validUntilUTCoffset; + } + + + +} diff --git a/src/org/uic/ticket/api/impl/SimpleToken.java b/src/org/uic/ticket/api/impl/SimpleToken.java new file mode 100644 index 0000000..7dcf5d2 --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleToken.java @@ -0,0 +1,68 @@ +package org.uic.ticket.api.impl; + +import org.uic.ticket.api.spec.IToken; + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleToken. + */ +public class SimpleToken implements IToken { + + /** The provider. */ + protected String provider; + + /** The specification. */ + protected String specification; + + /** The token. */ + protected byte[] token; + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IToken#getTokenProvider() + */ + @Override + public String getTokenProvider() { + return provider; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IToken#getTokenSpecification() + */ + @Override + public String getTokenSpecification() { + return specification; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IToken#getToken() + */ + @Override + public byte[] getToken() { + return token; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IToken#setTokenProvider(java.lang.String) + */ + @Override + public void setTokenProvider(String provider) { + this.provider = provider; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IToken#setTokenSppecification(java.lang.String) + */ + @Override + public void setTokenSpecification(String specification) { + this.specification = specification; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IToken#setToken(byte[]) + */ + @Override + public void setToken(byte[] token) { + this.token = token; + } + +} diff --git a/src/org/uic/ticket/api/impl/SimpleTrainLink.java b/src/org/uic/ticket/api/impl/SimpleTrainLink.java new file mode 100644 index 0000000..1431de3 --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleTrainLink.java @@ -0,0 +1,138 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import java.util.Date; + +import org.uic.ticket.api.spec.ITrainLink; + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleTrainLink. + */ +public class SimpleTrainLink implements ITrainLink{ + + + /** The train. */ + protected String train; + + /** The departure date time. */ + protected Date departureDateTime; + + /** offset to UTC time in units of 15 minutes. */ + protected Long departureUTCoffset; + + /** The from station. */ + protected String fromStation; + + /** The to station. */ + protected String toStation; + + /** The from station name. */ + protected String fromStationName; + + /** The to station name. */ + protected String toStationName; + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITrainLink#getTrain() + */ + public String getTrain() { + return train; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITrainLink#setTrain(java.lang.String) + */ + public void setTrain(String train) { + this.train = train.trim(); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITrainLink#getDepartureDateTime() + */ + public Date getDepartureDateTime() { + return departureDateTime; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITrainLink#setDepartureDateTime(java.util.Date) + */ + public void setDepartureDateTime(Date departureDateTime) { + this.departureDateTime = departureDateTime; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITrainLink#getFromStation() + */ + public String getFromStation() { + return fromStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITrainLink#setFromStation(java.lang.String) + */ + public void setFromStation(String fromStation) { + this.fromStation = fromStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITrainLink#getToStation() + */ + public String getToStation() { + return toStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITrainLink#setToStation(java.lang.String) + */ + public void setToStation(String toStation) { + this.toStation = toStation.trim(); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITrainLink#getFromStationName() + */ + public String getFromStationName() { + return fromStationName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITrainLink#setFromStationName(java.lang.String) + */ + public void setFromStationName(String fromStationName) { + this.fromStationName = fromStationName.trim(); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITrainLink#getToStationName() + */ + public String getToStationName() { + return toStationName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITrainLink#setToStationName(java.lang.String) + */ + public void setToStationName(String toStationName) { + this.toStationName = toStationName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITrainLink#getDepartureUTCoffset() + */ + public Long getDepartureUTCoffset() { + return departureUTCoffset; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITrainLink#setDepartureUTCoffset(java.lang.Long) + */ + public void setDepartureUTCoffset(Long departureUTCoffset) { + this.departureUTCoffset = departureUTCoffset; + } + + + +} diff --git a/src/org/uic/ticket/api/impl/SimpleTraveler.java b/src/org/uic/ticket/api/impl/SimpleTraveler.java new file mode 100644 index 0000000..50c322c --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleTraveler.java @@ -0,0 +1,290 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import java.util.Collection; +import java.util.Date; +import java.util.HashSet; + +import org.uic.ticket.api.asn.omv1.GenderType; +import org.uic.ticket.api.asn.omv1.PassengerType; +import org.uic.ticket.api.spec.ICustomerStatusDescription; +import org.uic.ticket.api.spec.ITraveler; + + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleTraveler. + */ +public class SimpleTraveler implements ITraveler { + + + /** The first name. */ + protected String firstName; + + /** The second name. */ + protected String secondName; + + /** The last name. */ + protected String lastName; + + /** The id card. */ + protected String idCard; + + /** The passport id. */ + protected String passportId; + + /** The title. */ + protected String title; + + /** The gender. */ + protected GenderType gender; + + /** The customer id. */ + protected String customerId; + + /** The date of birth. */ + protected Date dateOfBirth; + + /** The ticket holder. */ + protected boolean ticketHolder = true; + + /** The passenger type. */ + protected PassengerType passengerType; + + /** The passenger with reduced mobility. */ + protected boolean passengerWithReducedMobility = false; + + /** The country of residence. */ + protected int countryOfResidence = 0; + + + /** The country of passport. */ + protected int countryOfPassport = 0; + + /** The country of id card. */ + protected int countryOfIDCard = 0; + + /** The status collection. */ + protected Collection statusCollection = new HashSet(); + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITraveler#getFirstName() + */ + public String getFirstName() { + return firstName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITraveler#setFirstName(java.lang.String) + */ + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITraveler#getSecondName() + */ + public String getSecondName() { + return secondName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITraveler#setSecondName(java.lang.String) + */ + public void setSecondName(String secondName) { + this.secondName = secondName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITraveler#getLastName() + */ + public String getLastName() { + return lastName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITraveler#setLastName(java.lang.String) + */ + public void setLastName(String lastName) { + this.lastName = lastName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITraveler#getIdCard() + */ + public String getIdCard() { + return idCard; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITraveler#setIdCard(java.lang.String) + */ + public void setIdCard(String idCard) { + this.idCard = idCard; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITraveler#getPassportId() + */ + public String getPassportId() { + return passportId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITraveler#setPassportId(java.lang.String) + */ + public void setPassportId(String passportId) { + this.passportId = passportId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITraveler#getTitle() + */ + public String getTitle() { + return title; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITraveler#setTitle(java.lang.String) + */ + public void setTitle(String title) { + this.title = title; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITraveler#getGender() + */ + public GenderType getGender() { + return gender; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITraveler#setGender(org.uic.ticket.api.asn.om.GenderType) + */ + public void setGender(GenderType gender) { + this.gender = gender; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITraveler#getCustomerId() + */ + public String getCustomerId() { + return customerId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITraveler#setCustomerId(java.lang.String) + */ + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITraveler#getDateOfBirth() + */ + public Date getDateOfBirth() { + return dateOfBirth; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITraveler#setDateOfBirth(java.util.Date) + */ + public void setDateOfBirth(Date dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITraveler#isTicketHolder() + */ + public boolean isTicketHolder() { + return ticketHolder; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITraveler#setTicketHolder(boolean) + */ + public void setTicketHolder(boolean ticketHolder) { + this.ticketHolder = ticketHolder; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITraveler#getPassengerType() + */ + public PassengerType getPassengerType() { + return passengerType; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITraveler#setPassengerType(org.uic.ticket.api.asn.om.PassengerType) + */ + public void setPassengerType(PassengerType passengerType) { + this.passengerType = passengerType; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITraveler#isPassengerWithReducedMobility() + */ + public boolean isPassengerWithReducedMobility() { + return passengerWithReducedMobility; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITraveler#setPassengerWithReducedMobility(boolean) + */ + public void setPassengerWithReducedMobility(boolean passengerWithReducedMobility) { + this.passengerWithReducedMobility = passengerWithReducedMobility; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITraveler#getCountryOfResidence() + */ + public int getCountryOfResidence() { + return countryOfResidence; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITraveler#setCountryOfResidence(int) + */ + public void setCountryOfResidence(int countryOfResidence) { + this.countryOfResidence = countryOfResidence; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITraveler#getStatusCollection() + */ + public Collection getStatusCollection() { + return statusCollection; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.ITraveler#addStatusDescription(org.uic.ticket.api.spec.ICustomerStatusDescription) + */ + public void addStatusDescription(ICustomerStatusDescription statusDescription) { + this.statusCollection.add(statusDescription); + } + + @Override + public int getPassportCountry() { + return countryOfPassport; + } + + @Override + public void setPassportCountry(int country) { + this.countryOfPassport = country; + } + + @Override + public int getIDCardCountry() { + return countryOfIDCard; + } + + @Override + public void setIDCardCountry(int country) { + this.countryOfIDCard = country; + } + + + +} diff --git a/src/org/uic/ticket/api/impl/SimpleTravelerDetail.java b/src/org/uic/ticket/api/impl/SimpleTravelerDetail.java new file mode 100644 index 0000000..0c84498 --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleTravelerDetail.java @@ -0,0 +1,83 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import java.util.LinkedHashSet; +import java.util.Set; + +import org.uic.ticket.api.spec.ITraveler; +import org.uic.ticket.api.spec.ITravelerDetail; + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleTravelerDetail. + */ +public class SimpleTravelerDetail implements ITravelerDetail{ + + /** The group name. */ + String groupName; + + /** The preferred language. */ + String preferredLanguage; + + /** The travelers. */ + LinkedHashSet travelers = new LinkedHashSet(); + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.ITravelerDetail#getGroupName() + */ + public String getGroupName() { + return groupName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.ITravelerDetail#setGroupName(java.lang.String) + */ + public void setGroupName(String groupName) { + this.groupName = groupName; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.ITravelerDetail#addTraveler(org.uic.ticket.api.ITravelerData) + */ + public void addTraveler (ITraveler traveler) { + travelers.add(traveler); + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.ITravelerDetail#getTravelers() + */ + public Set getTravelers() { + return travelers; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.ITravelerDetail#setTravelers(java.util.LinkedHashSet) + */ + /** + * Sets the travelers. + * + * @param travelers the new travelers + */ + public void setTravelers(LinkedHashSet travelers) { + this.travelers = travelers; + } + + + @Override + public String getPreferredLanguage() { + return preferredLanguage; + } + + @Override + public void setPreferredLanguage(String language) { + this.preferredLanguage = language; + } + + + + + +} diff --git a/src/org/uic/ticket/api/impl/SimpleUicRailTicket.java b/src/org/uic/ticket/api/impl/SimpleUicRailTicket.java new file mode 100644 index 0000000..d3138b7 --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleUicRailTicket.java @@ -0,0 +1,234 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import java.util.Collection; +import java.util.LinkedHashSet; + +import org.uic.ticket.api.spec.ICarCarriageReservation; +import org.uic.ticket.api.spec.IControlDetail; +import org.uic.ticket.api.spec.ICounterMark; +import org.uic.ticket.api.spec.ICustomerCard; +import org.uic.ticket.api.spec.IDelayConfirmation; +import org.uic.ticket.api.spec.IDocumentData; +import org.uic.ticket.api.spec.IDocumentExtension; +import org.uic.ticket.api.spec.IExtension; +import org.uic.ticket.api.spec.IFipTicket; +import org.uic.ticket.api.spec.IIssuingDetail; +import org.uic.ticket.api.spec.IOpenTicket; +import org.uic.ticket.api.spec.IParkingGround; +import org.uic.ticket.api.spec.IPass; +import org.uic.ticket.api.spec.IReservation; +import org.uic.ticket.api.spec.IStationPassage; +import org.uic.ticket.api.spec.ITravelerDetail; +import org.uic.ticket.api.spec.IUicRailTicket; +import org.uic.ticket.api.spec.IVoucher; + + + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleUicRailTicket. + */ +public class SimpleUicRailTicket implements IUicRailTicket { + + /** The issuer details. */ + private IIssuingDetail issuerDetails = new SimpleIssuingDetail(); + + /** The traveler details. */ + private ITravelerDetail travelerDetails; + + /** The control details. */ + private IControlDetail controlDetails; + + /** The extensions. */ + private Collection extensions = new LinkedHashSet(); + + /** The documents. */ + private Collection documents = new LinkedHashSet(); + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.IUicRailTicket#getIssuerDetails() + */ + @Override + public IIssuingDetail getIssuerDetails() { + + if (issuerDetails == null) { + issuerDetails = new SimpleIssuingDetail(); + } + return issuerDetails; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.IUicRailTicket#getTravelerDetails() + */ + public ITravelerDetail getTravelerDetails() { + + if (travelerDetails == null) { + travelerDetails = new SimpleTravelerDetail(); + } + return travelerDetails; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IUicRailTicket#getControlDetails() + */ + public IControlDetail getControlDetails() { + + if (controlDetails == null) { + controlDetails = new SimpleControlDetail(); + } + return controlDetails; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IUicRailTicket#getExtensions() + */ + public Collection getExtensions() { + return extensions; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IUicRailTicket#addExtension(org.uic.ticket.api.spec.IExtension) + */ + public void addExtension(IExtension extension) { + this.extensions.add(extension); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IUicRailTicket#getDocuments() + */ + public Collection getDocuments() { + return documents; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IUicRailTicket#setIssuerDetails(org.uic.ticket.api.spec.IIssuingDetail) + */ + public void setIssuerDetails(IIssuingDetail issuerDetails) { + this.issuerDetails = issuerDetails; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IUicRailTicket#setTravelerDetails(org.uic.ticket.api.spec.ITravelerDetail) + */ + public void setTravelerDetails(ITravelerDetail travelerDetails) { + this.travelerDetails = travelerDetails; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IUicRailTicket#setControlDetails(org.uic.ticket.api.spec.IControlDetail) + */ + public void setControlDetails(IControlDetail controlDetails) { + this.controlDetails = controlDetails; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IUicRailTicket#getDocumentData() + */ + @Override + public Collection getDocumentData() { + return this.documents; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IUicRailTicket#addReservation(org.uic.ticket.api.spec.IReservation) + */ + @Override + public void addReservation(IReservation document) { + this.documents.add(document); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IUicRailTicket#addOpenTicket(org.uic.ticket.api.spec.IOpenTicket) + */ + @Override + public void addOpenTicket(IOpenTicket document) { + this.documents.add(document); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IUicRailTicket#addCarCarriageReservation(org.uic.ticket.api.spec.ICarCarriageReservation) + */ + @Override + public void addCarCarriageReservation(ICarCarriageReservation document) { + this.documents.add(document); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IUicRailTicket#addPass(org.uic.ticket.api.spec.IPass) + */ + @Override + public void addPass(IPass document) { + this.documents.add(document); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IUicRailTicket#addVoucher(org.uic.ticket.api.spec.IVoucher) + */ + @Override + public void addVoucher(IVoucher document) { + this.documents.add(document); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IUicRailTicket#addCustomerCard(org.uic.ticket.api.spec.ICustomerCard) + */ + @Override + public void addCustomerCard(ICustomerCard document) { + this.documents.add(document); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IUicRailTicket#addCounterMark(org.uic.ticket.api.spec.ICounterMark) + */ + @Override + public void addCounterMark(ICounterMark document) { + this.documents.add(document); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IUicRailTicket#addParkingGround(org.uic.ticket.api.spec.IParkingGround) + */ + @Override + public void addParkingGround(IParkingGround document) { + this.documents.add(document); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IUicRailTicket#addFipTicket(org.uic.ticket.api.spec.IFipTicket) + */ + @Override + public void addFipTicket(IFipTicket document) { + this.documents.add(document); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IUicRailTicket#addStationPassage(org.uic.ticket.api.spec.IStationPassage) + */ + @Override + public void addStationPassage(IStationPassage document) { + this.documents.add(document); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IUicRailTicket#addDocumentExtension(org.uic.ticket.api.spec.IDocumentExtension) + */ + @Override + public void addDocumentExtension(IDocumentExtension document) { + this.documents.add(document); + } + + @Override + public void addDelayConfirmation(IDelayConfirmation document) { + this.documents.add(document); + } + + +} diff --git a/src/org/uic/ticket/api/impl/SimpleUicTicketObjectFactory.java b/src/org/uic/ticket/api/impl/SimpleUicTicketObjectFactory.java new file mode 100644 index 0000000..05ecfde --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleUicTicketObjectFactory.java @@ -0,0 +1,243 @@ +package org.uic.ticket.api.impl; + +import org.uic.ticket.api.spec.IBerth; +import org.uic.ticket.api.spec.ICarCarriageReservation; +import org.uic.ticket.api.spec.ICardReference; +import org.uic.ticket.api.spec.ICompartmentDetails; +import org.uic.ticket.api.spec.IControlDetail; +import org.uic.ticket.api.spec.ICounterMark; +import org.uic.ticket.api.spec.ICustomerCard; +import org.uic.ticket.api.spec.ICustomerStatusDescription; +import org.uic.ticket.api.spec.IDelayConfirmation; +import org.uic.ticket.api.spec.IDocumentData; +import org.uic.ticket.api.spec.IDocumentExtension; +import org.uic.ticket.api.spec.IExtension; +import org.uic.ticket.api.spec.IFipTicket; +import org.uic.ticket.api.spec.IGeoCoordinate; +import org.uic.ticket.api.spec.IIncludedOpenTicket; +import org.uic.ticket.api.spec.IIssuingDetail; +import org.uic.ticket.api.spec.ILine; +import org.uic.ticket.api.spec.ILuggageRestriction; +import org.uic.ticket.api.spec.IOpenTicket; +import org.uic.ticket.api.spec.IParkingGround; +import org.uic.ticket.api.spec.IPass; +import org.uic.ticket.api.spec.IPlaces; +import org.uic.ticket.api.spec.IPolygone; +import org.uic.ticket.api.spec.IRegisteredLuggage; +import org.uic.ticket.api.spec.IReservation; +import org.uic.ticket.api.spec.IReturnRouteDescription; +import org.uic.ticket.api.spec.IRouteSection; +import org.uic.ticket.api.spec.ISeriesDataDetails; +import org.uic.ticket.api.spec.IServiceBrand; +import org.uic.ticket.api.spec.IStationPassage; +import org.uic.ticket.api.spec.ITariff; +import org.uic.ticket.api.spec.ITicketLink; +import org.uic.ticket.api.spec.ITimeRange; +import org.uic.ticket.api.spec.IToken; +import org.uic.ticket.api.spec.ITrainLink; +import org.uic.ticket.api.spec.ITraveler; +import org.uic.ticket.api.spec.ITravelerDetail; +import org.uic.ticket.api.spec.IUicRailTicket; +import org.uic.ticket.api.spec.IUicTicketObjectFactory; +import org.uic.ticket.api.spec.IValidityDetails; +import org.uic.ticket.api.spec.IValidityRange; +import org.uic.ticket.api.spec.IVatDetail; +import org.uic.ticket.api.spec.IViaStation; +import org.uic.ticket.api.spec.IVoucher; +import org.uic.ticket.api.spec.IZone; + + + + +public class SimpleUicTicketObjectFactory implements IUicTicketObjectFactory { + + public static IUicTicketObjectFactory getInstance(){ + return new SimpleUicTicketObjectFactory(); + } + + + public IBerth createBerth() { + return new SimpleBerth(); + } + + public ICarCarriageReservation createCarCarriageReservation() { + return new SimpleCarCarriageReservation(); + } + + public ICardReference createCardReference() { + return new SimpleCardReference(); + } + + public ICompartmentDetails createCompartmentDetails() { + return new SimpleCompartmentDetails(); + } + + public IControlDetail createControlDetail() { + return new SimpleControlDetail(); + } + + public ICounterMark createCounterMark() { + return new SimpleCounterMark(); + } + + public ICustomerCard createCustomerCard() { + return new SimpleCustomerCard(); + } + + public ICustomerStatusDescription createCustomerStatusDescription() { + return new SimpleCustomerStatusDescription(); + } + + public IDelayConfirmation createDelayConfirmation() { + return new SimpleDelayConfirmation(); + } + + public IDocumentData createDocumentData() { + return new SimpleDocumentData(); + } + + public IExtension createExtension() { + return new SimpleExtension(); + } + + public IFipTicket createFipTicket() { + return new SimpleFipTicket(); + } + + public IGeoCoordinate createGeoCoordinate() { + return new SimpleGeoCoordinate(); + } + + public IIncludedOpenTicket createIncludedOpenTicket() { + return new SimpleIncludedOpenTicket(); + } + + public IIssuingDetail createIssuingDetail() { + return new SimpleIssuingDetail(); + } + + public ILine createLine() { + return new SimpleLine(); + } + + public ILuggageRestriction createLuggageRestriction() { + return new SimpleLuggageRestriction(); + } + + public IOpenTicket createOpenTicket() { + return new SimpleOpenTicket(); + } + + public IParkingGround createParkingGround() { + return new SimpleParkingGround(); + } + + public IPass createPass() { + return new SimplePass(); + } + + public IPlaces createPlaces() { + return new SimplePlaces(); + } + + public IPolygone createPolygone() { + return new SimplePolygone(); + } + + public IRegisteredLuggage createRegisteredLuggage() { + return new SimpleRegisteredLuggage(); + } + + public IReservation createReservation() { + return new SimpleReservation(); + } + + public IReturnRouteDescription createReturnRouteDescription() { + return new SimpleReturnRouteDescription(); + } + + public IRouteSection createRouteSection() { + return new SimpleRouteSection(); + } + + public ISeriesDataDetails createSeriesDataDetails() { + return new SimpleSeriesDataDetails(); + } + + public IStationPassage createStationPassage() { + return new SimpleStationPassage(); + } + + public ITariff createTariff() { + return new SimpleTariff(); + } + + public ITicketLink createTicketLink() { + return new SimpleTicketLink(); + } + + public ITimeRange createTimeRange() { + return new SimpleTimeRange(); + } + + public IToken createToken() { + return new SimpleToken(); + } + + public ITrainLink createTrainLink() { + return new SimpleTrainLink(); + } + + public ITraveler createTraveler() { + return new SimpleTraveler(); + } + + public ITravelerDetail createTravelerDetail() { + return new SimpleTravelerDetail(); + } + + public IUicRailTicket createUicRailTicket() { + return new SimpleUicRailTicket(); + } + + public IValidityDetails createValidityDetails() { + return new SimpleValidityDetails(); + } + + public IValidityRange createValidityRange() { + return new SimpleValidityRange(); + } + + public IViaStation createViaStation() { + return new SimpleViaStation(); + } + + public IVoucher createVoucher() { + return new SimpleVoucher(); + } + + public IZone createZone() { + return new SimpleZone(); + } + + public IDocumentExtension createDocumentExtension() { + return new SimpleDocumentExtension(); + } + + + @Override + public IServiceBrand createServiceBrand() { + return new SimpleServiceBrand(); + } + + + @Override + public IVatDetail createVatDetail() { + return new SimpleVatDetail(); + } + + + + + +} diff --git a/src/org/uic/ticket/api/impl/SimpleValidityDetails.java b/src/org/uic/ticket/api/impl/SimpleValidityDetails.java new file mode 100644 index 0000000..87a8810 --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleValidityDetails.java @@ -0,0 +1,37 @@ +package org.uic.ticket.api.impl; + +import java.util.Collection; +import java.util.LinkedHashSet; + +import org.uic.ticket.api.spec.ITimeRange; +import org.uic.ticket.api.spec.IValidityDetails; +import org.uic.ticket.api.spec.IValidityRange; + +public class SimpleValidityDetails implements IValidityDetails { + + + private Collection validityRanges = new LinkedHashSet(); + + private Collection timeRanges = new LinkedHashSet(); + + @Override + public Collection getValidityRanges() { + return validityRanges; + } + + @Override + public Collection getTimeRanges() { + return timeRanges; + } + + @Override + public void addValidityRanges(IValidityRange range) { + this.validityRanges.add(range); + } + + @Override + public void addTimeRanges(ITimeRange range) { + this.timeRanges.add(range); + } + +} diff --git a/src/org/uic/ticket/api/impl/SimpleValidityRange.java b/src/org/uic/ticket/api/impl/SimpleValidityRange.java new file mode 100644 index 0000000..361a30f --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleValidityRange.java @@ -0,0 +1,90 @@ +package org.uic.ticket.api.impl; + +import java.util.Date; + +import org.uic.ticket.api.spec.IValidityRange; + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleValidityRange. + */ +public class SimpleValidityRange implements IValidityRange { + + /** The from date. */ + private Date fromDate; + + /** The until date. */ + private Date untilDate; + + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IValidityRange#getFromDate() + */ + @Override + public Date getFromDate() { + return fromDate; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IValidityRange#getUntilDate() + */ + @Override + public Date getUntilDate() { + return untilDate; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IValidityRange#setFromDate(java.util.Date) + */ + @Override + public void setFromDate(Date date) { + fromDate = date; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IValidityRange#setUntilDate(java.util.Date) + */ + @Override + public void setUntilDate(Date date) { + untilDate = date; + } + + /** The valid from utc coffset. */ + protected Long validFromUTCoffset; + + /** The valid until utc coffset. */ + protected Long validUntilUTCoffset; + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IValidityRange#getValidFromUTCoffset() + */ + public Long getValidFromUTCoffset() { + return validFromUTCoffset; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IValidityRange#setValidFromUTCoffset(java.lang.Long) + */ + public void setValidFromUTCoffset(Long validFromUTCoffset) { + this.validFromUTCoffset = validFromUTCoffset; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IValidityRange#getValidUntilUTCoffset() + */ + public Long getValidUntilUTCoffset() { + return validUntilUTCoffset; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IValidityRange#setValidUntilUTCoffset(java.lang.Long) + */ + public void setValidUntilUTCoffset(Long validUntilUTCoffset) { + this.validUntilUTCoffset = validUntilUTCoffset; + } + + + +} diff --git a/src/org/uic/ticket/api/impl/SimpleVatDetail.java b/src/org/uic/ticket/api/impl/SimpleVatDetail.java new file mode 100644 index 0000000..7c889d0 --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleVatDetail.java @@ -0,0 +1,54 @@ +package org.uic.ticket.api.impl; + + +import org.uic.ticket.api.spec.IVatDetail; + +public class SimpleVatDetail implements IVatDetail { + + + public int country; + + public int percentage; + + public Long amount; + + public String vatId; + + public int getCountry() { + return country; + } + + public void setCountry(int country) { + this.country = country; + } + + public int getPercentage() { + return percentage; + } + + public void setPercentage(int percentage) { + this.percentage = percentage; + } + + public Long getAmount() { + return amount; + } + + public void setAmount(Long amount) { + this.amount = amount; + } + + public String getVatId() { + return vatId; + } + + public void setVatId(String vatId) { + this.vatId = vatId; + } + + + + + + +} diff --git a/src/org/uic/ticket/api/impl/SimpleViaStation.java b/src/org/uic/ticket/api/impl/SimpleViaStation.java new file mode 100644 index 0000000..a60ff8b --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleViaStation.java @@ -0,0 +1,157 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import java.util.Collection; +import java.util.LinkedHashSet; + +import org.uic.ticket.api.asn.omv1.CodeTableType; +import org.uic.ticket.api.spec.IViaStation; + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleViaStation. + */ +public class SimpleViaStation implements IViaStation { + + /** The station code table. */ + protected CodeTableType stationCodeTable = CodeTableType.stationUIC; + + /** The station. */ + protected String station; + + /** The alternative routes. */ + protected CollectionalternativeRoutes = new LinkedHashSet(); + + /** The route. */ + protected Collectionroute = new LinkedHashSet(); + + /** The border. */ + protected boolean border = false; + + /** The carriers. */ + protected Collectioncarriers = new LinkedHashSet(); + + /** The route id. */ + protected int routeId; + + /** The series id. */ + protected int seriesId; + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IViaStation#getStationCodeTable() + */ + public CodeTableType getStationCodeTable() { + return stationCodeTable; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IViaStation#setStationCodeTable(org.uic.ticket.api.asn.om.CodeTableType) + */ + public void setStationCodeTable(CodeTableType stationCodeTable) { + this.stationCodeTable = stationCodeTable; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IViaStation#getStation() + */ + public String getStation() { + return station; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IViaStation#setStation(java.lang.String) + */ + public void setStation(String station) { + this.station = station; + } + + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IViaStation#getAlternativeRoutes() + */ + public Collection getAlternativeRoutes() { + return alternativeRoutes; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IViaStation#addAlternativeRoute(org.uic.ticket.api.spec.IViaStation) + */ + public void addAlternativeRoute(IViaStation route) { + this.alternativeRoutes.add(route); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IViaStation#getRoute() + */ + public Collection getRoute() { + return route; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IViaStation#addRouteStation(org.uic.ticket.api.spec.IViaStation) + */ + public void addRouteStation(IViaStation viaStation) { + this.route.add(viaStation); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IViaStation#isBorder() + */ + public boolean isBorder() { + return border; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IViaStation#setBorder(boolean) + */ + public void setBorder(boolean border) { + this.border = border; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IViaStation#getCarriers() + */ + public Collection getCarriers() { + return carriers; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IViaStation#addCarrier(int) + */ + public void addCarrier(String carrier) { + this.carriers.add(carrier); + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IViaStation#getRouteId() + */ + public int getRouteId() { + return routeId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IViaStation#setRouteId(int) + */ + public void setRouteId(int routeId) { + this.routeId = routeId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IViaStation#getSeriesId() + */ + public int getSeriesId() { + return seriesId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IViaStation#setSeriesId(int) + */ + public void setSeriesId(int seriesId) { + this.seriesId = seriesId; + } + + + +} diff --git a/src/org/uic/ticket/api/impl/SimpleVoucher.java b/src/org/uic/ticket/api/impl/SimpleVoucher.java new file mode 100644 index 0000000..936e11b --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleVoucher.java @@ -0,0 +1,180 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import java.util.Date; + +import org.uic.ticket.api.spec.IExtension; +import org.uic.ticket.api.spec.IVoucher; + + + + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleVoucher. + */ +public class SimpleVoucher extends SimpleDocumentData implements IVoucher { + + /** The reference. */ + protected String reference; + + /** The product id. */ + protected String productId; + + /** The product owner. */ + protected String productOwner; + + /** The valid from. */ + protected Date validFrom; + + /** The valid until. */ + protected Date validUntil; + + /** The info text. */ + protected String infoText; + + /** The amount. */ + protected Integer amount; + + /** The type. */ + protected Integer type; + + /** The extension data. */ + protected IExtension extensionData; + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IVoucher#getAmount() + */ + public Integer getAmount() { + return amount; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IVoucher#setAmount(java.lang.Integer) + */ + public void setAmount(Integer amount) { + this.amount = amount; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IVoucher#getType() + */ + public Integer getType() { + return type; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IVoucher#setType(java.lang.Integer) + */ + public void setType(Integer type) { + this.type = type; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IVoucher#getReference() + */ + public String getReference() { + return reference; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IVoucher#setReference(java.lang.String) + */ + public void setReference(String reference) { + this.reference = reference; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IVoucher#getProductId() + */ + public String getProductId() { + return productId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IVoucher#setProductId(java.lang.String) + */ + public void setProductId(String productId) { + this.productId = productId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IVoucher#getProductOwner() + */ + public String getProductOwner() { + return productOwner; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IVoucher#setProductOwner(java.lang.String) + */ + public void setProductOwner(String productOwner) { + this.productOwner = productOwner; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IVoucher#getValidFrom() + */ + public Date getValidFrom() { + return validFrom; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IVoucher#setValidFrom(java.util.Date) + */ + public void setValidFrom(Date validFrom) { + this.validFrom = validFrom; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IVoucher#getValidUntil() + */ + public Date getValidUntil() { + return validUntil; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IVoucher#setValidUntil(java.util.Date) + */ + public void setValidUntil(Date validUntil) { + this.validUntil = validUntil; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IVoucher#getInfoText() + */ + public String getInfoText() { + return infoText; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IVoucher#setInfoText(java.lang.String) + */ + public void setInfoText(String infoText) { + this.infoText = infoText; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IVoucher#getExtension() + */ + @Override + public IExtension getExtension() { + return extensionData; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IVoucher#setExtension(org.uic.ticket.api.spec.IExtension) + */ + @Override + public void setExtension(IExtension extensionData) { + this.extensionData = extensionData; + } + + + + + + +} diff --git a/src/org/uic/ticket/api/impl/SimpleZone.java b/src/org/uic/ticket/api/impl/SimpleZone.java new file mode 100644 index 0000000..d48a5d9 --- /dev/null +++ b/src/org/uic/ticket/api/impl/SimpleZone.java @@ -0,0 +1,155 @@ +/* + * + */ +package org.uic.ticket.api.impl; + +import java.util.Collection; +import java.util.HashSet; + +import org.uic.ticket.api.asn.omv1.CodeTableType; +import org.uic.ticket.api.spec.IZone; + +// TODO: Auto-generated Javadoc +/** + * The Class SimpleZone. + */ +public class SimpleZone implements IZone { + + /** The carrier. */ + protected String carrier; + + + /** The station code table. */ + protected CodeTableType stationCodeTable = CodeTableType.stationUIC; + + /** The entry station. */ + protected String entryStation; + + /** The terminating station. */ + protected String terminatingStation; + + /** The city. */ + protected int city; + + + /** The zone ids. */ + protected CollectionzoneIds = new HashSet(); + + /** The binaty zone id. */ + protected byte[] binaryZoneId; + + + protected String nutsCode; + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IZone#getCarrier() + */ + public String getCarrier() { + return carrier; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IZone#setCarrier(java.lang.String) + */ + public void setCarrier(String carrier) { + this.carrier = carrier; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IZone#getStationCodeTable() + */ + public CodeTableType getStationCodeTable() { + return stationCodeTable; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IZone#setStationCodeTable(org.uic.ticket.api.asn.om.CodeTableType) + */ + public void setStationCodeTable(CodeTableType stationCodeTable) { + this.stationCodeTable = stationCodeTable; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IZone#getEntryStation() + */ + public String getEntryStation() { + return entryStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IZone#setEntryStation(java.lang.String) + */ + public void setEntryStation(String entryStation) { + this.entryStation = entryStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IZone#getTerminatingStation() + */ + public String getTerminatingStation() { + return terminatingStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IZone#setTerminatingStation(java.lang.String) + */ + public void setTerminatingStation(String terminatingStation) { + this.terminatingStation = terminatingStation; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IZone#getCity() + */ + public int getCity() { + return city; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IZone#setCity(int) + */ + public void setCity(int city) { + this.city = city; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IZone#getBinatyZoneId() + */ + public byte[] getBinaryZoneId() { + return binaryZoneId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IZone#setBinatyZoneId(byte[]) + */ + public void setBinaryZoneId(byte[] binaryZoneId) { + this.binaryZoneId = binaryZoneId; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IZone#getZoneIds() + */ + public Collection getZoneIds() { + return zoneIds; + } + + /* (nicht-Javadoc) + * @see org.uic.ticket.api.spec.IZone#addZoneId(int) + */ + public void addZoneId(int zoneId) { + this.zoneIds.add(new Integer (zoneId)); + } + + @Override + public String getNUTScode() { + return nutsCode; + } + + @Override + public void setNUTScode(String code) { + nutsCode = code; + } + + + + +} diff --git a/src/org/uic/ticket/api/impl/package.html b/src/org/uic/ticket/api/impl/package.html new file mode 100644 index 0000000..587b741 --- /dev/null +++ b/src/org/uic/ticket/api/impl/package.html @@ -0,0 +1,7 @@ + + +Ticket Data Implementation + + Provides a simple implementation of the ticket data interface specified in package spec. + + \ No newline at end of file -- cgit v1.2.3