|
||||||||||
| 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
public abstract class BaseInfGraph
A base level implementation of the InfGraph interface.
| Nested Class Summary | |
|---|---|
static class |
BaseInfGraph.InfCapabilities
An InfCapabilities notes that size may not be accurate, and some triples may be irremovable. |
static class |
BaseInfGraph.InfFindSafeCapabilities
An InfCapabilities notes that size may not be accurate, and some triples may be irremovable. |
static class |
BaseInfGraph.InfTransactionHandler
|
| Field Summary |
|---|
| Fields inherited from class com.hp.hpl.jena.graph.impl.GraphBase |
|---|
TOSTRING_TRIPLE_BASE, TOSTRING_TRIPLE_LIMIT |
| Fields inherited from interface com.hp.hpl.jena.graph.Graph |
|---|
emptyGraph |
| Constructor Summary | |
|---|---|
BaseInfGraph(Graph data,
Reasoner reasoner)
Constructor |
|
BaseInfGraph(Graph data,
Reasoner reasoner,
ReificationStyle style)
|
|
| Method Summary | |
|---|---|
InfGraph |
cloneWithPremises(Graph premises)
Return a new inference graph which is a clone of the current graph together with an additional set of data premises. |
void |
close()
Free all resources, any further use of this Graph is an error. |
Reifier |
constructReifier()
Inference graphs share the reifiers of their underlying raw graphs. |
com.hp.hpl.jena.util.iterator.ExtendedIterator<Triple> |
find(Node subject,
Node property,
Node object,
Graph param)
An extension of the Graph.find interface which allows the caller to encode complex expressions in RDF and then refer to those expressions within the query triple. |
com.hp.hpl.jena.util.iterator.ExtendedIterator<Triple> |
find(TriplePattern pattern)
Basic pattern lookup interface. |
abstract com.hp.hpl.jena.util.iterator.ExtendedIterator<Triple> |
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. |
BulkUpdateHandler |
getBulkUpdateHandler()
returns this Graph's bulk-update handler |
Capabilities |
getCapabilities()
Answer the InfCapabilities of this InfGraph. |
Graph |
getDeductionsGraph()
Returns a derivations graph. |
Iterator<Derivation> |
getDerivation(Triple triple)
Return the derivation of the given triple (which is the result of some previous find operation). |
Node |
getGlobalProperty(Node property)
Test a global boolean property of the graph. |
PrefixMapping |
getPrefixMapping()
Inference graphs share the prefix-mapping of their underlying raw graph. |
Graph |
getRawGraph()
Return the raw RDF data Graph being processed (i.e. |
Reasoner |
getReasoner()
Return the Reasoner which is being used to answer queries to this graph. |
abstract Graph |
getSchemaGraph()
Return the schema graph, if any, bound into this inference graph. |
TransactionHandler |
getTransactionHandler()
returns this Graph's transaction handler |
int |
getVersion()
Return a version stamp for this graph which can be used to fast-fail concurrent modification exceptions. |
com.hp.hpl.jena.util.iterator.ExtendedIterator<Triple> |
graphBaseFind(Node subject,
Node property,
Node object)
Returns an iterator over Triples. |
com.hp.hpl.jena.util.iterator.ExtendedIterator<Triple> |
graphBaseFind(TripleMatch m)
Returns an iterator over Triples. |
int |
graphBaseSize()
Return the number of triples in the just the base graph |
boolean |
isEmpty()
Answer true iff this graph is empty. |
boolean |
isPrepared()
Answer true iff this graph has been through the prepare() step. |
void |
performAdd(Triple t)
Add one triple to the data graph, run any rules triggered by the new data item, recursively adding any generated triples. |
void |
performDelete(Triple t)
Removes the triple t (if possible) from the set belonging to this graph. |
void |
prepare()
Perform any initial processing and caching. |
void |
rebind()
Cause the inference graph to reconsult the underlying graph to take into account changes. |
void |
rebind(Graph data)
Replace the underlying data graph for this inference graph and start any inferences over again. |
void |
reset()
Reset any internal caches. |
void |
setDerivationLogging(boolean logOn)
Switch on/off drivation logging |
boolean |
testGlobalProperty(Node property)
A convenience version of getGlobalProperty which can only return a boolean result. |
ValidityReport |
validate()
Test the consistency of the bound data. |
| Methods inherited from class com.hp.hpl.jena.graph.impl.GraphBase |
|---|
add, contains, contains, delete, dependsOn, find, find, forTestingOnly_graphBaseFind, getEventManager, getReifier, getStatisticsHandler, isClosed, 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, getReifier, getStatisticsHandler, isClosed, isIsomorphicWith, queryHandler, size |
| Methods inherited from interface com.hp.hpl.jena.graph.GraphAdd |
|---|
add |
| Constructor Detail |
|---|
public BaseInfGraph(Graph data,
Reasoner 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.
public BaseInfGraph(Graph data,
Reasoner reasoner,
ReificationStyle style)
| Method Detail |
|---|
public PrefixMapping getPrefixMapping()
getPrefixMapping in interface GraphgetPrefixMapping in class com.hp.hpl.jena.graph.impl.GraphBaseGraph.getPrefixMapping()public Reifier constructReifier()
constructReifier in class com.hp.hpl.jena.graph.impl.GraphBaseGraph.getReifier()public Capabilities getCapabilities()
getCapabilities in interface GraphgetCapabilities in class com.hp.hpl.jena.graph.impl.GraphBasepublic BulkUpdateHandler getBulkUpdateHandler()
Graph
getBulkUpdateHandler in interface GraphgetBulkUpdateHandler in class com.hp.hpl.jena.graph.impl.GraphBasepublic TransactionHandler getTransactionHandler()
Graph
getTransactionHandler in interface GraphgetTransactionHandler in class com.hp.hpl.jena.graph.impl.GraphBasepublic Graph getRawGraph()
getRawGraph in interface InfGraphpublic Reasoner getReasoner()
getReasoner in interface InfGraphpublic void rebind(Graph data)
rebind in interface InfGraphdata - the new raw data graphpublic void rebind()
rebind in interface InfGraphpublic void reset()
reset in interface InfGraphpublic void prepare()
prepare in interface InfGraphpublic Graph getDeductionsGraph()
getDeductionsGraph in interface InfGraphpublic Node getGlobalProperty(Node property)
getGlobalProperty in interface InfGraphproperty - the URI of the property to be tested
public boolean testGlobalProperty(Node property)
testGlobalProperty in interface InfGraphpublic ValidityReport validate()
validate in interface InfGraph
public com.hp.hpl.jena.util.iterator.ExtendedIterator<Triple> find(Node subject,
Node property,
Node object,
Graph param)
find in interface InfGraphsubject - 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 com.hp.hpl.jena.util.iterator.ExtendedIterator<Triple> graphBaseFind(TripleMatch m)
This code used to have the .filterKeep component uncommented. We think this is because of earlier history, before .matches on a literal node was implemented as sameValueAs rather than equals. If it turns out that the filter is needed, it can be commented back in, AND a corresponding filter added to find(Node x 3) -- and test cases, of course.
[Chris, after discussion with Dave]
graphBaseFind in class com.hp.hpl.jena.graph.impl.GraphBase
public com.hp.hpl.jena.util.iterator.ExtendedIterator<Triple> graphBaseFind(Node subject,
Node property,
Node object)
graphBaseFind in class com.hp.hpl.jena.graph.impl.GraphBase
public abstract com.hp.hpl.jena.util.iterator.ExtendedIterator<Triple> findWithContinuation(TriplePattern pattern,
Finder continuation)
pattern - a TriplePattern to be matched against the datacontinuation - either a Finder or a normal Graph which
will be asked for additional match results if the implementor
may not have completely satisfied the query.public com.hp.hpl.jena.util.iterator.ExtendedIterator<Triple> find(TriplePattern pattern)
pattern - a TriplePattern to be matched against the data
public void setDerivationLogging(boolean logOn)
setDerivationLogging in interface InfGraphpublic Iterator<Derivation> getDerivation(Triple triple)
getDerivation in interface InfGraphpublic int graphBaseSize()
graphBaseSize in class com.hp.hpl.jena.graph.impl.GraphBasepublic boolean isEmpty()
isEmpty in interface GraphisEmpty in class com.hp.hpl.jena.graph.impl.GraphBasepublic void close()
close in interface Graphclose in class com.hp.hpl.jena.graph.impl.GraphBasepublic int getVersion()
public void performAdd(Triple t)
performAdd in interface com.hp.hpl.jena.graph.impl.GraphWithPerformperformAdd in class com.hp.hpl.jena.graph.impl.GraphBasepublic void performDelete(Triple t)
performDelete in interface com.hp.hpl.jena.graph.impl.GraphWithPerformperformDelete in class com.hp.hpl.jena.graph.impl.GraphBasepublic abstract Graph getSchemaGraph()
public InfGraph cloneWithPremises(Graph premises)
public boolean isPrepared()
prepare() step.
For testing purposes.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||