diff options
author | CGantert345 <57003061+CGantert345@users.noreply.github.com> | 2021-06-29 16:26:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-29 16:26:36 +0200 |
commit | 27d114203f6edaf8aea75ee710bd87f32d79f003 (patch) | |
tree | 794e40b39e154adef8e471ab8774c8a68bd3e434 /src/main/java/org/uic/barcode/ticket/api/asn/omv3/TravelerType.java | |
parent | Delete uicBarcodeFCBv2.0.asn (diff) | |
parent | - test for FCB version 3 (diff) | |
download | UIC-barcode-27d114203f6edaf8aea75ee710bd87f32d79f003.tar UIC-barcode-27d114203f6edaf8aea75ee710bd87f32d79f003.tar.gz UIC-barcode-27d114203f6edaf8aea75ee710bd87f32d79f003.tar.bz2 UIC-barcode-27d114203f6edaf8aea75ee710bd87f32d79f003.tar.lz UIC-barcode-27d114203f6edaf8aea75ee710bd87f32d79f003.tar.xz UIC-barcode-27d114203f6edaf8aea75ee710bd87f32d79f003.tar.zst UIC-barcode-27d114203f6edaf8aea75ee710bd87f32d79f003.zip |
Diffstat (limited to '')
-rw-r--r-- | src/main/java/org/uic/barcode/ticket/api/asn/omv3/TravelerType.java | 334 |
1 files changed, 334 insertions, 0 deletions
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/TravelerType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/TravelerType.java new file mode 100644 index 0000000..e41f758 --- /dev/null +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/TravelerType.java @@ -0,0 +1,334 @@ +/*
+ * This file was generated by openASN.1 - an open source ASN.1 toolkit for java
+ *
+ * openASN.1 is Copyright (C) 2007 Clayton Hoss, Marc Weyland
+ *
+ * openASN.1 is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of
+ * the License, or (at your option) any later version.
+ *
+ * openASN.1 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with openASN.1. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.uic.barcode.ticket.api.asn.omv3;
+
+import java.util.Calendar;
+import java.util.Date;
+import java.util.TimeZone;
+
+import org.uic.barcode.asn1.datatypes.Asn1Optional;
+import org.uic.barcode.asn1.datatypes.CharacterRestriction;
+import org.uic.barcode.asn1.datatypes.FieldOrder;
+import org.uic.barcode.asn1.datatypes.HasExtensionMarker;
+import org.uic.barcode.asn1.datatypes.IntRange;
+import org.uic.barcode.asn1.datatypes.RestrictedString;
+import org.uic.barcode.asn1.datatypes.Sequence;
+import org.uic.barcode.asn1.datatypes.SizeRange;
+
+@Sequence
+@HasExtensionMarker
+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=1,maxValue=12)
+ @Asn1Optional public Long monthOfBirth;
+
+ @FieldOrder(order = 11)
+ @IntRange(minValue=1,maxValue=31)
+ @Asn1Optional public Long dayOfBirth;
+
+ @FieldOrder(order = 12)
+ public Boolean ticketHolder = true;
+
+ @FieldOrder(order = 13)
+ @Asn1Optional public PassengerType passengerType;
+
+ @FieldOrder(order = 14)
+ @Asn1Optional public Boolean passengerWithReducedMobility;
+
+ @FieldOrder(order = 15)
+ @IntRange(minValue=1,maxValue=999)
+ @Asn1Optional public Long countryOfResidence;
+
+ @FieldOrder(order = 16)
+ @IntRange(minValue=1,maxValue=999)
+ @Asn1Optional public Long countryOfPassport;
+
+ @FieldOrder(order = 17)
+ @IntRange(minValue=1,maxValue=999)
+ @Asn1Optional public Long countryOfIdCard;
+
+ @FieldOrder(order = 18)
+ @Asn1Optional public SequenceOfCustomerStatusType status;
+
+
+
+ public String getFirstName() {
+
+ return this.firstName;
+ }
+
+ public String getSecondName() {
+
+ return this.secondName;
+ }
+
+ public String getLastName() {
+
+ return this.lastName;
+ }
+
+ public String getIdCard() {
+
+ return this.idCard;
+ }
+
+ public String getPassportId() {
+
+ return this.passportId;
+ }
+
+ public String getTitle() {
+
+ return this.title;
+ }
+
+ public GenderType getGender() {
+
+ return this.gender;
+ }
+
+ public String getCustomerIdIA5() {
+
+ return this.customerIdIA5;
+ }
+
+ public Long getCustomerIdNum() {
+
+ return this.customerIdNum;
+ }
+
+ public Long getYearOfBirth() {
+
+ return this.yearOfBirth;
+ }
+
+ public Long getDayOfBirth() {
+
+ return this.dayOfBirth;
+ }
+
+ public Boolean getTicketHolder() {
+
+ return this.ticketHolder;
+ }
+
+ public PassengerType getPassengerType() {
+
+ return this.passengerType;
+ }
+
+ public Boolean getPassengerWithReducedMobility() {
+ return this.passengerWithReducedMobility;
+ }
+
+ public Long getCountryOfResidence() {
+
+ return this.countryOfResidence;
+ }
+
+ public Long getCountryOfPassport() {
+
+ return this.countryOfPassport;
+ }
+
+ public Long getCountryOfIdCard() {
+
+ return this.countryOfIdCard;
+ }
+
+ public SequenceOfCustomerStatusType getStatus() {
+
+ return this.status;
+ }
+
+ public void setFirstName(String firstName) {
+
+ this.firstName = firstName;
+ }
+
+ public void setSecondName(String secondName) {
+
+ this.secondName = secondName;
+ }
+
+ public void setLastName(String lastName) {
+
+ this.lastName = lastName;
+ }
+
+ public void setIdCard(String idCard) {
+
+ this.idCard = idCard;
+ }
+
+ public void setPassportId(String passportId) {
+
+ this.passportId = passportId;
+ }
+
+ public void setTitle(String title) {
+
+ this.title = title;
+ }
+
+ public void setGender(GenderType gender) {
+
+ this.gender = gender;
+ }
+
+ public void setCustomerIdIA5(String customerIdIA5) {
+
+ this.customerIdIA5 = customerIdIA5;
+ }
+
+ public void setCustomerIdNum(Long customerIdNum) {
+
+ this.customerIdNum = customerIdNum;
+ }
+
+ public void setYearOfBirth(Long yearOfBirth) {
+
+ this.yearOfBirth = yearOfBirth;
+ }
+
+ public void setDayOfBirth(Long dayOfBirth) {
+
+ this.dayOfBirth = dayOfBirth;
+ }
+
+ public void setTicketHolder(Boolean ticketHolder) {
+
+ this.ticketHolder = ticketHolder;
+ }
+
+ public void setPassengerType(PassengerType passengerType) {
+
+ this.passengerType = passengerType;
+ }
+
+ public void setPassengerWithReducedMobility(Boolean passengerWithReducedMobility) {
+
+ this.passengerWithReducedMobility = passengerWithReducedMobility;
+ }
+
+ public void setCountryOfResidence(Long countryOfResidence) {
+
+ this.countryOfResidence = countryOfResidence;
+ }
+
+ public void setCountryOfPassport(Long countryOfPassport) {
+
+ this.countryOfPassport = countryOfPassport;
+ }
+
+ public void setCountryOfIdCard(Long countryOfIdCard) {
+
+ this.countryOfIdCard = countryOfIdCard;
+ }
+
+ public void setStatus(SequenceOfCustomerStatusType status) {
+
+ this.status = status;
+ }
+
+ public Long getMonthOfBirth() {
+ return monthOfBirth;
+ }
+
+ public void setMonthOfBirth(Long monthOfBirth) {
+ this.monthOfBirth = monthOfBirth;
+ }
+
+ public void setDateOfBirth(Date date){
+
+ if (date == null) return;
+
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(date);
+
+ this.yearOfBirth = new Long( cal.get(Calendar.YEAR));
+ this.monthOfBirth = new Long(cal.get(Calendar.MONTH) + 1);
+ this.dayOfBirth = new Long (cal.get(Calendar.DAY_OF_MONTH));
+
+ }
+
+ public Date getDateOfBirth() {
+
+ if (this.yearOfBirth == null) return null;
+ if (this.dayOfBirth == null) return null;
+
+ Calendar cal = Calendar.getInstance();
+ cal.clear();
+ cal.setTimeZone(TimeZone.getTimeZone("UTC"));
+ cal.set(Calendar.YEAR, this.yearOfBirth.intValue());
+ cal.set(Calendar.MONTH, (int)(this.monthOfBirth - 1));
+ cal.set(Calendar.DAY_OF_MONTH, this.dayOfBirth.intValue());
+ cal.set(Calendar.HOUR_OF_DAY,0);
+ cal.set(Calendar.MINUTE,0);
+
+ return cal.getTime();
+ }
+
+
+
+
+}
|