@Override public boolean test() { // Check if the ontology contains any axioms System.out.println("Number of axioms: " + ontology.getAxiomCount()); // Every ontology has a unique ID. System.out.println("Current Ontology ID: " + ontology.getOntologyID()); // test of CRUD // test of Create System.out.println("Number of children: " + factory.getAllChildInstances().size()); System.out.println("Create a new child "); factory.createChild("Nicola"); System.out.println("Number of children: " + factory.getAllChildInstances().size()); // test of Read Child c = factory.getChild("Nicola"); System.out.println(c.getOwlIndividual()); // TODO: test of Update // test of Delete c.delete(); System.out.println("Number of children: " + factory.getAllChildInstances().size()); // save ABox, TBox, RBox to separate files. try { ontlgAbox = manager.createOntology(ontology.getABoxAxioms(true)); ontlgTbox = manager.createOntology(ontology.getTBoxAxioms(true)); ontlgRbox = manager.createOntology(ontology.getRBoxAxioms(true)); } catch (OWLOntologyCreationException e) { // TODO Auto-generated catch block e.printStackTrace(); } try { manager.saveOntology(ontlgAbox, IRI.create(new File("individual/Abox.owl"))); manager.saveOntology(ontlgTbox, IRI.create(new File("individual/Tbox.owl"))); manager.saveOntology(ontlgRbox, IRI.create(new File("individual/Rbox.owl"))); } catch (OWLOntologyStorageException e) { // TODO Auto-generated catch block e.printStackTrace(); } return true; }