summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorCGantert345 <57003061+CGantert345@users.noreply.github.com>2023-08-11 10:43:36 +0200
committerGitHub <noreply@github.com>2023-08-11 10:43:36 +0200
commit91c78a9c0dbb20ce141a0122267b4f6d367646ec (patch)
tree960657a9b89eee67f09cc4e23675996f7f902440 /src/main
parentMerge pull request #70 from UnionInternationalCheminsdeFer/1.4.3 (diff)
parentversion number update (diff)
downloadUIC-barcode-1.4.4.tar
UIC-barcode-1.4.4.tar.gz
UIC-barcode-1.4.4.tar.bz2
UIC-barcode-1.4.4.tar.lz
UIC-barcode-1.4.4.tar.xz
UIC-barcode-1.4.4.tar.zst
UIC-barcode-1.4.4.zip
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv1/CountermarkData.java4
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv1/OpenTicketData.java6
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv1/PassData.java6
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv1/StationPassageData.java4
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv1/ValidityPeriodType.java4
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv2/CountermarkData.java4
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv2/IncludedOpenTicketType.java10
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv2/OpenTicketData.java4
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv2/PassData.java4
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv2/StationPassageData.java4
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv2/ValidityPeriodType.java4
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv3/CountermarkData.java4
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv3/IncludedOpenTicketType.java9
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv3/OpenTicketData.java4
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv3/PassData.java5
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv3/StationPassageData.java4
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv3/TrainValidityType.java4
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/asn/omv3/ValidityPeriodType.java4
18 files changed, 82 insertions, 6 deletions
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CountermarkData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CountermarkData.java
index a31f56d..4258b2e 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CountermarkData.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/CountermarkData.java
@@ -550,6 +550,10 @@ public class CountermarkData extends Object {
return null;
}
+ //set to 23:59
+ if (this.getValidUntilTime() == null) {
+ this.setValidUntilTime(1439L);
+ }
return DateTimeUtils.getDate(issuingDate, this.validFromDay + this.validUntilDay, this.validUntilTime);
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/OpenTicketData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/OpenTicketData.java
index 6f90f6f..0988675 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/OpenTicketData.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/OpenTicketData.java
@@ -599,6 +599,12 @@ public class OpenTicketData extends Object {
if (this.validUntilDay == null) {
return null;
}
+
+ //set to 23:59
+ if (this.getValidUntilTime() == null) {
+ this.setValidUntilTime(1439L);
+ }
+
return DateTimeUtils.getDate(issuingDate, this.validFromDay + this.validUntilDay, this.validUntilTime);
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/PassData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/PassData.java
index 74e8e4d..55db30f 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/PassData.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/PassData.java
@@ -889,7 +889,11 @@ public class PassData extends Object {
return null;
}
-
+ //set to 23:59
+ if (this.getValidUntilTime() == null) {
+ this.setValidUntilTime(1439L);
+ }
+
return DateTimeUtils.getDate(issuingDate, this.validFromDay + this.validUntilDay, this.validUntilTime);
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/StationPassageData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/StationPassageData.java
index f04a835..34eadf1 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv1/StationPassageData.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv1/StationPassageData.java
@@ -359,6 +359,10 @@ public class StationPassageData extends Object {
return null;
}
+ //set to 23:59
+ if (this.getValidUntilTime() == null) {
+ this.setValidUntilTime(1439L);
+ }
return DateTimeUtils.getDate(issuingDate, this.validFromDay + this.validUntilDay, this.validUntilTime);
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 5667ad9..a72d55b 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
@@ -139,6 +139,10 @@ public class ValidityPeriodType extends Object {
return null;
}
+ //set to 23:59
+ if (this.getValidUntilTime() == null) {
+ this.setValidUntilTime(1439L);
+ }
return DateTimeUtils.getDate(issuingDate, this.validFromDay + this.validUntilDay, this.validUntilTime);
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CountermarkData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CountermarkData.java
index 4c5a961..57d4a71 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CountermarkData.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/CountermarkData.java
@@ -552,6 +552,10 @@ public class CountermarkData extends Object {
return null;
}
+ //set to 23:59
+ if (this.getValidUntilTime() == null) {
+ this.setValidUntilTime(1439L);
+ }
return DateTimeUtils.getDate(issuingDate, this.validFromDay + this.validUntilDay, this.validUntilTime);
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/IncludedOpenTicketType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/IncludedOpenTicketType.java
index e0465d9..4cfe708 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/IncludedOpenTicketType.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/IncludedOpenTicketType.java
@@ -417,6 +417,11 @@ public class IncludedOpenTicketType extends Object {
return null;
}
+ //set to 23:59
+ if (this.getValidUntilTime() == null) {
+ this.setValidUntilTime(1439L);
+ }
+
return DateTimeUtils.getDate(issuingDate, this.validFromDay + this.validUntilDay, this.validUntilTime);
}
@@ -426,10 +431,11 @@ public class IncludedOpenTicketType extends Object {
}
public Date getUTCValidUntilDate(Date issuingDate){
+ this.getValidUntilDate(issuingDate);
if (this.validUntilUTCOffset == null) {
- return DateTimeUtils.getUTCDate(issuingDate, this.validFromDay, this.validFromTime, this.validFromUTCOffset);
+ return DateTimeUtils.getUTCDate(issuingDate, this.validFromDay + this.validUntilDay, this.validUntilTime, this.validUntilUTCOffset);
} else {
- return DateTimeUtils.getUTCDate(issuingDate, this.validFromDay, this.validUntilTime, this.validFromUTCOffset);
+ return DateTimeUtils.getUTCDate(issuingDate, this.validFromDay + this.validUntilDay, this.validUntilTime, this.validFromUTCOffset);
}
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/OpenTicketData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/OpenTicketData.java
index f44d604..3b5ae99 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/OpenTicketData.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/OpenTicketData.java
@@ -598,6 +598,10 @@ public class OpenTicketData extends Object {
return null;
}
+ //set to 23:59
+ if (this.getValidUntilTime() == null) {
+ this.setValidUntilTime(1439L);
+ }
return DateTimeUtils.getDate(issuingDate, this.validFromDay + this.validUntilDay, this.validUntilTime);
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/PassData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/PassData.java
index dad76dc..3a8c3b1 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/PassData.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/PassData.java
@@ -513,6 +513,10 @@ public class PassData extends Object {
return null;
}
+ //set to 23:59
+ if (this.getValidUntilTime() == null) {
+ this.setValidUntilTime(1439L);
+ }
return DateTimeUtils.getDate(issuingDate, this.validFromDay + this.validUntilDay, this.validUntilTime);
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/StationPassageData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/StationPassageData.java
index 1e6c720..bbab6ac 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/StationPassageData.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/StationPassageData.java
@@ -359,6 +359,10 @@ public class StationPassageData extends Object {
return null;
}
+ //set to 23:59
+ if (this.getValidUntilTime() == null) {
+ this.setValidUntilTime(1439L);
+ }
return DateTimeUtils.getDate(issuingDate, this.validFromDay + this.validUntilDay, this.validUntilTime);
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ValidityPeriodType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ValidityPeriodType.java
index e3b9aa6..e22cf3b 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ValidityPeriodType.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv2/ValidityPeriodType.java
@@ -139,6 +139,10 @@ public class ValidityPeriodType extends Object {
return null;
}
+ //set to 23:59
+ if (this.getValidUntilTime() == null) {
+ this.setValidUntilTime(1439L);
+ }
return DateTimeUtils.getDate(issuingDate, this.validFromDay + this.validUntilDay, this.validUntilTime);
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/CountermarkData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/CountermarkData.java
index 797f003..d0ce93a 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/CountermarkData.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/CountermarkData.java
@@ -554,6 +554,10 @@ public class CountermarkData extends Object {
return null;
}
+ if (this.getValidUntilTime() == null) {
+ this.validUntilTime = 1439L;
+ }
+
return DateTimeUtils.getDate(issuingDate, this.validFromDay + this.validUntilDay, this.validUntilTime);
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/IncludedOpenTicketType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/IncludedOpenTicketType.java
index 72a4132..ce46a94 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/IncludedOpenTicketType.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/IncludedOpenTicketType.java
@@ -417,6 +417,10 @@ public class IncludedOpenTicketType extends Object {
return null;
}
+ if (this.getValidUntilTime() == null) {
+ this.validUntilTime = 1439L;
+ }
+
return DateTimeUtils.getDate(issuingDate, this.validFromDay + this.validUntilDay, this.validUntilTime);
}
@@ -426,10 +430,11 @@ public class IncludedOpenTicketType extends Object {
}
public Date getUTCValidUntilDate(Date issuingDate){
+ this.getValidUntilDate(issuingDate);
if (this.validUntilUTCOffset == null) {
- return DateTimeUtils.getUTCDate(issuingDate, this.validFromDay, this.validFromTime, this.validFromUTCOffset);
+ return DateTimeUtils.getUTCDate(issuingDate, this.validFromDay + this.validUntilDay, this.validFromTime, this.validFromUTCOffset);
} else {
- return DateTimeUtils.getUTCDate(issuingDate, this.validFromDay, this.validUntilTime, this.validFromUTCOffset);
+ return DateTimeUtils.getUTCDate(issuingDate, this.validFromDay + this.validUntilDay, this.validUntilTime, this.validFromUTCOffset);
}
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/OpenTicketData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/OpenTicketData.java
index 30bc918..b9bd214 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/OpenTicketData.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/OpenTicketData.java
@@ -598,6 +598,10 @@ public class OpenTicketData extends Object {
return null;
}
+ //set to 23:59
+ if (this.getValidUntilTime() == null) {
+ this.setValidUntilTime(1439L);
+ }
return DateTimeUtils.getDate(issuingDate, this.validFromDay + this.validUntilDay, this.validUntilTime);
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/PassData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/PassData.java
index d84f868..9ef1acb 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/PassData.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/PassData.java
@@ -511,11 +511,14 @@ public class PassData extends Object {
this.validFromDay = 0L;
}
+ if (this.validUntilTime == null) {
+ this.validUntilTime = 1439L;
+ }
+
if (this.validUntilDay == null) {
return null;
}
-
return DateTimeUtils.getDate(issuingDate, this.validFromDay + this.validUntilDay, this.validUntilTime);
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/StationPassageData.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/StationPassageData.java
index 88f390a..df2022a 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/StationPassageData.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/StationPassageData.java
@@ -359,6 +359,10 @@ public class StationPassageData extends Object {
return null;
}
+ //set to 23:59
+ if (this.getValidUntilTime() == null) {
+ this.setValidUntilTime(1439L);
+ }
return DateTimeUtils.getDate(issuingDate, this.validFromDay + this.validUntilDay, this.validUntilTime);
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/TrainValidityType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/TrainValidityType.java
index e4060da..4f1bd72 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/TrainValidityType.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/TrainValidityType.java
@@ -174,6 +174,10 @@ public class TrainValidityType extends Object {
return null;
}
+ //set to 23:59
+ if (this.getValidUntilTime() == null) {
+ this.setValidUntilTime(1439L);
+ }
return DateTimeUtils.getDate(issuingDate, this.validFromDay + this.validUntilDay, this.validUntilTime);
diff --git a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/ValidityPeriodType.java b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/ValidityPeriodType.java
index 2b9a459..79364a3 100644
--- a/src/main/java/org/uic/barcode/ticket/api/asn/omv3/ValidityPeriodType.java
+++ b/src/main/java/org/uic/barcode/ticket/api/asn/omv3/ValidityPeriodType.java
@@ -139,6 +139,10 @@ public class ValidityPeriodType extends Object {
return null;
}
+ //set to 23:59
+ if (this.getValidUntilTime() == null) {
+ this.setValidUntilTime(1439L);
+ }
return DateTimeUtils.getDate(issuingDate, this.validFromDay + this.validUntilDay, this.validUntilTime);