summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/uic/barcode/dynamicContent/fdc1
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/uic/barcode/dynamicContent/fdc1')
-rw-r--r--src/main/java/org/uic/barcode/dynamicContent/fdc1/GeoCoordinateSystemType.java1
-rw-r--r--src/main/java/org/uic/barcode/dynamicContent/fdc1/GeoUnitType.java1
-rw-r--r--src/main/java/org/uic/barcode/dynamicContent/fdc1/HemisphereLatitudeType.java1
-rw-r--r--src/main/java/org/uic/barcode/dynamicContent/fdc1/HemisphereLongitudeType.java1
-rw-r--r--src/main/java/org/uic/barcode/dynamicContent/fdc1/TimeStamp.java14
-rw-r--r--src/main/java/org/uic/barcode/dynamicContent/fdc1/UicDynamicContentDataFDC1.java14
6 files changed, 23 insertions, 9 deletions
diff --git a/src/main/java/org/uic/barcode/dynamicContent/fdc1/GeoCoordinateSystemType.java b/src/main/java/org/uic/barcode/dynamicContent/fdc1/GeoCoordinateSystemType.java
index b25ad1a..700c542 100644
--- a/src/main/java/org/uic/barcode/dynamicContent/fdc1/GeoCoordinateSystemType.java
+++ b/src/main/java/org/uic/barcode/dynamicContent/fdc1/GeoCoordinateSystemType.java
@@ -20,7 +20,6 @@
package org.uic.barcode.dynamicContent.fdc1;
-// TODO: Auto-generated Javadoc
/**
* The Enum GeoCoordinateSystemType.
*/
diff --git a/src/main/java/org/uic/barcode/dynamicContent/fdc1/GeoUnitType.java b/src/main/java/org/uic/barcode/dynamicContent/fdc1/GeoUnitType.java
index 4eaa8c9..591e28a 100644
--- a/src/main/java/org/uic/barcode/dynamicContent/fdc1/GeoUnitType.java
+++ b/src/main/java/org/uic/barcode/dynamicContent/fdc1/GeoUnitType.java
@@ -19,7 +19,6 @@
*/
package org.uic.barcode.dynamicContent.fdc1;
-// TODO: Auto-generated Javadoc
/**
* The Enum GeoUnitType.
*/
diff --git a/src/main/java/org/uic/barcode/dynamicContent/fdc1/HemisphereLatitudeType.java b/src/main/java/org/uic/barcode/dynamicContent/fdc1/HemisphereLatitudeType.java
index 5157b0e..b39e599 100644
--- a/src/main/java/org/uic/barcode/dynamicContent/fdc1/HemisphereLatitudeType.java
+++ b/src/main/java/org/uic/barcode/dynamicContent/fdc1/HemisphereLatitudeType.java
@@ -19,7 +19,6 @@
*/
package org.uic.barcode.dynamicContent.fdc1;
-// TODO: Auto-generated Javadoc
/**
* The Enum HemisphereLatitudeType.
*/
diff --git a/src/main/java/org/uic/barcode/dynamicContent/fdc1/HemisphereLongitudeType.java b/src/main/java/org/uic/barcode/dynamicContent/fdc1/HemisphereLongitudeType.java
index c0e33e6..e1e39f0 100644
--- a/src/main/java/org/uic/barcode/dynamicContent/fdc1/HemisphereLongitudeType.java
+++ b/src/main/java/org/uic/barcode/dynamicContent/fdc1/HemisphereLongitudeType.java
@@ -19,7 +19,6 @@
*/
package org.uic.barcode.dynamicContent.fdc1;
-// TODO: Auto-generated Javadoc
/**
* The Enum HemisphereLongitudeType.
*/
diff --git a/src/main/java/org/uic/barcode/dynamicContent/fdc1/TimeStamp.java b/src/main/java/org/uic/barcode/dynamicContent/fdc1/TimeStamp.java
index ecbb226..c2cd8fa 100644
--- a/src/main/java/org/uic/barcode/dynamicContent/fdc1/TimeStamp.java
+++ b/src/main/java/org/uic/barcode/dynamicContent/fdc1/TimeStamp.java
@@ -91,8 +91,11 @@ public class TimeStamp {
this.secondOfDay = time;
}
+
+
+
/**
- * Gets the time.
+ * Gets the current date and time in UTC
*
* @return the date and time of content creation in UTC
*/
@@ -102,17 +105,18 @@ public class TimeStamp {
int dayOfYear = now.getDayOfYear();
if (dayOfYear - day.intValue() > 250) {
- now = now.plusDays(1);
+ now = now.plusYears(1);
}
if (day.intValue() - dayOfYear > 250) {
- now = now.minusDays(1);
+ now = now.minusYears(1);
}
now = now.withDayOfYear(1);
now = now.withSecond(0);
now = now.withHour(0);
now = now.withMinute(0);
- now = now.withDayOfYear(dayOfYear);
+ now = now.withNano(0);
+ now = now.withDayOfYear(day.intValue());
now = now.plusSeconds(secondOfDay);
return Date.from(now.toInstant());
@@ -136,4 +140,6 @@ public class TimeStamp {
}
+
+
}
diff --git a/src/main/java/org/uic/barcode/dynamicContent/fdc1/UicDynamicContentDataFDC1.java b/src/main/java/org/uic/barcode/dynamicContent/fdc1/UicDynamicContentDataFDC1.java
index e8f3695..9957ede 100644
--- a/src/main/java/org/uic/barcode/dynamicContent/fdc1/UicDynamicContentDataFDC1.java
+++ b/src/main/java/org/uic/barcode/dynamicContent/fdc1/UicDynamicContentDataFDC1.java
@@ -11,7 +11,9 @@ import org.uic.barcode.asn1.datatypes.HasExtensionMarker;
import org.uic.barcode.asn1.datatypes.RestrictedString;
import org.uic.barcode.asn1.datatypes.Sequence;
import org.uic.barcode.asn1.uper.UperEncoder;
-import org.uic.barcode.dynamicFrame.DataType;
+import org.uic.barcode.dynamicFrame.api.IData;
+import org.uic.barcode.dynamicFrame.api.SimpleData;
+import org.uic.barcode.dynamicFrame.v1.DataType;
/**
@@ -94,6 +96,14 @@ public class UicDynamicContentDataFDC1 {
return "FDC1";
}
+ public IData getApiDataType() {
+ IData data = new SimpleData();
+ data.setFormat(getFormat());
+ data.setData(UperEncoder.encode(this));
+ return data;
+ }
+
+
public DataType getDataType() {
DataType data = new DataType();
data.setFormat(getFormat());
@@ -181,6 +191,8 @@ public class UicDynamicContentDataFDC1 {
this.timeStamp = timeStamp;
}
+
+
public SequenceOfExtension getExtensions() {
return dynamicContentResponseToChallenge;
}