Skip to content

Commit

Permalink
Merge pull request #122 from daveneiman/adjust_TIFF_output_to_MIX
Browse files Browse the repository at this point in the history
LIBDRS-5209 - Latest FITS failing to generate MIX for some TIFF's
  • Loading branch information
daveneiman authored Dec 2, 2016
2 parents 609c1ee + bb80bf2 commit 3601615
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand Down
11 changes: 5 additions & 6 deletions tests/edu/harvard/hul/ois/fits/junit/MixTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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);
}
Expand Down Expand Up @@ -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");
}
Expand Down
2 changes: 1 addition & 1 deletion version.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
build.version=1.0.3
build.version=1.0.4
3 changes: 0 additions & 3 deletions xml/exiftool/exiftool_common_to_fits.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,6 @@
<xsl:when test="$format='TIFF'">
<xsl:value-of select="string('Tagged Image File Format')"/>
</xsl:when>
<xsl:when test="$format='TIFF EXIF'">
<xsl:value-of select="string('Tagged Image File Format')"/>
</xsl:when>
<xsl:when test="$format='AVI'">
<xsl:value-of select="string('Audio/Video Interleaved Format')"/>
</xsl:when>
Expand Down

0 comments on commit 3601615

Please sign in to comment.