diff --git a/.classpath b/.classpath
index a2c0a5a9..f4e2833e 100644
--- a/.classpath
+++ b/.classpath
@@ -185,6 +185,6 @@
-
+
diff --git a/lib/ots_1.0.41.jar b/lib/ots_1.0.41.jar
deleted file mode 100644
index 7eea1db3..00000000
Binary files a/lib/ots_1.0.41.jar and /dev/null differ
diff --git a/lib/ots_1.0.43.jar b/lib/ots_1.0.43.jar
new file mode 100644
index 00000000..7f57ce75
Binary files /dev/null and b/lib/ots_1.0.43.jar differ
diff --git a/testfiles/GLOBE1.JPG b/testfiles/GLOBE1.JPG
new file mode 100644
index 00000000..36a52c25
Binary files /dev/null and b/testfiles/GLOBE1.JPG differ
diff --git a/testfiles/gps.jpg b/testfiles/gps.jpg
new file mode 100644
index 00000000..a0f0167b
Binary files /dev/null and b/testfiles/gps.jpg differ
diff --git a/testfiles/output/3426592.jpg_XmlUnitExpectedOutput.xml b/testfiles/output/3426592.jpg_XmlUnitExpectedOutput.xml
deleted file mode 100644
index a236770b..00000000
--- a/testfiles/output/3426592.jpg_XmlUnitExpectedOutput.xml
+++ /dev/null
@@ -1,244 +0,0 @@
-
-
-
-
-
-
-
-
-
- 1.01
- fmt/43
-
-
-
- 1036284
- Adobe Photoshop Elements 2.0
- 2005:07:15 12:26:58
- 2005-07-15T12:26:58
- 2005:07:15 12:26:58
- /Users/dan179/git/git-daveneiman/fits/testfiles/3426592.jpg
- 3426592.jpg
- ac780de154d1eedff7fec0a22173f7d7
- 1460585102000
-
-
- true
- true
- Value offset not word-aligned: 75 offset=732
- Value offset not word-aligned: 91 offset=744
- Value offset not word-aligned: 139 offset=756
- Value offset not word-aligned: 163 offset=780
-
-
-
- big endian
- JPEG
- 1220
- 1462
- YCbCr
- 0 0 0 0 0 0
- 0.0
- 2 2
- 0 0 0
- 0.0
- Unknown (0)
- 0
- normal*
- in.
- 1200
- 1200
- 8 8 8
- 3
- 0
- 0
- Adobe Photoshop Elements 2.0
- 0
- 0
- 0, 0
- 0
- 0
- unknown
- 0 m
- 0.0
- Flash did not fire
- 0.0
- 0
- Unknown (0)
- Not defined
- 1
- 0.0
- 1.0
- 0.0
- 1.0
- 0.0
- 3737950.0
-
-
-
- big endian
-
- JPEG
-
-
-
-
- 1220
- 1462
-
- YCbCr
-
-
- 2
- 2
-
-
-
- 0
- 100
-
-
- 0
- 100
-
-
- 0
- 100
-
-
-
-
-
- Y
-
- 0
- 100
-
-
- 0
- 100
-
-
-
- Cb
-
- 0
- 100
-
-
- 0
- 100
-
-
-
- Cr
-
- 0
- 100
-
-
- 0
- 100
-
-
-
-
-
-
-
-
- 2005-07-15T16:26:58.0Z
-
-
-
- Adobe Photoshop Elements 2.0
-
-
-
-
-
-
- 0.0
- 0.0
- Not defined
-
- 1
- 1
-
-
- 100
- 100
-
-
- 0
- 1
-
-
- 0
- 1
-
-
- 100
- 100
-
- unknown
- Flash did not fire
- 0.0
-
-
-
- normal*
-
-
-
- in.
-
- 1200
- 1
-
-
- 1200
- 1
-
-
-
-
- 8
- 8
- 8
- integer
-
- 3
-
-
- 0
- 1
-
-
- 0
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/testfiles/output/GLOBE1.JPG_XmlUnitExpectedOutput.xml b/testfiles/output/GLOBE1.JPG_XmlUnitExpectedOutput.xml
new file mode 100644
index 00000000..6b48cfb2
--- /dev/null
+++ b/testfiles/output/GLOBE1.JPG_XmlUnitExpectedOutput.xml
@@ -0,0 +1,115 @@
+
+
+
+
+
+
+
+
+
+ 1.01
+ fmt/43
+
+
+
+ 49220
+ /Users/dan179/git/git-daveneiman/fits/testfiles/GLOBE1.JPG
+ GLOBE1.JPG
+ 97a5f169b4e0db02a982af7fcc5433de
+ 1488303425000
+
+
+ true
+ true
+
+
+
+ big endian
+ JPEG
+ 582
+ 597
+ YCbCr
+ 2 2
+ no absolute unit of measurement
+ 1
+ 1
+ 8 8 8
+ 3
+ unknown
+
+
+
+ big endian
+
+ JPEG
+
+
+
+
+ 582
+ 597
+
+ YCbCr
+
+
+ 2
+ 2
+
+
+
+
+
+
+
+
+
+
+
+ unknown
+
+
+
+
+
+
+ no absolute unit of measurement
+
+ 1
+ 1
+
+
+ 1
+ 1
+
+
+
+
+ 8
+ 8
+ 8
+ integer
+
+ 3
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/testfiles/output/gps.jpg_XmlUnitExpectedOutput.xml b/testfiles/output/gps.jpg_XmlUnitExpectedOutput.xml
new file mode 100644
index 00000000..85148c62
--- /dev/null
+++ b/testfiles/output/gps.jpg_XmlUnitExpectedOutput.xml
@@ -0,0 +1,223 @@
+
+
+
+
+
+
+
+
+ 2.2.1
+ 2.21
+ 1.01
+ fmt/645
+
+
+
+ 41851
+ FinePix F30
+ Digital Camera FinePix F30 Ver1.02
+ 2006:11:03 02:26:02
+ 2006-11-03T02:26:02
+ 2006:11:03 07:14:39
+ 2006:11:03 02:26:02
+ /Users/dan179/git/git-daveneiman/fits/testfiles/gps.jpg
+ gps.jpg
+ 201f1db44775631d307b3ffd62acb3ac
+ 1487953518000
+
+
+
+
+ JPEG (old-style)
+ 600
+ 800
+ 2 2
+ 2
+ normal*
+ in.
+ 72
+ 72
+ 8 8 8
+ digital still camera
+ FUJIFILM
+ FinePix F30
+ Digital Camera FinePix F30 Ver1.02
+ 2.8
+ 0.0083
+ 0.008333333333333333
+ Normal program
+ 400
+ 0221
+ 1220
+ 1/124
+ 2.8
+ 3.0
+ 3.02
+ 0
+ 2.8
+ 3.0
+ Pattern
+ unknown
+ 8.0
+ One-chip color area sensor
+ 2.2.0.0
+ N
+ 33 deg 24' 51.80" N
+ E
+ 130 deg 33' 31.40" E
+ 22:14:39
+ A
+ WGS-84
+ 2006-11-02
+ 3737910
+
+
+
+
+ JPEG (old-style)
+
+
+
+
+ 600
+ 800
+
+
+
+ 2
+ 2
+
+
+
+
+
+
+
+ 2006-11-03T12:14:39.0Z
+ digital still camera
+
+
+
+ Digital Camera FinePix F30 Ver1.02
+
+
+
+ FUJIFILM
+
+ FinePix F30
+
+
+
+ 2.8
+ 0.0083
+ Normal program
+ 400
+ 0221
+
+ 1
+ 124
+
+
+ 280
+ 100
+
+
+ 302
+ 100
+
+
+ 0
+ 1
+
+
+ 280
+ 100
+
+ Pattern
+ unknown
+ 8.0
+ One-chip color area sensor
+
+
+ 2.2.0.0
+ N
+
+
+ 33
+ 1
+
+
+ 24
+ 1
+
+
+ 5180
+ 100
+
+
+ E
+
+
+ 130
+ 1
+
+
+ 33
+ 1
+
+
+ 3140
+ 100
+
+
+ 22:14:39
+ A
+ WGS-84
+ 2006-11-02
+
+
+
+ normal*
+
+
+
+ in.
+
+ 72
+ 1
+
+
+ 72
+ 1
+
+
+
+
+ 8
+ 8
+ 8
+ integer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/edu/harvard/hul/ois/fits/junit/MixTest.java b/tests/edu/harvard/hul/ois/fits/junit/MixTest.java
index 93196905..fcab68fa 100644
--- a/tests/edu/harvard/hul/ois/fits/junit/MixTest.java
+++ b/tests/edu/harvard/hul/ois/fits/junit/MixTest.java
@@ -136,14 +136,29 @@ public void testJpgExif() throws Exception {
XMLOutputter serializer = new XMLOutputter(Format.getPrettyFormat());
serializer.output(fitsOut.getFitsXml(), System.out);
+
+ XMLOutputFactory xmlof = XMLOutputFactory.newInstance();
+ XMLStreamWriter writer = xmlof.createXMLStreamWriter(System.out);
- Mix mix = (Mix)fitsOut.getStandardXmlContent();
- mix.setRoot(true);
+ fitsOut.addStandardCombinedFormat(); // output all data to file
+ fitsOut.saveToDisk("test-generated-output/" + filename + "_Output.xml");
+
+ }
+
+ @Test
+ public void testJpgJfif() throws Exception {
+
+ String filename = "gps.jpg";
+ File input = new File("testfiles/" + filename);
+
+ FitsOutput fitsOut = fits.examine(input);
+
+ XMLOutputter serializer = new XMLOutputter(Format.getPrettyFormat());
+ serializer.output(fitsOut.getFitsXml(), System.out);
XMLOutputFactory xmlof = XMLOutputFactory.newInstance();
XMLStreamWriter writer = xmlof.createXMLStreamWriter(System.out);
- mix.output(writer);
fitsOut.addStandardCombinedFormat(); // output all data to file
fitsOut.saveToDisk("test-generated-output/" + filename + "_Output.xml");
diff --git a/tests/edu/harvard/hul/ois/fits/junit/MixXmlUnitTest.java b/tests/edu/harvard/hul/ois/fits/junit/MixXmlUnitTest.java
index 14fd5721..0979c127 100644
--- a/tests/edu/harvard/hul/ois/fits/junit/MixXmlUnitTest.java
+++ b/tests/edu/harvard/hul/ois/fits/junit/MixXmlUnitTest.java
@@ -152,9 +152,9 @@ public void testUncompressedTif() throws Exception {
}
@Test
- public void testMixJpg() throws Exception {
+ public void testJpgExif() throws Exception {
- String inputFilename = "3426592.jpg";
+ String inputFilename = "ICFA.KC.BIA.1524-small.jpg";
File input = new File("testfiles/" + inputFilename);
FitsOutput fitsOut = fits.examine(input);
@@ -185,9 +185,9 @@ public void testMixJpg() throws Exception {
}
@Test
- public void testJpgExif() throws Exception {
+ public void testJpgExif2() throws Exception {
- String inputFilename = "ICFA.KC.BIA.1524-small.jpg";
+ String inputFilename = "gps.jpg";
File input = new File("testfiles/" + inputFilename);
FitsOutput fitsOut = fits.examine(input);
@@ -195,13 +195,32 @@ public void testJpgExif() throws Exception {
XMLOutputter serializer = new XMLOutputter(Format.getPrettyFormat());
serializer.output(fitsOut.getFitsXml(), System.out);
- Mix mix = (Mix)fitsOut.getStandardXmlContent();
- mix.setRoot(true);
-
- XMLOutputFactory xmlof = XMLOutputFactory.newInstance();
- XMLStreamWriter writer = xmlof.createXMLStreamWriter(System.out);
+ fitsOut.addStandardCombinedFormat(); // output all data to file
+ fitsOut.saveToDisk("test-generated-output/" + inputFilename + ACTUAL_OUTPUT_FILE_SUFFIX);
+
+ String actualXmlStr = serializer.outputString(fitsOut.getFitsXml());
+
+ // Read in the expected XML file
+ Scanner scan = new Scanner(new File(
+ "testfiles/output/" + inputFilename + EXPECTED_OUTPUT_FILE_SUFFIX));
+ String expectedXmlStr = scan.
+ useDelimiter("\\Z").next();
+ scan.close();
+
+ testActualAgainstExpected(actualXmlStr, expectedXmlStr, inputFilename);
+ }
+
+ @Test
+ public void testJpgJfif() throws Exception {
+
+ String inputFilename = "GLOBE1.JPG";
+ File input = new File("testfiles/" + inputFilename);
+
+ FitsOutput fitsOut = fits.examine(input);
+
+ XMLOutputter serializer = new XMLOutputter(Format.getPrettyFormat());
+ serializer.output(fitsOut.getFitsXml(), System.out);
- mix.output(writer);
fitsOut.addStandardCombinedFormat(); // output all data to file
fitsOut.saveToDisk("test-generated-output/" + inputFilename + ACTUAL_OUTPUT_FILE_SUFFIX);
diff --git a/xml/exiftool/exiftool_common_to_fits.xslt b/xml/exiftool/exiftool_common_to_fits.xslt
index 187c1270..bae932fc 100644
--- a/xml/exiftool/exiftool_common_to_fits.xslt
+++ b/xml/exiftool/exiftool_common_to_fits.xslt
@@ -58,12 +58,12 @@
-
-
-
+
+
+
diff --git a/xml/nlnz/fits/nlnz_jpeg_to_fits.xslt b/xml/nlnz/fits/nlnz_jpeg_to_fits.xslt
index 3e882e40..53c3d6be 100644
--- a/xml/nlnz/fits/nlnz_jpeg_to_fits.xslt
+++ b/xml/nlnz/fits/nlnz_jpeg_to_fits.xslt
@@ -9,12 +9,12 @@
-
-
-
+
+
+