From 5e9311c455bbd93656c5a83ab119c3b8b4bc52b3 Mon Sep 17 00:00:00 2001 From: CGantert345 <57003061+CGantert345@users.noreply.github.com> Date: Mon, 6 Dec 2021 16:09:33 +0100 Subject: - extended automated test - fixes - missing default value in pass - missing getter and setter in train link - value range corrected in Zone and Line staion codes --- .../uic/barcode/ticket/api/asn/omv3/LineType.java | 4 ++-- .../uic/barcode/ticket/api/asn/omv3/PassData.java | 1 + .../barcode/ticket/api/asn/omv3/PlacesType.java | 27 ---------------------- .../api/asn/omv3/SequenceOfServiceBrands.java | 2 +- .../barcode/ticket/api/asn/omv3/TrainLinkType.java | 10 ++++++++ .../uic/barcode/ticket/api/asn/omv3/ZoneType.java | 4 ++-- 6 files changed, 16 insertions(+), 32 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/LineType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/LineType.java index 8cbf7a5..8650e6b 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/LineType.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/LineType.java @@ -53,7 +53,7 @@ public class LineType extends Object { @Asn1Optional public CodeTableType stationCodeTable; @FieldOrder(order = 4) - @IntRange(minValue=0,maxValue=9999999) + @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long entryStationNum; @FieldOrder(order = 5) @@ -61,7 +61,7 @@ public class LineType extends Object { @Asn1Optional public String entryStationIA5; @FieldOrder(order = 6) - @IntRange(minValue=0,maxValue=9999999) + @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long terminatingStationNum; @FieldOrder(order = 7) diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/PassData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/PassData.java index e4c42a6..dd56c90 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/PassData.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/PassData.java @@ -80,6 +80,7 @@ public class PassData extends Object { @FieldOrder(order = 9) @IntRange(minValue=-367,maxValue=700) + @Asn1Default(value = "0") @Asn1Optional public Long validFromDay; @FieldOrder(order = 10) diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/PlacesType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/PlacesType.java index 932a5c8..956ab15 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/PlacesType.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/PlacesType.java @@ -101,31 +101,4 @@ public class PlacesType extends Object { this.placeNum = placeNum; } - @Override - public boolean equals(Object anObject) { - if (this == anObject) return true; - if ((anObject == null) || (anObject.getClass() != this.getClass())) return false; - - PlacesType comparator = (PlacesType)anObject; - - if ((this.getCoach() != comparator.getCoach()) && ((this.getCoach() == null) || (! this.getCoach().equals(comparator.getCoach())))) return false; - if ((this.getPlaceString() != comparator.getPlaceString()) && ((this.getPlaceString() == null) || (! this.getPlaceString().equals(comparator.getPlaceString())))) return false; - if ((this.getPlaceDescription() != comparator.getPlaceDescription()) && ((this.getPlaceDescription() == null) || (! this.getPlaceDescription().equals(comparator.getPlaceDescription())))) return false; - if ((this.getPlaceIA5() != comparator.getPlaceIA5()) && ((this.getPlaceIA5() == null) || (! this.getPlaceIA5().equals(comparator.getPlaceIA5())))) return false; - if ((this.getPlaceNum() != comparator.getPlaceNum()) && ((this.getPlaceNum() == null) || (! this.getPlaceNum().equals(comparator.getPlaceNum())))) return false; - return true; - } - - @Override - public int hashCode() { - int hash = 5477; - - hash = 3547 * hash + (null == this.getCoach() ? 0 : this.getCoach().hashCode()); - hash = 7321 * hash + (null == this.getPlaceString() ? 0 : this.getPlaceString().hashCode()); - hash = 2083 * hash + (null == this.getPlaceDescription() ? 0 : this.getPlaceDescription().hashCode()); - hash = 881 * hash + (null == this.getPlaceIA5() ? 0 : this.getPlaceIA5().hashCode()); - hash = 6679 * hash + (null == this.getPlaceNum() ? 0 : this.getPlaceNum().hashCode()); - return hash; - } - } diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfServiceBrands.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfServiceBrands.java index 381ca64..3048235 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfServiceBrands.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfServiceBrands.java @@ -6,7 +6,7 @@ import java.util.List; import org.uic.barcode.asn1.datatypes.Asn1SequenceOf; import org.uic.barcode.asn1.datatypes.IntRange; -@IntRange(minValue=0,maxValue=32000) +@IntRange(minValue=1,maxValue=32000) public class SequenceOfServiceBrands extends Asn1SequenceOf { public SequenceOfServiceBrands() { super(); } public SequenceOfServiceBrands(Collection coll) { super(coll); } diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/TrainLinkType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/TrainLinkType.java index 3a06ff0..5221926 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/TrainLinkType.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/TrainLinkType.java @@ -93,6 +93,16 @@ public class TrainLinkType extends Object { public Long getDepartureTime() { return this.departureTime; } + + + + public Long getDepartureUTCOffset() { + return departureUTCOffset; + } + + public void setDepartureUTCOffset(Long departureUTCOffset) { + this.departureUTCOffset = departureUTCOffset; + } public Long getFromStationNum() { return this.fromStationNum; diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/ZoneType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/ZoneType.java index f354207..9c2b7be 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/ZoneType.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/ZoneType.java @@ -51,7 +51,7 @@ public class ZoneType extends Object { @Asn1Optional public CodeTableType stationCodeTable; @FieldOrder(order = 3) - @IntRange(minValue=0,maxValue=9999999) + @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long entryStationNum; @FieldOrder(order = 4) @@ -59,7 +59,7 @@ public class ZoneType extends Object { @Asn1Optional public String entryStationIA5; @FieldOrder(order = 5) - @IntRange(minValue=0,maxValue=9999999) + @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long terminatingStationNum; @FieldOrder(order = 6) -- cgit v1.2.3