com.hp.hpl.jena.reasoner.dig
Class DIGReasoner

java.lang.Object
  extended by com.hp.hpl.jena.reasoner.dig.DIGReasoner
All Implemented Interfaces:
Reasoner

public class DIGReasoner
extends Object
implements Reasoner

This reasoner is the generator of inf-graphs that can use an external DIG inference engine to perform DL reasoning tasks.

Version:
Release @release@ ($Id: DIGReasoner.java,v 1.7 2004/12/07 09:56:36 andy_seaborne Exp $)
Author:
Ian Dickinson, HP Labs (email)

Constructor Summary
DIGReasoner(Graph tbox, ReasonerFactory factory, Resource configuration)
          Construct a DIG reasoner, that can generate inference graphs binding an external DIG inference engine (e.g.
 
Method Summary
 void addDescription(Model configSpec, Resource base)
          Add this reasoner's description to the given configuration model.
 InfGraph bind(Graph data)
          Bind the given data graph to any existing t-box schema that we have, and answer the resulting inference graph.
 Reasoner bindSchema(Graph tbox)
          Bind a schema, or tbox, to this DIG reasoner.
 Reasoner bindSchema(Model tbox)
          Bind a schema, or tbox, to this DIG reasoner.
 void configure(Resource configuration)
          Configure the reasoner using the properties attached to the given config resource.
 Model getAxioms()
          Answer the model that contains the given axioms for this reasoner, or null if not defined.
 Capabilities getGraphCapabilities()
          Return the Jena Graph Capabilties that the inference graphs generated by this reasoner are expected to conform to.
 OntModelSpec getOntLangModelSpec()
          Answer the model spec that corresponds to the ontology model type we'll use to access the terms of the ontology according to language.
 Model getReasonerCapabilities()
          Answer the capabilities of this reasoner.
 String getReasonerURL()
          Answer the URL to use when connecting to the external reasoner.
 Graph getSchema()
          Answer the schema (tbox) graph for this reasoner, or null if no schema is defined.
 void setDerivationLogging(boolean logOn)
          Not available.
 void setParameter(Property parameter, Object value)
          Set a configuration parameter for the reasoner.
 boolean supportsProperty(Property property)
          Determine whether the given property is recognized and treated specially by this reasoner.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DIGReasoner

public DIGReasoner(Graph tbox,
                   ReasonerFactory factory,
                   Resource configuration)

Construct a DIG reasoner, that can generate inference graphs binding an external DIG inference engine (e.g. Racer) to a given source graph.

Parameters:
tbox - Optional schema to bind to this reasoner instance. Unlike other Jena reasoners, pre-binding a tbox to a DIG reasoner does not allow any efficiencies to be exploited.
factory - The reasoner factory that created this reasoner
configuration - Optional resource to which is attached configuration parameters for this reasoner
Method Detail

bindSchema

public Reasoner bindSchema(Graph tbox)

Bind a schema, or tbox, to this DIG reasoner. This does not have any efficiency value in DIG reasoners, since we must re-load the entire tbox into each new instance of a DIG inference graph.

Specified by:
bindSchema in interface Reasoner
Parameters:
tbox - The graph containing the ontology (tbox) data
Returns:
A new DIG reasoner containing the tbox data
See Also:
Reasoner.bindSchema(com.hp.hpl.jena.graph.Graph)

bindSchema

public Reasoner bindSchema(Model tbox)

Bind a schema, or tbox, to this DIG reasoner. This does not have any efficiency value in DIG reasoners, since we must re-load the entire tbox into each new instance of a DIG inference graph.

Specified by:
bindSchema in interface Reasoner
Parameters:
tbox - A model wrapping the graph containing the ontology (tbox) data
Returns:
A new DIG reasoner containing the tbox data
See Also:
Reasoner.bindSchema(com.hp.hpl.jena.graph.Graph)

bind

public InfGraph bind(Graph data)

Bind the given data graph to any existing t-box schema that we have, and answer the resulting inference graph.

Specified by:
bind in interface Reasoner
Parameters:
data - A graph containing the source data
Returns:
A new inference graph that will apply the DIG reasoner to the combination of the tbox and data graphs.

setDerivationLogging

public void setDerivationLogging(boolean logOn)
Not available.

Specified by:
setDerivationLogging in interface Reasoner
Throws:
UnsupportedOperationException

getReasonerCapabilities

public Model getReasonerCapabilities()

Answer the capabilities of this reasoner.

Specified by:
getReasonerCapabilities in interface Reasoner
Returns:
An RDF model denoting the capabilties of the reasoner

addDescription

public void addDescription(Model configSpec,
                           Resource base)

Add this reasoner's description to the given configuration model.

Specified by:
addDescription in interface Reasoner
Parameters:
configSpec - A configuration model to add this reasoner's configuration to
base - The base URI in the given model to which we will attach the configuration of this reasoner.

supportsProperty

public boolean supportsProperty(Property 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.

Specified by:
supportsProperty in interface Reasoner
Parameters:
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
Returns:
true if the given property is handled specially by the reasoner.

setParameter

public void setParameter(Property parameter,
                         Object value)
Set a configuration parameter for the reasoner. The supported parameters are:

Specified by:
setParameter in interface Reasoner
Parameters:
parameter - the property identifying the parameter to be changed
value - the new value for the parameter, typically this is a wrapped java object like Boolean or Integer.
Throws:
IllegalParameterException - if the parameter is unknown

configure

public void configure(Resource configuration)

Configure the reasoner using the properties attached to the given config resource.

Parameters:
configuration - A configuration resource.

getReasonerURL

public String getReasonerURL()

Answer the URL to use when connecting to the external reasoner.

Returns:
The connection URL for the external reasoner as a string

getOntLangModelSpec

public OntModelSpec getOntLangModelSpec()

Answer the model spec that corresponds to the ontology model type we'll use to access the terms of the ontology according to language.

Returns:
The appropriate ont model spec

getSchema

public Graph getSchema()

Answer the schema (tbox) graph for this reasoner, or null if no schema is defined.

Returns:
The schema graph, or null

getAxioms

public Model getAxioms()

Answer the model that contains the given axioms for this reasoner, or null if not defined.

Returns:
The axioms model

getGraphCapabilities

public Capabilities getGraphCapabilities()
Return the Jena Graph Capabilties that the inference graphs generated by this reasoner are expected to conform to.

Specified by:
getGraphCapabilities in interface Reasoner


Copyright © 2000, 2001, 2002, 2003, 2004 Hewlett-Packard Development Company, LP