XmlHandler extends edu.harvard.hul.ois.jhove.HandlerBase { protected void showNisoImageMetadata02(NisoImageMetadata niso) { String margin = getIndent(++_level); String[][] attrs = { { "xmlns:mix", "http: { "xmlns:xsi", "http: { "xsi:schemaLocation", "http: _writer.println(margin + elementStart("mix:mix", attrs)); showNisoBasicImageParameters02(niso, margin); showNisoImageCreation02(niso, margin); showNisoImagingPerformanceAssessment02(niso, margin); showNisoChangeHistory02(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 testShowNisoImageMetadata02() throws IOException { File mix02File = new File(this.getClass() .getResource("mix02_output.xml").getPath()); LOGGER.info("testShowNisoImageMetadata02 with file " + mix02File); assertTrue(mix02File.isFile()); String expectedMix02 = readXmlFile(mix02File); this.handler.showNisoImageMetadata02(TEST_NISO_IMAGE_MD); this.handler.close(); String generatedMix = readXmlFile(outputFile); assertEquals("Mix v0.2 generated not conformant", expectedMix02, generatedMix); }
@Test public void testShowNisoImage2Metadata02() throws IOException { File mix02File = new File(this.getClass() .getResource("mix02_output2.xml").getPath()); LOGGER.info("testShowNisoImage2Metadata02 with file " + mix02File); assertTrue(mix02File.isFile()); String expectedMix02 = readXmlFile(mix02File); this.handler.showNisoImageMetadata02(TEST_NISO_IMAGE2_MD); this.handler.close(); String generatedMix = readXmlFile(outputFile); assertEquals("Mix v0.2 generated not conformant", expectedMix02, generatedMix); }
@Test public void testShowNisoExifMetadata02() throws IOException { File mix02File = new File(this.getClass().getResource("exif_mix02.xml") .getPath()); LOGGER.info("testShowNisoExifMetadata02 with file " + mix02File); assertTrue(mix02File.isFile()); String expectedMix02 = readXmlFile(mix02File); this.handler.showNisoImageMetadata02(TEST_NISO_EXIF_MD); this.handler.close(); String generatedMix = readXmlFile(outputFile); assertEquals("Exif Mix v0.2 generated not conformant", expectedMix02, generatedMix); }