/** * <p>Answer the reasoner that will be used to infer additional entailed * triples in the ontology model.</p> * @return The reasoner for this specification */ public Reasoner getReasoner() { if (m_reasoner == null && m_rFactory != null) { // we need to create the reasoner // create a new one on each call since reasoners aren't guaranteed to be reusable return m_rFactory.create( null ); } return m_reasoner; }
/** * Return a prebuilt standard configuration for the default subclass/subproperty transitive closure reasoner. */ public static Reasoner getTransitiveReasoner() { if (theTRANSITIVEReasoner == null) theTRANSITIVEReasoner = TransitiveReasonerFactory.theInstance().create(null); return theTRANSITIVEReasoner; }
/** * 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; }
/** * Prebuilt standard configuration a micro-OWL reasoner. This just supports property axioms, * and class inheritance sufficient to power the OntAPI. */ public static Reasoner getOWLMicroReasoner() { if (theOWLMicroReasoner == null) theOWLMicroReasoner = OWLMicroReasonerFactory.theInstance().create(null); return theOWLMicroReasoner; }
/** * Prebuilt mini configuration for the default OWL reasoner. This omits bNode * introduction rules which has significant performance gain in some cases and * avoids breaking the find contract. */ public static Reasoner getOWLMiniReasoner() { if (theOWLMiniReasoner == null) theOWLMiniReasoner = OWLMiniReasonerFactory.theInstance().create(null); return theOWLMiniReasoner; }
@Override public Reasoner create( Resource configuration ) { return rf.create( configuration ).bindSchema( schema ); }
/** * Return a prebuilt standard configuration for the default RDFS reasoner */ public static Reasoner getRDFSReasoner() { if (theRDFSReasoner == null) theRDFSReasoner = RDFSRuleReasonerFactory.theInstance().create(null); return theRDFSReasoner; }
@Override public Reasoner create( Resource configuration ) { GenericRuleReasoner result = (GenericRuleReasoner) r.create( configuration ); result.addRules( rules ); return result; }
protected Reasoner getReasoner( Assembler a, Resource root ) { return getReasonerFactory( a, root ).create( root ); }
protected Reasoner getReasoner( Resource root ) { return getReasonerFactory( root ).create( root ); }
/** * Return a prebuilt simplified configuration for the default RDFS reasoner */ public static Reasoner getRDFSSimpleReasoner() { if (theRDFSSimpleReasoner == null) { theRDFSSimpleReasoner = RDFSRuleReasonerFactory.theInstance().create(null); theRDFSSimpleReasoner.setParameter(ReasonerVocabulary.PROPsetRDFSLevel, ReasonerVocabulary.RDFS_SIMPLE); } return theRDFSSimpleReasoner; }
/** Answer a Reasoner created according to the underlying factory, and then loaded with this Wrapper's rules (if the Reasoner is a RuleReasoner) and bound to this Wrapper's schemas (in an unspecified order). */ @Override public Reasoner create( Resource ignored ) { Reasoner result = factory.create( config ); return schemaUnion.isEmpty() ? result : result.bindSchema( schemaUnion ); }
/** * Create and return a new instance of the reasoner identified by * the given uri. * @param uri the uri of the reasoner to be created, expressed as a simple string * @param configuration an optional set of configuration information encoded in RDF this * parameter can be null if no configuration information is required. * @return a reaoner instance * @throws ReasonerException if there is not such reasoner or if there is * some problem during instantiation */ public Reasoner create(String uri, Resource configuration) throws ReasonerException { ReasonerFactory factory = getFactory(uri); if (factory != null) { return factory.create(configuration); } else { throw new ReasonerException("Attempted to instantiate an unknown reasoner: " + uri); } }