Esempio n. 1
0
 /**
  * Test method for {@link
  * org.arachb.owlbuilder.lib.Narrative#generateOWL(org.arachb.owlbuilder.Owlbuilder)}.
  *
  * @throws Exception
  */
 @Test
 public void testGenerateOWL1arg() throws Exception {
   Narrative n1 = new Narrative(nb1);
   OWLObject owlObj = n1.generateOWL(builder);
   assertNotNull(owlObj);
   assertTrue(owlObj instanceof OWLNamedIndividual);
 }
Esempio n. 2
0
 /**
  * Test method for {@link
  * org.arachb.owlbuilder.lib.Narrative#generateOWL(org.arachb.owlbuilder.Owlbuilder,
  * java.util.Map)}.
  *
  * @throws Exception
  */
 @Test
 public void testGenerateOWL2arg() throws Exception {
   Narrative n1 = new Narrative(nb1);
   Map<String, OWLObject> elements = new HashMap<>();
   OWLObject owlObj = n1.generateOWL(builder, elements);
   assertNotNull(owlObj);
   assertEquals(1, elements.size());
 }
Esempio n. 3
0
 public static Narrative newNarrative(NarrativeStatus status, String html)
     throws IOException, FHIRException {
   Narrative n = new Narrative();
   n.setStatus(status);
   try {
     n.setDiv(new XhtmlParser().parseFragment("<div>" + Utilities.escapeXml(html) + "</div>"));
   } catch (org.hl7.fhir.exceptions.FHIRException e) {
     throw new FHIRException(e.getMessage(), e);
   }
   return n;
 }