com.hp.hpl.jena.reasoner
Class ReasonerRegistry

java.lang.Object
  extended by com.hp.hpl.jena.reasoner.ReasonerRegistry

public class ReasonerRegistry
extends Object

A global registry of known reasoner modules. Modules are identified by a URI and can have associated capability and descriptive information, in RDF. Currently the schema/ontology for such descriptions is mostly open. However, we do ensure that each reasoner URI at least has an associated rdf:type statement to indicate that it is a reasoner.

It is up to each reasoner or some associated configuration system to register it in this registry.


Method Summary
 Reasoner create(String uri, Resource configuration)
          Create and return a new instance of the reasoner identified by the given uri.
 Model getAllDescriptions()
          Return a composite set of RDF capability descriptions for all registered reasoners.
 Resource getDescription(String uri)
          Return information on a given Reasoner.
 ReasonerFactory getFactory(String uri)
          Return the factory for the given reasoner.
static Reasoner getOWLMicroReasoner()
          Prebuilt standard configuration a micro-OWL reasoner.
static Reasoner getOWLMiniReasoner()
          Prebuilt mini configuration for the default OWL reasoner.
static Reasoner getOWLReasoner()
          Prebuilt standard configuration for the default OWL reasoner.
static Reasoner getRDFSReasoner()
          Return a prebuilt standard configuration for the default RDFS reasoner
static Reasoner getRDFSSimpleReasoner()
          Return a prebuilt simplified configuration for the default RDFS reasoner
static Reasoner getTransitiveReasoner()
          Return a prebuilt standard configuration for the default subclass/subproperty transitive closure reasoner.
static Node makeDirect(Node node)
          Return a property Node which represents the direct version of a transitively closed property.
static String makeDirect(String uri)
          Return a URI string which represents the direct version of a transitively closed property URI
 void register(ReasonerFactory factory)
          Register a Reasoner.
 void register(String reasonerUri, ReasonerFactory factory)
          Register a Reasoner - simple case with no RDF description.
static ReasonerRegistry theRegistry()
          Return the single global instance of the registry
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

theRegistry

public static ReasonerRegistry theRegistry()
Return the single global instance of the registry


register

public void register(ReasonerFactory factory)
Register a Reasoner.

Parameters:
factory - an factory that can be used to create instances of the reasoner

register

public void register(String reasonerUri,
                     ReasonerFactory factory)
Register a Reasoner - simple case with no RDF description.

Parameters:
factory - an factory that can be used to create instances of the reasoner
reasonerUri - the URI used to label the reasoner, expressed as a simple string

getAllDescriptions

public Model getAllDescriptions()
Return a composite set of RDF capability descriptions for all registered reasoners. Listing all Resources of type ReasonerClass in the returned model would enumerate all registered reasoners.


getDescription

public Resource getDescription(String uri)
Return information on a given Reasoner.

Parameters:
uri - the URI of the reasoner
Returns:
a Resource representing the reasoner whose properties (as obtainable through listProperties etc) give a capability description of the reasoner; returns null if no such reasoner is registered.

getFactory

public ReasonerFactory getFactory(String uri)
Return the factory for the given reasoner.

Parameters:
uri - the URI of the reasoner
Returns:
the ReasonerFactory instance for this reasoner

create

public Reasoner create(String uri,
                       Resource configuration)
                throws ReasonerException
Create and return a new instance of the reasoner identified by the given uri.

Parameters:
uri - the uri of the reasoner to be created, expressed as a simple string
configuration - an optional set of configuration information encoded in RDF this parameter can be null if no configuration information is required.
Returns:
a reaoner instance
Throws:
ReasonerException - if there is not such reasoner or if there is some problem during instantiation

makeDirect

public static Node makeDirect(Node node)
Return a property Node which represents the direct version of a transitively closed property. See makeDirect(String); this method makes a new Node with the direct respelling of nodes URI.


makeDirect

public static String makeDirect(String uri)
Return a URI string which represents the direct version of a transitively closed property URI

Not clear what the right thing to do here is. Should not just invent a new local name in the same namespace because that might be a controlled namespace like RDF or RDFS. Can't even just extend the namespace slightly because that would be violating the web principles of namespace ownership. On the other hand, this solution results in staggeringly clumsy names.

Parameters:
uri - the URI representing the transitive property

getRDFSReasoner

public static Reasoner getRDFSReasoner()
Return a prebuilt standard configuration for the default RDFS reasoner


getRDFSSimpleReasoner

public static Reasoner getRDFSSimpleReasoner()
Return a prebuilt simplified configuration for the default RDFS reasoner


getTransitiveReasoner

public static Reasoner getTransitiveReasoner()
Return a prebuilt standard configuration for the default subclass/subproperty transitive closure reasoner.


getOWLReasoner

public static Reasoner getOWLReasoner()
Prebuilt standard configuration for the default OWL reasoner. This configuration is hybrid forward/backward reasoner.


getOWLMicroReasoner

public static Reasoner getOWLMicroReasoner()
Prebuilt standard configuration a micro-OWL reasoner. This just supports property axioms, and class inheritance sufficient to power the OntAPI.


getOWLMiniReasoner

public static Reasoner getOWLMiniReasoner()
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.



Licenced under the Apache License, Version 2.0