@@ -0,0 +1,785 @@
+package fr.eurecom.nerd.inductive.ontology;%0A%0Aimport java.util.List;%0A%0Aimport com.hp.hpl.jena.ontology.OntClass;%0Aimport com.hp.hpl.jena.ontology.OntModel;%0Aimport com.hp.hpl.jena.ontology.OntModelSpec;%0Aimport com.hp.hpl.jena.rdf.model.ModelFactory;%0A%0Aimport junit.framework.TestCase;%0A%0Apublic class OntoToolsTest extends TestCase %7B%0A%09%0A%09public void testParent() %0A%09%7B%0A        OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM, null );%0A%09%09m.read(%22data/dbpedia_3.8.owl%22, %22RDF/XML%22);%0A%09%09%0A        OntoTools tool = new OntoTools();%0A        List%3COntClass%3E list = tool.namedRootsOf(m.getOntClass(%22http://dbpedia.org/ontology/Ambassador%22));%0A        for (OntClass clazz : list) %7B%0A        %09System.out.println(clazz.getURI());%0A        %7D%0A        %0A        assertEquals(1, list.size());%0A%09%7D%0A%7D%0A

test case for OntoTools