/** * Prebuilt standard configuration for the default OWL reasoner. This configuration is * hybrid forward/backward reasoner. */ public static Reasoner getOWLReasoner() { if (theOWLReasoner == null) theOWLReasoner = OWLFBRuleReasonerFactory.theInstance().create(null); return theOWLReasoner; }
if (capabilities == null) { capabilities = ModelFactory.createDefaultModel(); Resource base = capabilities.createResource(getURI()); base.addProperty(ReasonerVocabulary.nameP, "OWL BRule Reasoner") .addProperty(ReasonerVocabulary.descriptionP, "Experimental OWL reasoner.\n"
if (capabilities == null) { capabilities = ModelFactory.createDefaultModel(); Resource base = capabilities.createResource(getURI()); base.addProperty(ReasonerVocabulary.nameP, "OWL BRule Reasoner") .addProperty(ReasonerVocabulary.descriptionP, "Experimental OWL reasoner.\n"
/** * Prebuilt standard configuration for the default OWL reasoner. This configuration is * hybrid forward/backward reasoner. */ public static Reasoner getOWLReasoner() { if (theOWLReasoner == null) theOWLReasoner = OWLFBRuleReasonerFactory.theInstance().create(null); return theOWLReasoner; }
/** Return the bitflag corresponding to the given reasoner factory */ public int flagFor(ReasonerFactory rf) { if (rf.equals(OWLFBRuleReasonerFactory.theInstance())) { return FB; } else if (rf.equals(OWLMiniReasonerFactory.theInstance())) { return MINI; } else if (rf.equals(OWLMicroReasonerFactory.theInstance())) { return MICRO; } else { throw new ReasonerException("Unrecognized OWL reasoner config in unit test"); } }
/** Return the bitflag corresponding to the given reasoner factory */ public int flagFor(ReasonerFactory rf) { if (rf.equals(OWLFBRuleReasonerFactory.theInstance())) { return FB; } else if (rf.equals(OWLMiniReasonerFactory.theInstance())) { return MINI; } else if (rf.equals(OWLMicroReasonerFactory.theInstance())) { return MICRO; } else { throw new ReasonerException("Unrecognized OWL reasoner config in unit test"); } }
/** * Check cost of creating an empty OWL closure. */ public void temp() { Graph data = Factory.createGraphMem(); Graph data2 = Factory.createGraphMem(); Reasoner reasoner = new OWLFBRuleReasoner(OWLFBRuleReasonerFactory.theInstance()); FBRuleInfGraph infgraph = (FBRuleInfGraph)reasoner.bind(data); FBRuleInfGraph infgraph2 = (FBRuleInfGraph)reasoner.bind(data2); long t1 = System.currentTimeMillis(); infgraph.prepare(); long t2 = System.currentTimeMillis(); System.out.println("Prepare on empty graph = " + (t2-t1) +"ms"); t1 = System.currentTimeMillis(); infgraph2.prepare(); t2 = System.currentTimeMillis(); System.out.println("Prepare on empty graph = " + (t2-t1) +"ms"); }
/** * Check cost of creating an empty OWL closure. */ public void temp() { Graph data = Factory.createGraphMem(); Graph data2 = Factory.createGraphMem(); Reasoner reasoner = new OWLFBRuleReasoner(OWLFBRuleReasonerFactory.theInstance()); FBRuleInfGraph infgraph = (FBRuleInfGraph)reasoner.bind(data); FBRuleInfGraph infgraph2 = (FBRuleInfGraph)reasoner.bind(data2); long t1 = System.currentTimeMillis(); infgraph.prepare(); long t2 = System.currentTimeMillis(); System.out.println("Prepare on empty graph = " + (t2-t1) +"ms"); t1 = System.currentTimeMillis(); infgraph2.prepare(); t2 = System.currentTimeMillis(); System.out.println("Prepare on empty graph = " + (t2-t1) +"ms"); }
/** * Constructor is hidden - go via theRegistry */ private ReasonerRegistry() { allDescriptions = ModelFactory.createDefaultModel(); // Preload the known Jena reasoners register(TransitiveReasonerFactory.theInstance()); register(RDFSRuleReasonerFactory.theInstance()); register(OWLFBRuleReasonerFactory.theInstance()); register(GenericRuleReasonerFactory.theInstance()); register(OWLMicroReasonerFactory.theInstance()); register(OWLMiniReasonerFactory.theInstance()); }
/** * Constructor is hidden - go via theRegistry */ private ReasonerRegistry() { allDescriptions = ModelFactory.createDefaultModel(); // Preload the known Jena reasoners register(TransitiveReasonerFactory.theInstance()); register(RDFSRuleReasonerFactory.theInstance()); register(OWLFBRuleReasonerFactory.theInstance()); register(GenericRuleReasonerFactory.theInstance()); register(OWLMicroReasonerFactory.theInstance()); register(OWLMiniReasonerFactory.theInstance()); }
Model premisesM = FileManager.get().loadModel("file:testing/wg/equivalentClass/premises004.rdf"); Graph data = premisesM.getGraph(); Reasoner reasoner = new OWLFBRuleReasoner(OWLFBRuleReasonerFactory.theInstance()); InfGraph infgraph = reasoner.bind(data); Node rbPrototypeProp = NodeFactory.createURI(ReasonerVocabulary.RBNamespace+"prototype");
Model premisesM = FileManager.get().loadModel("file:testing/wg/equivalentClass/premises004.rdf"); Graph data = premisesM.getGraph(); Reasoner reasoner = new OWLFBRuleReasoner(OWLFBRuleReasonerFactory.theInstance()); InfGraph infgraph = reasoner.bind(data); Node rbPrototypeProp = NodeFactory.createURI(ReasonerVocabulary.RBNamespace+"prototype");
reasoner = OWLFBRuleReasonerFactory.theInstance().create(null);
reasoner = OWLFBRuleReasonerFactory.theInstance().create(null);