summaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/main/java/org/uic/barcode/asn1/uper/StringCoder.java2
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv1/CardReferenceType.java2
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv1/CustomerCardData.java1
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv1/IncludedOpenTicketType.java1
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv1/OpenTicketData.java1
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv1/ReservationData.java1
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfTimeRangeType.java10
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfValidityPeriodType.java10
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv1/ValidityPeriodDetailType.java14
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv1/ZoneType.java1
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv2/CustomerCardData.java1
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv2/IncludedOpenTicketType.java1
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv2/OpenTicketData.java1
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv2/ReservationData.java1
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfTimeRangeType.java10
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfValidityPeriodType.java10
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv2/ValidityPeriodDetailType.java14
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv2/ZoneType.java1
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv3/CardReferenceType.java2
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv3/CustomerCardData.java7
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv3/IncludedOpenTicketType.java1
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv3/LineType.java15
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv3/OpenTicketData.java1
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv3/ReservationData.java1
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfTimeRangeType.java10
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfValidityPeriodType.java10
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv3/ValidityPeriodDetailType.java14
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv3/ZoneType.java1
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/utils/Api2OpenAsnEncoderV3.java1
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/utils/OpenAsn2ApiDecoderV3.java2
30 files changed, 84 insertions, 63 deletions
diff --git a/src/main/java/org/uic/barcode/asn1/uper/StringCoder.java b/src/main/java/org/uic/barcode/asn1/uper/StringCoder.java
index c842480..349e988 100644
--- a/src/main/java/org/uic/barcode/asn1/uper/StringCoder.java
+++ b/src/main/java/org/uic/barcode/asn1/uper/StringCoder.java
@@ -130,7 +130,7 @@ class StringCoder implements Decoder, Encoder {
for (int i = 0; i < string.length(); i++) {
encodeChar(bitbuffer, string.charAt(i), restrictionAnnotation);
}
- UperEncoder.logger.debug(String.format("STRING %s size %d: %s", obj.getClass().getName(), bitbuffer.toBooleanString(position1, position2 - position1),bitbuffer.toBooleanStringFromPosition(position2)));
+ UperEncoder.logger.debug(String.format("STRING %s size %s: %s", obj.getClass().getName(), bitbuffer.toBooleanString(position1, position2 - position1),bitbuffer.toBooleanStringFromPosition(position2)));
return;
} else {
int position1 = bitbuffer.position();
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CardReferenceType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CardReferenceType.java
index a5a327c..3e0cfd6 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CardReferenceType.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CardReferenceType.java
@@ -26,6 +26,7 @@ import org.uic.barcode.asn1.datatypes.Asn1Optional;
import org.uic.barcode.asn1.datatypes.CharacterRestriction;
import org.uic.barcode.asn1.datatypes.FieldOrder;
import org.uic.barcode.asn1.datatypes.HasExtensionMarker;
+import org.uic.barcode.asn1.datatypes.IntRange;
import org.uic.barcode.asn1.datatypes.RestrictedString;
import org.uic.barcode.asn1.datatypes.Sequence;
@@ -37,6 +38,7 @@ public class CardReferenceType extends Object {
}
@FieldOrder(order = 0)
+ @IntRange(minValue=1,maxValue=32000)
@Asn1Optional public Asn1BigInteger cardIssuerNum;
@FieldOrder(order = 1)
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CustomerCardData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CustomerCardData.java
index d67f857..fc5523c 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CustomerCardData.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CustomerCardData.java
@@ -79,6 +79,7 @@ public class CustomerCardData extends Object {
@Asn1Optional public Asn1BigInteger customerStatus;
@FieldOrder(order = 11)
+ @RestrictedString(CharacterRestriction.IA5String)
@Asn1Optional public String customerStatusDescr;
@FieldOrder(order = 12)
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/IncludedOpenTicketType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/IncludedOpenTicketType.java
index 62e5a86..51afa05 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/IncludedOpenTicketType.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/IncludedOpenTicketType.java
@@ -101,6 +101,7 @@ public class IncludedOpenTicketType extends Object {
@FieldOrder(order = 15)
@SizeRange(minValue = 1, maxValue = 2)
+ @RestrictedString(CharacterRestriction.IA5String)
@Asn1Optional public String serviceLevel;
@FieldOrder(order = 16)
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/OpenTicketData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/OpenTicketData.java
index 7d82232..29047b3 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/OpenTicketData.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/OpenTicketData.java
@@ -148,6 +148,7 @@ public class OpenTicketData extends Object {
@FieldOrder(order = 27)
@SizeRange(minValue = 1, maxValue = 2)
+ @RestrictedString(CharacterRestriction.IA5String)
@Asn1Optional public String serviceLevel;
@FieldOrder(order = 28)
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ReservationData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ReservationData.java
index adc5f71..ecf1d5a 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ReservationData.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ReservationData.java
@@ -153,6 +153,7 @@ public class ReservationData extends Object {
@FieldOrder(order = 28)
@SizeRange(minValue = 1, maxValue = 2)
+ @RestrictedString(CharacterRestriction.IA5String)
@Asn1Optional public String serviceLevel;
@FieldOrder(order = 29)
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfTimeRangeType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfTimeRangeType.java
new file mode 100644
index 0000000..80ec6ff
--- /dev/null
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfTimeRangeType.java
@@ -0,0 +1,10 @@
+package org.uic.barcode.ticket.api.asn.omv1;
+
+import java.util.Collection;
+
+import org.uic.barcode.asn1.datatypes.Asn1SequenceOf;
+
+public class SequenceOfTimeRangeType extends Asn1SequenceOf<TimeRangeType> {
+ public SequenceOfTimeRangeType() { super(); }
+ public SequenceOfTimeRangeType(Collection<TimeRangeType> coll) { super(coll); }
+}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfValidityPeriodType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfValidityPeriodType.java
new file mode 100644
index 0000000..c4d3b73
--- /dev/null
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfValidityPeriodType.java
@@ -0,0 +1,10 @@
+package org.uic.barcode.ticket.api.asn.omv1;
+
+import java.util.Collection;
+
+import org.uic.barcode.asn1.datatypes.Asn1SequenceOf;
+
+public class SequenceOfValidityPeriodType extends Asn1SequenceOf<ValidityPeriodType> {
+ public SequenceOfValidityPeriodType() { super(); }
+ public SequenceOfValidityPeriodType(Collection<ValidityPeriodType> coll) { super(coll); }
+}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ValidityPeriodDetailType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ValidityPeriodDetailType.java
index 1717ea2..ce474a5 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ValidityPeriodDetailType.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ValidityPeriodDetailType.java
@@ -19,10 +19,7 @@
*/
package org.uic.barcode.ticket.api.asn.omv1;
-import java.util.Collection;
-
import org.uic.barcode.asn1.datatypes.Asn1Optional;
-import org.uic.barcode.asn1.datatypes.Asn1SequenceOf;
import org.uic.barcode.asn1.datatypes.FieldOrder;
import org.uic.barcode.asn1.datatypes.Sequence;
@@ -38,17 +35,6 @@ public class ValidityPeriodDetailType extends Object {
@Asn1Optional public SequenceOfTimeRangeType excludedTimeRange;
- public class SequenceOfTimeRangeType extends Asn1SequenceOf<TimeRangeType> {
- public SequenceOfTimeRangeType() { super(); }
- public SequenceOfTimeRangeType(Collection<TimeRangeType> coll) { super(coll); }
- }
-
-
- public class SequenceOfValidityPeriodType extends Asn1SequenceOf<ValidityPeriodType> {
- public SequenceOfValidityPeriodType() { super(); }
- public SequenceOfValidityPeriodType(Collection<ValidityPeriodType> coll) { super(coll); }
- }
-
public SequenceOfValidityPeriodType getValidityPeriod() {
return this.validityPeriod;
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ZoneType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ZoneType.java
index efe55f7..680bc42 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ZoneType.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ZoneType.java
@@ -76,6 +76,7 @@ public class ZoneType extends Object {
@Asn1Optional public OctetString binaryZoneId;
@FieldOrder(order = 10)
+ @RestrictedString(CharacterRestriction.IA5String)
@Asn1Optional public String nutsCode;
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CustomerCardData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CustomerCardData.java
index e9dbf85..5d8603f 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CustomerCardData.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CustomerCardData.java
@@ -79,6 +79,7 @@ public class CustomerCardData extends Object {
@Asn1Optional public Asn1BigInteger customerStatus;
@FieldOrder(order = 11)
+ @RestrictedString(CharacterRestriction.IA5String)
@Asn1Optional public String customerStatusDescr;
@FieldOrder(order = 12)
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/IncludedOpenTicketType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/IncludedOpenTicketType.java
index 35a9c73..e0465d9 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/IncludedOpenTicketType.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/IncludedOpenTicketType.java
@@ -101,6 +101,7 @@ public class IncludedOpenTicketType extends Object {
@FieldOrder(order = 15)
@SizeRange(minValue = 1, maxValue = 2)
+ @RestrictedString(CharacterRestriction.IA5String)
@Asn1Optional public String serviceLevel;
@FieldOrder(order = 16)
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/OpenTicketData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/OpenTicketData.java
index 44a7188..f44d604 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/OpenTicketData.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/OpenTicketData.java
@@ -149,6 +149,7 @@ public class OpenTicketData extends Object {
@FieldOrder(order = 27)
@SizeRange(minValue = 1, maxValue = 2)
+ @RestrictedString(CharacterRestriction.IA5String)
@Asn1Optional public String serviceLevel;
@FieldOrder(order = 28)
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ReservationData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ReservationData.java
index 31b3fa8..a42a3e1 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ReservationData.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ReservationData.java
@@ -153,6 +153,7 @@ public class ReservationData extends Object {
@FieldOrder(order = 28)
@SizeRange(minValue = 1, maxValue = 2)
+ @RestrictedString(CharacterRestriction.IA5String)
@Asn1Optional public String serviceLevel;
@FieldOrder(order = 29)
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfTimeRangeType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfTimeRangeType.java
new file mode 100644
index 0000000..a97f145
--- /dev/null
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfTimeRangeType.java
@@ -0,0 +1,10 @@
+package org.uic.barcode.ticket.api.asn.omv2;
+
+import java.util.Collection;
+
+import org.uic.barcode.asn1.datatypes.Asn1SequenceOf;
+
+public class SequenceOfTimeRangeType extends Asn1SequenceOf<TimeRangeType> {
+ public SequenceOfTimeRangeType() { super(); }
+ public SequenceOfTimeRangeType(Collection<TimeRangeType> coll) { super(coll); }
+}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfValidityPeriodType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfValidityPeriodType.java
new file mode 100644
index 0000000..5139340
--- /dev/null
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/SequenceOfValidityPeriodType.java
@@ -0,0 +1,10 @@
+package org.uic.barcode.ticket.api.asn.omv2;
+
+import java.util.Collection;
+
+import org.uic.barcode.asn1.datatypes.Asn1SequenceOf;
+
+public class SequenceOfValidityPeriodType extends Asn1SequenceOf<ValidityPeriodType> {
+ public SequenceOfValidityPeriodType() { super(); }
+ public SequenceOfValidityPeriodType(Collection<ValidityPeriodType> coll) { super(coll); }
+}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ValidityPeriodDetailType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ValidityPeriodDetailType.java
index dd9935b..cd7d1f5 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ValidityPeriodDetailType.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ValidityPeriodDetailType.java
@@ -19,10 +19,7 @@
*/
package org.uic.barcode.ticket.api.asn.omv2;
-import java.util.Collection;
-
import org.uic.barcode.asn1.datatypes.Asn1Optional;
-import org.uic.barcode.asn1.datatypes.Asn1SequenceOf;
import org.uic.barcode.asn1.datatypes.FieldOrder;
import org.uic.barcode.asn1.datatypes.Sequence;
@@ -38,17 +35,6 @@ public class ValidityPeriodDetailType extends Object {
@Asn1Optional public SequenceOfTimeRangeType excludedTimeRange;
- public class SequenceOfTimeRangeType extends Asn1SequenceOf<TimeRangeType> {
- public SequenceOfTimeRangeType() { super(); }
- public SequenceOfTimeRangeType(Collection<TimeRangeType> coll) { super(coll); }
- }
-
-
- public class SequenceOfValidityPeriodType extends Asn1SequenceOf<ValidityPeriodType> {
- public SequenceOfValidityPeriodType() { super(); }
- public SequenceOfValidityPeriodType(Collection<ValidityPeriodType> coll) { super(coll); }
- }
-
public SequenceOfValidityPeriodType getValidityPeriod() {
return this.validityPeriod;
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ZoneType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ZoneType.java
index db008e5..5fa7a8b 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ZoneType.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ZoneType.java
@@ -76,6 +76,7 @@ public class ZoneType extends Object {
@Asn1Optional public OctetString binaryZoneId;
@FieldOrder(order = 10)
+ @RestrictedString(CharacterRestriction.IA5String)
@Asn1Optional public String nutsCode;
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/CardReferenceType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/CardReferenceType.java
index 01778f3..0f768f8 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/CardReferenceType.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/CardReferenceType.java
@@ -26,6 +26,7 @@ import org.uic.barcode.asn1.datatypes.Asn1Optional;
import org.uic.barcode.asn1.datatypes.CharacterRestriction;
import org.uic.barcode.asn1.datatypes.FieldOrder;
import org.uic.barcode.asn1.datatypes.HasExtensionMarker;
+import org.uic.barcode.asn1.datatypes.IntRange;
import org.uic.barcode.asn1.datatypes.RestrictedString;
import org.uic.barcode.asn1.datatypes.Sequence;
@@ -37,6 +38,7 @@ public class CardReferenceType extends Object {
}
@FieldOrder(order = 0)
+ @IntRange(minValue=1,maxValue=32000)
@Asn1Optional public Asn1BigInteger cardIssuerNum;
@FieldOrder(order = 1)
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/CustomerCardData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/CustomerCardData.java
index 312ec57..e1c7963 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/CustomerCardData.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/CustomerCardData.java
@@ -50,10 +50,10 @@ public class CustomerCardData extends Object {
@FieldOrder(order = 3)
@IntRange(minValue=2016,maxValue=2269)
- @Asn1Optional public Long validFromYear;
+ public Long validFromYear;
@FieldOrder(order = 4)
- @IntRange(minValue=0,maxValue=700)
+ @IntRange(minValue=0,maxValue=370)
@Asn1Optional public Long validFromDay;
@FieldOrder(order = 5)
@@ -68,7 +68,7 @@ public class CustomerCardData extends Object {
@Asn1Optional public TravelClassType classCode;
@FieldOrder(order = 8)
- @IntRange(minValue=0,maxValue=1000)
+ @IntRange(minValue=1,maxValue=1000)
@Asn1Optional public Long cardType;
@FieldOrder(order = 9)
@@ -79,6 +79,7 @@ public class CustomerCardData extends Object {
@Asn1Optional public Asn1BigInteger customerStatus;
@FieldOrder(order = 11)
+ @RestrictedString(CharacterRestriction.IA5String)
@Asn1Optional public String customerStatusDescr;
@FieldOrder(order = 12)
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/IncludedOpenTicketType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/IncludedOpenTicketType.java
index ccaf1a2..5989cef 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/IncludedOpenTicketType.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/IncludedOpenTicketType.java
@@ -101,6 +101,7 @@ public class IncludedOpenTicketType extends Object {
@FieldOrder(order = 15)
@SizeRange(minValue = 1, maxValue = 2)
+ @RestrictedString(CharacterRestriction.IA5String)
@Asn1Optional public String serviceLevel;
@FieldOrder(order = 16)
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 80b6478..8cbf7a5 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
@@ -28,7 +28,6 @@ import org.uic.barcode.asn1.datatypes.HasExtensionMarker;
import org.uic.barcode.asn1.datatypes.IntRange;
import org.uic.barcode.asn1.datatypes.RestrictedString;
import org.uic.barcode.asn1.datatypes.Sequence;
-import org.uic.barcode.asn1.datatypesimpl.OctetString;
import org.uic.barcode.asn1.datatypesimpl.SequenceOfUnrestrictedLong;
@Sequence
@@ -72,10 +71,6 @@ public class LineType extends Object {
@FieldOrder(order = 8)
@Asn1Optional public Asn1BigInteger city;
- @FieldOrder(order = 9)
- @Asn1Optional public OctetString binaryZoneId;
-
-
public Long getCarrierNum() {
@@ -126,11 +121,6 @@ public class LineType extends Object {
return Asn1BigInteger.toLong(this.city);
}
- public byte[] getBinaryZoneId() {
-
- return binaryZoneId.toByteArray();
- }
-
public void setCarrierNum(Long carrierNum) {
this.carrierNum = carrierNum;
@@ -176,10 +166,5 @@ public class LineType extends Object {
this.city = Asn1BigInteger.toAsn1(city);
}
- public void setBinaryZoneId(byte[] binaryZoneId) {
-
- this.binaryZoneId = new OctetString(binaryZoneId);
- }
-
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/OpenTicketData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/OpenTicketData.java
index fa4208c..00baee8 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/OpenTicketData.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/OpenTicketData.java
@@ -149,6 +149,7 @@ public class OpenTicketData extends Object {
@FieldOrder(order = 27)
@SizeRange(minValue = 1, maxValue = 2)
+ @RestrictedString(CharacterRestriction.IA5String)
@Asn1Optional public String serviceLevel;
@FieldOrder(order = 28)
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/ReservationData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/ReservationData.java
index 7026ee6..2844c08 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/ReservationData.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/ReservationData.java
@@ -152,6 +152,7 @@ public class ReservationData extends Object {
@Asn1Optional public TravelClassType classCode;
@FieldOrder(order = 28)
+ @RestrictedString(CharacterRestriction.IA5String)
@SizeRange(minValue = 1, maxValue = 2)
@Asn1Optional public String serviceLevel;
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfTimeRangeType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfTimeRangeType.java
new file mode 100644
index 0000000..f46e41d
--- /dev/null
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfTimeRangeType.java
@@ -0,0 +1,10 @@
+package org.uic.barcode.ticket.api.asn.omv3;
+
+import java.util.Collection;
+
+import org.uic.barcode.asn1.datatypes.Asn1SequenceOf;
+
+public class SequenceOfTimeRangeType extends Asn1SequenceOf<TimeRangeType> {
+ public SequenceOfTimeRangeType() { super(); }
+ public SequenceOfTimeRangeType(Collection<TimeRangeType> coll) { super(coll); }
+}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfValidityPeriodType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfValidityPeriodType.java
new file mode 100644
index 0000000..3941a62
--- /dev/null
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/SequenceOfValidityPeriodType.java
@@ -0,0 +1,10 @@
+package org.uic.barcode.ticket.api.asn.omv3;
+
+import java.util.Collection;
+
+import org.uic.barcode.asn1.datatypes.Asn1SequenceOf;
+
+public class SequenceOfValidityPeriodType extends Asn1SequenceOf<ValidityPeriodType> {
+ public SequenceOfValidityPeriodType() { super(); }
+ public SequenceOfValidityPeriodType(Collection<ValidityPeriodType> coll) { super(coll); }
+}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/ValidityPeriodDetailType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/ValidityPeriodDetailType.java
index 946df05..3bafdba 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/ValidityPeriodDetailType.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/ValidityPeriodDetailType.java
@@ -19,10 +19,7 @@
*/
package org.uic.barcode.ticket.api.asn.omv3;
-import java.util.Collection;
-
import org.uic.barcode.asn1.datatypes.Asn1Optional;
-import org.uic.barcode.asn1.datatypes.Asn1SequenceOf;
import org.uic.barcode.asn1.datatypes.FieldOrder;
import org.uic.barcode.asn1.datatypes.Sequence;
@@ -37,17 +34,6 @@ public class ValidityPeriodDetailType extends Object {
@FieldOrder(order = 1)
@Asn1Optional public SequenceOfTimeRangeType excludedTimeRange;
-
- public class SequenceOfTimeRangeType extends Asn1SequenceOf<TimeRangeType> {
- public SequenceOfTimeRangeType() { super(); }
- public SequenceOfTimeRangeType(Collection<TimeRangeType> coll) { super(coll); }
- }
-
-
- public class SequenceOfValidityPeriodType extends Asn1SequenceOf<ValidityPeriodType> {
- public SequenceOfValidityPeriodType() { super(); }
- public SequenceOfValidityPeriodType(Collection<ValidityPeriodType> coll) { super(coll); }
- }
public SequenceOfValidityPeriodType getValidityPeriod() {
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 8fdd3af..f354207 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
@@ -76,6 +76,7 @@ public class ZoneType extends Object {
@Asn1Optional public OctetString binaryZoneId;
@FieldOrder(order = 10)
+ @RestrictedString(CharacterRestriction.IA5String)
@Asn1Optional public String nutsCode;
diff --git a/src/main/java/org/uic/barcode/ticket/api/utils/Api2OpenAsnEncoderV3.java b/src/main/java/org/uic/barcode/ticket/api/utils/Api2OpenAsnEncoderV3.java
index 6766f59..0ead754 100644
--- a/src/main/java/org/uic/barcode/ticket/api/utils/Api2OpenAsnEncoderV3.java
+++ b/src/main/java/org/uic/barcode/ticket/api/utils/Api2OpenAsnEncoderV3.java
@@ -1227,7 +1227,6 @@ public class Api2OpenAsnEncoderV3 implements Api2AsnEncoder {
if (document == null) return null;
LineType asnData =new LineType();
- asnData.setBinaryZoneId(document.getBinaryZoneId());
asnData.setCarrierNum(UicEncoderUtils.getNum(document.getCarrier()));
asnData.setCarrierIA5(UicEncoderUtils.getIA5NonNum(document.getCarrier()));
if (document.getStationCodeTable() != IStationCodeTable.stationUIC && document.getStationCodeTable() != null){
diff --git a/src/main/java/org/uic/barcode/ticket/api/utils/OpenAsn2ApiDecoderV3.java b/src/main/java/org/uic/barcode/ticket/api/utils/OpenAsn2ApiDecoderV3.java
index 73971c9..20d2319 100644
--- a/src/main/java/org/uic/barcode/ticket/api/utils/OpenAsn2ApiDecoderV3.java
+++ b/src/main/java/org/uic/barcode/ticket/api/utils/OpenAsn2ApiDecoderV3.java
@@ -1483,7 +1483,7 @@ public class OpenAsn2ApiDecoderV3 implements Asn2ApiDecoder {
ILine line = factory.createLine();
- line.setBinaryZoneId(asnDocument.getBinaryZoneId());
+
line.setCarrier(UicEncoderUtils.mapToString(asnDocument.getCarrierNum(),asnDocument.getCarrierIA5()));
if (asnDocument.getCity()!=null) {
line.setCity(asnDocument.getCity().intValue());