OWLOntology ontology; if (source instanceof OWLOntologyKnowledgeSource) { ontology = ((OWLOntologyKnowledgeSource) source).createOWLOntology(manager); owlAPIOntologies.add(ontology); } else {
public static void main(String[] args) throws Exception { OWLOntologyManager man = OWLManager.createOWLOntologyManager(); OWLOntology schema = //man.loadOntology(IRI.create("http://downloads.dbpedia.org/2016-10/dbpedia_2016-10.nt")); man.loadOntology(IRI.create("file:///tmp/merged.ttl")); OWLOntologyKnowledgeSource sampleKS = new OWLAPIOntology(schema); sampleKS.init(); final long start = System.currentTimeMillis(); OWLAPIReasoner baseReasoner = new OWLAPIReasoner(sampleKS); baseReasoner.setReasonerImplementation(ReasonerImplementation.STRUCTURAL); baseReasoner.init(); ClosedWorldReasoner reasoner = new ClosedWorldReasoner(baseReasoner); reasoner.init(); System.out.println(PeriodFormat.getDefault().print(new Period(System.currentTimeMillis() - start))); }
ontology = ((OWLOntologyKnowledgeSource) source).createOWLOntology(manager); owlAPIOntologies.add(ontology); }else{
sampleKS.init();