summaryrefslogtreecommitdiffstats
path: root/src/org/uic/barcode/staticFrame/UFLEXDataRecord.java
diff options
context:
space:
mode:
authorCGantert345 <57003061+CGantert345@users.noreply.github.com>2021-03-29 14:08:45 +0200
committerCGantert345 <57003061+CGantert345@users.noreply.github.com>2021-03-29 14:08:45 +0200
commite023e674020f1a435f7b8c8b9276704f576ea6e5 (patch)
tree011863c021df3e5356f07b056d30d0e7476061e4 /src/org/uic/barcode/staticFrame/UFLEXDataRecord.java
parentMerge pull request #13 from UnionInternationalCheminsdeFer/time_zone_fix_3 (diff)
downloadUIC-barcode-e023e674020f1a435f7b8c8b9276704f576ea6e5.tar
UIC-barcode-e023e674020f1a435f7b8c8b9276704f576ea6e5.tar.gz
UIC-barcode-e023e674020f1a435f7b8c8b9276704f576ea6e5.tar.bz2
UIC-barcode-e023e674020f1a435f7b8c8b9276704f576ea6e5.tar.lz
UIC-barcode-e023e674020f1a435f7b8c8b9276704f576ea6e5.tar.xz
UIC-barcode-e023e674020f1a435f7b8c8b9276704f576ea6e5.tar.zst
UIC-barcode-e023e674020f1a435f7b8c8b9276704f576ea6e5.zip
Diffstat (limited to 'src/org/uic/barcode/staticFrame/UFLEXDataRecord.java')
-rw-r--r--src/org/uic/barcode/staticFrame/UFLEXDataRecord.java90
1 files changed, 0 insertions, 90 deletions
diff --git a/src/org/uic/barcode/staticFrame/UFLEXDataRecord.java b/src/org/uic/barcode/staticFrame/UFLEXDataRecord.java
deleted file mode 100644
index fad2be8..0000000
--- a/src/org/uic/barcode/staticFrame/UFLEXDataRecord.java
+++ /dev/null
@@ -1,90 +0,0 @@
-package org.uic.barcode.staticFrame;
-
-import java.io.IOException;
-
-import org.uic.barcode.ticket.EncodingFormatException;
-import org.uic.barcode.ticket.UicRailTicketCoder;
-import org.uic.barcode.ticket.api.spec.IUicRailTicket;
-
-/**
- * The Class UFLEXDataRecord implements the dara record to hold the data of an ASN.1 PER encoded UIC ticket.
- */
-public class UFLEXDataRecord extends DataRecord {
-
-
- /** The ticket. */
- private IUicRailTicket ticket;
-
- /**
- * Instantiates a new UFLEX data record.
- */
- public UFLEXDataRecord() {
- super("U_FLEX");
- }
-
- /**
- * Instantiates a new UFLEX data record.
- *
- * @param version the version
- */
- public UFLEXDataRecord(String version) {
- super("U_FLEX", version);
- }
-
-
- /**
- * Gets the ticket.
- *
- * @return the ticket
- * @throws IOException Signals that an I/O exception has occurred.
- * @throws EncodingFormatException the encoding format exception
- */
- public IUicRailTicket getTicket() throws IOException, EncodingFormatException {
- if (ticket != null) {
- return ticket;
- }
- return null;
- }
-
- /**
- * Sets the ticket.
- *
- * @param ticket the new ticket
- * @throws IOException Signals that an I/O exception has occurred.
- * @throws EncodingFormatException the encoding format exception
- */
- public void setTicket(IUicRailTicket ticket) throws IOException, EncodingFormatException {
- this.ticket = ticket;
- super.setData(null);
- }
-
-
- /**
- * Decode content.
- *
- * @throws IOException Signals that an I/O exception has occurred.
- * @throws EncodingFormatException the encoding format exception
- */
- @Override
- protected void decodeContent() throws IOException, EncodingFormatException {
- UicRailTicketCoder coder = new UicRailTicketCoder();
- int version = Integer.parseInt(super.getVersionId());
- this.ticket = coder.decodeFromAsn(content,version);
- }
-
- /**
- * Encode content.
- *
- * @throws IOException Signals that an I/O exception has occurred.
- * @throws EncodingFormatException the encoding format exception
- */
- @Override
- protected void encodeContent() throws IOException, EncodingFormatException {
- UicRailTicketCoder coder = new UicRailTicketCoder();
- int version = Integer.parseInt(super.getVersionId());
- content = coder.encode(ticket, version);
- }
-
-
-
-}