summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/uic/barcode/ticket/api
diff options
context:
space:
mode:
authorCGantert345 <57003061+CGantert345@users.noreply.github.com>2022-04-12 12:54:16 +0200
committerCGantert345 <57003061+CGantert345@users.noreply.github.com>2022-04-12 12:54:16 +0200
commit58bafb860b060c609a01815657b4df22ce8fbffc (patch)
tree18bb0ef69bde020287f198227fd249121c11739a /src/main/java/org/uic/barcode/ticket/api
parentuse one provider only within validation (diff)
downloadUIC-barcode-58bafb860b060c609a01815657b4df22ce8fbffc.tar
UIC-barcode-58bafb860b060c609a01815657b4df22ce8fbffc.tar.gz
UIC-barcode-58bafb860b060c609a01815657b4df22ce8fbffc.tar.bz2
UIC-barcode-58bafb860b060c609a01815657b4df22ce8fbffc.tar.lz
UIC-barcode-58bafb860b060c609a01815657b4df22ce8fbffc.tar.xz
UIC-barcode-58bafb860b060c609a01815657b4df22ce8fbffc.tar.zst
UIC-barcode-58bafb860b060c609a01815657b4df22ce8fbffc.zip
Diffstat (limited to 'src/main/java/org/uic/barcode/ticket/api')
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/impl/SimpleTraveler.java2
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/utils/OpenAsn2ApiDecoder.java4
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/utils/OpenAsn2ApiDecoderV2.java4
-rw-r--r--src/main/java/org/uic/barcode/ticket/api/utils/OpenAsn2ApiDecoderV3.java6
4 files changed, 11 insertions, 5 deletions
diff --git a/src/main/java/org/uic/barcode/ticket/api/impl/SimpleTraveler.java b/src/main/java/org/uic/barcode/ticket/api/impl/SimpleTraveler.java
index afc351d..e7edd45 100644
--- a/src/main/java/org/uic/barcode/ticket/api/impl/SimpleTraveler.java
+++ b/src/main/java/org/uic/barcode/ticket/api/impl/SimpleTraveler.java
@@ -53,7 +53,7 @@ public class SimpleTraveler implements ITraveler {
protected IPassengerType passengerType;
/** The passenger with reduced mobility. */
- protected boolean passengerWithReducedMobility;
+ protected Boolean passengerWithReducedMobility;
/** The country of residence. */
protected int countryOfResidence = 0;
diff --git a/src/main/java/org/uic/barcode/ticket/api/utils/OpenAsn2ApiDecoder.java b/src/main/java/org/uic/barcode/ticket/api/utils/OpenAsn2ApiDecoder.java
index 031d5b3..f4e041f 100644
--- a/src/main/java/org/uic/barcode/ticket/api/utils/OpenAsn2ApiDecoder.java
+++ b/src/main/java/org/uic/barcode/ticket/api/utils/OpenAsn2ApiDecoder.java
@@ -356,12 +356,14 @@ public class OpenAsn2ApiDecoder implements Asn2ApiDecoder {
private IDelayConfirmation convertDelayConfirmation(DelayConfirmation asnDocument, Date issuingDate) {
IDelayConfirmation document = factory.createDelayConfirmation();
- document.setReference(UicEncoderUtils.mapToString(asnDocument.getReferenceNum().longValue(),asnDocument.getReferenceIA5()));
+ document.setReference(UicEncoderUtils.mapToString(asnDocument.getReferenceNum(),asnDocument.getReferenceIA5()));
document.setExtension(convertExtension(asnDocument.getExtension()));
document.setInfoText(asnDocument.getInfoText());
+ document.setTrain(UicEncoderUtils.mapToString(asnDocument.getTrainNum(), asnDocument.getTrainIA5()));
+
if (asnDocument.getStationCodeTable()!=null){
document.setStationCodeTable(IStationCodeTable.valueOf(asnDocument.getStationCodeTable().name()));
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/utils/OpenAsn2ApiDecoderV2.java b/src/main/java/org/uic/barcode/ticket/api/utils/OpenAsn2ApiDecoderV2.java
index 1d50cb8..57d2366 100644
--- a/src/main/java/org/uic/barcode/ticket/api/utils/OpenAsn2ApiDecoderV2.java
+++ b/src/main/java/org/uic/barcode/ticket/api/utils/OpenAsn2ApiDecoderV2.java
@@ -358,12 +358,14 @@ public class OpenAsn2ApiDecoderV2 implements Asn2ApiDecoder {
private IDelayConfirmation convertDelayConfirmation(DelayConfirmation asnDocument, Date issuingDate) {
IDelayConfirmation document = factory.createDelayConfirmation();
- document.setReference(UicEncoderUtils.mapToString(asnDocument.getReferenceNum().longValue(),asnDocument.getReferenceIA5()));
+ document.setReference(UicEncoderUtils.mapToString(asnDocument.getReferenceNum(),asnDocument.getReferenceIA5()));
document.setExtension(convertExtension(asnDocument.getExtension()));
document.setInfoText(asnDocument.getInfoText());
+ document.setTrain(UicEncoderUtils.mapToString(asnDocument.getTrainNum(), asnDocument.getTrainIA5()));
+
if (asnDocument.getStationCodeTable()!=null){
document.setStationCodeTable(IStationCodeTable.valueOf(asnDocument.getStationCodeTable().toString()));
}
diff --git a/src/main/java/org/uic/barcode/ticket/api/utils/OpenAsn2ApiDecoderV3.java b/src/main/java/org/uic/barcode/ticket/api/utils/OpenAsn2ApiDecoderV3.java
index 20d2319..9521858 100644
--- a/src/main/java/org/uic/barcode/ticket/api/utils/OpenAsn2ApiDecoderV3.java
+++ b/src/main/java/org/uic/barcode/ticket/api/utils/OpenAsn2ApiDecoderV3.java
@@ -361,12 +361,14 @@ public class OpenAsn2ApiDecoderV3 implements Asn2ApiDecoder {
private IDelayConfirmation convertDelayConfirmation(DelayConfirmation asnDocument, Date issuingDate) {
IDelayConfirmation document = factory.createDelayConfirmation();
- document.setReference(UicEncoderUtils.mapToString(asnDocument.getReferenceNum().longValue(),asnDocument.getReferenceIA5()));
+ document.setReference(UicEncoderUtils.mapToString(asnDocument.getReferenceNum(),asnDocument.getReferenceIA5()));
document.setExtension(convertExtension(asnDocument.getExtension()));
- document.setInfoText(asnDocument.getInfoText());
+ document.setInfoText(asnDocument.getInfoText());
+ document.setTrain(UicEncoderUtils.mapToString(asnDocument.getTrainNum(), asnDocument.getTrainIA5()));
+
if (asnDocument.getStationCodeTable()!=null){
document.setStationCodeTable(IStationCodeTable.valueOf(asnDocument.getStationCodeTable().toString()));
}