From bb80bf2df3c4755ff8c0fa0da55535a259842773 Mon Sep 17 00:00:00 2001 From: David Neiman Date: Thu, 1 Dec 2016 10:57:07 -0500 Subject: [PATCH] LIBDRS-5209 - Latest FITS failing to generate MIX for some TIFF's --- .../hul/ois/fits/tools/droid/DroidToolOutputter.java | 1 + tests/edu/harvard/hul/ois/fits/junit/MixTest.java | 11 +++++------ version.properties | 2 +- xml/exiftool/exiftool_common_to_fits.xslt | 3 --- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/edu/harvard/hul/ois/fits/tools/droid/DroidToolOutputter.java b/src/edu/harvard/hul/ois/fits/tools/droid/DroidToolOutputter.java index 8e3b1ebe..8c8cfd91 100644 --- a/src/edu/harvard/hul/ois/fits/tools/droid/DroidToolOutputter.java +++ b/src/edu/harvard/hul/ois/fits/tools/droid/DroidToolOutputter.java @@ -73,6 +73,7 @@ private Document createToolData () { mimeType = FitsMetadataValues.getInstance().normalizeMimeType(mimeType); } + // maybe this block should be moved to mapFormatName() ??? if(formatName.equals("Digital Negative (DNG)")) { mimeType="image/x-adobe-dng"; } else if (formatName.equals("Office Open XML Document")) { diff --git a/tests/edu/harvard/hul/ois/fits/junit/MixTest.java b/tests/edu/harvard/hul/ois/fits/junit/MixTest.java index ced5cbe5..1c30c57f 100644 --- a/tests/edu/harvard/hul/ois/fits/junit/MixTest.java +++ b/tests/edu/harvard/hul/ois/fits/junit/MixTest.java @@ -33,7 +33,6 @@ import edu.harvard.hul.ois.fits.Fits; import edu.harvard.hul.ois.fits.FitsOutput; import edu.harvard.hul.ois.fits.tests.AbstractLoggingTest; -import edu.harvard.hul.ois.ots.schemas.DocumentMD.DocumentMD; import edu.harvard.hul.ois.ots.schemas.MIX.Mix; public class MixTest extends AbstractLoggingTest { @@ -50,7 +49,7 @@ public static void beforeClass() throws Exception { XMLUnit.setIgnoreWhitespace(true); XMLUnit.setNormalizeWhitespace(true); fits = new Fits(); - // Use this instead to turn on tool output. + // Use this instead of above line to turn on tool output. // File fitsConfigFile = new File("testfiles/properties/fits-full-with-tool-output.xml"); // fits = new Fits(null, fitsConfigFile); } @@ -92,14 +91,14 @@ public void testUncompressedTif() throws Exception { fitsOut.addStandardCombinedFormat(); serializer.output(fitsOut.getFitsXml(), System.out); - DocumentMD docmd = (DocumentMD)fitsOut.getStandardXmlContent(); + Mix mix = (Mix)fitsOut.getStandardXmlContent(); - if(docmd != null) { - docmd.setRoot(true); + if(mix != null) { + mix.setRoot(true); XMLOutputFactory xmlof = XMLOutputFactory.newInstance(); XMLStreamWriter writer = xmlof.createXMLStreamWriter(System.out); - docmd.output(writer); + mix.output(writer); } fitsOut.saveToDisk("test-generated-output/" + inputFilename + "_Output.xml"); } diff --git a/version.properties b/version.properties index fd9d7a45..98daf1f4 100644 --- a/version.properties +++ b/version.properties @@ -1 +1 @@ -build.version=1.0.3 +build.version=1.0.4 diff --git a/xml/exiftool/exiftool_common_to_fits.xslt b/xml/exiftool/exiftool_common_to_fits.xslt index 4d76d673..e41f69ee 100644 --- a/xml/exiftool/exiftool_common_to_fits.xslt +++ b/xml/exiftool/exiftool_common_to_fits.xslt @@ -100,9 +100,6 @@ - - -