|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.hp.hpl.jena.graph.impl.GraphBase
com.hp.hpl.jena.reasoner.BaseInfGraph
com.hp.hpl.jena.reasoner.dig.DIGInfGraph
public class DIGInfGraph
An InfGraph that performs reasoning via a DIG interface to an external reasoner.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.hp.hpl.jena.reasoner.BaseInfGraph |
---|
BaseInfGraph.InfCapabilities, BaseInfGraph.InfFindSafeCapabilities, BaseInfGraph.InfTransactionHandler |
Field Summary |
---|
Fields inherited from interface com.hp.hpl.jena.graph.Graph |
---|
emptyGraph |
Constructor Summary | |
---|---|
DIGInfGraph(Graph data,
DIGReasoner reasoner)
Constructor |
Method Summary | |
---|---|
ExtendedIterator |
find(Node subject,
Node property,
Node object,
Graph param)
An extension of the Graph.find(com.hp.hpl.jena.graph.TripleMatch) interface which allows the caller to
encode complex expressions in RDF and then refer to those expressions
within the query triple. |
ExtendedIterator |
findWithContinuation(TriplePattern pattern,
Finder continuation)
Extended find interface used in situations where the implementator may or may not be able to answer the complete query. |
Graph |
getSchemaGraph()
Return the schema graph, if any, bound into this inference graph. |
void |
performAdd(Triple t)
Add one triple to the data graph, mark the graph not-prepared, but don't run prepare() just yet. |
void |
performDelete(Triple t)
Delete one triple from the data graph, mark the graph not-prepared, but don't run prepare() just yet. |
void |
prepare()
Perform any initial processing and caching. |
void |
rebind(Graph data)
Replace the underlying data graph for this inference graph and start any inferences over again. |
void |
setDerivationLogging(boolean logOn)
Switch on/off drivation logging - not supported with DIG reasoner |
ValidityReport |
validate()
Test the consistency of the model. |
Methods inherited from class com.hp.hpl.jena.reasoner.BaseInfGraph |
---|
cloneWithPremises, close, find, getBulkUpdateHandler, getCapabilities, getDeductionsGraph, getDerivation, getGlobalProperty, getPrefixMapping, getRawGraph, getReasoner, getReifier, getTransactionHandler, graphBaseFind, graphBaseFind, graphBaseSize, isEmpty, rebind, reset, testGlobalProperty |
Methods inherited from class com.hp.hpl.jena.graph.impl.GraphBase |
---|
add, contains, contains, delete, dependsOn, find, find, forTestingOnly_graphBaseFind, getEventManager, isIsomorphicWith, notifyAdd, notifyDelete, queryHandler, size, toString, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.hp.hpl.jena.graph.Graph |
---|
contains, contains, delete, dependsOn, find, find, getEventManager, isIsomorphicWith, queryHandler, size |
Methods inherited from interface com.hp.hpl.jena.graph.GraphAdd |
---|
add |
Constructor Detail |
---|
public DIGInfGraph(Graph data, DIGReasoner reasoner)
data
- the raw data file to be augmented with entailmentsreasoner
- the engine, with associated tbox data, whose find interface
can be used to extract all entailments from the data.Method Detail |
---|
public void prepare()
prepare
in interface InfGraph
prepare
in class BaseInfGraph
public ExtendedIterator findWithContinuation(TriplePattern pattern, Finder continuation)
Extended find interface used in situations where the implementator may or may not be able to answer the complete query. It will attempt to answer the pattern but if its answers are not known to be complete then it will also pass the request on to the nested Finder to append more results.
DIG implementation note: the default call into this
method from the base inference graph makes the continuation a query
of the base graph. Since DIGAdapter
already queries the base
graph, there is no futher need to query it through the continuation.
Consequently, this implementation does not call the continuation.
Client code that wishes to provide a non-default continuation should
sub-class DIGInfGraph and provide a suitable call to the continuation.find().
findWithContinuation
in class BaseInfGraph
pattern
- a TriplePattern to be matched against the datacontinuation
- Not used in this implementationpublic ExtendedIterator find(Node subject, Node property, Node object, Graph param)
An extension of the Graph.find(com.hp.hpl.jena.graph.TripleMatch)
interface which allows the caller to
encode complex expressions in RDF and then refer to those expressions
within the query triple. For example, one might encode a class expression
and then ask if there are any instances of this class expression in the
InfGraph. In the case of the DIGInfGraph, this is exactly the use case we assume.
In particular, we expect that the object
node is the subject of
one or more sentences in param
which completely define the class
description.
find
in interface InfGraph
find
in class BaseInfGraph
subject
- the subject Node of the query triple, may be a Node in
the graph or a node in the parameter micro-graph or nullproperty
- the property to be retrieved or nullobject
- the object Node of the query triple, may be a Node in
the graph or a node in the parameter micro-graph.param
- a small graph encoding an expression which the subject and/or
object nodes refer.public Graph getSchemaGraph()
getSchemaGraph
in class BaseInfGraph
public void performAdd(Triple t)
Add one triple to the data graph, mark the graph not-prepared, but don't run prepare() just yet.
performAdd
in interface com.hp.hpl.jena.graph.impl.GraphWithPerform
performAdd
in class BaseInfGraph
t
- A triple to add to the graphpublic void performDelete(Triple t)
Delete one triple from the data graph, mark the graph not-prepared, but don't run prepare() just yet.
performDelete
in interface com.hp.hpl.jena.graph.impl.GraphWithPerform
performDelete
in class BaseInfGraph
t
- A triple to remove from the graphpublic void rebind(Graph data)
rebind
in interface InfGraph
rebind
in class BaseInfGraph
data
- the new raw data graphpublic void setDerivationLogging(boolean logOn)
setDerivationLogging
in interface InfGraph
setDerivationLogging
in class BaseInfGraph
public ValidityReport validate()
Test the consistency of the model. This looks for overall inconsistency, and for any unsatisfiable classes.
validate
in interface InfGraph
validate
in class BaseInfGraph
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |