diff options
author | CGantert345 <57003061+CGantert345@users.noreply.github.com> | 2024-06-18 15:42:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-18 15:42:51 +0200 |
commit | 6b9254296a5b3b323c2e103db40865c01ffad005 (patch) | |
tree | a02e7adfe7c44ab01feaf94cd26689f9e09bfc62 /src/main/java/org/uic/barcode/ticket/api/asn/omv1 | |
parent | Merge pull request #81 from UnionInternationalCheminsdeFer/fix_test_for_year_with_feb29 (diff) | |
parent | Create MAVticketTest.java (diff) | |
download | UIC-barcode-1.4.6.tar UIC-barcode-1.4.6.tar.gz UIC-barcode-1.4.6.tar.bz2 UIC-barcode-1.4.6.tar.lz UIC-barcode-1.4.6.tar.xz UIC-barcode-1.4.6.tar.zst UIC-barcode-1.4.6.zip |
Diffstat (limited to 'src/main/java/org/uic/barcode/ticket/api/asn/omv1')
18 files changed, 38 insertions, 41 deletions
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CarCarriageReservationData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CarCarriageReservationData.java index 6729d08..a55b619 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CarCarriageReservationData.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CarCarriageReservationData.java @@ -33,7 +33,6 @@ import org.uic.barcode.asn1.datatypes.IntRange; import org.uic.barcode.asn1.datatypes.RestrictedString;
import org.uic.barcode.asn1.datatypes.Sequence;
import org.uic.barcode.asn1.datatypesimpl.SequenceOfStringIA5;
-import org.uic.barcode.ticket.api.asn.omv1.SequenceOfCarrierNum;
import org.uic.barcode.ticket.api.utils.DateTimeUtils;
@@ -232,7 +231,7 @@ public class CarCarriageReservationData extends Object { public Long getBeginLoadingTime() {
- if (beginLoadingTime == null) return new Long(0);
+ if (beginLoadingTime == null) return Long.valueOf(0);
return beginLoadingTime;
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CustomerCardData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CustomerCardData.java index 0d8bdcd..ae9d513 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CustomerCardData.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CustomerCardData.java @@ -244,8 +244,8 @@ public class CustomerCardData extends Object { fromCal.clear();
fromCal.setTime(fromDate);
- this.validFromYear = new Long( fromCal.get(Calendar.YEAR));
- this.validFromDay = new Long (fromCal.get(Calendar.DAY_OF_YEAR));
+ this.validFromYear = Long.valueOf( fromCal.get(Calendar.YEAR));
+ this.validFromDay = Long.valueOf(fromCal.get(Calendar.DAY_OF_YEAR));
if (untilDate == null) return;
@@ -256,8 +256,8 @@ public class CustomerCardData extends Object { int untildays = untilCal.get(Calendar.DAY_OF_YEAR);
int yearDiff = untilCal.get(Calendar.YEAR) - fromCal.get(Calendar.YEAR);
- this.validUntilYear = new Long( yearDiff);
- this.validUntilDay = new Long (untildays);
+ this.validUntilYear = Long.valueOf( yearDiff);
+ this.validUntilDay = Long.valueOf (untildays);
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/DelayConfirmation.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/DelayConfirmation.java index a3df48b..32e6c97 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/DelayConfirmation.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/DelayConfirmation.java @@ -282,11 +282,11 @@ public class DelayConfirmation extends Object { Calendar cal = Calendar.getInstance();
cal.setTime(date);
- this.plannedArrivalYear = new Long( cal.get(Calendar.YEAR));
- this.plannedArrivalDay = new Long (cal.get(Calendar.DAY_OF_YEAR));
+ this.plannedArrivalYear = Long.valueOf( cal.get(Calendar.YEAR));
+ this.plannedArrivalDay = Long.valueOf (cal.get(Calendar.DAY_OF_YEAR));
int time = cal.get(Calendar.HOUR_OF_DAY) * 60 + cal.get(Calendar.MINUTE);
if (time > 0) {
- this.plannedArrivalTime = new Long (time );
+ this.plannedArrivalTime = Long.valueOf (time );
}
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/IssuingData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/IssuingData.java index 5a150dc..4c3a5ff 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/IssuingData.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/IssuingData.java @@ -184,7 +184,7 @@ public class IssuingData extends Object { public Long getCurrencyFract() {
if (currencyFract == null) {
- return new Long(2);
+ return Long.valueOf(2);
}
return this.currencyFract;
}
@@ -323,11 +323,11 @@ public class IssuingData extends Object { Calendar cal = Calendar.getInstance();
cal.setTime(date);
- this.issuingYear = new Long( cal.get(Calendar.YEAR));
- this.issuingDay = new Long (cal.get(Calendar.DAY_OF_YEAR));
+ this.issuingYear = Long.valueOf( cal.get(Calendar.YEAR));
+ this.issuingDay = Long.valueOf (cal.get(Calendar.DAY_OF_YEAR));
int time = cal.get(Calendar.HOUR_OF_DAY) * 60 + cal.get(Calendar.MINUTE);
if (time >= 0) {
- this.issuingTime = new Long (time );
+ this.issuingTime = Long.valueOf (time );
}
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/LuggageRestrictionType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/LuggageRestrictionType.java index 04f4309..86f75d9 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/LuggageRestrictionType.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/LuggageRestrictionType.java @@ -54,7 +54,7 @@ public class LuggageRestrictionType extends Object { public Long getMaxHandLuggagePieces() {
if (maxHandLuggagePieces == null) {
- return new Long(3);
+ return Long.valueOf(3);
}
return this.maxHandLuggagePieces;
@@ -63,7 +63,7 @@ public class LuggageRestrictionType extends Object { public Long getMaxNonHandLuggagePieces() {
if (maxNonHandLuggagePieces == null) {
- return new Long(1);
+ return Long.valueOf(1);
}
return this.maxNonHandLuggagePieces;
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ReservationData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ReservationData.java index b1b2be4..d60dee1 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ReservationData.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ReservationData.java @@ -314,7 +314,7 @@ public class ReservationData extends Object { public Long getArrivalDate() {
if (arrivalDate == null) {
- return new Long(0);
+ return Long.valueOf(0);
}
return this.arrivalDate;
@@ -397,7 +397,7 @@ public class ReservationData extends Object { public Long getTypeOfSupplement() {
if (typeOfSupplement == null){
- return new Long(0);
+ return Long.valueOf(0);
}
@@ -407,7 +407,7 @@ public class ReservationData extends Object { public Long getNumberOfSupplements() {
if (numberOfSupplements == null) {
- return new Long(0);
+ return Long.valueOf(0);
}
return this.numberOfSupplements;
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfActivatedDays.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfActivatedDays.java index 2d1eebd..775d145 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfActivatedDays.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfActivatedDays.java @@ -14,7 +14,7 @@ public class SequenceOfActivatedDays extends Asn1SequenceOf<Long> { public SequenceOfActivatedDays(List<Long> numbers) {
super();
for (Long number: numbers){
- this.add(new Long(number));
+ this.add(Long.valueOf(number));
}
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCarrierNum.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCarrierNum.java index 9d75e83..8d8d708 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCarrierNum.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCarrierNum.java @@ -15,7 +15,7 @@ public class SequenceOfCarrierNum extends Asn1SequenceOf<Long> { public SequenceOfCarrierNum(List<Long> numbers) {
super();
for (Long number: numbers){
- this.add(new Long(number));
+ this.add(Long.valueOf(number));
}
}
public static SequenceOfCarrierNum getSequence(List<Long> numList) {
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCountries.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCountries.java index e6dd46b..ea3213c 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCountries.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfCountries.java @@ -15,7 +15,7 @@ public class SequenceOfCountries extends Asn1SequenceOf<Long> { public SequenceOfCountries(List<Long> numbers) {
super();
for (Long number: numbers){
- this.add(new Long(number));
+ this.add(Long.valueOf(number));
}
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfPlaceNum.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfPlaceNum.java index c8ec7ce..07d7950 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfPlaceNum.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfPlaceNum.java @@ -16,7 +16,7 @@ public class SequenceOfPlaceNum extends Asn1SequenceOf<Long> { public SequenceOfPlaceNum(List<Long> numbers) {
super();
for (Long number: numbers){
- this.add(new Long(number));
+ this.add(Long.valueOf(number));
}
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfServiceBrands.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfServiceBrands.java index 3edd7fb..e8fde5a 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfServiceBrands.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfServiceBrands.java @@ -15,7 +15,7 @@ public class SequenceOfServiceBrands extends Asn1SequenceOf<Long> { public SequenceOfServiceBrands(List<Long> numbers) {
super();
for (Long number: numbers){
- this.add(new Long(number));
+ this.add(Long.valueOf(number));
}
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfTravelerId.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfTravelerId.java index 3a1b1ec..b1d61ba 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfTravelerId.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/SequenceOfTravelerId.java @@ -14,7 +14,7 @@ public class SequenceOfTravelerId extends Asn1SequenceOf<Long> { public SequenceOfTravelerId(List<Long> numbers) {
super();
for (Long number: numbers){
- this.add(new Long(number));
+ this.add(Long.valueOf(number));
}
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TariffType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TariffType.java index 66cb399..6927416 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TariffType.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TariffType.java @@ -82,7 +82,7 @@ public class TariffType extends Object { public Long getNumberOfPassengers() {
if (numberOfPassengers == null) {
- return new Long(1);
+ return Long.valueOf(1);
}
return this.numberOfPassengers;
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TicketDetailData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TicketDetailData.java index 7a86d56..b137f4c 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TicketDetailData.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TicketDetailData.java @@ -24,8 +24,6 @@ package org.uic.barcode.ticket.api.asn.omv1; import org.uic.barcode.asn1.datatypes.Choice;
import org.uic.barcode.asn1.datatypes.FieldOrder;
import org.uic.barcode.asn1.datatypes.HasExtensionMarker;
-import org.uic.barcode.ticket.api.asn.omv1.DelayConfirmation;
-import org.uic.barcode.ticket.api.asn.omv1.ExtensionData;
@Choice
@HasExtensionMarker
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TrainLinkType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TrainLinkType.java index 6cc1c42..9bd4fe4 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TrainLinkType.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TrainLinkType.java @@ -43,7 +43,7 @@ public class TrainLinkType extends Object { @Asn1Optional public String trainIA5;
@FieldOrder(order = 2)
- @IntRange(minValue=0,maxValue=370)
+ @IntRange(minValue=-1,maxValue=370)
public Long travelDate;
@FieldOrder(order = 3)
@@ -168,7 +168,7 @@ public class TrainLinkType extends Object { public void setDepartureTimeZone(Date dateLocal, Date dateUTC ) {
// -- (UTC = local + offset * 15 Minutes)
- this.departureUTCOffset = new Long(dateLocal.getTime() - dateUTC.getTime()) / (1000 * 60 * 15);
+ this.departureUTCOffset = Long.valueOf(dateLocal.getTime() - dateUTC.getTime()) / (1000 * 60 * 15);
}
public Date getDepartureDate(Date issuingDate){
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TravelerType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TravelerType.java index 7f512fc..f9663c5 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TravelerType.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/TravelerType.java @@ -295,8 +295,8 @@ public class TravelerType extends Object { Calendar cal = Calendar.getInstance();
cal.setTime(date);
- this.yearOfBirth = new Long( cal.get(Calendar.YEAR));
- this.dayOfBirth = new Long (cal.get(Calendar.DAY_OF_YEAR));
+ this.yearOfBirth = Long.valueOf ( cal.get(Calendar.YEAR));
+ this.dayOfBirth = Long.valueOf (cal.get(Calendar.DAY_OF_YEAR));
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ValidityPeriodType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ValidityPeriodType.java index a72d55b..e9a0ce8 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ValidityPeriodType.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/ValidityPeriodType.java @@ -62,7 +62,7 @@ public class ValidityPeriodType extends Object { public Long getValidFromDay() {
if (validFromDay == null) {
- return new Long(0);
+ return Long.valueOf(0);
}
return this.validFromDay;
@@ -76,7 +76,7 @@ public class ValidityPeriodType extends Object { public Long getValidUntilDay() {
if (validUntilDay == null) {
- return new Long(0);
+ return Long.valueOf(0);
}
return this.validUntilDay;
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/VoucherData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/VoucherData.java index 521f32a..796e15e 100644 --- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/VoucherData.java +++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/VoucherData.java @@ -241,8 +241,8 @@ public class VoucherData extends Object { fromCal.clear();
fromCal.setTime(fromDate);
- this.validFromYear = new Long( fromCal.get(Calendar.YEAR));
- this.validFromDay = new Long (fromCal.get(Calendar.DAY_OF_YEAR));
+ this.validFromYear = Long.valueOf( fromCal.get(Calendar.YEAR));
+ this.validFromDay = Long.valueOf (fromCal.get(Calendar.DAY_OF_YEAR));
if (untilDate == null) return;
@@ -250,8 +250,8 @@ public class VoucherData extends Object { untilCal.clear();
untilCal.setTime(untilDate);
- this.validUntilYear = new Long( untilCal.get(Calendar.YEAR));
- this.validUntilDay = new Long (untilCal.get(Calendar.DAY_OF_YEAR));
+ this.validUntilYear = Long.valueOf( untilCal.get(Calendar.YEAR));
+ this.validUntilDay = Long.valueOf(untilCal.get(Calendar.DAY_OF_YEAR));
}
@@ -264,8 +264,8 @@ public class VoucherData extends Object { fromCal.clear();
fromCal.setTime(fromDate);
- this.validFromYear = new Long( fromCal.get(Calendar.YEAR));
- this.validFromDay = new Long (fromCal.get(Calendar.DAY_OF_YEAR));
+ this.validFromYear = Long.valueOf( fromCal.get(Calendar.YEAR));
+ this.validFromDay = Long.valueOf(fromCal.get(Calendar.DAY_OF_YEAR));
}
@@ -277,8 +277,8 @@ public class VoucherData extends Object { untilCal.clear();
untilCal.setTime(untilDate);
- this.validUntilYear = new Long( untilCal.get(Calendar.YEAR));
- this.validUntilDay = new Long (untilCal.get(Calendar.DAY_OF_YEAR));
+ this.validUntilYear = Long.valueOf( untilCal.get(Calendar.YEAR));
+ this.validUntilDay = Long.valueOf (untilCal.get(Calendar.DAY_OF_YEAR));
}
|