public OntologyDB(ArrayList<String> filenames) { // create an empty model this.model = ModelFactory.createOntologyModel(PelletReasonerFactory.THE_SPEC); // this.model = ModelFactory.createDefaultModel(); try { for (String filename : filenames) { // String modelFileName = filename; this.importOntology(filename); } } catch (IllegalArgumentException e) { System.out.println("Caught Exception : " + e.getMessage()); } this.reasoning(); }
public void reloadOWLFile(String file) { // create an empty model // this.model = ModelFactory.createDefaultModel(); this.model = ModelFactory.createOntologyModel(PelletReasonerFactory.THE_SPEC); System.out.println("Load OWL File: " + file); // use the FileManager to find the input file InputStream in = FileManager.get().open(file); if (in == null) { throw new IllegalArgumentException("File: " + file + " not found"); } // read the RDF/XML file model.read(in, null); }
public OntologyDB() { // create an empty model this.model = ModelFactory.createOntologyModel(PelletReasonerFactory.THE_SPEC); this.reasoning(); }