XmlHandler extends edu.harvard.hul.ois.jhove.HandlerBase { protected void showNisoImageMetadata10(NisoImageMetadata niso) { String margin = getIndent(++_level); String[][] attrs = { { "xmlns:mix", "http: { "xmlns:xsi", "http: { "xsi:schemaLocation", "http: _writer.println(margin + elementStart("mix:mix", attrs)); showNisoBasicDigitalObjectInformation10(niso, margin); showNisoBasicImageInformation10(niso, margin); showNisoImageCaptureMetadata10(niso, margin); showNisoImageAssessmentMetadata10(niso, margin); showChangeHistory10(niso, margin); _writer.println(margin + elementEnd("mix:mix")); _level--; } XmlHandler();  XmlHandler(String name, String release, int[] date, String note,
			String rights); @Override void show(); @Override void show(App app); @Override void show(OutputHandler handler); @Override void show(Module module); @Override void show(RepInfo info); @Override void showFooter(); @Override void showHeader(); void rationalToString(StringBuffer buf, String tag, String margin,
			Rational r);  }
@Test public void testShowNisoImageMetadata10() throws IOException { File mix10File = new File(this.getClass() .getResource("mix10_output.xml").getPath()); LOGGER.info("testShowNisoImageMetadata10 with file " + mix10File); assertTrue(mix10File.isFile()); String expectedMix10 = readXmlFile(mix10File); this.handler.showNisoImageMetadata10(TEST_NISO_IMAGE_MD); this.handler.close(); String generatedMix = readXmlFile(outputFile); assertEquals("Mix v1.0 generated not conformant", expectedMix10, generatedMix); }
@Test public void testShowNisoImage2Metadata10() throws IOException { File mix10File = new File(this.getClass() .getResource("mix10_output2.xml").getPath()); LOGGER.info("testShowNisoImage2Metadata10 with file " + mix10File); assertTrue(mix10File.isFile()); String expectedMix10 = readXmlFile(mix10File); this.handler.showNisoImageMetadata10(TEST_NISO_IMAGE2_MD); this.handler.close(); String generatedMix = readXmlFile(outputFile); assertEquals("Mix v1.0 generated not conformant", expectedMix10, generatedMix); }
@Test public void testShowNisoExifMetadata10() throws IOException { File mix10File = new File(this.getClass().getResource("exif_mix10.xml") .getPath()); LOGGER.info("testShowNisoExifMetadata10 with file " + mix10File); assertTrue(mix10File.isFile()); String expectedMix10 = readXmlFile(mix10File); this.handler.showNisoImageMetadata10(TEST_NISO_EXIF_MD); this.handler.close(); String generatedMix = readXmlFile(outputFile); assertEquals("Exif Mix v1.0 generated not conformant", expectedMix10, generatedMix); }