Esempio n. 1
0
  @Test
  public void testNonCycle3() throws Exception {
    ParserWrapper parser = new ParserWrapper();
    IRI iri = IRI.create(getResource("verification/self_references.obo").getAbsoluteFile());
    OWLGraphWrapper graph = parser.parseToOWLGraph(iri.toString());

    OntologyCheck check = new CycleCheck();

    Collection<CheckWarning> warnings = check.check(graph, graph.getAllOWLObjects());
    assertTrue(warnings.isEmpty());
  }
Esempio n. 2
0
  @Test
  public void testCycle1() throws Exception {
    ParserWrapper parser = new ParserWrapper();
    IRI iri = IRI.create(getResource("verification/cycle.obo").getAbsoluteFile());
    OWLGraphWrapper graph = parser.parseToOWLGraph(iri.toString());

    OntologyCheck check = new CycleCheck();

    Collection<CheckWarning> warnings = check.check(graph, graph.getAllOWLObjects());
    assertEquals(1, warnings.size());
    CheckWarning warning = warnings.iterator().next();
    List<IRI> iris = warning.getIris();
    assertEquals(3, iris.size());
  }