CDAR2Parser implements Parser<ClinicalDocument> { public ClinicalDocument parse(String s, Object... options) { try { return parse(new ByteArrayInputStream(s.getBytes()), options); } catch (IOException e) { throw new ParseException(e); } }  ClinicalDocument parse(String s, Object... options); ClinicalDocument parse(InputStream is, Object... options); ClinicalDocument parse(Source source, Object... options); ClinicalDocument parse(Reader reader, Object... options);  }
@Test public void testParseHITSPDocument() throws Exception { CDAR2Utils.initHITSPC32(); InputStream is = getClass().getResourceAsStream( "/builders/content/document/SampleHITSPC32v25Document.xml"); ClinicalDocument clinicalDocument = parser.parse(is); String result = renderer.render(clinicalDocument, (Object[]) null); Assert.assertTrue(result.length() > 0); }
@Test public void testParseCDADocument() throws Exception { InputStream is = getClass().getResourceAsStream( "/builders/content/document/SampleCDADocument.xml"); ClinicalDocument clinicalDocument = parser.parse(is); String result = renderer.render(clinicalDocument, (Object[]) null); Assert.assertTrue(result.length() > 0); }
@Test public void testParseCCDDocument() throws Exception { CDAR2Utils.initCCD(); InputStream is = getClass().getResourceAsStream( "/builders/content/document/SampleCCDDocument.xml"); ClinicalDocument clinicalDocument = parser.parse(is); String result = renderer.render(clinicalDocument, (Object[]) null); Assert.assertTrue(result.length() > 0); }