/** * <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 description of the capabilities of this reasoner encoded in * RDF. These capabilities may be static or may depend on configuration * information supplied at construction time. May be null if there are * no useful capabilities registered. */ @Override public Model getReasonerCapabilities() { if (factory != null) { return factory.getCapabilities(); } else { return null; } }
@Override public String getURI() { return r.getURI(); } };
/** * Determine whether the given property is recognized and treated specially * by this reasoner. This is a convenience packaging of a special case of getCapabilities. * @param property the property which we want to ask the reasoner about, given as a Node since * this is part of the SPI rather than API * @return true if the given property is handled specially by the reasoner. */ @Override public boolean supportsProperty(Property property) { if (factory == null) return false; Model caps = factory.getCapabilities(); Resource root = caps.getResource(factory.getURI()); return caps.contains(root, ReasonerVocabulary.supportsP, property); }
/** * Determine whether the given property is recognized and treated specially * by this reasoner. This is a convenience packaging of a special case of getCapabilities. * @param property the property which we want to ask the reasoner about, given as a Node since * this is part of the SPI rather than API * @return true if the given property is handled specially by the reasoner. */ @Override public boolean supportsProperty(Property property) { if (factory == null) return false; Model caps = factory.getCapabilities(); Resource root = caps.getResource(factory.getURI()); return caps.contains(root, ReasonerVocabulary.supportsP, property); }
/** * Determine whether the given property is recognized and treated specially * by this reasoner. This is a convenience packaging of a special case of getCapabilities. * @param property the property which we want to ask the reasoner about, given as a Node since * this is part of the SPI rather than API * @return true if the given property is handled specially by the reasoner. */ @Override public boolean supportsProperty(Property property) { if (factory == null) return false; Model caps = factory.getCapabilities(); Resource root = caps.getResource(factory.getURI()); return caps.contains(root, ReasonerVocabulary.supportsP, property); }
/** * 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; }
/** Answer the capabilities of the underlying ReasonerFactory. */ @Override public Model getCapabilities() { return factory.getCapabilities(); }
/** Answer the URI of the underlying ReasonerFactory. */ @Override public String getURI() { return factory.getURI(); } }
/** * Register a Reasoner. * @param factory an factory that can be used to create instances of the reasoner */ public void register(ReasonerFactory factory) { reasonerFactories.put(factory.getURI(), factory); Model description = factory.getCapabilities(); if (description != null) { allDescriptions.add(description); } allDescriptions.createResource(factory.getURI()) .addProperty(RDF.type, ReasonerVocabulary.ReasonerClass); }
/** * 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; }
@Override public Model getCapabilities() { return rf.getCapabilities(); }
@Override public String getURI() { return rf.getURI(); } };
/** * Determine whether the given property is recognized and treated specially * by this reasoner. This is a convenience packaging of a special case of getCapabilities. * @param property the property which we want to ask the reasoner about, given as a Node since * this is part of the SPI rather than API * @return true if the given property is handled specially by the reasoner. */ @Override public boolean supportsProperty(Property property) { ReasonerFactory rf = TransitiveReasonerFactory.theInstance(); Model caps = rf.getCapabilities(); Resource root = caps.getResource(rf.getURI()); return caps.contains(root, ReasonerVocabulary.supportsP, property); }
/** * Return a prebuilt standard configuration for the default RDFS reasoner */ public static Reasoner getRDFSReasoner() { if (theRDFSReasoner == null) theRDFSReasoner = RDFSRuleReasonerFactory.theInstance().create(null); return theRDFSReasoner; }
/** * Return a description of the capabilities of this reasoner encoded in * RDF. These capabilities may be static or may depend on configuration * information supplied at construction time. May be null if there are * no useful capabilities registered. */ @Override public Model getReasonerCapabilities() { if (factory != null) { return factory.getCapabilities(); } else { return null; } }
@Override public Reasoner create( Resource configuration ) { GenericRuleReasoner result = (GenericRuleReasoner) r.create( configuration ); result.addRules( rules ); return result; }
@Override public Model getCapabilities() { return r.getCapabilities(); }
/** * 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; }
/** * Return a description of the capabilities of this reasoner encoded in * RDF. These capabilities may be static or may depend on configuration * information supplied at construction time. May be null if there are * no useful capabilities registered. */ @Override public Model getReasonerCapabilities() { if (factory != null) { return factory.getCapabilities(); } else { return null; } }