From 1541849d2dc6b3783fc309a64a1ebf3364453434 Mon Sep 17 00:00:00 2001
From: brutzman <brutzman@nps.edu>
Date: Mon, 3 Jan 2022 14:17:16 -0800
Subject: [PATCH] add created, modified date entries

---
 .../OpenDis7Examples/ExampleTrackInterpolation.x3d  |  4 +++-
 .../ExampleTrackInterpolationLog.txt                |  8 +++++---
 examples/src/OpenDis7Examples/PduTrack.java         | 13 ++++++++++++-
 .../src/OpenDis7Examples/PduTrackInterpolation.x3d  |  6 ++++--
 examples/src/OpenDis7Examples/PduTrackLog.txt       |  6 ++++--
 5 files changed, 28 insertions(+), 9 deletions(-)

diff --git a/examples/src/OpenDis7Examples/ExampleTrackInterpolation.x3d b/examples/src/OpenDis7Examples/ExampleTrackInterpolation.x3d
index 4d55ca27db..8599fb0d3b 100644
--- a/examples/src/OpenDis7Examples/ExampleTrackInterpolation.x3d
+++ b/examples/src/OpenDis7Examples/ExampleTrackInterpolation.x3d
@@ -3,9 +3,11 @@
 <X3D profile='Interchange' version='4.0' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-4.0.xsd'>
   <head>
     <meta content='ExampleTrackInterpolation.x3d' name='title'/>
+    <meta content='Conversion of ESPDU track into X3D animation interpolators and LineSet.' name='description'/>
+    <meta content='3 January 2022' name='created'/>
+    <meta content='3 January 2022' name='modified'/>
     <meta content='Don Brutzman' name='creator'/>
     <meta content='https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/blob/master/examples/src/OpenDis7Examples/ExampleTrackInterpolation.x3d' name='identifier'/>
-    <meta content='Conversion of ESPDU track into X3D animation interpolators and LineSet.' name='description'/>
     <meta content='PduTrack utility, open-dis7-java Library https://github.com/open-dis/open-dis7-java' name='generator'/>
     <meta content='NPS MOVES MV3500 Networked Graphics https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500' name='reference'/>
     <meta content='X3D Resources https://www.web3d.org/x3d/content/examples/X3dResources.html' name='reference'/>
diff --git a/examples/src/OpenDis7Examples/ExampleTrackInterpolationLog.txt b/examples/src/OpenDis7Examples/ExampleTrackInterpolationLog.txt
index 22e69a5374..7285ca937d 100644
--- a/examples/src/OpenDis7Examples/ExampleTrackInterpolationLog.txt
+++ b/examples/src/OpenDis7Examples/ExampleTrackInterpolationLog.txt
@@ -13,7 +13,7 @@ run-single:
 [DisThreadedNetworkInterface] createThreads() sendingThread.isAlive()=true
 Network confirmation: address=239.1.2.3 port=3000
 Beginning pdu save to directory ./pduLog
-Recorder log file open: C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\pduLog\PduCaptureLog175.dislog
+Recorder log file open: C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\pduLog\PduCaptureLog176.dislog
 [DisThreadedNetworkInterface] using network interface Intel(R) Wi-Fi 6E AX210 160MHz
 [DisThreadedNetworkInterface] datagramSocket.joinGroup  address=239.1.2.3 port=3000 isConnected()=false createDatagramSocket() complete.
 [DisThreadedNetworkInterface] createThreads() receiveThread.isAlive()=true
@@ -72,9 +72,11 @@ pduTrack_1 duration = 42.0 seconds = 0 ticks
 <X3D profile='Interchange' version='4.0' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-4.0.xsd'>
   <head>
     <meta content='ExampleTrackInterpolation.x3d' name='title'/>
+    <meta content='Conversion of ESPDU track into X3D animation interpolators and LineSet.' name='description'/>
+    <meta content='3 January 2022' name='created'/>
+    <meta content='3 January 2022' name='modified'/>
     <meta content='Don Brutzman' name='creator'/>
     <meta content='https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/blob/master/examples/src/OpenDis7Examples/ExampleTrackInterpolation.x3d' name='identifier'/>
-    <meta content='Conversion of ESPDU track into X3D animation interpolators and LineSet.' name='description'/>
     <meta content='PduTrack utility, open-dis7-java Library https://github.com/open-dis/open-dis7-java' name='generator'/>
     <meta content='NPS MOVES MV3500 Networked Graphics https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500' name='reference'/>
     <meta content='X3D Resources https://www.web3d.org/x3d/content/examples/X3dResources.html' name='reference'/>
@@ -244,6 +246,6 @@ pduTrack_1 duration = 42.0 seconds = 0 ticks
 *** killThread() status: receiveThread.isAlive()=false receiveThread.isInterrupted()=true
 *** Thread close status: sendingThread.isAlive()=false receiveThread.isAlive()=false
 
-PduRecorder.stop() closing recorder log file: C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\pduLog\PduCaptureLog175.dislog
+PduRecorder.stop() closing recorder log file: C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\pduLog\PduCaptureLog176.dislog
 [OpenDis7Examples.ExampleTrackInterpolation] complete.
 BUILD SUCCESSFUL (total time: 12 seconds)
diff --git a/examples/src/OpenDis7Examples/PduTrack.java b/examples/src/OpenDis7Examples/PduTrack.java
index 3a2a5cd9ff..38b2811fb3 100644
--- a/examples/src/OpenDis7Examples/PduTrack.java
+++ b/examples/src/OpenDis7Examples/PduTrack.java
@@ -40,7 +40,10 @@ import edu.nps.moves.dis7.pdus.EntityStatePdu;
 import edu.nps.moves.dis7.pdus.EulerAngles;
 import edu.nps.moves.dis7.pdus.Pdu;
 import edu.nps.moves.dis7.pdus.Vector3Double;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
 import java.util.ArrayList;
+import java.util.Date;
 
 /**
  * Create a track from DIS ESPDUs
@@ -567,11 +570,19 @@ public class PduTrack
         sb.append("  <head>").append("\n");
         if (!getX3dModelName().isEmpty())
             sb.append("    <meta content='").append(getX3dModelName()).append("' name='title'/>").append("\n");
+        sb.append("    <meta content='Conversion of ESPDU track into X3D animation interpolators and LineSet.' name='description'/>").append("\n");
+        
+        // https://docs.oracle.com/javase/tutorial/datetime/TOC.html
+        // https://stackoverflow.com/questions/5175728/how-to-get-the-current-date-time-in-java/5175900
+        DateFormat dateFormat = new SimpleDateFormat("d MMMM yyyy");
+        Date date = new Date();
+        sb.append("    <meta content='").append(dateFormat.format(date)).append("' name='created'/>").append("\n");
+        sb.append("    <meta content='").append(dateFormat.format(date)).append("' name='modified'/>").append("\n");
         if (!getAuthor().isEmpty())
             sb.append("    <meta content='").append(getAuthor()).append("' name='creator'/>").append("\n");
         if (!getX3dModelIdentifier().isEmpty())
             sb.append("    <meta content='").append(getX3dModelIdentifier()).append("' name='identifier'/>").append("\n");
-        sb.append("    <meta content='Conversion of ESPDU track into X3D animation interpolators and LineSet.' name='description'/>").append("\n");
+        
         sb.append("    <meta content='PduTrack utility, open-dis7-java Library https://github.com/open-dis/open-dis7-java' name='generator'/>").append("\n");
         sb.append("    <meta content='NPS MOVES MV3500 Networked Graphics https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500' name='reference'/>").append("\n");
         sb.append("    <meta content='X3D Resources https://www.web3d.org/x3d/content/examples/X3dResources.html' name='reference'/>").append("\n");
diff --git a/examples/src/OpenDis7Examples/PduTrackInterpolation.x3d b/examples/src/OpenDis7Examples/PduTrackInterpolation.x3d
index b6ea1ad27c..f05f64a93c 100644
--- a/examples/src/OpenDis7Examples/PduTrackInterpolation.x3d
+++ b/examples/src/OpenDis7Examples/PduTrackInterpolation.x3d
@@ -3,9 +3,11 @@
 <X3D profile='Interchange' version='4.0' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-4.0.xsd'>
   <head>
     <meta content='PduTrackInterpolation.x3d' name='title'/>
+    <meta content='Conversion of ESPDU track into X3D animation interpolators and LineSet.' name='description'/>
+    <meta content='3 January 2022' name='created'/>
+    <meta content='3 January 2022' name='modified'/>
     <meta content='Don Brutzman' name='creator'/>
     <meta content='https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/blob/master/examples/src/OpenDis7Examples/PduTrackInterpolation.x3d' name='identifier'/>
-    <meta content='Conversion of ESPDU track into X3D animation interpolators and LineSet.' name='description'/>
     <meta content='PduTrack utility, open-dis7-java Library https://github.com/open-dis/open-dis7-java' name='generator'/>
     <meta content='NPS MOVES MV3500 Networked Graphics https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500' name='reference'/>
     <meta content='X3D Resources https://www.web3d.org/x3d/content/examples/X3dResources.html' name='reference'/>
@@ -55,4 +57,4 @@
     <ROUTE fromField='value_changed' fromNode='PduTrackSelfTestPositions' toField='translation' toNode='AnimationTransform'/>
     <ROUTE fromField='value_changed' fromNode='PduTrackSelfTestOrientations' toField='rotation' toNode='AnimationTransform'/>
   </Scene>
-</X3D>
\ No newline at end of file
+</X3D>
diff --git a/examples/src/OpenDis7Examples/PduTrackLog.txt b/examples/src/OpenDis7Examples/PduTrackLog.txt
index 0b2504b53a..070653230f 100644
--- a/examples/src/OpenDis7Examples/PduTrackLog.txt
+++ b/examples/src/OpenDis7Examples/PduTrackLog.txt
@@ -17,9 +17,11 @@ run-single:
 <X3D profile='Interchange' version='4.0' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-4.0.xsd'>
   <head>
     <meta content='PduTrackInterpolation.x3d' name='title'/>
+    <meta content='Conversion of ESPDU track into X3D animation interpolators and LineSet.' name='description'/>
+    <meta content='3 January 2022' name='created'/>
+    <meta content='3 January 2022' name='modified'/>
     <meta content='Don Brutzman' name='creator'/>
     <meta content='https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/blob/master/examples/src/OpenDis7Examples/PduTrackInterpolation.x3d' name='identifier'/>
-    <meta content='Conversion of ESPDU track into X3D animation interpolators and LineSet.' name='description'/>
     <meta content='PduTrack utility, open-dis7-java Library https://github.com/open-dis/open-dis7-java' name='generator'/>
     <meta content='NPS MOVES MV3500 Networked Graphics https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500' name='reference'/>
     <meta content='X3D Resources https://www.web3d.org/x3d/content/examples/X3dResources.html' name='reference'/>
@@ -74,4 +76,4 @@ run-single:
 =================================
 [PduTrack main() self test] selfTest() complete.
 *** PduTrack main() self test complete.
-BUILD SUCCESSFUL (total time: 1 second)
+BUILD SUCCESSFUL (total time: 2 seconds)
-- 
GitLab