From ca0191d050b3dac6e65815ad5662ed8e796ef9d9 Mon Sep 17 00:00:00 2001 From: CGantert345 <57003061+CGantert345@users.noreply.github.com> Date: Thu, 29 Oct 2020 12:44:07 +0100 Subject: fix for the Android Java SDK bug in getDeclaredFields nor providing the field order --- .settings/org.eclipse.core.resources.prefs | 3 + src/net/gcdc/asn1/datatypes/FieldOrder.java | 13 +++ src/net/gcdc/asn1/test/UperEncodeBooleanTest.java | 3 +- .../asn1/test/UperEncodeChoiceExtensionTest.java | 3 + src/net/gcdc/asn1/test/UperEncodeChoiceTest.java | 3 + .../asn1/test/UperEncodeEnumExtensionTest.java | 2 + src/net/gcdc/asn1/test/UperEncodeEnumTest.java | 2 + .../test/UperEncodeExtensionFieldOrderTest.java | 102 +++++++++++++++++++++ .../gcdc/asn1/test/UperEncodeFieldOrderTest.java | 68 ++++++++++++++ .../test/UperEncodeIntegerConstrainedTest.java | 4 + .../asn1/test/UperEncodeIntegerExtensionTest.java | 28 ++---- .../gcdc/asn1/test/UperEncodeIntegerSmallTest.java | 3 + src/net/gcdc/asn1/test/UperEncodeIntegerTest.java | 2 + .../asn1/test/UperEncodeObjectIdentifierTest.java | 4 + .../gcdc/asn1/test/UperEncodeOctetStringTest.java | 2 + .../UperEncodeOptionalSequenceExtensionTest.java | 3 + .../asn1/test/UperEncodeRestrictedIntegerTest.java | 2 + .../asn1/test/UperEncodeSequenceExtensionTest.java | 4 + .../asn1/test/UperEncodeSequenceOfIntegerTest.java | 3 +- .../UperEncodeSequenceOfRestrictedIntegerTest.java | 2 + .../test/UperEncodeSequenceOfStringListTest.java | 2 + .../asn1/test/UperEncodeSequenceOfStringTest.java | 3 +- .../test/UperEncodeSequenceOfUtf8StringTest.java | 3 +- .../asn1/test/UperEncodeStringDefaultTest.java | 3 + .../gcdc/asn1/test/UperEncodeStringLengthTest.java | 2 + src/net/gcdc/asn1/test/UperEncodeStringTest.java | 33 +++++-- src/net/gcdc/asn1/uper/UperEncoder.java | 29 +++++- src/org/uic/barcode/dynamicFrame/DynamicFrame.java | 4 + .../uic/barcode/dynamicFrame/Level1DataType.java | 11 ++- .../uic/barcode/dynamicFrame/Level2DataType.java | 5 +- .../barcode/dynamicFrame/SequenceOfDataType.java | 1 - .../uic/ticket/api/asn/omv1/BerthDetailData.java | 7 +- .../api/asn/omv1/CarCarriageReservationData.java | 48 +++++++++- .../uic/ticket/api/asn/omv1/CardReferenceType.java | 11 +++ .../api/asn/omv1/CompartmentDetailsType.java | 8 ++ src/org/uic/ticket/api/asn/omv1/ControlData.java | 13 +++ .../uic/ticket/api/asn/omv1/CountermarkData.java | 41 ++++++++- .../uic/ticket/api/asn/omv1/CustomerCardData.java | 17 +++- .../ticket/api/asn/omv1/CustomerStatusType.java | 5 + .../uic/ticket/api/asn/omv1/DelayConfirmation.java | 19 ++++ .../uic/ticket/api/asn/omv1/DeltaCoordinates.java | 5 +- src/org/uic/ticket/api/asn/omv1/DocumentData.java | 7 +- src/org/uic/ticket/api/asn/omv1/ExtensionData.java | 8 +- src/org/uic/ticket/api/asn/omv1/FIPTicketData.java | 16 ++++ .../uic/ticket/api/asn/omv1/GeoCoordinateType.java | 8 ++ .../api/asn/omv1/IncludedOpenTicketType.java | 25 ++++- src/org/uic/ticket/api/asn/omv1/IssuingData.java | 20 ++++ src/org/uic/ticket/api/asn/omv1/LineType.java | 11 +++ .../api/asn/omv1/LuggageRestrictionType.java | 4 + .../uic/ticket/api/asn/omv1/OpenTicketData.java | 41 ++++++++- .../uic/ticket/api/asn/omv1/ParkingGroundData.java | 21 +++++ src/org/uic/ticket/api/asn/omv1/PassData.java | 34 +++++++ src/org/uic/ticket/api/asn/omv1/PlacesType.java | 6 ++ src/org/uic/ticket/api/asn/omv1/PolygoneType.java | 3 + .../ticket/api/asn/omv1/RegionalValidityType.java | 6 ++ .../ticket/api/asn/omv1/RegisteredLuggageType.java | 4 + .../uic/ticket/api/asn/omv1/ReservationData.java | 45 +++++++++ .../api/asn/omv1/ReturnRouteDescriptionType.java | 9 ++ .../uic/ticket/api/asn/omv1/RouteSectionType.java | 8 ++ .../uic/ticket/api/asn/omv1/SeriesDetailType.java | 4 + .../ticket/api/asn/omv1/StationPassageData.java | 23 +++++ src/org/uic/ticket/api/asn/omv1/TariffType.java | 13 +++ .../uic/ticket/api/asn/omv1/TicketDetailData.java | 13 +++ .../uic/ticket/api/asn/omv1/TicketLinkType.java | 10 +- src/org/uic/ticket/api/asn/omv1/TimeRangeType.java | 3 + src/org/uic/ticket/api/asn/omv1/TokenType.java | 5 + src/org/uic/ticket/api/asn/omv1/TrainLinkType.java | 12 +++ src/org/uic/ticket/api/asn/omv1/TravelerData.java | 4 + src/org/uic/ticket/api/asn/omv1/TravelerType.java | 19 ++++ .../uic/ticket/api/asn/omv1/UicRailTicketData.java | 6 ++ .../api/asn/omv1/ValidityPeriodDetailType.java | 3 + .../ticket/api/asn/omv1/ValidityPeriodType.java | 7 ++ src/org/uic/ticket/api/asn/omv1/VatDetailType.java | 5 + .../uic/ticket/api/asn/omv1/ViaStationType.java | 13 ++- src/org/uic/ticket/api/asn/omv1/VoucherData.java | 15 +++ src/org/uic/ticket/api/asn/omv1/ZoneType.java | 12 +++ .../uic/ticket/api/asn/omv2/BerthDetailData.java | 4 + .../api/asn/omv2/CarCarriageReservationData.java | 48 +++++++++- .../uic/ticket/api/asn/omv2/CardReferenceType.java | 12 ++- .../api/asn/omv2/CompartmentDetailsType.java | 8 ++ src/org/uic/ticket/api/asn/omv2/ControlData.java | 13 +++ .../uic/ticket/api/asn/omv2/CountermarkData.java | 37 +++++++- .../uic/ticket/api/asn/omv2/CustomerCardData.java | 17 +++- .../ticket/api/asn/omv2/CustomerStatusType.java | 5 + .../uic/ticket/api/asn/omv2/DelayConfirmation.java | 19 ++++ .../uic/ticket/api/asn/omv2/DeltaCoordinates.java | 3 + src/org/uic/ticket/api/asn/omv2/DocumentData.java | 3 + src/org/uic/ticket/api/asn/omv2/ExtensionData.java | 3 + src/org/uic/ticket/api/asn/omv2/FIPTicketData.java | 16 ++++ .../uic/ticket/api/asn/omv2/GeoCoordinateType.java | 8 ++ .../api/asn/omv2/IncludedOpenTicketType.java | 27 +++++- src/org/uic/ticket/api/asn/omv2/IssuingData.java | 20 ++++ src/org/uic/ticket/api/asn/omv2/LineType.java | 11 +++ .../api/asn/omv2/LuggageRestrictionType.java | 4 + .../uic/ticket/api/asn/omv2/OpenTicketData.java | 43 ++++++++- .../uic/ticket/api/asn/omv2/ParkingGroundData.java | 21 +++++ src/org/uic/ticket/api/asn/omv2/PassData.java | 36 +++++++- src/org/uic/ticket/api/asn/omv2/PlacesType.java | 6 ++ src/org/uic/ticket/api/asn/omv2/PolygoneType.java | 3 + .../ticket/api/asn/omv2/RegionalValidityType.java | 6 ++ .../ticket/api/asn/omv2/RegisteredLuggageType.java | 4 + .../uic/ticket/api/asn/omv2/ReservationData.java | 45 +++++++++ .../api/asn/omv2/ReturnRouteDescriptionType.java | 9 ++ .../uic/ticket/api/asn/omv2/RouteSectionType.java | 8 ++ .../uic/ticket/api/asn/omv2/SeriesDetailType.java | 4 + .../ticket/api/asn/omv2/StationPassageData.java | 23 +++++ src/org/uic/ticket/api/asn/omv2/TariffType.java | 14 ++- .../uic/ticket/api/asn/omv2/TicketDetailData.java | 13 +++ .../uic/ticket/api/asn/omv2/TicketLinkType.java | 10 +- src/org/uic/ticket/api/asn/omv2/TimeRangeType.java | 3 + src/org/uic/ticket/api/asn/omv2/TokenType.java | 5 + src/org/uic/ticket/api/asn/omv2/TrainLinkType.java | 12 +++ src/org/uic/ticket/api/asn/omv2/TravelerData.java | 5 +- src/org/uic/ticket/api/asn/omv2/TravelerType.java | 19 ++++ .../uic/ticket/api/asn/omv2/UicRailTicketData.java | 6 ++ .../api/asn/omv2/ValidityPeriodDetailType.java | 3 + .../ticket/api/asn/omv2/ValidityPeriodType.java | 11 ++- src/org/uic/ticket/api/asn/omv2/VatDetailType.java | 5 + .../uic/ticket/api/asn/omv2/ViaStationType.java | 11 +++ src/org/uic/ticket/api/asn/omv2/VoucherData.java | 15 +++ src/org/uic/ticket/api/asn/omv2/ZoneType.java | 12 +++ 121 files changed, 1506 insertions(+), 73 deletions(-) create mode 100644 .settings/org.eclipse.core.resources.prefs create mode 100644 src/net/gcdc/asn1/datatypes/FieldOrder.java create mode 100644 src/net/gcdc/asn1/test/UperEncodeExtensionFieldOrderTest.java create mode 100644 src/net/gcdc/asn1/test/UperEncodeFieldOrderTest.java diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..205c6ee --- /dev/null +++ b/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +encoding//src/net/gcdc/asn1/test/UperEncodeFieldOrderTest.java=UTF-8 +encoding//src/net/gcdc/asn1/test/UperEncodeStringTest.java=UTF-8 diff --git a/src/net/gcdc/asn1/datatypes/FieldOrder.java b/src/net/gcdc/asn1/datatypes/FieldOrder.java new file mode 100644 index 0000000..23fb8fa --- /dev/null +++ b/src/net/gcdc/asn1/datatypes/FieldOrder.java @@ -0,0 +1,13 @@ +package net.gcdc.asn1.datatypes; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface FieldOrder { + int order() default -1; +} + diff --git a/src/net/gcdc/asn1/test/UperEncodeBooleanTest.java b/src/net/gcdc/asn1/test/UperEncodeBooleanTest.java index 9716474..b9ca590 100644 --- a/src/net/gcdc/asn1/test/UperEncodeBooleanTest.java +++ b/src/net/gcdc/asn1/test/UperEncodeBooleanTest.java @@ -5,6 +5,7 @@ import static org.junit.Assert.assertEquals; import java.util.logging.Level; import net.gcdc.asn1.datatypes.Asn1Optional; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.Sequence; import net.gcdc.asn1.uper.UperEncoder; @@ -25,7 +26,7 @@ public class UperEncodeBooleanTest { @Sequence public static class TestRecord { - + @FieldOrder(order = 0) @Asn1Optional() Boolean value; public TestRecord() { diff --git a/src/net/gcdc/asn1/test/UperEncodeChoiceExtensionTest.java b/src/net/gcdc/asn1/test/UperEncodeChoiceExtensionTest.java index acbbd0b..19cdb63 100644 --- a/src/net/gcdc/asn1/test/UperEncodeChoiceExtensionTest.java +++ b/src/net/gcdc/asn1/test/UperEncodeChoiceExtensionTest.java @@ -7,6 +7,7 @@ import java.util.logging.Level; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; import net.gcdc.asn1.datatypes.Choice; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IsExtension; import net.gcdc.asn1.datatypes.RestrictedString; @@ -30,9 +31,11 @@ public class UperEncodeChoiceExtensionTest { @HasExtensionMarker public static class TestRecordExtended { + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.IA5String) String value1 = null; + @FieldOrder(order = 1) @IsExtension @RestrictedString(CharacterRestriction.IA5String) String value2 = "extension"; diff --git a/src/net/gcdc/asn1/test/UperEncodeChoiceTest.java b/src/net/gcdc/asn1/test/UperEncodeChoiceTest.java index d35e717..8dc8ce1 100644 --- a/src/net/gcdc/asn1/test/UperEncodeChoiceTest.java +++ b/src/net/gcdc/asn1/test/UperEncodeChoiceTest.java @@ -6,6 +6,7 @@ import java.util.logging.Level; import net.gcdc.asn1.datatypes.CharacterRestriction; import net.gcdc.asn1.datatypes.Choice; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.RestrictedString; import net.gcdc.asn1.uper.UperEncoder; @@ -31,9 +32,11 @@ public class UperEncodeChoiceTest { @Choice public static class TestRecord { + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.UTF8String) String valueUtf8; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) String valueIA5; diff --git a/src/net/gcdc/asn1/test/UperEncodeEnumExtensionTest.java b/src/net/gcdc/asn1/test/UperEncodeEnumExtensionTest.java index c098839..4b91f8e 100644 --- a/src/net/gcdc/asn1/test/UperEncodeEnumExtensionTest.java +++ b/src/net/gcdc/asn1/test/UperEncodeEnumExtensionTest.java @@ -5,6 +5,7 @@ import static org.junit.Assert.assertEquals; import java.util.logging.Level; import net.gcdc.asn1.datatypes.Asn1Optional; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IsExtension; import net.gcdc.asn1.datatypes.Sequence; @@ -35,6 +36,7 @@ public class UperEncodeEnumExtensionTest { @Sequence public static class TestRecord { + @FieldOrder(order = 0) @Asn1Optional EnumType value = EnumType.value1; public TestRecord() {} public void setValue(EnumType value) { diff --git a/src/net/gcdc/asn1/test/UperEncodeEnumTest.java b/src/net/gcdc/asn1/test/UperEncodeEnumTest.java index 66fbc05..ce41e7a 100644 --- a/src/net/gcdc/asn1/test/UperEncodeEnumTest.java +++ b/src/net/gcdc/asn1/test/UperEncodeEnumTest.java @@ -6,6 +6,7 @@ import java.util.logging.Level; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.Sequence; import net.gcdc.asn1.uper.UperEncoder; @@ -32,6 +33,7 @@ public class UperEncodeEnumTest { @Sequence public static class TestRecord { + @FieldOrder(order = 0) @Asn1Default(value="value2") @Asn1Optional EnumType value = EnumType.value2; diff --git a/src/net/gcdc/asn1/test/UperEncodeExtensionFieldOrderTest.java b/src/net/gcdc/asn1/test/UperEncodeExtensionFieldOrderTest.java new file mode 100644 index 0000000..3c60e9c --- /dev/null +++ b/src/net/gcdc/asn1/test/UperEncodeExtensionFieldOrderTest.java @@ -0,0 +1,102 @@ +package net.gcdc.asn1.test; + +import static org.junit.Assert.assertEquals; + +import java.util.logging.Level; + +import net.gcdc.asn1.datatypes.Asn1BigInteger; +import net.gcdc.asn1.datatypes.FieldOrder; +import net.gcdc.asn1.datatypes.HasExtensionMarker; +import net.gcdc.asn1.datatypes.IsExtension; +import net.gcdc.asn1.datatypes.Sequence; + +import net.gcdc.asn1.uper.UperEncoder; + +import org.junit.Test; + + +public class UperEncodeExtensionFieldOrderTest { + + /** + * Example from the Standard on UPER. +
+     TestRecord ::= [APPLICATION 0] IMPLICIT SEQUENCE {
+           number1 INTEGER,
+           ...,
+           number2 INTEGER,
+           number3 INTEGER 
+    }
+    
+    value TestRecord ::=  {     
+        value1       12345678909999899,
+        value2       5555555555,
+        value3       32001      
+       }
+    
+Encoding to the file 'data.uper' using PER UNALIGNED encoding rule...
+TestRecord SEQUENCE [root fieldcount (not encoded) = 1]
+  value1 INTEGER [length = 7.0]
+    12345678909999899
+  value2 INTEGER [length = 5.0]
+    5555555555
+  value3 INTEGER [length = 2.0]
+    32001
+Total encoded length = 20.2
+Encoded successfully in 21 bytes:
+8395EE2A 2EF8858D 81C18140 52C8C338 C0C09F40 40
+    
+    
+    
+ */ + @Sequence + @HasExtensionMarker + public static class TestRecord { + + @FieldOrder(order = 0) + Asn1BigInteger value1; + + @FieldOrder(order = 1) + @IsExtension + Asn1BigInteger value2; + + @FieldOrder(order = 2) + @IsExtension + Asn1BigInteger value3; + + public TestRecord() { + value1 = new Asn1BigInteger(12345678909999899L); + value2 = new Asn1BigInteger(5555555555L); + value3 = new Asn1BigInteger(32001L); + } + + + } + + + @Test public void test() throws IllegalArgumentException, IllegalAccessException { + + TestRecord record = new TestRecord(); + byte[] encoded = UperEncoder.encode(record); + String hex = UperEncoder.hexStringFromBytes(encoded); + UperEncoder.logger.log(Level.FINEST,String.format("data hex: %s", hex)); + assertEquals("8395EE2A2EF8858D81C1814052C8C338C0C09F4040",hex); + + + } + + @Test public void testDecode() throws IllegalArgumentException, IllegalAccessException { + + TestRecord record = new TestRecord(); + byte[] encoded = UperEncoder.encode(record); + String hex = UperEncoder.hexStringFromBytes(encoded); + UperEncoder.logger.log(Level.FINEST,String.format("data hex: %s", hex)); + assertEquals("8395EE2A2EF8858D81C1814052C8C338C0C09F4040",hex); + + TestRecord result = UperEncoder.decode(encoded, TestRecord.class); + assertEquals(result.value1.longValue(),record.value1.longValue()); + assertEquals(result.value2.longValue(),record.value2.longValue()); + assertEquals(result.value3.longValue(),record.value3.longValue()); + + } + +} diff --git a/src/net/gcdc/asn1/test/UperEncodeFieldOrderTest.java b/src/net/gcdc/asn1/test/UperEncodeFieldOrderTest.java new file mode 100644 index 0000000..e535356 --- /dev/null +++ b/src/net/gcdc/asn1/test/UperEncodeFieldOrderTest.java @@ -0,0 +1,68 @@ +package net.gcdc.asn1.test; + +import static org.junit.Assert.assertEquals; + +import java.util.logging.Level; + +import net.gcdc.asn1.datatypes.Asn1Optional; +import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; +import net.gcdc.asn1.datatypes.RestrictedString; +import net.gcdc.asn1.datatypes.Sequence; + +import net.gcdc.asn1.uper.UperEncoder; + +import org.junit.Test; + + +public class UperEncodeFieldOrderTest { + + /** + * Example from the Standard on UPER. +
+        World-Schema DEFINITIONS AUTOMATIC TAGS ::= 
+        BEGIN
+        TestRecord ::= [APPLICATION 0] IMPLICIT SEQUENCE {
+            testString1 UTF8String OPTIONAL,
+            testString2 IA5String OPTIONAL
+         }                                   
+        END
+    
+ */ + @Sequence + public static class TestRecord { + + @FieldOrder(order = 1) + @RestrictedString(CharacterRestriction.IA5String) + @Asn1Optional() String string2; + + @FieldOrder(order = 0) + @RestrictedString(CharacterRestriction.UTF8String) + @Asn1Optional() String string1; + + + public TestRecord() { + } + + public TestRecord(String utf8, String ia5) { + this.string1 = utf8; + this.string2 = ia5; + } + } + + + @Test public void test() throws IllegalArgumentException, IllegalAccessException { + + TestRecord record = new TestRecord("String1", "String2"); + byte[] encoded = UperEncoder.encode(record); + + TestRecord result = UperEncoder.decode(encoded, TestRecord.class); + assertEquals(result.string1,"String1"); + assertEquals(result.string2,"String2"); + } + + + + + +} diff --git a/src/net/gcdc/asn1/test/UperEncodeIntegerConstrainedTest.java b/src/net/gcdc/asn1/test/UperEncodeIntegerConstrainedTest.java index 9450406..6c6a4af 100644 --- a/src/net/gcdc/asn1/test/UperEncodeIntegerConstrainedTest.java +++ b/src/net/gcdc/asn1/test/UperEncodeIntegerConstrainedTest.java @@ -4,6 +4,7 @@ import static org.junit.Assert.assertEquals; import java.util.logging.Level; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.Sequence; import net.gcdc.asn1.uper.UperEncoder; @@ -26,12 +27,15 @@ public class UperEncodeIntegerConstrainedTest { @Sequence public static class TestRecord { + @FieldOrder(order = 0) @IntRange(minValue=1, maxValue=999) public Long value1; + @FieldOrder(order = 1) @IntRange(minValue=0, maxValue=999) public Long value2; + @FieldOrder(order = 2) @IntRange(minValue=63, maxValue=999) public Long value3; diff --git a/src/net/gcdc/asn1/test/UperEncodeIntegerExtensionTest.java b/src/net/gcdc/asn1/test/UperEncodeIntegerExtensionTest.java index 5a33368..4c87bae 100644 --- a/src/net/gcdc/asn1/test/UperEncodeIntegerExtensionTest.java +++ b/src/net/gcdc/asn1/test/UperEncodeIntegerExtensionTest.java @@ -5,6 +5,7 @@ import static org.junit.Assert.assertEquals; import java.util.logging.Level; import net.gcdc.asn1.datatypes.Asn1BigInteger; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IsExtension; import net.gcdc.asn1.datatypes.Sequence; @@ -51,14 +52,17 @@ Encoded successfully in 21 bytes: @HasExtensionMarker public static class TestRecord { - + @FieldOrder(order = 0) Asn1BigInteger value1; + @FieldOrder(order = 2) + @IsExtension + Asn1BigInteger value3; + + @FieldOrder(order = 1) @IsExtension Asn1BigInteger value2; - @IsExtension - Asn1BigInteger value3; public TestRecord() { value1 = new Asn1BigInteger(12345678909999899L); @@ -74,26 +78,14 @@ Encoded successfully in 21 bytes: TestRecord record = new TestRecord(); byte[] encoded = UperEncoder.encode(record); - String hex = UperEncoder.hexStringFromBytes(encoded); - UperEncoder.logger.log(Level.FINEST,String.format("data hex: %s", hex)); - assertEquals("8395EE2A2EF8858D81C1814052C8C338C0C09F4040",hex); - - - } - - @Test public void testDecode() throws IllegalArgumentException, IllegalAccessException { - - TestRecord record = new TestRecord(); - byte[] encoded = UperEncoder.encode(record); - String hex = UperEncoder.hexStringFromBytes(encoded); - UperEncoder.logger.log(Level.FINEST,String.format("data hex: %s", hex)); - assertEquals("8395EE2A2EF8858D81C1814052C8C338C0C09F4040",hex); - TestRecord result = UperEncoder.decode(encoded, TestRecord.class); assertEquals(result.value1.longValue(),record.value1.longValue()); assertEquals(result.value2.longValue(),record.value2.longValue()); assertEquals(result.value3.longValue(),record.value3.longValue()); + } + + } diff --git a/src/net/gcdc/asn1/test/UperEncodeIntegerSmallTest.java b/src/net/gcdc/asn1/test/UperEncodeIntegerSmallTest.java index 9ad0e63..c34918f 100644 --- a/src/net/gcdc/asn1/test/UperEncodeIntegerSmallTest.java +++ b/src/net/gcdc/asn1/test/UperEncodeIntegerSmallTest.java @@ -4,6 +4,7 @@ import static org.junit.Assert.assertEquals; import java.util.logging.Level; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.Sequence; import net.gcdc.asn1.uper.UperEncoder; @@ -25,8 +26,10 @@ public class UperEncodeIntegerSmallTest { @Sequence public static class TestRecord { + @FieldOrder(order = 0) public Long value1; + @FieldOrder(order = 1) public Integer value2; public TestRecord() { diff --git a/src/net/gcdc/asn1/test/UperEncodeIntegerTest.java b/src/net/gcdc/asn1/test/UperEncodeIntegerTest.java index 4eab78a..f4f56f6 100644 --- a/src/net/gcdc/asn1/test/UperEncodeIntegerTest.java +++ b/src/net/gcdc/asn1/test/UperEncodeIntegerTest.java @@ -5,6 +5,7 @@ import static org.junit.Assert.assertEquals; import java.util.logging.Level; import net.gcdc.asn1.datatypes.Asn1BigInteger; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.Sequence; import net.gcdc.asn1.uper.UperEncoder; @@ -25,6 +26,7 @@ public class UperEncodeIntegerTest { @Sequence public static class TestRecord { + @FieldOrder(order = 0) Asn1BigInteger value; public TestRecord() { diff --git a/src/net/gcdc/asn1/test/UperEncodeObjectIdentifierTest.java b/src/net/gcdc/asn1/test/UperEncodeObjectIdentifierTest.java index c46751d..d36cfe6 100644 --- a/src/net/gcdc/asn1/test/UperEncodeObjectIdentifierTest.java +++ b/src/net/gcdc/asn1/test/UperEncodeObjectIdentifierTest.java @@ -7,6 +7,7 @@ import org.junit.jupiter.api.Test; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.RestrictedString; import net.gcdc.asn1.datatypes.Sequence; import net.gcdc.asn1.uper.UperEncoder; @@ -34,12 +35,15 @@ class UperEncodeObjectIdentifierTest { @Sequence public static class TestRecord { + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.ObjectIdentifier) String value1 = "2.16.840.1.101.3.4.3.1"; //DSA SHA224 + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.ObjectIdentifier) String value2 = "2.16.840.1.101.3.4.3.2"; //DSA SHA248 + @FieldOrder(order = 2) @RestrictedString(CharacterRestriction.ObjectIdentifier) String value3 = "1.2.840.10045.3.1.7"; //ECC diff --git a/src/net/gcdc/asn1/test/UperEncodeOctetStringTest.java b/src/net/gcdc/asn1/test/UperEncodeOctetStringTest.java index 7604d6a..eb92373 100644 --- a/src/net/gcdc/asn1/test/UperEncodeOctetStringTest.java +++ b/src/net/gcdc/asn1/test/UperEncodeOctetStringTest.java @@ -4,6 +4,7 @@ import static org.junit.Assert.assertEquals; import java.util.logging.Level; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.Sequence; import net.gcdc.asn1.datatypesimpl.OctetString; @@ -39,6 +40,7 @@ public class UperEncodeOctetStringTest { @Sequence public static class TestRecord { + @FieldOrder(order = 0) OctetString value; public TestRecord() { diff --git a/src/net/gcdc/asn1/test/UperEncodeOptionalSequenceExtensionTest.java b/src/net/gcdc/asn1/test/UperEncodeOptionalSequenceExtensionTest.java index 1b2fa09..4e82a82 100644 --- a/src/net/gcdc/asn1/test/UperEncodeOptionalSequenceExtensionTest.java +++ b/src/net/gcdc/asn1/test/UperEncodeOptionalSequenceExtensionTest.java @@ -6,6 +6,7 @@ import java.util.logging.Level; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IsExtension; import net.gcdc.asn1.datatypes.RestrictedString; @@ -32,9 +33,11 @@ public class UperEncodeOptionalSequenceExtensionTest { @HasExtensionMarker public static class TestRecordExtended { + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.IA5String) String value1; + @FieldOrder(order = 1) @IsExtension @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional() String value2; diff --git a/src/net/gcdc/asn1/test/UperEncodeRestrictedIntegerTest.java b/src/net/gcdc/asn1/test/UperEncodeRestrictedIntegerTest.java index 27dc5f4..7463214 100644 --- a/src/net/gcdc/asn1/test/UperEncodeRestrictedIntegerTest.java +++ b/src/net/gcdc/asn1/test/UperEncodeRestrictedIntegerTest.java @@ -4,6 +4,7 @@ import static org.junit.Assert.assertEquals; import java.util.logging.Level; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.Sequence; @@ -25,6 +26,7 @@ TestRecord ::= [APPLICATION 0] IMPLICIT SEQUENCE { @Sequence public static class TestRecord { + @FieldOrder(order = 0) @IntRange(maxValue = 63000, minValue = 33000) Long value; diff --git a/src/net/gcdc/asn1/test/UperEncodeSequenceExtensionTest.java b/src/net/gcdc/asn1/test/UperEncodeSequenceExtensionTest.java index 7934354..8c5131b 100644 --- a/src/net/gcdc/asn1/test/UperEncodeSequenceExtensionTest.java +++ b/src/net/gcdc/asn1/test/UperEncodeSequenceExtensionTest.java @@ -6,6 +6,7 @@ import java.util.logging.Level; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IsExtension; import net.gcdc.asn1.datatypes.RestrictedString; @@ -29,13 +30,16 @@ public class UperEncodeSequenceExtensionTest { @HasExtensionMarker public static class TestRecordExtended { + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional() String value1 = "regular"; + @FieldOrder(order = 1) @IsExtension @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional() String value2 = "extension"; + public TestRecordExtended() { } } diff --git a/src/net/gcdc/asn1/test/UperEncodeSequenceOfIntegerTest.java b/src/net/gcdc/asn1/test/UperEncodeSequenceOfIntegerTest.java index 6028a29..40a3772 100644 --- a/src/net/gcdc/asn1/test/UperEncodeSequenceOfIntegerTest.java +++ b/src/net/gcdc/asn1/test/UperEncodeSequenceOfIntegerTest.java @@ -6,6 +6,7 @@ import java.util.ArrayList; import java.util.List; import java.util.logging.Level; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.Sequence; import net.gcdc.asn1.datatypesimpl.SequenceOfUnrestrictedLong; @@ -27,7 +28,7 @@ TestRecord ::= [APPLICATION 0] IMPLICIT SEQUENCE { @Sequence public static class TestRecord { - + @FieldOrder(order = 0) SequenceOfUnrestrictedLong numbers; public TestRecord() { diff --git a/src/net/gcdc/asn1/test/UperEncodeSequenceOfRestrictedIntegerTest.java b/src/net/gcdc/asn1/test/UperEncodeSequenceOfRestrictedIntegerTest.java index 5ac9834..c1feece 100644 --- a/src/net/gcdc/asn1/test/UperEncodeSequenceOfRestrictedIntegerTest.java +++ b/src/net/gcdc/asn1/test/UperEncodeSequenceOfRestrictedIntegerTest.java @@ -4,6 +4,7 @@ import static org.junit.Assert.assertEquals; import java.util.logging.Level; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.Sequence; @@ -25,6 +26,7 @@ TestRecord ::= [APPLICATION 0] IMPLICIT SEQUENCE { @Sequence public static class TestRecord { + @FieldOrder(order = 0) @IntRange(minValue=9500000,maxValue=99900001) TestSequenceOfLong numbers = null;; diff --git a/src/net/gcdc/asn1/test/UperEncodeSequenceOfStringListTest.java b/src/net/gcdc/asn1/test/UperEncodeSequenceOfStringListTest.java index 1a8f68e..4bc0cb9 100644 --- a/src/net/gcdc/asn1/test/UperEncodeSequenceOfStringListTest.java +++ b/src/net/gcdc/asn1/test/UperEncodeSequenceOfStringListTest.java @@ -7,6 +7,7 @@ import java.util.List; import java.util.logging.Level; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.RestrictedString; import net.gcdc.asn1.datatypes.Sequence; import net.gcdc.asn1.uper.UperEncoder; @@ -27,6 +28,7 @@ public class UperEncodeSequenceOfStringListTest { @Sequence public static class TestRecord { + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.IA5String) ArrayList strings = new ArrayList(); diff --git a/src/net/gcdc/asn1/test/UperEncodeSequenceOfStringTest.java b/src/net/gcdc/asn1/test/UperEncodeSequenceOfStringTest.java index c7c82f7..3ddf93e 100644 --- a/src/net/gcdc/asn1/test/UperEncodeSequenceOfStringTest.java +++ b/src/net/gcdc/asn1/test/UperEncodeSequenceOfStringTest.java @@ -5,6 +5,7 @@ import static org.junit.Assert.assertEquals; import java.util.logging.Level; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.RestrictedString; import net.gcdc.asn1.datatypes.Sequence; import net.gcdc.asn1.datatypesimpl.SequenceOfStringIA5; @@ -26,7 +27,7 @@ public class UperEncodeSequenceOfStringTest { @Sequence public static class TestRecord { - + @FieldOrder(order = 0) SequenceOfStringIA5 strings = new SequenceOfStringIA5(); public TestRecord() { diff --git a/src/net/gcdc/asn1/test/UperEncodeSequenceOfUtf8StringTest.java b/src/net/gcdc/asn1/test/UperEncodeSequenceOfUtf8StringTest.java index b2c855d..88d5050 100644 --- a/src/net/gcdc/asn1/test/UperEncodeSequenceOfUtf8StringTest.java +++ b/src/net/gcdc/asn1/test/UperEncodeSequenceOfUtf8StringTest.java @@ -4,6 +4,7 @@ import static org.junit.Assert.assertEquals; import java.util.logging.Level; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.Sequence; import net.gcdc.asn1.datatypesimpl.SequenceOfStringUTF8; import net.gcdc.asn1.uper.UperEncoder; @@ -46,7 +47,7 @@ Encoded successfully in 19 bytes: @Sequence public static class TestRecord { - + @FieldOrder(order = 0) SequenceOfStringUTF8 strings = new SequenceOfStringUTF8(); public TestRecord() { diff --git a/src/net/gcdc/asn1/test/UperEncodeStringDefaultTest.java b/src/net/gcdc/asn1/test/UperEncodeStringDefaultTest.java index e43d76d..5abaa37 100644 --- a/src/net/gcdc/asn1/test/UperEncodeStringDefaultTest.java +++ b/src/net/gcdc/asn1/test/UperEncodeStringDefaultTest.java @@ -7,6 +7,7 @@ import java.util.logging.Level; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.RestrictedString; import net.gcdc.asn1.datatypes.Sequence; import net.gcdc.asn1.uper.UperEncoder; @@ -28,9 +29,11 @@ public class UperEncodeStringDefaultTest { @Sequence public static class TestRecord { + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional() String valueUtf8; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @Asn1Default(value="testString") String valueIA5; diff --git a/src/net/gcdc/asn1/test/UperEncodeStringLengthTest.java b/src/net/gcdc/asn1/test/UperEncodeStringLengthTest.java index 378bc06..9db6229 100644 --- a/src/net/gcdc/asn1/test/UperEncodeStringLengthTest.java +++ b/src/net/gcdc/asn1/test/UperEncodeStringLengthTest.java @@ -6,6 +6,7 @@ import java.util.logging.Level; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.RestrictedString; import net.gcdc.asn1.datatypes.Sequence; @@ -38,6 +39,7 @@ public class UperEncodeStringLengthTest { @Sequence public static class TestRecord { + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional() String valueUtf8; diff --git a/src/net/gcdc/asn1/test/UperEncodeStringTest.java b/src/net/gcdc/asn1/test/UperEncodeStringTest.java index 521075c..29e6c99 100644 --- a/src/net/gcdc/asn1/test/UperEncodeStringTest.java +++ b/src/net/gcdc/asn1/test/UperEncodeStringTest.java @@ -6,6 +6,7 @@ import java.util.logging.Level; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.RestrictedString; import net.gcdc.asn1.datatypes.Sequence; @@ -31,9 +32,11 @@ public class UperEncodeStringTest { @Sequence public static class TestRecord { + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional() String valueUtf8; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional() String valueIA5; @@ -48,29 +51,41 @@ public class UperEncodeStringTest { @Test public void testEncode() throws IllegalArgumentException, IllegalAccessException { - TestRecord record = new TestRecord("Müller", "Meier"); + + //Teststring: AêñüC + String original = new String("A" + "\u00ea" + "\u00f1" + "\u00fc" + "C"); + + TestRecord record = new TestRecord(original, "Meier"); byte[] encoded = UperEncoder.encode(record); String hex = UperEncoder.hexStringFromBytes(encoded); UperEncoder.logger.log(Level.FINEST,String.format("data hex: %s", hex)); - assertEquals("C1D370EF1B1B195C8166E5D39790",hex); + assertEquals("C21070EAB0EC70EF10C166E5D39790",hex); + } @Test public void testEncodeUtf8() throws IllegalArgumentException, IllegalAccessException { - TestRecord record = new TestRecord("你好吗", "Meier"); + + //"你好吗" + String original = new String("\u00e4" + "\u00bd" + "\u00a0" + "\u00e5" + "\u00a5" + "\u00bd" + "\u00e5" + "\u0090" + "\u0097"); + TestRecord record = new TestRecord(original, "Meier"); byte[] encoded = UperEncoder.encode(record); String hex = UperEncoder.hexStringFromBytes(encoded); UperEncoder.logger.log(Level.FINEST,String.format("data hex: %s", hex)); - assertEquals("C2792F6839696F796425C166E5D39790",hex); + assertEquals("C4B0E930AF70A830E970A970AF70E970A430A5C166E5D39790",hex); } @Test public void testDecode() throws IllegalArgumentException, IllegalAccessException { - TestRecord record = new TestRecord("Müller", "Meier"); + + //Teststring: AêñüC + String original = new String("A" + "\u00ea" + "\u00f1" + "\u00fc" + "C"); + + TestRecord record = new TestRecord(original, "Meier"); byte[] encoded = UperEncoder.encode(record); String hex = UperEncoder.hexStringFromBytes(encoded); UperEncoder.logger.log(Level.FINEST,String.format("data hex: %s", hex)); - assertEquals("C1D370EF1B1B195C8166E5D39790",hex); + assertEquals("C21070EAB0EC70EF10C166E5D39790",hex); TestRecord result = UperEncoder.decode(encoded, TestRecord.class); assertEquals(result.valueUtf8,record.valueUtf8); assertEquals(result.valueIA5,record.valueIA5); @@ -78,11 +93,13 @@ public class UperEncodeStringTest { @Test public void testDecodeUtf8() throws IllegalArgumentException, IllegalAccessException { - TestRecord record = new TestRecord("你好吗", "Meier"); + //"你好吗" + String original = new String("\u00e4" + "\u00bd" + "\u00a0" + "\u00e5" + "\u00a5" + "\u00bd" + "\u00e5" + "\u0090" + "\u0097"); + TestRecord record = new TestRecord(original, "Meier"); byte[] encoded = UperEncoder.encode(record); String hex = UperEncoder.hexStringFromBytes(encoded); UperEncoder.logger.log(Level.FINEST,String.format("data hex: %s", hex)); - assertEquals("C2792F6839696F796425C166E5D39790",hex); + assertEquals("C4B0E930AF70A830E970A970AF70E970A430A5C166E5D39790",hex); TestRecord result = UperEncoder.decode(encoded, TestRecord.class); assertEquals(result.valueUtf8,record.valueUtf8); assertEquals(result.valueIA5,record.valueIA5); diff --git a/src/net/gcdc/asn1/uper/UperEncoder.java b/src/net/gcdc/asn1/uper/UperEncoder.java index f9c2f2a..30aa82b 100644 --- a/src/net/gcdc/asn1/uper/UperEncoder.java +++ b/src/net/gcdc/asn1/uper/UperEncoder.java @@ -7,6 +7,8 @@ import java.lang.reflect.InvocationTargetException; import java.math.BigInteger; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collections; +import java.util.Comparator; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -17,6 +19,7 @@ import logger.LoggerFactory; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.IsExtension; @@ -405,7 +408,31 @@ public final class UperEncoder { Map originalAccess = new HashMap<>(); Asn1ContainerFieldSorter(Class type) { - for (Field f : type.getDeclaredFields()) { + + /* + * + * sorting of the fields added to compensate the error + * in the java SDK on android where getDeclaredFields does + * not return the fields in the order of the class definition + * + */ + List fields = Arrays.asList(type.getDeclaredFields()); + Collections.sort(fields, new Comparator() { + @Override + public int compare(Field o1, Field o2) { + FieldOrder ao1 = o1.getAnnotation(FieldOrder.class); + FieldOrder ao2 = o2.getAnnotation(FieldOrder.class); + int order1 = ao1 == null ? Integer.MAX_VALUE : ao1.order(); + int order2 = ao2 == null ? Integer.MAX_VALUE : ao2.order(); + if (order1 == Integer.MAX_VALUE || order2 == Integer.MAX_VALUE || order1 < 0 || order2 < 0 || order1 == order2) { + logger.debug(String.format("field order error for %s",type.getSimpleName())); + } + return Integer.compare(order1, order2); + } + }); + + + for (Field f : fields) { if (isTestInstrumentation(f) || isNonAsn1Field(f) ) { continue; } diff --git a/src/org/uic/barcode/dynamicFrame/DynamicFrame.java b/src/org/uic/barcode/dynamicFrame/DynamicFrame.java index 445990a..69a67b2 100644 --- a/src/org/uic/barcode/dynamicFrame/DynamicFrame.java +++ b/src/org/uic/barcode/dynamicFrame/DynamicFrame.java @@ -14,6 +14,7 @@ import org.uic.barcode.utils.AlgorithmNameResolver; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.RestrictedString; import net.gcdc.asn1.datatypes.Sequence; @@ -33,14 +34,17 @@ public class DynamicFrame extends Object{ public DynamicFrame() {} /** The format. */ + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.IA5String) public String format; /*level 2 data*/ + @FieldOrder(order = 1) Level2DataType level2SignedData; /** The signature of level 2 data*/ + @FieldOrder(order = 2) @Asn1Optional public OctetString level2Signature; /** diff --git a/src/org/uic/barcode/dynamicFrame/Level1DataType.java b/src/org/uic/barcode/dynamicFrame/Level1DataType.java index ac48ba8..796c44f 100644 --- a/src/org/uic/barcode/dynamicFrame/Level1DataType.java +++ b/src/org/uic/barcode/dynamicFrame/Level1DataType.java @@ -5,6 +5,7 @@ import org.uic.ticket.api.utils.UicEncoderUtils; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; import net.gcdc.asn1.datatypes.Sequence; @@ -22,20 +23,24 @@ public class Level1DataType { * numeric codes 1 ...32000 * * */ + @FieldOrder(order = 0) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long securityProviderNum; /** The security provider alphanumeric codes. */ + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String securityProviderIA5; /** The key id. */ + @FieldOrder(order = 2) @IntRange(minValue=1,maxValue=99999) @Asn1Optional public Long keyId; /** The data. */ + @FieldOrder(order = 3) public SequenceOfDataType data; /** @@ -50,10 +55,11 @@ public class Level1DataType { * * */ + @FieldOrder(order = 4) @RestrictedString(CharacterRestriction.ObjectIdentifier) @Asn1Optional public String level1KeyAlg; - + @FieldOrder(order = 5) @RestrictedString(CharacterRestriction.ObjectIdentifier) @Asn1Optional public String level2KeyAlg; @@ -69,14 +75,17 @@ public class Level1DataType { * * */ + @FieldOrder(order = 6) @RestrictedString(CharacterRestriction.ObjectIdentifier) @Asn1Optional public String level1SigningAlg; + @FieldOrder(order = 7) @RestrictedString(CharacterRestriction.ObjectIdentifier) @Asn1Optional public String level2SigningAlg; /** The level 2 public key*/ + @FieldOrder(order = 8) @Asn1Optional public OctetString level2publicKey; diff --git a/src/org/uic/barcode/dynamicFrame/Level2DataType.java b/src/org/uic/barcode/dynamicFrame/Level2DataType.java index 66e4225..b2aceab 100644 --- a/src/org/uic/barcode/dynamicFrame/Level2DataType.java +++ b/src/org/uic/barcode/dynamicFrame/Level2DataType.java @@ -6,6 +6,7 @@ import java.security.Signature; import org.uic.barcode.utils.AlgorithmNameResolver; import net.gcdc.asn1.datatypes.Asn1Optional; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.Sequence; import net.gcdc.asn1.datatypesimpl.OctetString; import net.gcdc.asn1.uper.UperEncoder; @@ -16,12 +17,14 @@ import net.gcdc.asn1.uper.UperEncoder; @Sequence public class Level2DataType { + @FieldOrder(order = 0) Level1DataType level1Data; /** The data. */ + @FieldOrder(order = 1) @Asn1Optional public OctetString level1Signature; - + @FieldOrder(order = 2) @Asn1Optional DataType level2Data; diff --git a/src/org/uic/barcode/dynamicFrame/SequenceOfDataType.java b/src/org/uic/barcode/dynamicFrame/SequenceOfDataType.java index c879ddd..93b9d78 100644 --- a/src/org/uic/barcode/dynamicFrame/SequenceOfDataType.java +++ b/src/org/uic/barcode/dynamicFrame/SequenceOfDataType.java @@ -4,7 +4,6 @@ package org.uic.barcode.dynamicFrame; import java.util.Collection; import net.gcdc.asn1.datatypes.Asn1SequenceOf; -// TODO: Auto-generated Javadoc /** * The Class SequenceOfDataType. diff --git a/src/org/uic/ticket/api/asn/omv1/BerthDetailData.java b/src/org/uic/ticket/api/asn/omv1/BerthDetailData.java index 386c429..24358b7 100644 --- a/src/org/uic/ticket/api/asn/omv1/BerthDetailData.java +++ b/src/org/uic/ticket/api/asn/omv1/BerthDetailData.java @@ -21,6 +21,7 @@ package org.uic.ticket.api.asn.omv1; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.Sequence; @@ -29,14 +30,16 @@ import net.gcdc.asn1.datatypes.Sequence; @Sequence @HasExtensionMarker public class BerthDetailData extends Object { - public BerthDetailData() { - } + public BerthDetailData() {} + @FieldOrder(order = 0) public BerthTypeType berthType; + @FieldOrder(order = 1) @IntRange(minValue=1, maxValue=999) public Long numberOfBerths; + @FieldOrder(order = 2) @Asn1Default(value="family") @Asn1Optional public CompartmentGenderType gender; diff --git a/src/org/uic/ticket/api/asn/omv1/CarCarriageReservationData.java b/src/org/uic/ticket/api/asn/omv1/CarCarriageReservationData.java index ca71c85..e6942b9 100644 --- a/src/org/uic/ticket/api/asn/omv1/CarCarriageReservationData.java +++ b/src/org/uic/ticket/api/asn/omv1/CarCarriageReservationData.java @@ -30,6 +30,7 @@ import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -44,132 +45,175 @@ public class CarCarriageReservationData extends Object { public CarCarriageReservationData() { } + @FieldOrder(order = 0) @Asn1Optional public Asn1BigInteger trainNum; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String trainIA5; + @FieldOrder(order = 2) @IntRange(minValue=-1,maxValue=370) @Asn1Default(value="0") @Asn1Optional public Long beginLoadingDate; + @FieldOrder(order = 3) @IntRange(minValue=0,maxValue=1440) @Asn1Optional public Long beginLoadingTime; + @FieldOrder(order = 4) @IntRange(minValue=0,maxValue=1440) @Asn1Optional public Long endLoadingTime; + @FieldOrder(order = 5) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long loadingUTCOffset; + @FieldOrder(order = 6) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String referenceIA5; + @FieldOrder(order = 7) @Asn1Optional public Asn1BigInteger referenceNum; + @FieldOrder(order = 8) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long productOwnerNum; + @FieldOrder(order = 9) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productOwnerIA5; + @FieldOrder(order = 10) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long productIdNum; + @FieldOrder(order = 11) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productIdIA5; + @FieldOrder(order = 12) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long serviceBrand; + @FieldOrder(order = 13) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String serviceBrandAbrUTF8; + @FieldOrder(order = 14) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String serviceBrandNameUTF8; + @FieldOrder(order = 15) @Asn1Default("stationUICReservation") @Asn1Optional public CodeTableType stationCodeTable; + @FieldOrder(order = 16) @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long fromStationNum; + @FieldOrder(order = 17) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String fromStationIA5; + @FieldOrder(order = 18) @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long toStationNum; + @FieldOrder(order = 19) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String toStationIA5; + @FieldOrder(order = 20) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String fromStationNameUTF8; + @FieldOrder(order = 21) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String toStationNameUTF8; + @FieldOrder(order = 22) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String coach; + @FieldOrder(order = 23) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String place; + @FieldOrder(order = 24) @Asn1Optional public CompartmentDetailsType compartmentDetails; + @FieldOrder(order = 25) @RestrictedString(CharacterRestriction.IA5String) public String numberPlate; + @FieldOrder(order = 26) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String trailerPlate; + @FieldOrder(order = 27) @IntRange(minValue=0,maxValue=9) public Long carCategory; + @FieldOrder(order = 28) @IntRange(minValue=0,maxValue=6) @Asn1Optional public Long boatCategory; + @FieldOrder(order = 29) public Boolean textileRoof = false; + @FieldOrder(order = 30) @Asn1Default(value ="norack") @Asn1Optional public RoofRackType roofRackType; + @FieldOrder(order = 31) @IntRange(minValue=0,maxValue=99) @Asn1Optional public Long roofRackHeight; + @FieldOrder(order = 32) @IntRange(minValue=0,maxValue=2) @Asn1Optional public Long attachedBoats; + @FieldOrder(order = 33) @IntRange(minValue=0,maxValue=4) @Asn1Optional public Long attachedBicycles; + @FieldOrder(order = 34) @IntRange(minValue=0,maxValue=5) @Asn1Optional public Long attachedSurfboards; + @FieldOrder(order = 35) @IntRange(minValue=0,maxValue=999) @Asn1Optional public Long loadingListEntry; + @FieldOrder(order = 36) @Asn1Default(value="upper") @Asn1Optional public LoadingDeckType loadingDeck; + @FieldOrder(order = 37) @Asn1Optional public SequenceOfCarrierNum carrierNum; + @FieldOrder(order = 38) @Asn1Optional public SequenceOfStringIA5 carrierIA5; + @FieldOrder(order = 39) public TariffType tariff; + @FieldOrder(order = 40) @Asn1Default(value="travelPrice") @Asn1Optional public PriceTypeType priceType; - + @FieldOrder(order = 41) @Asn1Optional Asn1BigInteger price; + @FieldOrder(order = 42) @Asn1Optional SequenceOfVatDetail vatDetails; - + @FieldOrder(order = 43) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String infoText; + @FieldOrder(order = 44) @Asn1Optional public ExtensionData extension; public Long getTrainNum() { diff --git a/src/org/uic/ticket/api/asn/omv1/CardReferenceType.java b/src/org/uic/ticket/api/asn/omv1/CardReferenceType.java index f15574d..3d7b6e6 100644 --- a/src/org/uic/ticket/api/asn/omv1/CardReferenceType.java +++ b/src/org/uic/ticket/api/asn/omv1/CardReferenceType.java @@ -25,6 +25,7 @@ import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.RestrictedString; import net.gcdc.asn1.datatypes.Sequence; @@ -36,28 +37,38 @@ public class CardReferenceType extends Object { public CardReferenceType() { } + @FieldOrder(order = 0) @Asn1Optional public Asn1BigInteger cardIssuerNum; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String cardIssuerIA5; + @FieldOrder(order = 2) @Asn1Optional public Asn1BigInteger cardIdNum; + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String cardIdIA5; + @FieldOrder(order = 4) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String cardName; + @FieldOrder(order = 5) @Asn1Optional public Asn1BigInteger cardType; + @FieldOrder(order = 6) @Asn1Optional public Asn1BigInteger leadingCardIdNum; + @FieldOrder(order = 7) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String leadingCardIdIA5; + @FieldOrder(order = 8) @Asn1Optional public Asn1BigInteger trailingCardIdNum; + @FieldOrder(order = 9) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String trailingCardIdIA5; diff --git a/src/org/uic/ticket/api/asn/omv1/CompartmentDetailsType.java b/src/org/uic/ticket/api/asn/omv1/CompartmentDetailsType.java index bd07ab7..f7a8cbc 100644 --- a/src/org/uic/ticket/api/asn/omv1/CompartmentDetailsType.java +++ b/src/org/uic/ticket/api/asn/omv1/CompartmentDetailsType.java @@ -23,6 +23,7 @@ import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -35,24 +36,31 @@ public class CompartmentDetailsType extends Object { public CompartmentDetailsType() { } + @FieldOrder(order = 0) @IntRange(minValue=1,maxValue=99) @Asn1Optional public Long coachType; + @FieldOrder(order = 1) @IntRange(minValue=1,maxValue=99) @Asn1Optional public Long compartmentType; + @FieldOrder(order = 2) @IntRange(minValue=1,maxValue=99) @Asn1Optional public Long specialAllocation; + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String coachTypeDescr; + @FieldOrder(order = 4) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String compartmentTypeDescr; + @FieldOrder(order = 5) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String specialAllocationDescr; + @FieldOrder(order = 6) @Asn1Default(value="unspecified") public CompartmentPositionType position; diff --git a/src/org/uic/ticket/api/asn/omv1/ControlData.java b/src/org/uic/ticket/api/asn/omv1/ControlData.java index 52c0e41..7a1a2af 100644 --- a/src/org/uic/ticket/api/asn/omv1/ControlData.java +++ b/src/org/uic/ticket/api/asn/omv1/ControlData.java @@ -23,6 +23,7 @@ import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -36,30 +37,42 @@ public class ControlData extends Object { public ControlData() { } + @FieldOrder(order = 0) @Asn1Optional public SequenceOfCardReferenceType identificationByCardReference; + @FieldOrder(order = 1) public Boolean identificationByIdCard = false; + @FieldOrder(order = 2) public Boolean identificationByPassportId = false; + @FieldOrder(order = 3) @Asn1Optional public Asn1BigInteger identificationItem; + @FieldOrder(order = 4) public Boolean passportValidationRequired = false; + @FieldOrder(order = 5) public Boolean onlineValidationRequired = false; + @FieldOrder(order = 6) @IntRange(minValue=0,maxValue=99) @Asn1Optional public Long randomDetailedValidationRequired; + @FieldOrder(order = 7) public Boolean ageCheckRequired = false; + @FieldOrder(order = 8) public Boolean reductionCardCheckRequired = false; + @FieldOrder(order = 9) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String infoText; + @FieldOrder(order = 10) @Asn1Optional public SequenceOfTicketLinkType includedTickets; + @FieldOrder(order = 11) @Asn1Optional public ExtensionData extension; diff --git a/src/org/uic/ticket/api/asn/omv1/CountermarkData.java b/src/org/uic/ticket/api/asn/omv1/CountermarkData.java index dfc5a4d..7983636 100644 --- a/src/org/uic/ticket/api/asn/omv1/CountermarkData.java +++ b/src/org/uic/ticket/api/asn/omv1/CountermarkData.java @@ -27,6 +27,7 @@ import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -41,105 +42,135 @@ public class CountermarkData extends Object { public CountermarkData() { } + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String referenceIA5; + @FieldOrder(order = 1) @Asn1Optional public Asn1BigInteger referenceNum; + @FieldOrder(order = 2) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long productOwnerNum; + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productOwnerIA5; + @FieldOrder(order = 4) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long productIdNum; + @FieldOrder(order = 5) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productIdIA5; + @FieldOrder(order = 6) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String ticketReferenceIA5; + @FieldOrder(order = 7) @Asn1Optional public Asn1BigInteger ticketReferenceNum; + @FieldOrder(order = 8) @IntRange(minValue=1,maxValue=200) @Asn1Optional public Long numberOfCountermark; + @FieldOrder(order = 9) @IntRange(minValue=1,maxValue=200) @Asn1Optional public Long totalOfCountermarks; + @FieldOrder(order = 10) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String groupName; + @FieldOrder(order = 11) @Asn1Default("stationUIC") @Asn1Optional public CodeTableType stationCodeTable; + @FieldOrder(order = 12) @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long fromStationNum; + @FieldOrder(order = 13) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String fromStationIA5; + @FieldOrder(order = 14) @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long toStationNum; + @FieldOrder(order = 15) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String toStationIA5; + @FieldOrder(order = 16) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String fromStationNameUTF8; + @FieldOrder(order = 17) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String toStationNameUTF8; + @FieldOrder(order = 18) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String validRegionDesc; + @FieldOrder(order = 19) @Asn1Optional public SequenceOfRegionalValidityType validRegion; + @FieldOrder(order = 20) public Boolean returnIncluded = false; + @FieldOrder(order = 21) @Asn1Optional public ReturnRouteDescriptionType returnDescription; + @FieldOrder(order = 22) @IntRange(minValue=-1,maxValue=700) @Asn1Optional public Long validFromDay; + @FieldOrder(order = 22) @IntRange(minValue=0,maxValue=1440) @Asn1Optional public Long validFromTime; + @FieldOrder(order = 23) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long validFromUTCOffset; + @FieldOrder(order = 24) @IntRange(minValue=0,maxValue=370) @Asn1Optional public Long validUntilDay; + @FieldOrder(order = 25) @IntRange(minValue=0,maxValue=1440) @Asn1Optional public Long validUntilTime; + @FieldOrder(order = 26) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long validUntilUTCOffset; + @FieldOrder(order = 27) @Asn1Default(value="second") @Asn1Optional public TravelClassType classCode; + @FieldOrder(order = 28) @Asn1Optional public SequenceOfCarrierNum carrierNum; + @FieldOrder(order = 29) @Asn1Optional public SequenceOfStringIA5 carrierIA5; + @FieldOrder(order = 30) @Asn1Optional public SequenceOfServiceBrands includedServiceBrands; + @FieldOrder(order = 31) @Asn1Optional public SequenceOfServiceBrands excludedServiceBrands; - + @FieldOrder(order = 32) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String infoText; + @FieldOrder(order = 33) @Asn1Optional public ExtensionData extension; - - - - public String getReferenceIA5() { diff --git a/src/org/uic/ticket/api/asn/omv1/CustomerCardData.java b/src/org/uic/ticket/api/asn/omv1/CustomerCardData.java index a355543..ea2d48d 100644 --- a/src/org/uic/ticket/api/asn/omv1/CustomerCardData.java +++ b/src/org/uic/ticket/api/asn/omv1/CustomerCardData.java @@ -27,6 +27,7 @@ import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -41,41 +42,53 @@ public class CustomerCardData extends Object { public CustomerCardData() { } + @FieldOrder(order = 0) @Asn1Optional public TravelerType customer; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String cardIdIA5; + @FieldOrder(order = 2) @Asn1Optional public Asn1BigInteger cardIdNum; - + @FieldOrder(order = 3) @IntRange(minValue=2016,maxValue=2269) @Asn1Optional public Long validFromYear; + @FieldOrder(order = 4) @IntRange(minValue=0,maxValue=700) @Asn1Optional public Long validFromDay; + @FieldOrder(order = 5) @IntRange(minValue=0,maxValue=250) @Asn1Optional public Long validUntilYear; + @FieldOrder(order = 6) @IntRange(minValue=0,maxValue=370) @Asn1Optional public Long validUntilDay; - + @FieldOrder(order = 7) @Asn1Optional public TravelClassType classCode; + @FieldOrder(order = 8) @IntRange(minValue=0,maxValue=1000) @Asn1Optional public Long cardType; + @FieldOrder(order = 9) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String cardTypeDescr; + @FieldOrder(order = 10) @Asn1Optional public Asn1BigInteger customerStatus; + @FieldOrder(order = 11) @Asn1Optional public String customerStatusDescr; + @FieldOrder(order = 12) @Asn1Optional public SequenceOfUnrestrictedLong includedServices; + @FieldOrder(order = 13) @Asn1Optional public ExtensionData extension; diff --git a/src/org/uic/ticket/api/asn/omv1/CustomerStatusType.java b/src/org/uic/ticket/api/asn/omv1/CustomerStatusType.java index dd2272a..a821f17 100644 --- a/src/org/uic/ticket/api/asn/omv1/CustomerStatusType.java +++ b/src/org/uic/ticket/api/asn/omv1/CustomerStatusType.java @@ -23,6 +23,7 @@ import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; import net.gcdc.asn1.datatypes.Sequence; @@ -34,14 +35,18 @@ public class CustomerStatusType extends Object { public CustomerStatusType() { } + @FieldOrder(order = 0) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long statusProviderNum; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String statusProviderIA5; + @FieldOrder(order = 2) @Asn1Optional public Asn1BigInteger customerStatus; + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String customerStatusDescr; diff --git a/src/org/uic/ticket/api/asn/omv1/DelayConfirmation.java b/src/org/uic/ticket/api/asn/omv1/DelayConfirmation.java index 91a0ce5..11d900f 100644 --- a/src/org/uic/ticket/api/asn/omv1/DelayConfirmation.java +++ b/src/org/uic/ticket/api/asn/omv1/DelayConfirmation.java @@ -29,6 +29,7 @@ import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -41,53 +42,71 @@ public class DelayConfirmation extends Object { public DelayConfirmation() { } + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String referenceIA5; + @FieldOrder(order = 1) @Asn1Optional public Asn1BigInteger referenceNum; + @FieldOrder(order = 2) @Asn1Optional public Asn1BigInteger trainNum; + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String trainIA5; + @FieldOrder(order = 4) @IntRange(minValue=2016, maxValue=2269) @Asn1Optional public Long plannedArrivalYear; + @FieldOrder(order = 5) @IntRange(minValue=1, maxValue=366) @Asn1Optional public Long plannedArrivalDay; + @FieldOrder(order = 6) @IntRange(minValue=0, maxValue=1440) @Asn1Optional public Long plannedArrivalTime; + @FieldOrder(order = 7) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long departureUTCOffset; + @FieldOrder(order = 8) @Asn1Default(value="stationUIC") @Asn1Optional public CodeTableType stationCodeTable; + @FieldOrder(order = 9) @IntRange(minValue=1, maxValue=9999999) @Asn1Optional public Long stationNum; + @FieldOrder(order = 10) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String stationIA5; + @FieldOrder(order = 11) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String stationNameUTF8; + @FieldOrder(order = 12) @IntRange(minValue=0, maxValue=999, hasExtensionMarker=false) @Asn1Optional public Long delay; + @FieldOrder(order = 13) @Asn1Optional public Boolean trainCancelled = false; + @FieldOrder(order = 14) @Asn1Default(value="travelerDelayConfirmation") @Asn1Optional public ConfirmationTypeType confirmationType; + @FieldOrder(order = 15) @Asn1Optional public SequenceOfTicketLinkType affectedTickets; + @FieldOrder(order = 16) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String infoText; + @FieldOrder(order = 17) @Asn1Optional public ExtensionData extension; diff --git a/src/org/uic/ticket/api/asn/omv1/DeltaCoordinates.java b/src/org/uic/ticket/api/asn/omv1/DeltaCoordinates.java index 6e9ab8f..7d17ca0 100644 --- a/src/org/uic/ticket/api/asn/omv1/DeltaCoordinates.java +++ b/src/org/uic/ticket/api/asn/omv1/DeltaCoordinates.java @@ -20,6 +20,7 @@ package org.uic.ticket.api.asn.omv1; import net.gcdc.asn1.datatypes.Asn1BigInteger; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.Sequence; @Sequence @@ -27,12 +28,14 @@ public class DeltaCoordinates extends Object { public DeltaCoordinates() { } + @FieldOrder(order = 0) public Asn1BigInteger longitude; + @FieldOrder(order = 1) public Asn1BigInteger latitude; + public Asn1BigInteger getLongitude() { - return this.longitude; } diff --git a/src/org/uic/ticket/api/asn/omv1/DocumentData.java b/src/org/uic/ticket/api/asn/omv1/DocumentData.java index f0b1229..c8afc04 100644 --- a/src/org/uic/ticket/api/asn/omv1/DocumentData.java +++ b/src/org/uic/ticket/api/asn/omv1/DocumentData.java @@ -20,6 +20,7 @@ package org.uic.ticket.api.asn.omv1; import net.gcdc.asn1.datatypes.Asn1Optional; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.Sequence; @@ -29,27 +30,25 @@ public class DocumentData extends Object { public DocumentData() { } + @FieldOrder(order = 0) @Asn1Optional public TokenType token; + @FieldOrder(order = 1) public TicketDetailData ticket; public TokenType getToken() { - return this.token; } public TicketDetailData getTicket() { - return this.ticket; } public void setToken(TokenType token) { - this.token = token; } public void setTicket(TicketDetailData ticket) { - this.ticket = ticket; } diff --git a/src/org/uic/ticket/api/asn/omv1/ExtensionData.java b/src/org/uic/ticket/api/asn/omv1/ExtensionData.java index 7091ba2..8a2a5cd 100644 --- a/src/org/uic/ticket/api/asn/omv1/ExtensionData.java +++ b/src/org/uic/ticket/api/asn/omv1/ExtensionData.java @@ -20,6 +20,7 @@ package org.uic.ticket.api.asn.omv1; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.RestrictedString; import net.gcdc.asn1.datatypes.Sequence; import net.gcdc.asn1.datatypesimpl.OctetString; @@ -30,30 +31,27 @@ public class ExtensionData extends Object { public ExtensionData() { } + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.IA5String) public String extensionId; + @FieldOrder(order = 1) public OctetString extensionData; public String getExtensionId() { - return this.extensionId; } public byte[] getExtensionData() { - return extensionData.toByteArray(); } public void setExtensionId(String extensionId) { - this.extensionId = extensionId; } public void setExtensionData(byte[] extensionData) { - this.extensionData = new OctetString(extensionData); - } diff --git a/src/org/uic/ticket/api/asn/omv1/FIPTicketData.java b/src/org/uic/ticket/api/asn/omv1/FIPTicketData.java index eac2ef3..9864c18 100644 --- a/src/org/uic/ticket/api/asn/omv1/FIPTicketData.java +++ b/src/org/uic/ticket/api/asn/omv1/FIPTicketData.java @@ -28,6 +28,7 @@ import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; import net.gcdc.asn1.datatypesimpl.SequenceOfStringIA5; @@ -36,43 +37,58 @@ public class FIPTicketData extends Object { public FIPTicketData() { } + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String referenceIA5; + @FieldOrder(order = 1) @Asn1Optional public Asn1BigInteger referenceNum; + @FieldOrder(order = 2) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long productOwnerNum; + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productOwnerIA5; + @FieldOrder(order = 4) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long productIdNum; + @FieldOrder(order = 5) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productIdIA5; + @FieldOrder(order = 6) @IntRange(minValue=-1,maxValue=700) @Asn1Optional public Long validFromDay; + @FieldOrder(order = 7) @IntRange(minValue=0,maxValue=370) @Asn1Optional public Long validUntilDay; + @FieldOrder(order = 8) @Asn1Optional public SequenceOfActivatedDays activatedDay; + @FieldOrder(order = 9) @Asn1Optional public SequenceOfCarrierNum carrierNum; + @FieldOrder(order = 10) @Asn1Optional public SequenceOfStringIA5 carrierIA5; + @FieldOrder(order = 11) @IntRange(minValue=1,maxValue=200) public Long numberOfTravelDays; + @FieldOrder(order = 12) public Boolean includesSupplements = false; + @FieldOrder(order = 13) @Asn1Default(value="second") @Asn1Optional public TravelClassType classCode; + @FieldOrder(order = 14) @Asn1Optional public ExtensionData extension; public String getReferenceIA5() { diff --git a/src/org/uic/ticket/api/asn/omv1/GeoCoordinateType.java b/src/org/uic/ticket/api/asn/omv1/GeoCoordinateType.java index 0b04491..ce482e0 100644 --- a/src/org/uic/ticket/api/asn/omv1/GeoCoordinateType.java +++ b/src/org/uic/ticket/api/asn/omv1/GeoCoordinateType.java @@ -22,6 +22,7 @@ package org.uic.ticket.api.asn.omv1; import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.Sequence; @Sequence @@ -29,22 +30,29 @@ public class GeoCoordinateType extends Object { public GeoCoordinateType() { } + @FieldOrder(order = 0) @Asn1Default(value="milliDegree") @Asn1Optional public GeoUnitType geoUnit; + @FieldOrder(order = 1) @Asn1Default(value="wgs84") @Asn1Optional public GeoCoordinateSystemType coordinateSystem; + @FieldOrder(order = 2) @Asn1Default(value="north") @Asn1Optional public HemisphereLongitudeType hemisphereLongitude; + @FieldOrder(order = 3) @Asn1Default(value="east") @Asn1Optional public HemisphereLatitudeType hemisphereLatitude; + @FieldOrder(order = 4) public Asn1BigInteger longitude; + @FieldOrder(order = 5) public Asn1BigInteger latitude; + @FieldOrder(order = 6) @Asn1Optional public GeoUnitType accuracy; public GeoUnitType getGeoUnit() { diff --git a/src/org/uic/ticket/api/asn/omv1/IncludedOpenTicketType.java b/src/org/uic/ticket/api/asn/omv1/IncludedOpenTicketType.java index 18537cd..4119ef4 100644 --- a/src/org/uic/ticket/api/asn/omv1/IncludedOpenTicketType.java +++ b/src/org/uic/ticket/api/asn/omv1/IncludedOpenTicketType.java @@ -25,6 +25,7 @@ import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; import net.gcdc.asn1.datatypes.SizeRange; @@ -34,65 +35,87 @@ public class IncludedOpenTicketType extends Object { public IncludedOpenTicketType() { } + @FieldOrder(order = 0) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long productOwnerNum; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productOwnerIA5; + @FieldOrder(order = 2) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long productIdNum; + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productIdIA5; + @FieldOrder(order = 4) @Asn1Optional public Asn1BigInteger externalIssuerId; + @FieldOrder(order = 5) @Asn1Optional public Asn1BigInteger issuerAutorizationId; + @FieldOrder(order = 6) @Asn1Default("stationUIC") @Asn1Optional public CodeTableType stationCodeTable; + @FieldOrder(order = 7) @Asn1Optional public SequenceOfRegionalValidityType validRegion; + @FieldOrder(order = 8) @IntRange(minValue=-1,maxValue=700) @Asn1Optional public Long validFromDay; + @FieldOrder(order = 9) @IntRange(minValue=0,maxValue=1440) @Asn1Optional public Long validFromTime; + @FieldOrder(order = 10) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long validFromUTCOffset; + @FieldOrder(order = 11) @IntRange(minValue=0,maxValue=370) @Asn1Optional public Long validUntilDay; + @FieldOrder(order = 12) @IntRange(minValue=0,maxValue=1440) @Asn1Optional public Long validUntilTime; + @FieldOrder(order = 13) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long validUntilUTCOffset; + @FieldOrder(order = 14) @Asn1Default(value="second") @Asn1Optional public TravelClassType classCode; + @FieldOrder(order = 15) @SizeRange(minValue = 1, maxValue = 2) @Asn1Optional public String serviceLevel; + @FieldOrder(order = 16) @Asn1Optional public SequenceOfCarrierNum includedCarriersNum; + @FieldOrder(order = 17) @Asn1Optional public SequenceOfStringIA5 includedCarriersIA5; + @FieldOrder(order = 18) @Asn1Optional public SequenceOfServiceBrands includedServiceBrands; + @FieldOrder(order = 19) @Asn1Optional public SequenceOfServiceBrands excludedServiceBrands; + @FieldOrder(order = 20) @Asn1Optional public SequenceOfTariffType tariffs; + @FieldOrder(order = 21) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String infoText; - + @FieldOrder(order = 22) @Asn1Optional public ExtensionData extension; public Long getProductOwnerNum() { diff --git a/src/org/uic/ticket/api/asn/omv1/IssuingData.java b/src/org/uic/ticket/api/asn/omv1/IssuingData.java index 228accd..4082b84 100644 --- a/src/org/uic/ticket/api/asn/omv1/IssuingData.java +++ b/src/org/uic/ticket/api/asn/omv1/IssuingData.java @@ -27,6 +27,7 @@ import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.FixedSize; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; @@ -39,57 +40,76 @@ public class IssuingData extends Object { public IssuingData() { } + @FieldOrder(order = 0) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long securityProviderNum; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String securityProviderIA5; + @FieldOrder(order = 2) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long issuerNum; + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String issuerIA5; + @FieldOrder(order = 4) @IntRange(minValue=2016,maxValue=2269) public Long issuingYear; + @FieldOrder(order = 5) @IntRange(minValue=1,maxValue=366) public Long issuingDay; + @FieldOrder(order = 6) @IntRange(minValue=0,maxValue=1440) @Asn1Optional public Long issuingTime; + @FieldOrder(order = 7) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String issuerName; + @FieldOrder(order = 8) public Boolean specimen = false; + @FieldOrder(order = 9) public Boolean securePaperTicket = false; + @FieldOrder(order = 10) public Boolean activated = true; + @FieldOrder(order = 11) @FixedSize(3) @Asn1Default(value="EUR") @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String currency; + @FieldOrder(order = 12) @IntRange(minValue=1,maxValue=3) @Asn1Default(value="2") @Asn1Optional public Long currencyFract; + @FieldOrder(order = 13) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String issuerPNR; + @FieldOrder(order = 14) @Asn1Optional public ExtensionData extension; + @FieldOrder(order = 15) @Asn1Optional public Asn1BigInteger issuedOnTrainNum; + @FieldOrder(order = 16) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String issuedOnTrainIA5; + @FieldOrder(order = 17) @Asn1Optional public Asn1BigInteger issuedOnLine; + @FieldOrder(order = 18) @Asn1Optional public GeoCoordinateType pointOfSale; diff --git a/src/org/uic/ticket/api/asn/omv1/LineType.java b/src/org/uic/ticket/api/asn/omv1/LineType.java index b8a82af..eb9928e 100644 --- a/src/org/uic/ticket/api/asn/omv1/LineType.java +++ b/src/org/uic/ticket/api/asn/omv1/LineType.java @@ -23,6 +23,7 @@ import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -37,31 +38,41 @@ public class LineType extends Object { public LineType() { } + @FieldOrder(order = 0) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long carrierNum; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String carrierIA5; + @FieldOrder(order = 2) @Asn1Optional public SequenceOfUnrestrictedLong lineId; + @FieldOrder(order = 3) @Asn1Default("stationUIC") @Asn1Optional public CodeTableType stationCodeTable; + @FieldOrder(order = 4) @IntRange(minValue=0,maxValue=9999999) @Asn1Optional public Long entryStationNum; + @FieldOrder(order = 5) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String entryStationIA5; + @FieldOrder(order = 6) @IntRange(minValue=0,maxValue=9999999) @Asn1Optional public Long terminatingStationNum; + @FieldOrder(order = 7) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String terminatingStationIA5; + @FieldOrder(order = 8) @Asn1Optional public Asn1BigInteger city; + @FieldOrder(order = 9) @Asn1Optional public OctetString binaryZoneId; diff --git a/src/org/uic/ticket/api/asn/omv1/LuggageRestrictionType.java b/src/org/uic/ticket/api/asn/omv1/LuggageRestrictionType.java index 67adc1f..23ae0a6 100644 --- a/src/org/uic/ticket/api/asn/omv1/LuggageRestrictionType.java +++ b/src/org/uic/ticket/api/asn/omv1/LuggageRestrictionType.java @@ -21,6 +21,7 @@ package org.uic.ticket.api.asn.omv1; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.Sequence; @@ -31,14 +32,17 @@ public class LuggageRestrictionType extends Object { public LuggageRestrictionType() { } + @FieldOrder(order = 0) @IntRange(minValue=0,maxValue=99) @Asn1Default(value="3") @Asn1Optional public Long maxHandLuggagePieces; + @FieldOrder(order = 1) @IntRange(minValue=0,maxValue=99) @Asn1Default(value="1") @Asn1Optional public Long maxNonHandLuggagePieces; + @FieldOrder(order = 2) @Asn1Optional public SequenceOfRegisteredLuggageType registeredLuggage; diff --git a/src/org/uic/ticket/api/asn/omv1/OpenTicketData.java b/src/org/uic/ticket/api/asn/omv1/OpenTicketData.java index 018241a..67bf1ac 100644 --- a/src/org/uic/ticket/api/asn/omv1/OpenTicketData.java +++ b/src/org/uic/ticket/api/asn/omv1/OpenTicketData.java @@ -27,6 +27,7 @@ import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -40,108 +41,146 @@ public class OpenTicketData extends Object { public OpenTicketData() { } + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String referenceIA5; + @FieldOrder(order = 1) @Asn1Optional public Asn1BigInteger referenceNum; + @FieldOrder(order = 2) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long productOwnerNum; + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productOwnerIA5; + @FieldOrder(order = 4) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long productIdNum; + @FieldOrder(order = 5) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productIdIA5; + @FieldOrder(order = 6) @Asn1Optional public Asn1BigInteger externalIssuerId; + @FieldOrder(order = 7) @Asn1Optional public Asn1BigInteger issuerAutorizationId; + @FieldOrder(order = 8) public Boolean returnIncluded = false; + @FieldOrder(order = 9) @Asn1Default("stationUIC") @Asn1Optional public CodeTableType stationCodeTable; + @FieldOrder(order = 10) @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long fromStationNum; + @FieldOrder(order = 11) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String fromStationIA5; + @FieldOrder(order = 12) @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long toStationNum; + @FieldOrder(order = 13) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String toStationIA5; + @FieldOrder(order = 14) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String fromStationNameUTF8; + @FieldOrder(order = 15) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String toStationNameUTF8; + @FieldOrder(order = 16) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String validRegionDesc; + @FieldOrder(order = 17) @Asn1Optional public SequenceOfRegionalValidityType validRegion; + @FieldOrder(order = 18) @Asn1Optional public ReturnRouteDescriptionType returnDescription; + @FieldOrder(order = 19) @Asn1Default(value = "0") @IntRange(minValue=-1,maxValue=700) @Asn1Optional public Long validFromDay; + @FieldOrder(order = 20) @IntRange(minValue=0,maxValue=1440) @Asn1Optional public Long validFromTime; + @FieldOrder(order = 21) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long validFromUTCOffset; + @FieldOrder(order = 22) @Asn1Default(value = "0") @IntRange(minValue=0,maxValue=370) @Asn1Optional public Long validUntilDay; + @FieldOrder(order = 23) @IntRange(minValue=0,maxValue=1440) @Asn1Optional public Long validUntilTime; + @FieldOrder(order = 24) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long validUntilUTCOffset; + @FieldOrder(order = 25) @Asn1Optional public SequenceOfActivatedDays activatedDay; + @FieldOrder(order = 26) @Asn1Default(value="second") @Asn1Optional public TravelClassType classCode; + @FieldOrder(order = 27) @SizeRange(minValue = 1, maxValue = 2) @Asn1Optional public String serviceLevel; + @FieldOrder(order = 28) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public SequenceOfCarrierNum carrierNum; + @FieldOrder(order = 29) @Asn1Optional public SequenceOfStringIA5 carrierIA5; + @FieldOrder(order = 30) @Asn1Optional public SequenceOfServiceBrands includedServiceBrands; + @FieldOrder(order = 31) @Asn1Optional public SequenceOfServiceBrands excludedServiceBrands; + @FieldOrder(order = 32) @Asn1Optional public SequenceOfTariffType tariffs; + @FieldOrder(order = 33) @Asn1Optional Asn1BigInteger price; + @FieldOrder(order = 34) @Asn1Optional SequenceOfVatDetail vatDetails; + @FieldOrder(order = 35) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String infoText; + @FieldOrder(order = 36) @Asn1Optional public SequenceOfIncludedOpenTicketType includedAddOns; + @FieldOrder(order = 37) @Asn1Optional public LuggageRestrictionType luggage; - + @FieldOrder(order = 38) @Asn1Optional public ExtensionData extension; diff --git a/src/org/uic/ticket/api/asn/omv1/ParkingGroundData.java b/src/org/uic/ticket/api/asn/omv1/ParkingGroundData.java index 53daa85..f121811 100644 --- a/src/org/uic/ticket/api/asn/omv1/ParkingGroundData.java +++ b/src/org/uic/ticket/api/asn/omv1/ParkingGroundData.java @@ -25,6 +25,7 @@ import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -36,60 +37,80 @@ public class ParkingGroundData extends Object { public ParkingGroundData() { } + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String referenceIA5; + @FieldOrder(order = 1) @Asn1Optional public Asn1BigInteger referenceNum; + @FieldOrder(order = 2) @RestrictedString(CharacterRestriction.IA5String) public String parkingGroundId; + @FieldOrder(order = 3) @IntRange(minValue=0,maxValue=370) @Asn1Optional public Long fromParkingDate; + @FieldOrder(order = 4) @IntRange(minValue=0,maxValue=370) @Asn1Optional public Long toParkingDate; + @FieldOrder(order = 5) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long productOwnerNum; + @FieldOrder(order = 6) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productOwnerIA5; + @FieldOrder(order = 7) @IntRange(minValue=0,maxValue=32000) @Asn1Optional public Long productIdNum; + @FieldOrder(order = 8) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productIdIA5; + @FieldOrder(order = 9) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String accessCode; + @FieldOrder(order = 10) @RestrictedString(CharacterRestriction.UTF8String) public String location; + @FieldOrder(order = 11) @Asn1Default("stationUIC") @Asn1Optional public CodeTableType stationCodeTable; + @FieldOrder(order = 12) @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long stationNum; + @FieldOrder(order = 13) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String stationIA5; + @FieldOrder(order = 14) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String specialInformation; + @FieldOrder(order = 15) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String entryTrack; + @FieldOrder(order = 16) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String numberPlate; + @FieldOrder(order = 17) @Asn1Optional Asn1BigInteger price; + @FieldOrder(order = 18) @Asn1Optional SequenceOfVatDetail vatDetails; + @FieldOrder(order = 19) @Asn1Optional public ExtensionData extension; diff --git a/src/org/uic/ticket/api/asn/omv1/PassData.java b/src/org/uic/ticket/api/asn/omv1/PassData.java index 98b719e..5e53098 100644 --- a/src/org/uic/ticket/api/asn/omv1/PassData.java +++ b/src/org/uic/ticket/api/asn/omv1/PassData.java @@ -27,6 +27,7 @@ import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -39,88 +40,121 @@ public class PassData extends Object { public PassData() { } + @FieldOrder(order = 0) @Asn1Optional public Asn1BigInteger referenceNum; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String referenceIA5; + @FieldOrder(order = 2) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long productOwnerNum; + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productOwnerIA5; + @FieldOrder(order = 4) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long productIdNum; + @FieldOrder(order = 5) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productIdIA5; + @FieldOrder(order = 6) @IntRange(minValue=1,maxValue=250) @Asn1Optional public Long passType; + @FieldOrder(order = 7) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String passDescription; + @FieldOrder(order = 8) @Asn1Default (value="second") @Asn1Optional public TravelClassType classCode; + @FieldOrder(order = 9) @IntRange(minValue=-1,maxValue=700) @Asn1Optional public Long validFromDay; + @FieldOrder(order = 10) @IntRange(minValue=0,maxValue=1440) @Asn1Optional public Long validFromTime; + @FieldOrder(order = 11) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long validFromUTCOffset; + @FieldOrder(order = 12) @IntRange(minValue=0,maxValue=370) @Asn1Optional public Long validUntilDay; + @FieldOrder(order = 13) @IntRange(minValue=0,maxValue=1440) @Asn1Optional public Long validUntilTime; + @FieldOrder(order = 14) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long validUntilUTCOffset; + @FieldOrder(order = 15) @Asn1Optional public ValidityPeriodDetailType validityPeriodDetails; + @FieldOrder(order = 16) @IntRange(minValue=0,maxValue=370) @Asn1Optional public Long numberOfValidityDays; + @FieldOrder(order = 17) @IntRange(minValue=1,maxValue=250) @Asn1Optional public Long numberOfPossibleTrips; + @FieldOrder(order = 18) @IntRange(minValue=1,maxValue=250) @Asn1Optional public Long numberOfDaysOfTravel; + @FieldOrder(order = 19) @Asn1Optional public SequenceOfActivatedDays activatedDay; + @FieldOrder(order = 20) @Asn1Optional public SequenceOfCountries countries; + @FieldOrder(order = 21) @Asn1Optional public SequenceOfCarrierNum includedCarriersNum; + @FieldOrder(order = 22) @Asn1Optional public SequenceOfStringIA5 includedCarriersIA5; + @FieldOrder(order = 23) @Asn1Optional public SequenceOfCarrierNum excludedCarriersNum; + @FieldOrder(order = 24) @Asn1Optional public SequenceOfStringIA5 excludedCarriersIA5; + @FieldOrder(order = 25) @Asn1Optional public SequenceOfServiceBrands includedServiceBrands; + @FieldOrder(order = 26) @Asn1Optional public SequenceOfServiceBrands excludedServiceBrands; + @FieldOrder(order = 27) @Asn1Optional public SequenceOfRegionalValidityType validRegion; + @FieldOrder(order = 28) @Asn1Optional public SequenceOfTariffType tariffs; + @FieldOrder(order = 29) @Asn1Optional Asn1BigInteger price; + @FieldOrder(order = 30) @Asn1Optional SequenceOfVatDetail vatDetails; + @FieldOrder(order = 31) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String infoText; + @FieldOrder(order = 32) @Asn1Optional public ExtensionData extension; diff --git a/src/org/uic/ticket/api/asn/omv1/PlacesType.java b/src/org/uic/ticket/api/asn/omv1/PlacesType.java index bf71601..999c804 100644 --- a/src/org/uic/ticket/api/asn/omv1/PlacesType.java +++ b/src/org/uic/ticket/api/asn/omv1/PlacesType.java @@ -21,6 +21,7 @@ package org.uic.ticket.api.asn.omv1; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.RestrictedString; import net.gcdc.asn1.datatypes.Sequence; import net.gcdc.asn1.datatypesimpl.SequenceOfStringIA5; @@ -30,17 +31,22 @@ public class PlacesType extends Object { public PlacesType() { } + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String coach; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String placeString; + @FieldOrder(order = 2) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String placeDescription; + @FieldOrder(order = 3) @Asn1Optional public SequenceOfStringIA5 placeIA5; + @FieldOrder(order = 4) @Asn1Optional public SequenceOfPlaceNum placeNum; diff --git a/src/org/uic/ticket/api/asn/omv1/PolygoneType.java b/src/org/uic/ticket/api/asn/omv1/PolygoneType.java index 24dd7f5..0304fc8 100644 --- a/src/org/uic/ticket/api/asn/omv1/PolygoneType.java +++ b/src/org/uic/ticket/api/asn/omv1/PolygoneType.java @@ -19,6 +19,7 @@ */ package org.uic.ticket.api.asn.omv1; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.Sequence; @Sequence @@ -26,8 +27,10 @@ public class PolygoneType extends Object { public PolygoneType() { } + @FieldOrder(order = 0) public GeoCoordinateType firstEdge; + @FieldOrder(order = 1) public SequenceOfDeltaCoordinates edges; diff --git a/src/org/uic/ticket/api/asn/omv1/RegionalValidityType.java b/src/org/uic/ticket/api/asn/omv1/RegionalValidityType.java index 94ab87d..13a2378 100644 --- a/src/org/uic/ticket/api/asn/omv1/RegionalValidityType.java +++ b/src/org/uic/ticket/api/asn/omv1/RegionalValidityType.java @@ -20,6 +20,7 @@ package org.uic.ticket.api.asn.omv1; import net.gcdc.asn1.datatypes.Choice; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; @@ -29,14 +30,19 @@ public class RegionalValidityType extends Object { public RegionalValidityType() { } + @FieldOrder(order = 0) public TrainLinkType trainLink; + @FieldOrder(order = 1) public ViaStationType viaStations; + @FieldOrder(order = 2) public ZoneType zones; + @FieldOrder(order = 3) public LineType lines; + @FieldOrder(order = 4) public PolygoneType polygone; diff --git a/src/org/uic/ticket/api/asn/omv1/RegisteredLuggageType.java b/src/org/uic/ticket/api/asn/omv1/RegisteredLuggageType.java index 5028fb6..1d0df55 100644 --- a/src/org/uic/ticket/api/asn/omv1/RegisteredLuggageType.java +++ b/src/org/uic/ticket/api/asn/omv1/RegisteredLuggageType.java @@ -21,6 +21,7 @@ package org.uic.ticket.api.asn.omv1; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -33,12 +34,15 @@ public class RegisteredLuggageType extends Object { public RegisteredLuggageType() { } + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String registrationId; + @FieldOrder(order = 1) @IntRange(minValue=1,maxValue=99) @Asn1Optional public Long maxWeight; + @FieldOrder(order = 2) @IntRange(minValue=1,maxValue=300) @Asn1Optional public Long maxSize; diff --git a/src/org/uic/ticket/api/asn/omv1/ReservationData.java b/src/org/uic/ticket/api/asn/omv1/ReservationData.java index 185b9cd..9144a78 100644 --- a/src/org/uic/ticket/api/asn/omv1/ReservationData.java +++ b/src/org/uic/ticket/api/asn/omv1/ReservationData.java @@ -25,6 +25,7 @@ import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -38,127 +39,171 @@ public class ReservationData extends Object { public ReservationData() { } + @FieldOrder(order = 0) @Asn1Optional public Asn1BigInteger trainNum; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String trainIA5; + @FieldOrder(order = 2) @Asn1Default(value="0") @IntRange(minValue=-1,maxValue=370) @Asn1Optional public Long departureDate; + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String referenceIA5; + @FieldOrder(order = 4) @Asn1Optional public Asn1BigInteger referenceNum; + @FieldOrder(order = 5) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long productOwnerNum; + @FieldOrder(order = 6) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productOwnerIA5; + @FieldOrder(order = 7) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long productIdNum; + @FieldOrder(order = 8) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productIdIA5; + @FieldOrder(order = 9) @IntRange(minValue=0,maxValue=32000) @Asn1Optional public Long serviceBrand; + @FieldOrder(order = 10) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String serviceBrandAbrUTF8; + @FieldOrder(order = 11) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String serviceBrandNameUTF8; + @FieldOrder(order = 12) @Asn1Default("seat") @Asn1Optional public ServiceType service; + @FieldOrder(order = 13) @Asn1Default("stationUICReservation") @Asn1Optional public CodeTableType stationCodeTable; + @FieldOrder(order = 14) @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long fromStationNum; + @FieldOrder(order = 15) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String fromStationIA5; + @FieldOrder(order = 16) @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long toStationNum; + @FieldOrder(order = 17) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String toStationIA5; + @FieldOrder(order = 18) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String fromStationNameUTF8; + @FieldOrder(order = 19) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String toStationNameUTF8; + @FieldOrder(order = 20) @IntRange(minValue=0,maxValue=1440) public Long departureTime; + @FieldOrder(order = 21) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long departureUTCOffset; + @FieldOrder(order = 22) @IntRange(minValue=-1,maxValue=20) @Asn1Default(value="0") @Asn1Optional public Long arrivalDate; + @FieldOrder(order = 23) @IntRange(minValue=0,maxValue=1440) @Asn1Optional public Long arrivalTime; + @FieldOrder(order = 24) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long arrivalUTCOffset; + @FieldOrder(order = 25) @Asn1Optional public SequenceOfCarrierNum carrierNum; + @FieldOrder(order = 26) @Asn1Optional public SequenceOfStringIA5 carrierIA5; + @FieldOrder(order = 27) @Asn1Default("second") @Asn1Optional public TravelClassType classCode; + @FieldOrder(order = 28) @SizeRange(minValue = 1, maxValue = 2) @Asn1Optional public String serviceLevel; + @FieldOrder(order = 29) @Asn1Optional public PlacesType places; + @FieldOrder(order = 30) @Asn1Optional public PlacesType additionalPlaces; + @FieldOrder(order = 31) @Asn1Optional public PlacesType bicyclePlaces; + @FieldOrder(order = 32) @Asn1Optional public CompartmentDetailsType compartmentDetails; + @FieldOrder(order = 33) @IntRange(minValue=0,maxValue=200) @Asn1Default(value="0") @Asn1Optional public Long numberOfOverbooked; + @FieldOrder(order = 34) @Asn1Optional public SequenceOfBerthDetailData berth; + @FieldOrder(order = 35) @Asn1Optional public SequenceOfTariffType tariff; + @FieldOrder(order = 36) @Asn1Default("travelPrice") @Asn1Optional public PriceTypeType priceType; + @FieldOrder(order = 37) @Asn1Optional Asn1BigInteger price; + @FieldOrder(order = 38) @Asn1Optional SequenceOfVatDetail vatDetails; + @FieldOrder(order = 39) @IntRange(minValue=0,maxValue=9) @Asn1Default("0") @Asn1Optional public Long typeOfSupplement; + @FieldOrder(order = 40) @IntRange(minValue=0,maxValue=200) @Asn1Default("0") @Asn1Optional public Long numberOfSupplements; + @FieldOrder(order = 41) @Asn1Optional public LuggageRestrictionType luggage; + @FieldOrder(order = 42) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String infoText; + @FieldOrder(order = 43) @Asn1Optional public ExtensionData extension; public Long getTrainNum() { diff --git a/src/org/uic/ticket/api/asn/omv1/ReturnRouteDescriptionType.java b/src/org/uic/ticket/api/asn/omv1/ReturnRouteDescriptionType.java index 588e132..1274eec 100644 --- a/src/org/uic/ticket/api/asn/omv1/ReturnRouteDescriptionType.java +++ b/src/org/uic/ticket/api/asn/omv1/ReturnRouteDescriptionType.java @@ -23,6 +23,7 @@ import java.util.List; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -34,27 +35,35 @@ public class ReturnRouteDescriptionType extends Object { public ReturnRouteDescriptionType() { } + @FieldOrder(order = 0) @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long fromStationNum; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String fromStationIA5; + @FieldOrder(order = 2) @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long toStationNum; + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String toStationIA5; + @FieldOrder(order = 4) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String fromStationNameUTF8; + @FieldOrder(order = 5) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String toStationNameUTF8; + @FieldOrder(order = 6) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String validReturnRegionDesc; + @FieldOrder(order = 7) @Asn1Optional public SequenceOfRegionalValidityType validReturnRegion; public Long getFromStationNum() { diff --git a/src/org/uic/ticket/api/asn/omv1/RouteSectionType.java b/src/org/uic/ticket/api/asn/omv1/RouteSectionType.java index 24f20a0..a19a92d 100644 --- a/src/org/uic/ticket/api/asn/omv1/RouteSectionType.java +++ b/src/org/uic/ticket/api/asn/omv1/RouteSectionType.java @@ -22,6 +22,7 @@ package org.uic.ticket.api.asn.omv1; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -29,24 +30,31 @@ public class RouteSectionType extends Object { public RouteSectionType() { } + @FieldOrder(order = 0) @Asn1Default("stationUIC") @Asn1Optional public CodeTableType stationCodeTable; + @FieldOrder(order = 1) @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long fromStationNum; + @FieldOrder(order = 2) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String fromStationIA5; + @FieldOrder(order = 3) @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long toStationNum; + @FieldOrder(order = 4) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String toStationIA5; + @FieldOrder(order = 5) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String fromStationNameUTF8; + @FieldOrder(order = 6) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String toStationNameUTF8; diff --git a/src/org/uic/ticket/api/asn/omv1/SeriesDetailType.java b/src/org/uic/ticket/api/asn/omv1/SeriesDetailType.java index 63862a1..c33bc17 100644 --- a/src/org/uic/ticket/api/asn/omv1/SeriesDetailType.java +++ b/src/org/uic/ticket/api/asn/omv1/SeriesDetailType.java @@ -21,6 +21,7 @@ package org.uic.ticket.api.asn.omv1; import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Optional; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.Sequence; @@ -29,12 +30,15 @@ public class SeriesDetailType extends Object { public SeriesDetailType() { } + @FieldOrder(order = 0) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long supplyingCarrier; + @FieldOrder(order = 1) @IntRange(minValue=1,maxValue=99) @Asn1Optional public Long offerIdentification; + @FieldOrder(order = 2) @Asn1Optional public Asn1BigInteger series; diff --git a/src/org/uic/ticket/api/asn/omv1/StationPassageData.java b/src/org/uic/ticket/api/asn/omv1/StationPassageData.java index b7b4e25..156fe2d 100644 --- a/src/org/uic/ticket/api/asn/omv1/StationPassageData.java +++ b/src/org/uic/ticket/api/asn/omv1/StationPassageData.java @@ -26,6 +26,7 @@ import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -40,62 +41,84 @@ public class StationPassageData extends Object { public StationPassageData() { } + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String referenceIA5; + @FieldOrder(order = 1) @Asn1Optional public Asn1BigInteger referenceNum; + @FieldOrder(order = 2) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long productOwnerNum; + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productOwnerIA5; + @FieldOrder(order = 4) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long productIdNum; + @FieldOrder(order = 5) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productIdIA5; + @FieldOrder(order = 6) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String productName; + @FieldOrder(order = 7) @Asn1Default("stationUIC") @Asn1Optional public CodeTableType stationCodeTable; + @FieldOrder(order = 8) @Asn1Optional public SequenceOfUnrestrictedLong stationNum; + @FieldOrder(order = 9) @Asn1Optional public SequenceOfStringIA5 stationIA5; + @FieldOrder(order = 10) @Asn1Optional public SequenceOfStringUTF8 stationNameUTF8; + @FieldOrder(order = 11) @Asn1Optional public SequenceOfUnrestrictedLong areaCodeNum; + @FieldOrder(order = 12) @Asn1Optional public SequenceOfStringIA5 areaCodeIA5; + @FieldOrder(order = 13) @Asn1Optional public SequenceOfStringUTF8 areaNameUTF8; + @FieldOrder(order = 14) @IntRange(minValue=-1,maxValue=700) public Long validFromDay; + @FieldOrder(order = 15) @IntRange(minValue=0,maxValue=1440) @Asn1Optional public Long validFromTime; + @FieldOrder(order = 16) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long validFromUTCOffset; + @FieldOrder(order = 17) @Asn1Default(value="0") @IntRange(minValue=0,maxValue=370) @Asn1Optional public Long validUntilDay; + @FieldOrder(order = 18) @IntRange(minValue=0,maxValue=1440) @Asn1Optional public Long validUntilTime; + @FieldOrder(order = 19) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long validUntilUTCOffset; + @FieldOrder(order = 20) @Asn1Optional public Asn1BigInteger numberOfDaysValid; + @FieldOrder(order = 21) @Asn1Optional public ExtensionData extension; diff --git a/src/org/uic/ticket/api/asn/omv1/TariffType.java b/src/org/uic/ticket/api/asn/omv1/TariffType.java index c5f1067..a329798 100644 --- a/src/org/uic/ticket/api/asn/omv1/TariffType.java +++ b/src/org/uic/ticket/api/asn/omv1/TariffType.java @@ -23,6 +23,7 @@ import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -34,34 +35,46 @@ public class TariffType extends Object { public TariffType() { } + @FieldOrder(order = 0) @IntRange(minValue=1,maxValue=200) @Asn1Default(value = "1") @Asn1Optional public Long numberOfPassengers; + @FieldOrder(order = 1) @Asn1Optional public PassengerType passengerType; + @FieldOrder(order = 2) @IntRange(minValue=1,maxValue=64) @Asn1Optional public Long ageBelow; + @FieldOrder(order = 3) @IntRange(minValue=1,maxValue=128) @Asn1Optional public Long ageAbove; + @FieldOrder(order = 4) @Asn1Optional public SequenceOfTravelerId traverlerid; + @FieldOrder(order = 5) public Boolean restrictedToCountryOfResidence; + @FieldOrder(order = 6) @Asn1Optional public RouteSectionType restrictedToRouteSection; + @FieldOrder(order = 7) @Asn1Optional public SeriesDetailType seriesDataDetails; + @FieldOrder(order = 8) @Asn1Optional public Asn1BigInteger tariffIdNum; + @FieldOrder(order = 9) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String tariffIdIA5; + @FieldOrder(order = 10) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String tariffDesc; + @FieldOrder(order = 11) @Asn1Optional public SequenceOfCardReferenceType reductionCard; diff --git a/src/org/uic/ticket/api/asn/omv1/TicketDetailData.java b/src/org/uic/ticket/api/asn/omv1/TicketDetailData.java index 1e12944..0f3ab2b 100644 --- a/src/org/uic/ticket/api/asn/omv1/TicketDetailData.java +++ b/src/org/uic/ticket/api/asn/omv1/TicketDetailData.java @@ -22,6 +22,7 @@ package org.uic.ticket.api.asn.omv1; import net.gcdc.asn1.datatypes.Choice; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; @Choice @@ -30,28 +31,40 @@ public class TicketDetailData extends Object { public TicketDetailData() { } + @FieldOrder(order = 0) public ReservationData reservation; + @FieldOrder(order = 1) public CarCarriageReservationData carCarriageReservation; + @FieldOrder(order = 2) public OpenTicketData openTicket; + @FieldOrder(order = 3) public PassData pass; + @FieldOrder(order = 4) public VoucherData voucher; + @FieldOrder(order = 5) public CustomerCardData customerCard; + @FieldOrder(order = 6) public CountermarkData counterMark; + @FieldOrder(order = 7) public ParkingGroundData parkingGround; + @FieldOrder(order = 8) public FIPTicketData fipTicket; + @FieldOrder(order = 9) public StationPassageData stationPassage; + @FieldOrder(order = 10) public DelayConfirmation delayConfirmation; + @FieldOrder(order = 11) public ExtensionData extension; public ReservationData getReservation() { diff --git a/src/org/uic/ticket/api/asn/omv1/TicketLinkType.java b/src/org/uic/ticket/api/asn/omv1/TicketLinkType.java index c4f9052..0df19c6 100644 --- a/src/org/uic/ticket/api/asn/omv1/TicketLinkType.java +++ b/src/org/uic/ticket/api/asn/omv1/TicketLinkType.java @@ -23,6 +23,7 @@ import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -34,27 +35,34 @@ public class TicketLinkType extends Object { public TicketLinkType() { } + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String referenceIA5; + @FieldOrder(order = 1) @Asn1Optional public Asn1BigInteger referenceNum; + @FieldOrder(order = 2) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String issuerName; - + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String issuerPNR; + @FieldOrder(order = 4) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long productOwnerNum; + @FieldOrder(order = 5) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productOwnerIA5; + @FieldOrder(order = 6) @Asn1Default(value="openTicket") @Asn1Optional public TicketType ticketType; + @FieldOrder(order = 7) @Asn1Default(value="issuedTogether") @Asn1Optional public LinkMode linkMode; diff --git a/src/org/uic/ticket/api/asn/omv1/TimeRangeType.java b/src/org/uic/ticket/api/asn/omv1/TimeRangeType.java index 5f98f7e..7c6a66d 100644 --- a/src/org/uic/ticket/api/asn/omv1/TimeRangeType.java +++ b/src/org/uic/ticket/api/asn/omv1/TimeRangeType.java @@ -19,6 +19,7 @@ */ package org.uic.ticket.api.asn.omv1; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.Sequence; @@ -27,9 +28,11 @@ public class TimeRangeType extends Object { public TimeRangeType() { } + @FieldOrder(order = 0) @IntRange(minValue=0,maxValue=1440) public Long fromTime; + @FieldOrder(order = 1) @IntRange(minValue=0,maxValue=1440) public Long untilTime; diff --git a/src/org/uic/ticket/api/asn/omv1/TokenType.java b/src/org/uic/ticket/api/asn/omv1/TokenType.java index e48a539..ba0e8cc 100644 --- a/src/org/uic/ticket/api/asn/omv1/TokenType.java +++ b/src/org/uic/ticket/api/asn/omv1/TokenType.java @@ -21,6 +21,7 @@ package org.uic.ticket.api.asn.omv1; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.RestrictedString; import net.gcdc.asn1.datatypes.Sequence; import net.gcdc.asn1.datatypesimpl.OctetString; @@ -30,14 +31,18 @@ public class TokenType extends Object { public TokenType() { } + @FieldOrder(order = 0) @Asn1Optional public Long tokenProviderNum; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String tokenProviderIA5; + @FieldOrder(order = 2) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String tokenSpecification; + @FieldOrder(order = 3) public OctetString token; public Long getTokenProviderNum() { diff --git a/src/org/uic/ticket/api/asn/omv1/TrainLinkType.java b/src/org/uic/ticket/api/asn/omv1/TrainLinkType.java index fd2f674..608f209 100644 --- a/src/org/uic/ticket/api/asn/omv1/TrainLinkType.java +++ b/src/org/uic/ticket/api/asn/omv1/TrainLinkType.java @@ -24,6 +24,7 @@ import java.util.Date; import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; import net.gcdc.asn1.datatypes.Sequence; @@ -33,35 +34,46 @@ public class TrainLinkType extends Object { public TrainLinkType() { } + @FieldOrder(order = 0) @Asn1Optional public Asn1BigInteger trainNum; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String trainIA5; + @FieldOrder(order = 2) @IntRange(minValue=0,maxValue=370) @Asn1Optional public Long travelDate; + @FieldOrder(order = 3) @IntRange(minValue=0,maxValue=1440) @Asn1Optional public Long departureTime; + @FieldOrder(order = 4) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long departureUTCOffset; + @FieldOrder(order = 5) @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long fromStationNum; + @FieldOrder(order = 6) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String fromStationIA5; + @FieldOrder(order = 7) @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long toStationNum; + @FieldOrder(order = 8) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String toStationIA5; + @FieldOrder(order = 9) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String fromStationName; + @FieldOrder(order = 10) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String toStationName; diff --git a/src/org/uic/ticket/api/asn/omv1/TravelerData.java b/src/org/uic/ticket/api/asn/omv1/TravelerData.java index f29491c..df89e7d 100644 --- a/src/org/uic/ticket/api/asn/omv1/TravelerData.java +++ b/src/org/uic/ticket/api/asn/omv1/TravelerData.java @@ -23,6 +23,7 @@ import java.util.List; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.FixedSize; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.RestrictedString; @@ -34,12 +35,15 @@ public class TravelerData extends Object { public TravelerData() { } + @FieldOrder(order = 0) @Asn1Optional public SequenceOfTravelerType traveler; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @FixedSize(2) @Asn1Optional public String preferedLanguage; + @FieldOrder(order = 2) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String groupName; diff --git a/src/org/uic/ticket/api/asn/omv1/TravelerType.java b/src/org/uic/ticket/api/asn/omv1/TravelerType.java index efbed3a..9a7b3fb 100644 --- a/src/org/uic/ticket/api/asn/omv1/TravelerType.java +++ b/src/org/uic/ticket/api/asn/omv1/TravelerType.java @@ -25,6 +25,7 @@ import java.util.TimeZone; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -37,53 +38,71 @@ public class TravelerType extends Object { public TravelerType() { } + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String firstName; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String secondName; + @FieldOrder(order = 2) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String lastName; + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String idCard; + @FieldOrder(order = 4) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String passportId; + @FieldOrder(order = 5) @SizeRange(minValue = 1, maxValue = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String title; + @FieldOrder(order = 6) @Asn1Optional public GenderType gender; + @FieldOrder(order = 7) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String customerIdIA5; + @FieldOrder(order = 8) @Asn1Optional public Long customerIdNum; + @FieldOrder(order = 9) @IntRange(minValue=1901,maxValue=2155) @Asn1Optional public Long yearOfBirth; + @FieldOrder(order = 10) @IntRange(minValue=0,maxValue=366) @Asn1Optional public Long dayOfBirth; + @FieldOrder(order = 11) public Boolean ticketHolder = true; + @FieldOrder(order = 12) @Asn1Optional public PassengerType passengerType; + @FieldOrder(order = 13) @Asn1Optional public Boolean passengerWithReducedMobility; + @FieldOrder(order = 14) @IntRange(minValue=1,maxValue=999) @Asn1Optional public Long countryOfResidence; + @FieldOrder(order = 15) @IntRange(minValue=1,maxValue=999) @Asn1Optional public Long countryOfPassport; + @FieldOrder(order = 16) @IntRange(minValue=1,maxValue=999) @Asn1Optional public Long countryOfIdCard; + @FieldOrder(order = 17) @Asn1Optional public SequenceOfCustomerStatusType status; diff --git a/src/org/uic/ticket/api/asn/omv1/UicRailTicketData.java b/src/org/uic/ticket/api/asn/omv1/UicRailTicketData.java index 1822628..4df11b9 100644 --- a/src/org/uic/ticket/api/asn/omv1/UicRailTicketData.java +++ b/src/org/uic/ticket/api/asn/omv1/UicRailTicketData.java @@ -23,6 +23,7 @@ import java.util.List; import net.gcdc.asn1.datatypes.Asn1Optional; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.Sequence; import net.gcdc.asn1.uper.UperEncoder; @@ -33,14 +34,19 @@ public class UicRailTicketData extends Object { public UicRailTicketData() { } + @FieldOrder(order = 0) public IssuingData issuingDetail; + @FieldOrder(order = 1) @Asn1Optional public TravelerData travelerDetail; + @FieldOrder(order = 2) @Asn1Optional public SequenceOfDocumentData transportDocument; + @FieldOrder(order = 3) @Asn1Optional public ControlData controlDetail; + @FieldOrder(order = 4) @Asn1Optional public SequenceOfExtensionData extension; public IssuingData getIssuingDetail() { diff --git a/src/org/uic/ticket/api/asn/omv1/ValidityPeriodDetailType.java b/src/org/uic/ticket/api/asn/omv1/ValidityPeriodDetailType.java index 94c5bc6..86dcd88 100644 --- a/src/org/uic/ticket/api/asn/omv1/ValidityPeriodDetailType.java +++ b/src/org/uic/ticket/api/asn/omv1/ValidityPeriodDetailType.java @@ -23,6 +23,7 @@ import java.util.Collection; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.Asn1SequenceOf; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.Sequence; @Sequence @@ -30,8 +31,10 @@ public class ValidityPeriodDetailType extends Object { public ValidityPeriodDetailType() { } + @FieldOrder(order = 0) @Asn1Optional public SequenceOfValidityPeriodType validityPeriod; + @FieldOrder(order = 1) @Asn1Optional public SequenceOfTimeRangeType excludedTimeRange; diff --git a/src/org/uic/ticket/api/asn/omv1/ValidityPeriodType.java b/src/org/uic/ticket/api/asn/omv1/ValidityPeriodType.java index 932345a..04ff584 100644 --- a/src/org/uic/ticket/api/asn/omv1/ValidityPeriodType.java +++ b/src/org/uic/ticket/api/asn/omv1/ValidityPeriodType.java @@ -23,6 +23,7 @@ import java.util.Date; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.Sequence; @@ -31,23 +32,29 @@ public class ValidityPeriodType extends Object { public ValidityPeriodType() { } + @FieldOrder(order = 0) @IntRange(minValue=0,maxValue=700) @Asn1Default(value="0") @Asn1Optional public Long validFromDay; + @FieldOrder(order = 1) @IntRange(minValue=0,maxValue=1440) @Asn1Optional public Long validFromTime; + @FieldOrder(order = 2) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long validFromUTCOffset; + @FieldOrder(order = 3) @IntRange(minValue=0,maxValue=370) @Asn1Default(value="0") @Asn1Optional public Long validUntilDay; + @FieldOrder(order = 4) @IntRange(minValue=0,maxValue=1440) @Asn1Optional public Long validUntilTime; + @FieldOrder(order = 5) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long validUntilUTCOffset; diff --git a/src/org/uic/ticket/api/asn/omv1/VatDetailType.java b/src/org/uic/ticket/api/asn/omv1/VatDetailType.java index 37e5081..56a8464 100644 --- a/src/org/uic/ticket/api/asn/omv1/VatDetailType.java +++ b/src/org/uic/ticket/api/asn/omv1/VatDetailType.java @@ -22,6 +22,7 @@ package org.uic.ticket.api.asn.omv1; import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; import net.gcdc.asn1.datatypes.Sequence; @@ -32,14 +33,18 @@ public class VatDetailType extends Object { public VatDetailType() { } + @FieldOrder(order = 0) @IntRange(minValue = 1, maxValue = 999) public Long country; + @FieldOrder(order = 1) @IntRange(minValue = 0, maxValue = 999) public Long percentage; + @FieldOrder(order = 2) @Asn1Optional public Asn1BigInteger amount; + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String vatId; diff --git a/src/org/uic/ticket/api/asn/omv1/ViaStationType.java b/src/org/uic/ticket/api/asn/omv1/ViaStationType.java index f0ed866..f690ade 100644 --- a/src/org/uic/ticket/api/asn/omv1/ViaStationType.java +++ b/src/org/uic/ticket/api/asn/omv1/ViaStationType.java @@ -23,6 +23,7 @@ import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -35,27 +36,37 @@ public class ViaStationType extends Object { public ViaStationType() { } + @FieldOrder(order = 0) @Asn1Default("stationUIC") @Asn1Optional public CodeTableType stationCodeTable; + @FieldOrder(order = 1) @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long stationNum; + @FieldOrder(order = 2) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String stationIA5; + @FieldOrder(order = 3) @Asn1Optional public SequenceOfViaStationType alternativeRoutes; + @FieldOrder(order = 4) @Asn1Optional public SequenceOfViaStationType route; + @FieldOrder(order = 5) @Asn1Optional public Boolean border = false; + @FieldOrder(order = 6) @Asn1Optional public SequenceOfCarrierNum carriersNum; - + + @FieldOrder(order = 7) @Asn1Optional public SequenceOfStringIA5 carriersIA5; + @FieldOrder(order = 8) @Asn1Optional public Asn1BigInteger seriesId; + @FieldOrder(order = 9) @Asn1Optional public Asn1BigInteger routeId; diff --git a/src/org/uic/ticket/api/asn/omv1/VoucherData.java b/src/org/uic/ticket/api/asn/omv1/VoucherData.java index b21dcbc..b053a15 100644 --- a/src/org/uic/ticket/api/asn/omv1/VoucherData.java +++ b/src/org/uic/ticket/api/asn/omv1/VoucherData.java @@ -26,6 +26,7 @@ import java.util.TimeZone; import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -38,43 +39,57 @@ public class VoucherData extends Object { public VoucherData() { } + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String referenceIA5; + @FieldOrder(order = 1) @Asn1Optional public Asn1BigInteger referenceNum; + @FieldOrder(order = 2) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long productOwnerNum; + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productOwnerIA5; + @FieldOrder(order = 4) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long productIdNum; + @FieldOrder(order = 5) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productIdIA5; + @FieldOrder(order = 6) @IntRange(minValue=2016,maxValue=2269) public Long validFromYear; + @FieldOrder(order = 7) @IntRange(minValue=0,maxValue=370) public Long validFromDay; + @FieldOrder(order = 8) @IntRange(minValue=2016,maxValue=2269) public Long validUntilYear; + @FieldOrder(order = 9) @IntRange(minValue=0,maxValue=370) public Long validUntilDay; + @FieldOrder(order = 10) @Asn1Optional public Long value; + @FieldOrder(order = 11) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long type; + @FieldOrder(order = 12) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String infoText; + @FieldOrder(order = 13) @Asn1Optional public ExtensionData extension; diff --git a/src/org/uic/ticket/api/asn/omv1/ZoneType.java b/src/org/uic/ticket/api/asn/omv1/ZoneType.java index dbd7f9a..116c5cc 100644 --- a/src/org/uic/ticket/api/asn/omv1/ZoneType.java +++ b/src/org/uic/ticket/api/asn/omv1/ZoneType.java @@ -24,6 +24,7 @@ import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -38,33 +39,44 @@ public class ZoneType extends Object { public ZoneType() { } + @FieldOrder(order = 0) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long carrierNum; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String carrierIA5; + @FieldOrder(order = 2) @Asn1Default("stationUIC") @Asn1Optional public CodeTableType stationCodeTable; + @FieldOrder(order = 3) @IntRange(minValue=0,maxValue=9999999) @Asn1Optional public Long entryStationNum; + @FieldOrder(order = 4) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String entryStationIA5; + @FieldOrder(order = 5) @IntRange(minValue=0,maxValue=9999999) @Asn1Optional public Long terminatingStationNum; + @FieldOrder(order = 6) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String terminatingStationIA5; + @FieldOrder(order = 7) @Asn1Optional public Asn1BigInteger city; + @FieldOrder(order = 8) @Asn1Optional public SequenceOfUnrestrictedLong zoneId; + @FieldOrder(order = 9) @Asn1Optional public OctetString binaryZoneId; + @FieldOrder(order = 10) @Asn1Optional public String nutsCode; diff --git a/src/org/uic/ticket/api/asn/omv2/BerthDetailData.java b/src/org/uic/ticket/api/asn/omv2/BerthDetailData.java index 31bb1fd..34a53cd 100644 --- a/src/org/uic/ticket/api/asn/omv2/BerthDetailData.java +++ b/src/org/uic/ticket/api/asn/omv2/BerthDetailData.java @@ -21,6 +21,7 @@ package org.uic.ticket.api.asn.omv2; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.Sequence; @@ -32,11 +33,14 @@ public class BerthDetailData extends Object { public BerthDetailData() { } + @FieldOrder(order = 0) public BerthTypeType berthType; + @FieldOrder(order = 1) @IntRange(minValue=1, maxValue=999) public Long numberOfBerths; + @FieldOrder(order = 2) @Asn1Default(value="family") @Asn1Optional public CompartmentGenderType gender; diff --git a/src/org/uic/ticket/api/asn/omv2/CarCarriageReservationData.java b/src/org/uic/ticket/api/asn/omv2/CarCarriageReservationData.java index df96c96..c4b5c3f 100644 --- a/src/org/uic/ticket/api/asn/omv2/CarCarriageReservationData.java +++ b/src/org/uic/ticket/api/asn/omv2/CarCarriageReservationData.java @@ -30,6 +30,7 @@ import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -44,132 +45,175 @@ public class CarCarriageReservationData extends Object { public CarCarriageReservationData() { } + @FieldOrder(order = 0) @Asn1Optional public Asn1BigInteger trainNum; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String trainIA5; + @FieldOrder(order = 2) @IntRange(minValue=-1,maxValue=370) @Asn1Default(value="0") @Asn1Optional public Long beginLoadingDate; + @FieldOrder(order = 3) @IntRange(minValue=0,maxValue=1439) @Asn1Optional public Long beginLoadingTime; + @FieldOrder(order = 4) @IntRange(minValue=0,maxValue=1439) @Asn1Optional public Long endLoadingTime; + @FieldOrder(order = 5) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long loadingUTCOffset; + @FieldOrder(order = 6) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String referenceIA5; + @FieldOrder(order = 7) @Asn1Optional public Asn1BigInteger referenceNum; + @FieldOrder(order = 8) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long productOwnerNum; + @FieldOrder(order = 9) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productOwnerIA5; + @FieldOrder(order = 10) @IntRange(minValue=0,maxValue=65535) @Asn1Optional public Long productIdNum; + @FieldOrder(order = 11) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productIdIA5; + @FieldOrder(order = 12) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long serviceBrand; + @FieldOrder(order = 13) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String serviceBrandAbrUTF8; + @FieldOrder(order = 14) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String serviceBrandNameUTF8; + @FieldOrder(order = 15) @Asn1Default("stationUICReservation") @Asn1Optional public CodeTableType stationCodeTable; + @FieldOrder(order = 16) @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long fromStationNum; + @FieldOrder(order = 17) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String fromStationIA5; + @FieldOrder(order = 18) @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long toStationNum; + @FieldOrder(order = 19) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String toStationIA5; + @FieldOrder(order = 20) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String fromStationNameUTF8; + @FieldOrder(order = 21) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String toStationNameUTF8; + @FieldOrder(order = 22) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String coach; + @FieldOrder(order = 23) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String place; + @FieldOrder(order = 24) @Asn1Optional public CompartmentDetailsType compartmentDetails; + @FieldOrder(order = 25) @RestrictedString(CharacterRestriction.IA5String) public String numberPlate; + @FieldOrder(order = 26) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String trailerPlate; + @FieldOrder(order = 27) @IntRange(minValue=0,maxValue=9) public Long carCategory; + @FieldOrder(order = 28) @IntRange(minValue=0,maxValue=6) @Asn1Optional public Long boatCategory; + @FieldOrder(order = 29) public Boolean textileRoof = false; + @FieldOrder(order = 30) @Asn1Default(value ="norack") @Asn1Optional public RoofRackType roofRackType; + @FieldOrder(order = 31) @IntRange(minValue=0,maxValue=99) @Asn1Optional public Long roofRackHeight; + @FieldOrder(order = 32) @IntRange(minValue=0,maxValue=2) @Asn1Optional public Long attachedBoats; + @FieldOrder(order = 33) @IntRange(minValue=0,maxValue=4) @Asn1Optional public Long attachedBicycles; + @FieldOrder(order = 34) @IntRange(minValue=0,maxValue=5) @Asn1Optional public Long attachedSurfboards; + @FieldOrder(order = 35) @IntRange(minValue=0,maxValue=999) @Asn1Optional public Long loadingListEntry; + @FieldOrder(order = 36) @Asn1Default(value="upper") @Asn1Optional public LoadingDeckType loadingDeck; + @FieldOrder(order = 37) @Asn1Optional public SequenceOfCarrierNum carrierNum; + @FieldOrder(order = 38) @Asn1Optional public SequenceOfStringIA5 carrierIA5; + @FieldOrder(order = 39) public TariffType tariff; + @FieldOrder(order = 40) @Asn1Default(value="travelPrice") @Asn1Optional public PriceTypeType priceType; - + @FieldOrder(order = 41) @Asn1Optional Asn1BigInteger price; + @FieldOrder(order = 42) @Asn1Optional SequenceOfVatDetail vatDetails; - + @FieldOrder(order = 43) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String infoText; + @FieldOrder(order = 44) @Asn1Optional public ExtensionData extension; public Long getTrainNum() { diff --git a/src/org/uic/ticket/api/asn/omv2/CardReferenceType.java b/src/org/uic/ticket/api/asn/omv2/CardReferenceType.java index 946c560..f0d138b 100644 --- a/src/org/uic/ticket/api/asn/omv2/CardReferenceType.java +++ b/src/org/uic/ticket/api/asn/omv2/CardReferenceType.java @@ -25,6 +25,7 @@ import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.RestrictedString; import net.gcdc.asn1.datatypes.Sequence; @@ -36,32 +37,41 @@ public class CardReferenceType extends Object { public CardReferenceType() { } + @FieldOrder(order = 0) @Asn1Optional public Asn1BigInteger cardIssuerNum; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String cardIssuerIA5; + @FieldOrder(order = 2) @Asn1Optional public Asn1BigInteger cardIdNum; + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String cardIdIA5; + @FieldOrder(order = 4) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String cardName; + @FieldOrder(order = 5) @Asn1Optional public Asn1BigInteger cardType; + @FieldOrder(order = 6) @Asn1Optional public Asn1BigInteger leadingCardIdNum; + @FieldOrder(order = 7) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String leadingCardIdIA5; + @FieldOrder(order = 8) @Asn1Optional public Asn1BigInteger trailingCardIdNum; + @FieldOrder(order = 9) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String trailingCardIdIA5; - public Asn1BigInteger getCardIssuerNum() { return this.cardIssuerNum; diff --git a/src/org/uic/ticket/api/asn/omv2/CompartmentDetailsType.java b/src/org/uic/ticket/api/asn/omv2/CompartmentDetailsType.java index 352c2e5..72316cf 100644 --- a/src/org/uic/ticket/api/asn/omv2/CompartmentDetailsType.java +++ b/src/org/uic/ticket/api/asn/omv2/CompartmentDetailsType.java @@ -23,6 +23,7 @@ import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -35,24 +36,31 @@ public class CompartmentDetailsType extends Object { public CompartmentDetailsType() { } + @FieldOrder(order = 0) @IntRange(minValue=1,maxValue=99) @Asn1Optional public Long coachType; + @FieldOrder(order = 1) @IntRange(minValue=1,maxValue=99) @Asn1Optional public Long compartmentType; + @FieldOrder(order = 2) @IntRange(minValue=1,maxValue=99) @Asn1Optional public Long specialAllocation; + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String coachTypeDescr; + @FieldOrder(order = 4) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String compartmentTypeDescr; + @FieldOrder(order = 5) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String specialAllocationDescr; + @FieldOrder(order = 6) @Asn1Default(value="unspecified") public CompartmentPositionType position; diff --git a/src/org/uic/ticket/api/asn/omv2/ControlData.java b/src/org/uic/ticket/api/asn/omv2/ControlData.java index 5645f62..90509ff 100644 --- a/src/org/uic/ticket/api/asn/omv2/ControlData.java +++ b/src/org/uic/ticket/api/asn/omv2/ControlData.java @@ -23,6 +23,7 @@ import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -36,30 +37,42 @@ public class ControlData extends Object { public ControlData() { } + @FieldOrder(order = 0) @Asn1Optional public SequenceOfCardReferenceType identificationByCardReference; + @FieldOrder(order = 1) public Boolean identificationByIdCard = false; + @FieldOrder(order = 2) public Boolean identificationByPassportId = false; + @FieldOrder(order = 3) @Asn1Optional public Asn1BigInteger identificationItem; + @FieldOrder(order = 4) public Boolean passportValidationRequired = false; + @FieldOrder(order = 5) public Boolean onlineValidationRequired = false; + @FieldOrder(order = 6) @IntRange(minValue=0,maxValue=99) @Asn1Optional public Long randomDetailedValidationRequired; + @FieldOrder(order = 7) public Boolean ageCheckRequired = false; + @FieldOrder(order = 8) public Boolean reductionCardCheckRequired = false; + @FieldOrder(order = 9) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String infoText; + @FieldOrder(order = 10) @Asn1Optional public SequenceOfTicketLinkType includedTickets; + @FieldOrder(order = 11) @Asn1Optional public ExtensionData extension; diff --git a/src/org/uic/ticket/api/asn/omv2/CountermarkData.java b/src/org/uic/ticket/api/asn/omv2/CountermarkData.java index 1e09c70..e428777 100644 --- a/src/org/uic/ticket/api/asn/omv2/CountermarkData.java +++ b/src/org/uic/ticket/api/asn/omv2/CountermarkData.java @@ -27,6 +27,7 @@ import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -41,100 +42,134 @@ public class CountermarkData extends Object { public CountermarkData() { } + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String referenceIA5; + @FieldOrder(order = 1) @Asn1Optional public Asn1BigInteger referenceNum; + @FieldOrder(order = 2) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long productOwnerNum; + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productOwnerIA5; + @FieldOrder(order = 4) @IntRange(minValue=0,maxValue=65535) @Asn1Optional public Long productIdNum; + @FieldOrder(order = 5) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productIdIA5; + @FieldOrder(order = 6) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String ticketReferenceIA5; + @FieldOrder(order = 7) @Asn1Optional public Asn1BigInteger ticketReferenceNum; + @FieldOrder(order = 8) @IntRange(minValue=1,maxValue=200) @Asn1Optional public Long numberOfCountermark; + @FieldOrder(order = 9) @IntRange(minValue=1,maxValue=200) @Asn1Optional public Long totalOfCountermarks; + @FieldOrder(order = 10) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String groupName; + @FieldOrder(order = 11) @Asn1Default("stationUIC") @Asn1Optional public CodeTableType stationCodeTable; + @FieldOrder(order = 12) @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long fromStationNum; + @FieldOrder(order = 13) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String fromStationIA5; + @FieldOrder(order = 14) @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long toStationNum; + @FieldOrder(order = 15) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String toStationIA5; + @FieldOrder(order = 16) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String fromStationNameUTF8; + @FieldOrder(order = 17) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String toStationNameUTF8; + @FieldOrder(order = 18) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String validRegionDesc; + @FieldOrder(order = 19) @Asn1Optional public SequenceOfRegionalValidityType validRegion; + @FieldOrder(order = 20) public Boolean returnIncluded = false; + @FieldOrder(order = 21) @Asn1Optional public ReturnRouteDescriptionType returnDescription; + @FieldOrder(order = 22) @IntRange(minValue=-1,maxValue=700) @Asn1Optional public Long validFromDay; + @FieldOrder(order = 23) @IntRange(minValue=0,maxValue=1439) @Asn1Optional public Long validFromTime; + @FieldOrder(order = 24) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long validFromUTCOffset; + @FieldOrder(order = 25) @IntRange(minValue=0,maxValue=370) @Asn1Optional public Long validUntilDay; + @FieldOrder(order = 26) @IntRange(minValue=0,maxValue=1439) @Asn1Optional public Long validUntilTime; + @FieldOrder(order = 27) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long validUntilUTCOffset; + @FieldOrder(order = 28) @Asn1Default(value="second") @Asn1Optional public TravelClassType classCode; + @FieldOrder(order = 29) @Asn1Optional public SequenceOfCarrierNum carrierNum; + @FieldOrder(order = 30) @Asn1Optional public SequenceOfStringIA5 carrierIA5; + @FieldOrder(order = 31) @Asn1Optional public SequenceOfServiceBrands includedServiceBrands; + @FieldOrder(order = 32) @Asn1Optional public SequenceOfServiceBrands excludedServiceBrands; - + @FieldOrder(order = 33) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String infoText; + @FieldOrder(order = 34) @Asn1Optional public ExtensionData extension; diff --git a/src/org/uic/ticket/api/asn/omv2/CustomerCardData.java b/src/org/uic/ticket/api/asn/omv2/CustomerCardData.java index 336799b..c3062ec 100644 --- a/src/org/uic/ticket/api/asn/omv2/CustomerCardData.java +++ b/src/org/uic/ticket/api/asn/omv2/CustomerCardData.java @@ -27,6 +27,7 @@ import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -41,41 +42,53 @@ public class CustomerCardData extends Object { public CustomerCardData() { } + @FieldOrder(order = 0) @Asn1Optional public TravelerType customer; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String cardIdIA5; + @FieldOrder(order = 2) @Asn1Optional public Asn1BigInteger cardIdNum; - + @FieldOrder(order = 3) @IntRange(minValue=2016,maxValue=2269) @Asn1Optional public Long validFromYear; + @FieldOrder(order = 4) @IntRange(minValue=0,maxValue=700) @Asn1Optional public Long validFromDay; + @FieldOrder(order = 5) @IntRange(minValue=0,maxValue=250) @Asn1Optional public Long validUntilYear; + @FieldOrder(order = 6) @IntRange(minValue=0,maxValue=370) @Asn1Optional public Long validUntilDay; - + @FieldOrder(order = 7) @Asn1Optional public TravelClassType classCode; + @FieldOrder(order = 8) @IntRange(minValue=0,maxValue=1000) @Asn1Optional public Long cardType; + @FieldOrder(order = 9) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String cardTypeDescr; + @FieldOrder(order = 10) @Asn1Optional public Asn1BigInteger customerStatus; + @FieldOrder(order = 11) @Asn1Optional public String customerStatusDescr; + @FieldOrder(order = 12) @Asn1Optional public SequenceOfUnrestrictedLong includedServices; + @FieldOrder(order = 13) @Asn1Optional public ExtensionData extension; diff --git a/src/org/uic/ticket/api/asn/omv2/CustomerStatusType.java b/src/org/uic/ticket/api/asn/omv2/CustomerStatusType.java index e53a00a..10d8665 100644 --- a/src/org/uic/ticket/api/asn/omv2/CustomerStatusType.java +++ b/src/org/uic/ticket/api/asn/omv2/CustomerStatusType.java @@ -23,6 +23,7 @@ import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; import net.gcdc.asn1.datatypes.Sequence; @@ -34,14 +35,18 @@ public class CustomerStatusType extends Object { public CustomerStatusType() { } + @FieldOrder(order = 0) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long statusProviderNum; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String statusProviderIA5; + @FieldOrder(order = 2) @Asn1Optional public Asn1BigInteger customerStatus; + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String customerStatusDescr; diff --git a/src/org/uic/ticket/api/asn/omv2/DelayConfirmation.java b/src/org/uic/ticket/api/asn/omv2/DelayConfirmation.java index 8eb95b7..ac931bc 100644 --- a/src/org/uic/ticket/api/asn/omv2/DelayConfirmation.java +++ b/src/org/uic/ticket/api/asn/omv2/DelayConfirmation.java @@ -29,6 +29,7 @@ import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -41,53 +42,71 @@ public class DelayConfirmation extends Object { public DelayConfirmation() { } + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String referenceIA5; + @FieldOrder(order = 1) @Asn1Optional public Asn1BigInteger referenceNum; + @FieldOrder(order = 2) @Asn1Optional public Asn1BigInteger trainNum; + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String trainIA5; + @FieldOrder(order = 4) @IntRange(minValue=2016, maxValue=2269) @Asn1Optional public Long plannedArrivalYear; + @FieldOrder(order = 5) @IntRange(minValue=1, maxValue=366) @Asn1Optional public Long plannedArrivalDay; + @FieldOrder(order = 6) @IntRange(minValue=0, maxValue=1439) @Asn1Optional public Long plannedArrivalTime; + @FieldOrder(order = 7) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long departureUTCOffset; + @FieldOrder(order = 8) @Asn1Default(value="stationUIC") @Asn1Optional public CodeTableType stationCodeTable; + @FieldOrder(order = 9) @IntRange(minValue=1, maxValue=9999999) @Asn1Optional public Long stationNum; + @FieldOrder(order = 10) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String stationIA5; + @FieldOrder(order = 11) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String stationNameUTF8; + @FieldOrder(order = 12) @IntRange(minValue=0, maxValue=999, hasExtensionMarker=false) @Asn1Optional public Long delay; + @FieldOrder(order = 13) @Asn1Optional public Boolean trainCancelled = false; + @FieldOrder(order = 14) @Asn1Default(value="travelerDelayConfirmation") @Asn1Optional public ConfirmationTypeType confirmationType; + @FieldOrder(order = 15) @Asn1Optional public SequenceOfTicketLinkType affectedTickets; + @FieldOrder(order = 16) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String infoText; + @FieldOrder(order = 17) @Asn1Optional public ExtensionData extension; diff --git a/src/org/uic/ticket/api/asn/omv2/DeltaCoordinates.java b/src/org/uic/ticket/api/asn/omv2/DeltaCoordinates.java index 01d2567..00d7981 100644 --- a/src/org/uic/ticket/api/asn/omv2/DeltaCoordinates.java +++ b/src/org/uic/ticket/api/asn/omv2/DeltaCoordinates.java @@ -20,6 +20,7 @@ package org.uic.ticket.api.asn.omv2; import net.gcdc.asn1.datatypes.Asn1BigInteger; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.Sequence; @Sequence @@ -27,8 +28,10 @@ public class DeltaCoordinates extends Object { public DeltaCoordinates() { } + @FieldOrder(order = 0) public Asn1BigInteger longitude; + @FieldOrder(order = 1) public Asn1BigInteger latitude; public Asn1BigInteger getLongitude() { diff --git a/src/org/uic/ticket/api/asn/omv2/DocumentData.java b/src/org/uic/ticket/api/asn/omv2/DocumentData.java index 37bbebd..90097f1 100644 --- a/src/org/uic/ticket/api/asn/omv2/DocumentData.java +++ b/src/org/uic/ticket/api/asn/omv2/DocumentData.java @@ -20,6 +20,7 @@ package org.uic.ticket.api.asn.omv2; import net.gcdc.asn1.datatypes.Asn1Optional; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.Sequence; @@ -29,8 +30,10 @@ public class DocumentData extends Object { public DocumentData() { } + @FieldOrder(order = 0) @Asn1Optional public TokenType token; + @FieldOrder(order = 1) public TicketDetailData ticket; public TokenType getToken() { diff --git a/src/org/uic/ticket/api/asn/omv2/ExtensionData.java b/src/org/uic/ticket/api/asn/omv2/ExtensionData.java index 2d9a088..61952ea 100644 --- a/src/org/uic/ticket/api/asn/omv2/ExtensionData.java +++ b/src/org/uic/ticket/api/asn/omv2/ExtensionData.java @@ -20,6 +20,7 @@ package org.uic.ticket.api.asn.omv2; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.RestrictedString; import net.gcdc.asn1.datatypes.Sequence; import net.gcdc.asn1.datatypesimpl.OctetString; @@ -30,9 +31,11 @@ public class ExtensionData extends Object { public ExtensionData() { } + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.IA5String) public String extensionId; + @FieldOrder(order = 1) public OctetString extensionData; public String getExtensionId() { diff --git a/src/org/uic/ticket/api/asn/omv2/FIPTicketData.java b/src/org/uic/ticket/api/asn/omv2/FIPTicketData.java index 2979d99..6c54b6a 100644 --- a/src/org/uic/ticket/api/asn/omv2/FIPTicketData.java +++ b/src/org/uic/ticket/api/asn/omv2/FIPTicketData.java @@ -28,6 +28,7 @@ import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; import net.gcdc.asn1.datatypesimpl.SequenceOfStringIA5; @@ -36,43 +37,58 @@ public class FIPTicketData extends Object { public FIPTicketData() { } + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String referenceIA5; + @FieldOrder(order = 1) @Asn1Optional public Asn1BigInteger referenceNum; + @FieldOrder(order = 2) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long productOwnerNum; + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productOwnerIA5; + @FieldOrder(order = 4) @IntRange(minValue=0,maxValue=65535) @Asn1Optional public Long productIdNum; + @FieldOrder(order = 5) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productIdIA5; + @FieldOrder(order = 6) @IntRange(minValue=-1,maxValue=700) @Asn1Optional public Long validFromDay; + @FieldOrder(order = 7) @IntRange(minValue=0,maxValue=370) @Asn1Optional public Long validUntilDay; + @FieldOrder(order = 8) @Asn1Optional public SequenceOfActivatedDays activatedDay; + @FieldOrder(order = 9) @Asn1Optional public SequenceOfCarrierNum carrierNum; + @FieldOrder(order = 10) @Asn1Optional public SequenceOfStringIA5 carrierIA5; + @FieldOrder(order = 11) @IntRange(minValue=1,maxValue=200) public Long numberOfTravelDays; + @FieldOrder(order = 12) public Boolean includesSupplements = false; + @FieldOrder(order = 13) @Asn1Default(value="second") @Asn1Optional public TravelClassType classCode; + @FieldOrder(order = 14) @Asn1Optional public ExtensionData extension; public String getReferenceIA5() { diff --git a/src/org/uic/ticket/api/asn/omv2/GeoCoordinateType.java b/src/org/uic/ticket/api/asn/omv2/GeoCoordinateType.java index a55b0fa..90cb86b 100644 --- a/src/org/uic/ticket/api/asn/omv2/GeoCoordinateType.java +++ b/src/org/uic/ticket/api/asn/omv2/GeoCoordinateType.java @@ -22,6 +22,7 @@ package org.uic.ticket.api.asn.omv2; import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.Sequence; @Sequence @@ -29,22 +30,29 @@ public class GeoCoordinateType extends Object { public GeoCoordinateType() { } + @FieldOrder(order = 0) @Asn1Default(value="milliDegree") @Asn1Optional public GeoUnitType geoUnit; + @FieldOrder(order = 1) @Asn1Default(value="wgs84") @Asn1Optional public GeoCoordinateSystemType coordinateSystem; + @FieldOrder(order = 2) @Asn1Default(value="north") @Asn1Optional public HemisphereLongitudeType hemisphereLongitude; + @FieldOrder(order = 3) @Asn1Default(value="east") @Asn1Optional public HemisphereLatitudeType hemisphereLatitude; + @FieldOrder(order = 4) public Asn1BigInteger longitude; + @FieldOrder(order = 5) public Asn1BigInteger latitude; + @FieldOrder(order = 6) @Asn1Optional public GeoUnitType accuracy; public GeoUnitType getGeoUnit() { diff --git a/src/org/uic/ticket/api/asn/omv2/IncludedOpenTicketType.java b/src/org/uic/ticket/api/asn/omv2/IncludedOpenTicketType.java index ababa1d..cc9475b 100644 --- a/src/org/uic/ticket/api/asn/omv2/IncludedOpenTicketType.java +++ b/src/org/uic/ticket/api/asn/omv2/IncludedOpenTicketType.java @@ -25,6 +25,7 @@ import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; import net.gcdc.asn1.datatypes.SizeRange; @@ -34,69 +35,93 @@ public class IncludedOpenTicketType extends Object { public IncludedOpenTicketType() { } + @FieldOrder(order = 0) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long productOwnerNum; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productOwnerIA5; + @FieldOrder(order = 2) @IntRange(minValue=0,maxValue=65535) @Asn1Optional public Long productIdNum; + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productIdIA5; + @FieldOrder(order = 4) @Asn1Optional public Asn1BigInteger externalIssuerId; + @FieldOrder(order = 5) @Asn1Optional public Asn1BigInteger issuerAutorizationId; + @FieldOrder(order = 6) @Asn1Default("stationUIC") @Asn1Optional public CodeTableType stationCodeTable; + @FieldOrder(order = 7) @Asn1Optional public SequenceOfRegionalValidityType validRegion; + @FieldOrder(order = 8) @IntRange(minValue=-1,maxValue=700) @Asn1Optional public Long validFromDay; + @FieldOrder(order = 9) @IntRange(minValue=0,maxValue=1439) @Asn1Optional public Long validFromTime; + @FieldOrder(order = 10) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long validFromUTCOffset; + @FieldOrder(order = 11) @IntRange(minValue=0,maxValue=370) @Asn1Optional public Long validUntilDay; + @FieldOrder(order = 12) @IntRange(minValue=0,maxValue=1439) @Asn1Optional public Long validUntilTime; + @FieldOrder(order = 13) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long validUntilUTCOffset; + @FieldOrder(order = 14) @Asn1Default(value="second") @Asn1Optional public TravelClassType classCode; + @FieldOrder(order = 15) @SizeRange(minValue = 1, maxValue = 2) @Asn1Optional public String serviceLevel; + @FieldOrder(order = 16) @Asn1Optional public SequenceOfCarrierNum includedCarriersNum; + @FieldOrder(order = 17) @Asn1Optional public SequenceOfStringIA5 includedCarriersIA5; + @FieldOrder(order = 18) @Asn1Optional public SequenceOfServiceBrands includedServiceBrands; + @FieldOrder(order = 19) @Asn1Optional public SequenceOfServiceBrands excludedServiceBrands; + @FieldOrder(order = 20) @Asn1Optional public SequenceOfTariffType tariffs; + @FieldOrder(order = 21) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String infoText; - + @FieldOrder(order = 22) @Asn1Optional public SequenceOfTransportTypes includedTransportTypes; + @FieldOrder(order = 23) @Asn1Optional public SequenceOfTransportTypes excludedTransportTypes; + @FieldOrder(order = 24) @Asn1Optional public ExtensionData extension; public Long getProductOwnerNum() { diff --git a/src/org/uic/ticket/api/asn/omv2/IssuingData.java b/src/org/uic/ticket/api/asn/omv2/IssuingData.java index ed517df..d68621b 100644 --- a/src/org/uic/ticket/api/asn/omv2/IssuingData.java +++ b/src/org/uic/ticket/api/asn/omv2/IssuingData.java @@ -27,6 +27,7 @@ import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.FixedSize; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; @@ -39,57 +40,76 @@ public class IssuingData extends Object { public IssuingData() { } + @FieldOrder(order = 0) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long securityProviderNum; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String securityProviderIA5; + @FieldOrder(order = 2) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long issuerNum; + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String issuerIA5; + @FieldOrder(order = 4) @IntRange(minValue=2016,maxValue=2269) public Long issuingYear; + @FieldOrder(order = 5) @IntRange(minValue=1,maxValue=366) public Long issuingDay; + @FieldOrder(order = 6) @IntRange(minValue=0,maxValue=1439) @Asn1Optional public Long issuingTime; + @FieldOrder(order = 7) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String issuerName; + @FieldOrder(order = 8) public Boolean specimen = false; + @FieldOrder(order = 9) public Boolean securePaperTicket = false; + @FieldOrder(order = 10) public Boolean activated = true; + @FieldOrder(order = 11) @FixedSize(3) @Asn1Default(value="EUR") @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String currency; + @FieldOrder(order = 12) @IntRange(minValue=1,maxValue=3) @Asn1Default(value="2") @Asn1Optional public Long currencyFract; + @FieldOrder(order = 13) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String issuerPNR; + @FieldOrder(order = 14) @Asn1Optional public ExtensionData extension; + @FieldOrder(order = 15) @Asn1Optional public Asn1BigInteger issuedOnTrainNum; + @FieldOrder(order = 16) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String issuedOnTrainIA5; + @FieldOrder(order = 17) @Asn1Optional public Asn1BigInteger issuedOnLine; + @FieldOrder(order = 18) @Asn1Optional public GeoCoordinateType pointOfSale; diff --git a/src/org/uic/ticket/api/asn/omv2/LineType.java b/src/org/uic/ticket/api/asn/omv2/LineType.java index 78ea99a..176128b 100644 --- a/src/org/uic/ticket/api/asn/omv2/LineType.java +++ b/src/org/uic/ticket/api/asn/omv2/LineType.java @@ -23,6 +23,7 @@ import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -37,31 +38,41 @@ public class LineType extends Object { public LineType() { } + @FieldOrder(order = 0) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long carrierNum; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String carrierIA5; + @FieldOrder(order = 2) @Asn1Optional public SequenceOfUnrestrictedLong lineId; + @FieldOrder(order = 3) @Asn1Default("stationUIC") @Asn1Optional public CodeTableType stationCodeTable; + @FieldOrder(order = 4) @IntRange(minValue=0,maxValue=9999999) @Asn1Optional public Long entryStationNum; + @FieldOrder(order = 5) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String entryStationIA5; + @FieldOrder(order = 6) @IntRange(minValue=0,maxValue=9999999) @Asn1Optional public Long terminatingStationNum; + @FieldOrder(order = 7) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String terminatingStationIA5; + @FieldOrder(order = 8) @Asn1Optional public Asn1BigInteger city; + @FieldOrder(order = 9) @Asn1Optional public OctetString binaryZoneId; diff --git a/src/org/uic/ticket/api/asn/omv2/LuggageRestrictionType.java b/src/org/uic/ticket/api/asn/omv2/LuggageRestrictionType.java index 0f56183..b40b62b 100644 --- a/src/org/uic/ticket/api/asn/omv2/LuggageRestrictionType.java +++ b/src/org/uic/ticket/api/asn/omv2/LuggageRestrictionType.java @@ -21,6 +21,7 @@ package org.uic.ticket.api.asn.omv2; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.Sequence; @@ -31,14 +32,17 @@ public class LuggageRestrictionType extends Object { public LuggageRestrictionType() { } + @FieldOrder(order = 0) @IntRange(minValue=0,maxValue=99) @Asn1Default(value="3") @Asn1Optional public Long maxHandLuggagePieces; + @FieldOrder(order = 1) @IntRange(minValue=0,maxValue=99) @Asn1Default(value="1") @Asn1Optional public Long maxNonHandLuggagePieces; + @FieldOrder(order = 2) @Asn1Optional public SequenceOfRegisteredLuggageType registeredLuggage; diff --git a/src/org/uic/ticket/api/asn/omv2/OpenTicketData.java b/src/org/uic/ticket/api/asn/omv2/OpenTicketData.java index 0f5bf9a..a2e126b 100644 --- a/src/org/uic/ticket/api/asn/omv2/OpenTicketData.java +++ b/src/org/uic/ticket/api/asn/omv2/OpenTicketData.java @@ -27,6 +27,7 @@ import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -40,112 +41,152 @@ public class OpenTicketData extends Object { public OpenTicketData() { } + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String referenceIA5; + @FieldOrder(order = 1) @Asn1Optional public Asn1BigInteger referenceNum; + @FieldOrder(order = 2) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long productOwnerNum; + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productOwnerIA5; + @FieldOrder(order = 4) @IntRange(minValue=0,maxValue=65535) @Asn1Optional public Long productIdNum; + @FieldOrder(order = 5) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productIdIA5; + @FieldOrder(order = 6) @Asn1Optional public Asn1BigInteger externalIssuerId; + @FieldOrder(order = 7) @Asn1Optional public Asn1BigInteger issuerAutorizationId; + @FieldOrder(order = 8) public Boolean returnIncluded = false; + @FieldOrder(order = 9) @Asn1Default("stationUIC") @Asn1Optional public CodeTableType stationCodeTable; + @FieldOrder(order = 10) @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long fromStationNum; + @FieldOrder(order = 11) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String fromStationIA5; + @FieldOrder(order = 12) @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long toStationNum; + @FieldOrder(order = 13) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String toStationIA5; + @FieldOrder(order = 14) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String fromStationNameUTF8; + @FieldOrder(order = 15) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String toStationNameUTF8; + @FieldOrder(order = 16) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String validRegionDesc; + @FieldOrder(order = 17) @Asn1Optional public SequenceOfRegionalValidityType validRegion; + @FieldOrder(order = 18) @Asn1Optional public ReturnRouteDescriptionType returnDescription; + @FieldOrder(order = 19) @Asn1Default(value = "0") @IntRange(minValue=-1,maxValue=700) @Asn1Optional public Long validFromDay; + @FieldOrder(order = 20) @IntRange(minValue=0,maxValue=1439) @Asn1Optional public Long validFromTime; + @FieldOrder(order = 21) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long validFromUTCOffset; + @FieldOrder(order = 22) @Asn1Default(value = "0") @IntRange(minValue=0,maxValue=370) @Asn1Optional public Long validUntilDay; + @FieldOrder(order = 23) @IntRange(minValue=0,maxValue=1439) @Asn1Optional public Long validUntilTime; + @FieldOrder(order = 24) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long validUntilUTCOffset; + @FieldOrder(order = 25) @Asn1Optional public SequenceOfActivatedDays activatedDay; + @FieldOrder(order = 26) @Asn1Default(value="second") @Asn1Optional public TravelClassType classCode; + @FieldOrder(order = 27) @SizeRange(minValue = 1, maxValue = 2) @Asn1Optional public String serviceLevel; + @FieldOrder(order = 28) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public SequenceOfCarrierNum carrierNum; + @FieldOrder(order = 29) @Asn1Optional public SequenceOfStringIA5 carrierIA5; + @FieldOrder(order = 30) @Asn1Optional public SequenceOfServiceBrands includedServiceBrands; + @FieldOrder(order = 31) @Asn1Optional public SequenceOfServiceBrands excludedServiceBrands; + @FieldOrder(order = 32) @Asn1Optional public SequenceOfTariffType tariffs; + @FieldOrder(order = 33) @Asn1Optional Asn1BigInteger price; + @FieldOrder(order = 34) @Asn1Optional SequenceOfVatDetail vatDetails; + @FieldOrder(order = 35) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String infoText; + @FieldOrder(order = 36) @Asn1Optional public SequenceOfIncludedOpenTicketType includedAddOns; + @FieldOrder(order = 37) @Asn1Optional public LuggageRestrictionType luggage; + @FieldOrder(order = 38) @Asn1Optional public SequenceOfTransportTypes includedTransportTypes; + @FieldOrder(order = 39) @Asn1Optional public SequenceOfTransportTypes excludedTransportTypes; - + @FieldOrder(order = 40) @Asn1Optional public ExtensionData extension; diff --git a/src/org/uic/ticket/api/asn/omv2/ParkingGroundData.java b/src/org/uic/ticket/api/asn/omv2/ParkingGroundData.java index dfefc1f..a401bd7 100644 --- a/src/org/uic/ticket/api/asn/omv2/ParkingGroundData.java +++ b/src/org/uic/ticket/api/asn/omv2/ParkingGroundData.java @@ -25,6 +25,7 @@ import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -36,60 +37,80 @@ public class ParkingGroundData extends Object { public ParkingGroundData() { } + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String referenceIA5; + @FieldOrder(order = 1) @Asn1Optional public Asn1BigInteger referenceNum; + @FieldOrder(order = 2) @RestrictedString(CharacterRestriction.IA5String) public String parkingGroundId; + @FieldOrder(order = 3) @IntRange(minValue=0,maxValue=370) @Asn1Optional public Long fromParkingDate; + @FieldOrder(order = 4) @IntRange(minValue=0,maxValue=370) @Asn1Optional public Long toParkingDate; + @FieldOrder(order = 5) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long productOwnerNum; + @FieldOrder(order = 6) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productOwnerIA5; + @FieldOrder(order = 7) @IntRange(minValue=0,maxValue=65535) @Asn1Optional public Long productIdNum; + @FieldOrder(order = 8) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productIdIA5; + @FieldOrder(order = 9) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String accessCode; + @FieldOrder(order = 10) @RestrictedString(CharacterRestriction.UTF8String) public String location; + @FieldOrder(order = 11) @Asn1Default("stationUIC") @Asn1Optional public CodeTableType stationCodeTable; + @FieldOrder(order = 12) @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long stationNum; + @FieldOrder(order = 13) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String stationIA5; + @FieldOrder(order = 14) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String specialInformation; + @FieldOrder(order = 15) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String entryTrack; + @FieldOrder(order = 16) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String numberPlate; + @FieldOrder(order = 17) @Asn1Optional Asn1BigInteger price; + @FieldOrder(order = 18) @Asn1Optional SequenceOfVatDetail vatDetails; + @FieldOrder(order = 19) @Asn1Optional public ExtensionData extension; diff --git a/src/org/uic/ticket/api/asn/omv2/PassData.java b/src/org/uic/ticket/api/asn/omv2/PassData.java index 548167e..24ff796 100644 --- a/src/org/uic/ticket/api/asn/omv2/PassData.java +++ b/src/org/uic/ticket/api/asn/omv2/PassData.java @@ -27,6 +27,7 @@ import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -39,88 +40,121 @@ public class PassData extends Object { public PassData() { } + @FieldOrder(order = 0) @Asn1Optional public Asn1BigInteger referenceNum; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String referenceIA5; + @FieldOrder(order = 2) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long productOwnerNum; + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productOwnerIA5; + @FieldOrder(order = 4) @IntRange(minValue=0,maxValue=65535) @Asn1Optional public Long productIdNum; + @FieldOrder(order = 5) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productIdIA5; + @FieldOrder(order = 6) @IntRange(minValue=1,maxValue=250) @Asn1Optional public Long passType; + @FieldOrder(order = 7) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String passDescription; + @FieldOrder(order = 8) @Asn1Default (value="second") @Asn1Optional public TravelClassType classCode; + @FieldOrder(order = 9) @IntRange(minValue=-1,maxValue=700) @Asn1Optional public Long validFromDay; + @FieldOrder(order = 10) @IntRange(minValue=0,maxValue=1439) @Asn1Optional public Long validFromTime; + @FieldOrder(order = 11) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long validFromUTCOffset; + @FieldOrder(order = 12) @IntRange(minValue=0,maxValue=370) @Asn1Optional public Long validUntilDay; + @FieldOrder(order = 13) @IntRange(minValue=0,maxValue=1439) @Asn1Optional public Long validUntilTime; + @FieldOrder(order = 14) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long validUntilUTCOffset; + @FieldOrder(order = 15) @Asn1Optional public ValidityPeriodDetailType validityPeriodDetails; + @FieldOrder(order = 16) @IntRange(minValue=0,maxValue=370) @Asn1Optional public Long numberOfValidityDays; + @FieldOrder(order = 17) @IntRange(minValue=1,maxValue=250) @Asn1Optional public Long numberOfPossibleTrips; + @FieldOrder(order = 18) @IntRange(minValue=1,maxValue=250) @Asn1Optional public Long numberOfDaysOfTravel; + @FieldOrder(order = 19) @Asn1Optional public SequenceOfActivatedDays activatedDay; + @FieldOrder(order = 20) @Asn1Optional public SequenceOfCountries countries; + @FieldOrder(order = 21) @Asn1Optional public SequenceOfCarrierNum includedCarriersNum; + @FieldOrder(order = 22) @Asn1Optional public SequenceOfStringIA5 includedCarriersIA5; + @FieldOrder(order = 23) @Asn1Optional public SequenceOfCarrierNum excludedCarriersNum; + @FieldOrder(order = 24) @Asn1Optional public SequenceOfStringIA5 excludedCarriersIA5; + @FieldOrder(order = 25) @Asn1Optional public SequenceOfServiceBrands includedServiceBrands; + @FieldOrder(order = 26) @Asn1Optional public SequenceOfServiceBrands excludedServiceBrands; + @FieldOrder(order = 27) @Asn1Optional public SequenceOfRegionalValidityType validRegion; - + + @FieldOrder(order = 28) @Asn1Optional public SequenceOfTariffType tariffs; + @FieldOrder(order = 29) @Asn1Optional Asn1BigInteger price; + @FieldOrder(order = 30) @Asn1Optional SequenceOfVatDetail vatDetails; + @FieldOrder(order = 31) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String infoText; + @FieldOrder(order = 32) @Asn1Optional public ExtensionData extension; diff --git a/src/org/uic/ticket/api/asn/omv2/PlacesType.java b/src/org/uic/ticket/api/asn/omv2/PlacesType.java index e463b3d..feafa28 100644 --- a/src/org/uic/ticket/api/asn/omv2/PlacesType.java +++ b/src/org/uic/ticket/api/asn/omv2/PlacesType.java @@ -21,6 +21,7 @@ package org.uic.ticket.api.asn.omv2; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.RestrictedString; import net.gcdc.asn1.datatypes.Sequence; import net.gcdc.asn1.datatypesimpl.SequenceOfStringIA5; @@ -30,17 +31,22 @@ public class PlacesType extends Object { public PlacesType() { } + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String coach; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String placeString; + @FieldOrder(order = 2) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String placeDescription; + @FieldOrder(order = 3) @Asn1Optional public SequenceOfStringIA5 placeIA5; + @FieldOrder(order = 4) @Asn1Optional public SequenceOfPlaceNum placeNum; diff --git a/src/org/uic/ticket/api/asn/omv2/PolygoneType.java b/src/org/uic/ticket/api/asn/omv2/PolygoneType.java index a5c1986..a14fa63 100644 --- a/src/org/uic/ticket/api/asn/omv2/PolygoneType.java +++ b/src/org/uic/ticket/api/asn/omv2/PolygoneType.java @@ -19,6 +19,7 @@ */ package org.uic.ticket.api.asn.omv2; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.Sequence; @Sequence @@ -26,8 +27,10 @@ public class PolygoneType extends Object { public PolygoneType() { } + @FieldOrder(order = 0) public GeoCoordinateType firstEdge; + @FieldOrder(order = 1) public SequenceOfDeltaCoordinates edges; diff --git a/src/org/uic/ticket/api/asn/omv2/RegionalValidityType.java b/src/org/uic/ticket/api/asn/omv2/RegionalValidityType.java index 307fb5b..15a3430 100644 --- a/src/org/uic/ticket/api/asn/omv2/RegionalValidityType.java +++ b/src/org/uic/ticket/api/asn/omv2/RegionalValidityType.java @@ -20,6 +20,7 @@ package org.uic.ticket.api.asn.omv2; import net.gcdc.asn1.datatypes.Choice; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; @@ -29,14 +30,19 @@ public class RegionalValidityType extends Object { public RegionalValidityType() { } + @FieldOrder(order = 0) public TrainLinkType trainLink; + @FieldOrder(order = 1) public ViaStationType viaStations; + @FieldOrder(order = 2) public ZoneType zones; + @FieldOrder(order = 3) public LineType lines; + @FieldOrder(order = 4) public PolygoneType polygone; diff --git a/src/org/uic/ticket/api/asn/omv2/RegisteredLuggageType.java b/src/org/uic/ticket/api/asn/omv2/RegisteredLuggageType.java index f50cc51..9c65ff1 100644 --- a/src/org/uic/ticket/api/asn/omv2/RegisteredLuggageType.java +++ b/src/org/uic/ticket/api/asn/omv2/RegisteredLuggageType.java @@ -21,6 +21,7 @@ package org.uic.ticket.api.asn.omv2; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -33,12 +34,15 @@ public class RegisteredLuggageType extends Object { public RegisteredLuggageType() { } + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String registrationId; + @FieldOrder(order = 1) @IntRange(minValue=1,maxValue=99) @Asn1Optional public Long maxWeight; + @FieldOrder(order = 2) @IntRange(minValue=1,maxValue=300) @Asn1Optional public Long maxSize; diff --git a/src/org/uic/ticket/api/asn/omv2/ReservationData.java b/src/org/uic/ticket/api/asn/omv2/ReservationData.java index f8a6748..457690f 100644 --- a/src/org/uic/ticket/api/asn/omv2/ReservationData.java +++ b/src/org/uic/ticket/api/asn/omv2/ReservationData.java @@ -25,6 +25,7 @@ import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -38,127 +39,171 @@ public class ReservationData extends Object { public ReservationData() { } + @FieldOrder(order = 0) @Asn1Optional public Asn1BigInteger trainNum; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String trainIA5; + @FieldOrder(order = 2) @Asn1Default(value="0") @IntRange(minValue=-1,maxValue=370) @Asn1Optional public Long departureDate; + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String referenceIA5; + @FieldOrder(order = 4) @Asn1Optional public Asn1BigInteger referenceNum; + @FieldOrder(order = 5) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long productOwnerNum; + @FieldOrder(order = 6) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productOwnerIA5; + @FieldOrder(order = 7) @IntRange(minValue=0,maxValue=65535) @Asn1Optional public Long productIdNum; + @FieldOrder(order = 8) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productIdIA5; + @FieldOrder(order = 9) @IntRange(minValue=0,maxValue=32000) @Asn1Optional public Long serviceBrand; + @FieldOrder(order = 10) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String serviceBrandAbrUTF8; + @FieldOrder(order = 11) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String serviceBrandNameUTF8; + @FieldOrder(order = 12) @Asn1Default("seat") @Asn1Optional public ServiceType service; + @FieldOrder(order = 13) @Asn1Default("stationUICReservation") @Asn1Optional public CodeTableType stationCodeTable; + @FieldOrder(order = 14) @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long fromStationNum; + @FieldOrder(order = 15) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String fromStationIA5; + @FieldOrder(order = 16) @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long toStationNum; + @FieldOrder(order = 17) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String toStationIA5; + @FieldOrder(order = 18) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String fromStationNameUTF8; + @FieldOrder(order = 19) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String toStationNameUTF8; + @FieldOrder(order = 20) @IntRange(minValue=0,maxValue=1440) public Long departureTime; + @FieldOrder(order = 21) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long departureUTCOffset; + @FieldOrder(order = 22) @IntRange(minValue=-1,maxValue=20) @Asn1Default(value="0") @Asn1Optional public Long arrivalDate; + @FieldOrder(order = 23) @IntRange(minValue=0,maxValue=1439) @Asn1Optional public Long arrivalTime; + @FieldOrder(order = 24) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long arrivalUTCOffset; + @FieldOrder(order = 25) @Asn1Optional public SequenceOfCarrierNum carrierNum; + @FieldOrder(order = 26) @Asn1Optional public SequenceOfStringIA5 carrierIA5; + @FieldOrder(order = 27) @Asn1Default("second") @Asn1Optional public TravelClassType classCode; + @FieldOrder(order = 28) @SizeRange(minValue = 1, maxValue = 2) @Asn1Optional public String serviceLevel; + @FieldOrder(order = 29) @Asn1Optional public PlacesType places; + @FieldOrder(order = 30) @Asn1Optional public PlacesType additionalPlaces; + @FieldOrder(order = 31) @Asn1Optional public PlacesType bicyclePlaces; + @FieldOrder(order = 32) @Asn1Optional public CompartmentDetailsType compartmentDetails; + @FieldOrder(order = 33) @IntRange(minValue=0,maxValue=200) @Asn1Default(value="0") @Asn1Optional public Long numberOfOverbooked; + @FieldOrder(order = 34) @Asn1Optional public SequenceOfBerthDetailData berth; + @FieldOrder(order = 35) @Asn1Optional public SequenceOfTariffType tariff; + @FieldOrder(order = 36) @Asn1Default("travelPrice") @Asn1Optional public PriceTypeType priceType; + @FieldOrder(order = 37) @Asn1Optional Asn1BigInteger price; + @FieldOrder(order = 38) @Asn1Optional SequenceOfVatDetail vatDetails; + @FieldOrder(order = 39) @IntRange(minValue=0,maxValue=9) @Asn1Default("0") @Asn1Optional public Long typeOfSupplement; + @FieldOrder(order = 40) @IntRange(minValue=0,maxValue=200) @Asn1Default("0") @Asn1Optional public Long numberOfSupplements; + @FieldOrder(order = 41) @Asn1Optional public LuggageRestrictionType luggage; + @FieldOrder(order = 42) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String infoText; + @FieldOrder(order = 43) @Asn1Optional public ExtensionData extension; public Long getTrainNum() { diff --git a/src/org/uic/ticket/api/asn/omv2/ReturnRouteDescriptionType.java b/src/org/uic/ticket/api/asn/omv2/ReturnRouteDescriptionType.java index d0f8c9d..bc43e51 100644 --- a/src/org/uic/ticket/api/asn/omv2/ReturnRouteDescriptionType.java +++ b/src/org/uic/ticket/api/asn/omv2/ReturnRouteDescriptionType.java @@ -23,6 +23,7 @@ import java.util.List; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -34,27 +35,35 @@ public class ReturnRouteDescriptionType extends Object { public ReturnRouteDescriptionType() { } + @FieldOrder(order = 0) @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long fromStationNum; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String fromStationIA5; + @FieldOrder(order = 2) @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long toStationNum; + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String toStationIA5; + @FieldOrder(order = 4) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String fromStationNameUTF8; + @FieldOrder(order = 5) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String toStationNameUTF8; + @FieldOrder(order = 6) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String validReturnRegionDesc; + @FieldOrder(order = 7) @Asn1Optional public SequenceOfRegionalValidityType validReturnRegion; public Long getFromStationNum() { diff --git a/src/org/uic/ticket/api/asn/omv2/RouteSectionType.java b/src/org/uic/ticket/api/asn/omv2/RouteSectionType.java index 3093d02..6dbb7f5 100644 --- a/src/org/uic/ticket/api/asn/omv2/RouteSectionType.java +++ b/src/org/uic/ticket/api/asn/omv2/RouteSectionType.java @@ -22,6 +22,7 @@ package org.uic.ticket.api.asn.omv2; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -29,24 +30,31 @@ public class RouteSectionType extends Object { public RouteSectionType() { } + @FieldOrder(order = 0) @Asn1Default("stationUIC") @Asn1Optional public CodeTableType stationCodeTable; + @FieldOrder(order = 1) @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long fromStationNum; + @FieldOrder(order = 2) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String fromStationIA5; + @FieldOrder(order = 3) @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long toStationNum; + @FieldOrder(order = 4) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String toStationIA5; + @FieldOrder(order = 5) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String fromStationNameUTF8; + @FieldOrder(order = 6) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String toStationNameUTF8; diff --git a/src/org/uic/ticket/api/asn/omv2/SeriesDetailType.java b/src/org/uic/ticket/api/asn/omv2/SeriesDetailType.java index fb5d5b6..79f34e1 100644 --- a/src/org/uic/ticket/api/asn/omv2/SeriesDetailType.java +++ b/src/org/uic/ticket/api/asn/omv2/SeriesDetailType.java @@ -21,6 +21,7 @@ package org.uic.ticket.api.asn.omv2; import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Optional; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.Sequence; @@ -29,12 +30,15 @@ public class SeriesDetailType extends Object { public SeriesDetailType() { } + @FieldOrder(order = 0) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long supplyingCarrier; + @FieldOrder(order = 1) @IntRange(minValue=1,maxValue=99) @Asn1Optional public Long offerIdentification; + @FieldOrder(order = 2) @Asn1Optional public Asn1BigInteger series; diff --git a/src/org/uic/ticket/api/asn/omv2/StationPassageData.java b/src/org/uic/ticket/api/asn/omv2/StationPassageData.java index 0848c37..b3011d2 100644 --- a/src/org/uic/ticket/api/asn/omv2/StationPassageData.java +++ b/src/org/uic/ticket/api/asn/omv2/StationPassageData.java @@ -26,6 +26,7 @@ import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -40,62 +41,84 @@ public class StationPassageData extends Object { public StationPassageData() { } + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String referenceIA5; + @FieldOrder(order = 1) @Asn1Optional public Asn1BigInteger referenceNum; + @FieldOrder(order = 2) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long productOwnerNum; + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productOwnerIA5; + @FieldOrder(order = 4) @IntRange(minValue=0,maxValue=65535) @Asn1Optional public Long productIdNum; + @FieldOrder(order = 5) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productIdIA5; + @FieldOrder(order = 6) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String productName; + @FieldOrder(order = 7) @Asn1Default("stationUIC") @Asn1Optional public CodeTableType stationCodeTable; + @FieldOrder(order = 8) @Asn1Optional public SequenceOfUnrestrictedLong stationNum; + @FieldOrder(order = 9) @Asn1Optional public SequenceOfStringIA5 stationIA5; + @FieldOrder(order = 10) @Asn1Optional public SequenceOfStringUTF8 stationNameUTF8; + @FieldOrder(order = 11) @Asn1Optional public SequenceOfUnrestrictedLong areaCodeNum; + @FieldOrder(order = 12) @Asn1Optional public SequenceOfStringIA5 areaCodeIA5; + @FieldOrder(order = 13) @Asn1Optional public SequenceOfStringUTF8 areaNameUTF8; + @FieldOrder(order = 14) @IntRange(minValue=-1,maxValue=700) public Long validFromDay; + @FieldOrder(order = 15) @IntRange(minValue=0,maxValue=1440) @Asn1Optional public Long validFromTime; + @FieldOrder(order = 16) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long validFromUTCOffset; + @FieldOrder(order = 17) @Asn1Default(value="0") @IntRange(minValue=0,maxValue=370) @Asn1Optional public Long validUntilDay; + @FieldOrder(order = 18) @IntRange(minValue=0,maxValue=1440) @Asn1Optional public Long validUntilTime; + @FieldOrder(order = 19) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long validUntilUTCOffset; + @FieldOrder(order = 20) @Asn1Optional public Asn1BigInteger numberOfDaysValid; + @FieldOrder(order = 21) @Asn1Optional public ExtensionData extension; diff --git a/src/org/uic/ticket/api/asn/omv2/TariffType.java b/src/org/uic/ticket/api/asn/omv2/TariffType.java index 278efda..0427ee7 100644 --- a/src/org/uic/ticket/api/asn/omv2/TariffType.java +++ b/src/org/uic/ticket/api/asn/omv2/TariffType.java @@ -23,6 +23,7 @@ import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -33,35 +34,46 @@ import net.gcdc.asn1.datatypes.Sequence; public class TariffType extends Object { public TariffType() { } - + @FieldOrder(order = 0) @IntRange(minValue=1,maxValue=200) @Asn1Default(value = "1") @Asn1Optional public Long numberOfPassengers; + @FieldOrder(order = 1) @Asn1Optional public PassengerType passengerType; + @FieldOrder(order = 2) @IntRange(minValue=1,maxValue=64) @Asn1Optional public Long ageBelow; + @FieldOrder(order = 3) @IntRange(minValue=1,maxValue=128) @Asn1Optional public Long ageAbove; + @FieldOrder(order = 5) @Asn1Optional public SequenceOfTravelerId traverlerid; + @FieldOrder(order = 6) public Boolean restrictedToCountryOfResidence; + @FieldOrder(order = 7) @Asn1Optional public RouteSectionType restrictedToRouteSection; + @FieldOrder(order = 8) @Asn1Optional public SeriesDetailType seriesDataDetails; + @FieldOrder(order = 9) @Asn1Optional public Asn1BigInteger tariffIdNum; + @FieldOrder(order = 10) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String tariffIdIA5; + @FieldOrder(order = 11) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String tariffDesc; + @FieldOrder(order = 12) @Asn1Optional public SequenceOfCardReferenceType reductionCard; diff --git a/src/org/uic/ticket/api/asn/omv2/TicketDetailData.java b/src/org/uic/ticket/api/asn/omv2/TicketDetailData.java index 1262f35..da2d5ec 100644 --- a/src/org/uic/ticket/api/asn/omv2/TicketDetailData.java +++ b/src/org/uic/ticket/api/asn/omv2/TicketDetailData.java @@ -22,6 +22,7 @@ package org.uic.ticket.api.asn.omv2; import net.gcdc.asn1.datatypes.Choice; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; @Choice @@ -30,28 +31,40 @@ public class TicketDetailData extends Object { public TicketDetailData() { } + @FieldOrder(order = 0) public ReservationData reservation; + @FieldOrder(order = 1) public CarCarriageReservationData carCarriageReservation; + @FieldOrder(order = 2) public OpenTicketData openTicket; + @FieldOrder(order = 3) public PassData pass; + @FieldOrder(order = 4) public VoucherData voucher; + @FieldOrder(order = 5) public CustomerCardData customerCard; + @FieldOrder(order = 6) public CountermarkData counterMark; + @FieldOrder(order = 7) public ParkingGroundData parkingGround; + @FieldOrder(order = 8) public FIPTicketData fipTicket; + @FieldOrder(order = 9) public StationPassageData stationPassage; + @FieldOrder(order = 10) public DelayConfirmation delayConfirmation; + @FieldOrder(order = 11) public ExtensionData extension; public ReservationData getReservation() { diff --git a/src/org/uic/ticket/api/asn/omv2/TicketLinkType.java b/src/org/uic/ticket/api/asn/omv2/TicketLinkType.java index 7c8f1f5..a125b80 100644 --- a/src/org/uic/ticket/api/asn/omv2/TicketLinkType.java +++ b/src/org/uic/ticket/api/asn/omv2/TicketLinkType.java @@ -23,6 +23,7 @@ import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -34,27 +35,34 @@ public class TicketLinkType extends Object { public TicketLinkType() { } + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String referenceIA5; + @FieldOrder(order = 1) @Asn1Optional public Asn1BigInteger referenceNum; + @FieldOrder(order = 2) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String issuerName; - + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String issuerPNR; + @FieldOrder(order = 4) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long productOwnerNum; + @FieldOrder(order = 5) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productOwnerIA5; + @FieldOrder(order = 6) @Asn1Default(value="openTicket") @Asn1Optional public TicketType ticketType; + @FieldOrder(order = 7) @Asn1Default(value="issuedTogether") @Asn1Optional public LinkMode linkMode; diff --git a/src/org/uic/ticket/api/asn/omv2/TimeRangeType.java b/src/org/uic/ticket/api/asn/omv2/TimeRangeType.java index f78f2e0..4a985ab 100644 --- a/src/org/uic/ticket/api/asn/omv2/TimeRangeType.java +++ b/src/org/uic/ticket/api/asn/omv2/TimeRangeType.java @@ -19,6 +19,7 @@ */ package org.uic.ticket.api.asn.omv2; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.Sequence; @@ -27,9 +28,11 @@ public class TimeRangeType extends Object { public TimeRangeType() { } + @FieldOrder(order = 0) @IntRange(minValue=0,maxValue=1439) public Long fromTime; + @FieldOrder(order = 1) @IntRange(minValue=0,maxValue=1439) public Long untilTime; diff --git a/src/org/uic/ticket/api/asn/omv2/TokenType.java b/src/org/uic/ticket/api/asn/omv2/TokenType.java index c06c01a..9a6ce74 100644 --- a/src/org/uic/ticket/api/asn/omv2/TokenType.java +++ b/src/org/uic/ticket/api/asn/omv2/TokenType.java @@ -21,6 +21,7 @@ package org.uic.ticket.api.asn.omv2; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.RestrictedString; import net.gcdc.asn1.datatypes.Sequence; import net.gcdc.asn1.datatypesimpl.OctetString; @@ -30,14 +31,18 @@ public class TokenType extends Object { public TokenType() { } + @FieldOrder(order = 0) @Asn1Optional public Long tokenProviderNum; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String tokenProviderIA5; + @FieldOrder(order = 2) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String tokenSpecification; + @FieldOrder(order = 4) public OctetString token; public Long getTokenProviderNum() { diff --git a/src/org/uic/ticket/api/asn/omv2/TrainLinkType.java b/src/org/uic/ticket/api/asn/omv2/TrainLinkType.java index addca17..a78ca77 100644 --- a/src/org/uic/ticket/api/asn/omv2/TrainLinkType.java +++ b/src/org/uic/ticket/api/asn/omv2/TrainLinkType.java @@ -24,6 +24,7 @@ import java.util.Date; import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; import net.gcdc.asn1.datatypes.Sequence; @@ -33,35 +34,46 @@ public class TrainLinkType extends Object { public TrainLinkType() { } + @FieldOrder(order = 0) @Asn1Optional public Asn1BigInteger trainNum; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String trainIA5; + @FieldOrder(order = 2) @IntRange(minValue=0,maxValue=370) @Asn1Optional public Long travelDate; + @FieldOrder(order = 3) @IntRange(minValue=0,maxValue=1440) @Asn1Optional public Long departureTime; + @FieldOrder(order = 4) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long departureUTCOffset; + @FieldOrder(order = 5) @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long fromStationNum; + @FieldOrder(order = 6) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String fromStationIA5; + @FieldOrder(order = 7) @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long toStationNum; + @FieldOrder(order = 8) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String toStationIA5; + @FieldOrder(order = 9) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String fromStationName; + @FieldOrder(order = 10) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String toStationName; diff --git a/src/org/uic/ticket/api/asn/omv2/TravelerData.java b/src/org/uic/ticket/api/asn/omv2/TravelerData.java index 9cdfc7f..0c36fb7 100644 --- a/src/org/uic/ticket/api/asn/omv2/TravelerData.java +++ b/src/org/uic/ticket/api/asn/omv2/TravelerData.java @@ -23,6 +23,7 @@ import java.util.List; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.FixedSize; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.RestrictedString; @@ -33,13 +34,15 @@ import net.gcdc.asn1.datatypes.Sequence; public class TravelerData extends Object { public TravelerData() { } - + @FieldOrder(order = 0) @Asn1Optional public SequenceOfTravelerType traveler; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @FixedSize(2) @Asn1Optional public String preferedLanguage; + @FieldOrder(order = 2) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String groupName; diff --git a/src/org/uic/ticket/api/asn/omv2/TravelerType.java b/src/org/uic/ticket/api/asn/omv2/TravelerType.java index 682203f..5726bd9 100644 --- a/src/org/uic/ticket/api/asn/omv2/TravelerType.java +++ b/src/org/uic/ticket/api/asn/omv2/TravelerType.java @@ -25,6 +25,7 @@ import java.util.TimeZone; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -37,53 +38,71 @@ public class TravelerType extends Object { public TravelerType() { } + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String firstName; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String secondName; + @FieldOrder(order = 2) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String lastName; + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String idCard; + @FieldOrder(order = 4) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String passportId; + @FieldOrder(order = 5) @SizeRange(minValue = 1, maxValue = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String title; + @FieldOrder(order = 6) @Asn1Optional public GenderType gender; + @FieldOrder(order = 7) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String customerIdIA5; + @FieldOrder(order = 8) @Asn1Optional public Long customerIdNum; + @FieldOrder(order = 9) @IntRange(minValue=1901,maxValue=2155) @Asn1Optional public Long yearOfBirth; + @FieldOrder(order = 10) @IntRange(minValue=0,maxValue=366) @Asn1Optional public Long dayOfBirth; + @FieldOrder(order = 11) public Boolean ticketHolder = true; + @FieldOrder(order = 12) @Asn1Optional public PassengerType passengerType; + @FieldOrder(order = 13) @Asn1Optional public Boolean passengerWithReducedMobility; + @FieldOrder(order = 14) @IntRange(minValue=1,maxValue=999) @Asn1Optional public Long countryOfResidence; + @FieldOrder(order = 15) @IntRange(minValue=1,maxValue=999) @Asn1Optional public Long countryOfPassport; + @FieldOrder(order = 16) @IntRange(minValue=1,maxValue=999) @Asn1Optional public Long countryOfIdCard; + @FieldOrder(order = 17) @Asn1Optional public SequenceOfCustomerStatusType status; diff --git a/src/org/uic/ticket/api/asn/omv2/UicRailTicketData.java b/src/org/uic/ticket/api/asn/omv2/UicRailTicketData.java index 624acf4..8eb602f 100644 --- a/src/org/uic/ticket/api/asn/omv2/UicRailTicketData.java +++ b/src/org/uic/ticket/api/asn/omv2/UicRailTicketData.java @@ -23,6 +23,7 @@ import java.util.List; import net.gcdc.asn1.datatypes.Asn1Optional; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.Sequence; import net.gcdc.asn1.uper.UperEncoder; @@ -33,14 +34,19 @@ public class UicRailTicketData extends Object { public UicRailTicketData() { } + @FieldOrder(order = 0) public IssuingData issuingDetail; + @FieldOrder(order = 1) @Asn1Optional public TravelerData travelerDetail; + @FieldOrder(order = 2) @Asn1Optional public SequenceOfDocumentData transportDocument; + @FieldOrder(order = 3) @Asn1Optional public ControlData controlDetail; + @FieldOrder(order = 4) @Asn1Optional public SequenceOfExtensionData extension; public IssuingData getIssuingDetail() { diff --git a/src/org/uic/ticket/api/asn/omv2/ValidityPeriodDetailType.java b/src/org/uic/ticket/api/asn/omv2/ValidityPeriodDetailType.java index 149e85a..38c4a30 100644 --- a/src/org/uic/ticket/api/asn/omv2/ValidityPeriodDetailType.java +++ b/src/org/uic/ticket/api/asn/omv2/ValidityPeriodDetailType.java @@ -23,6 +23,7 @@ import java.util.Collection; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.Asn1SequenceOf; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.Sequence; @Sequence @@ -30,8 +31,10 @@ public class ValidityPeriodDetailType extends Object { public ValidityPeriodDetailType() { } + @FieldOrder(order = 0) @Asn1Optional public SequenceOfValidityPeriodType validityPeriod; + @FieldOrder(order = 1) @Asn1Optional public SequenceOfTimeRangeType excludedTimeRange; diff --git a/src/org/uic/ticket/api/asn/omv2/ValidityPeriodType.java b/src/org/uic/ticket/api/asn/omv2/ValidityPeriodType.java index 2b6468e..bce29b4 100644 --- a/src/org/uic/ticket/api/asn/omv2/ValidityPeriodType.java +++ b/src/org/uic/ticket/api/asn/omv2/ValidityPeriodType.java @@ -23,6 +23,7 @@ import java.util.Date; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.Sequence; @@ -31,23 +32,29 @@ public class ValidityPeriodType extends Object { public ValidityPeriodType() { } + @FieldOrder(order = 0) @IntRange(minValue=0,maxValue=700) @Asn1Default(value="0") @Asn1Optional public Long validFromDay; - @IntRange(minValue=0,maxValue=1440) + @FieldOrder(order = 1) + @IntRange(minValue=0,maxValue=1439) @Asn1Optional public Long validFromTime; + @FieldOrder(order = 2) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long validFromUTCOffset; + @FieldOrder(order = 3) @IntRange(minValue=0,maxValue=370) @Asn1Default(value="0") @Asn1Optional public Long validUntilDay; - @IntRange(minValue=0,maxValue=1440) + @FieldOrder(order = 4) + @IntRange(minValue=0,maxValue=1439) @Asn1Optional public Long validUntilTime; + @FieldOrder(order = 5) @IntRange(minValue=-60, maxValue=60) @Asn1Optional public Long validUntilUTCOffset; diff --git a/src/org/uic/ticket/api/asn/omv2/VatDetailType.java b/src/org/uic/ticket/api/asn/omv2/VatDetailType.java index de1fa00..f3d2336 100644 --- a/src/org/uic/ticket/api/asn/omv2/VatDetailType.java +++ b/src/org/uic/ticket/api/asn/omv2/VatDetailType.java @@ -22,6 +22,7 @@ package org.uic.ticket.api.asn.omv2; import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; import net.gcdc.asn1.datatypes.Sequence; @@ -32,14 +33,18 @@ public class VatDetailType extends Object { public VatDetailType() { } + @FieldOrder(order = 0) @IntRange(minValue = 1, maxValue = 999) public Long country; + @FieldOrder(order = 1) @IntRange(minValue = 0, maxValue = 999) public Long percentage; + @FieldOrder(order = 2) @Asn1Optional public Asn1BigInteger amount; + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String vatId; diff --git a/src/org/uic/ticket/api/asn/omv2/ViaStationType.java b/src/org/uic/ticket/api/asn/omv2/ViaStationType.java index 21d5428..db8f6fb 100644 --- a/src/org/uic/ticket/api/asn/omv2/ViaStationType.java +++ b/src/org/uic/ticket/api/asn/omv2/ViaStationType.java @@ -23,6 +23,7 @@ import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -35,27 +36,37 @@ public class ViaStationType extends Object { public ViaStationType() { } + @FieldOrder(order = 0) @Asn1Default("stationUIC") @Asn1Optional public CodeTableType stationCodeTable; + @FieldOrder(order = 1) @IntRange(minValue=1,maxValue=9999999) @Asn1Optional public Long stationNum; + @FieldOrder(order = 2) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String stationIA5; + @FieldOrder(order = 3) @Asn1Optional public SequenceOfViaStationType alternativeRoutes; + @FieldOrder(order = 4) @Asn1Optional public SequenceOfViaStationType route; + @FieldOrder(order = 5) @Asn1Optional public Boolean border = false; + @FieldOrder(order = 6) @Asn1Optional public SequenceOfCarrierNum carriersNum; + @FieldOrder(order = 7) @Asn1Optional public SequenceOfStringIA5 carriersIA5; + @FieldOrder(order = 8) @Asn1Optional public Asn1BigInteger seriesId; + @FieldOrder(order = 9) @Asn1Optional public Asn1BigInteger routeId; diff --git a/src/org/uic/ticket/api/asn/omv2/VoucherData.java b/src/org/uic/ticket/api/asn/omv2/VoucherData.java index 1528680..73d8105 100644 --- a/src/org/uic/ticket/api/asn/omv2/VoucherData.java +++ b/src/org/uic/ticket/api/asn/omv2/VoucherData.java @@ -26,6 +26,7 @@ import java.util.TimeZone; import net.gcdc.asn1.datatypes.Asn1BigInteger; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -38,43 +39,57 @@ public class VoucherData extends Object { public VoucherData() { } + @FieldOrder(order = 0) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String referenceIA5; + @FieldOrder(order = 1) @Asn1Optional public Asn1BigInteger referenceNum; + @FieldOrder(order = 2) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long productOwnerNum; + @FieldOrder(order = 3) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productOwnerIA5; + @FieldOrder(order = 4) @IntRange(minValue=0,maxValue=65535) @Asn1Optional public Long productIdNum; + @FieldOrder(order = 5) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String productIdIA5; + @FieldOrder(order = 6) @IntRange(minValue=2016,maxValue=2269) public Long validFromYear; + @FieldOrder(order = 7) @IntRange(minValue=0,maxValue=370) public Long validFromDay; + @FieldOrder(order = 8) @IntRange(minValue=2016,maxValue=2269) public Long validUntilYear; + @FieldOrder(order = 9) @IntRange(minValue=0,maxValue=370) public Long validUntilDay; + @FieldOrder(order = 10) @Asn1Optional public Long value; + @FieldOrder(order = 11) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long type; + @FieldOrder(order = 12) @RestrictedString(CharacterRestriction.UTF8String) @Asn1Optional public String infoText; + @FieldOrder(order = 13) @Asn1Optional public ExtensionData extension; diff --git a/src/org/uic/ticket/api/asn/omv2/ZoneType.java b/src/org/uic/ticket/api/asn/omv2/ZoneType.java index 33eac99..6712601 100644 --- a/src/org/uic/ticket/api/asn/omv2/ZoneType.java +++ b/src/org/uic/ticket/api/asn/omv2/ZoneType.java @@ -24,6 +24,7 @@ import net.gcdc.asn1.datatypes.Asn1Default; import net.gcdc.asn1.datatypes.Asn1Optional; import net.gcdc.asn1.datatypes.CharacterRestriction; +import net.gcdc.asn1.datatypes.FieldOrder; import net.gcdc.asn1.datatypes.HasExtensionMarker; import net.gcdc.asn1.datatypes.IntRange; import net.gcdc.asn1.datatypes.RestrictedString; @@ -38,33 +39,44 @@ public class ZoneType extends Object { public ZoneType() { } + @FieldOrder(order = 0) @IntRange(minValue=1,maxValue=32000) @Asn1Optional public Long carrierNum; + @FieldOrder(order = 1) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String carrierIA5; + @FieldOrder(order = 2) @Asn1Default("stationUIC") @Asn1Optional public CodeTableType stationCodeTable; + @FieldOrder(order = 3) @IntRange(minValue=0,maxValue=9999999) @Asn1Optional public Long entryStationNum; + @FieldOrder(order = 4) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String entryStationIA5; + @FieldOrder(order = 5) @IntRange(minValue=0,maxValue=9999999) @Asn1Optional public Long terminatingStationNum; + @FieldOrder(order = 6) @RestrictedString(CharacterRestriction.IA5String) @Asn1Optional public String terminatingStationIA5; + @FieldOrder(order = 7) @Asn1Optional public Asn1BigInteger city; + @FieldOrder(order = 8) @Asn1Optional public SequenceOfUnrestrictedLong zoneId; + @FieldOrder(order = 9) @Asn1Optional public OctetString binaryZoneId; + @FieldOrder(order = 10) @Asn1Optional public String nutsCode; -- cgit v1.2.3