|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 |
Method Summary | |
---|---|
void |
clear()
Remove all the statements from this graph. |
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. |
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()
Deprecated. Bulk update operations are going to be removed. |
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 |
remove(Node s,
Node p,
Node o)
Remove all triples that match by find(s, p, o) |
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, getStatisticsHandler, isClosed, isIsomorphicWith, notifyAdd, notifyDelete, 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 |
---|
add, contains, contains, delete, dependsOn, find, find, getEventManager, getStatisticsHandler, isClosed, isIsomorphicWith, size |
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.Method Detail |
---|
public PrefixMapping getPrefixMapping()
getPrefixMapping
in interface Graph
getPrefixMapping
in class com.hp.hpl.jena.graph.impl.GraphBase
Graph.getPrefixMapping()
public Capabilities getCapabilities()
getCapabilities
in interface Graph
getCapabilities
in class com.hp.hpl.jena.graph.impl.GraphBase
@Deprecated public BulkUpdateHandler getBulkUpdateHandler()
Graph
getBulkUpdateHandler
in interface Graph
getBulkUpdateHandler
in class com.hp.hpl.jena.graph.impl.GraphBase
for convenience helpers.
public void remove(Node s, Node p, Node o)
Graph
remove
in interface Graph
remove
in class com.hp.hpl.jena.graph.impl.GraphBase
public void clear()
Graph
clear
in interface Graph
clear
in class com.hp.hpl.jena.graph.impl.GraphBase
public TransactionHandler getTransactionHandler()
Graph
getTransactionHandler
in interface Graph
getTransactionHandler
in class com.hp.hpl.jena.graph.impl.GraphBase
public Graph getRawGraph()
getRawGraph
in interface InfGraph
public Reasoner getReasoner()
getReasoner
in interface InfGraph
public void rebind(Graph data)
rebind
in interface InfGraph
data
- the new raw data graphpublic void rebind()
rebind
in interface InfGraph
public void reset()
reset
in interface InfGraph
public void prepare()
prepare
in interface InfGraph
public Graph getDeductionsGraph()
getDeductionsGraph
in interface InfGraph
public Node getGlobalProperty(Node property)
getGlobalProperty
in interface InfGraph
property
- the URI of the property to be tested
public boolean testGlobalProperty(Node property)
testGlobalProperty
in interface InfGraph
public 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 InfGraph
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 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.
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 InfGraph
public Iterator<Derivation> getDerivation(Triple triple)
getDerivation
in interface InfGraph
public int graphBaseSize()
graphBaseSize
in class com.hp.hpl.jena.graph.impl.GraphBase
public boolean isEmpty()
isEmpty
in interface Graph
isEmpty
in class com.hp.hpl.jena.graph.impl.GraphBase
public void close()
close
in interface Graph
close
in class com.hp.hpl.jena.graph.impl.GraphBase
public int getVersion()
public void performAdd(Triple t)
performAdd
in interface com.hp.hpl.jena.graph.impl.GraphWithPerform
performAdd
in class com.hp.hpl.jena.graph.impl.GraphBase
public void performDelete(Triple t)
performDelete
in interface com.hp.hpl.jena.graph.impl.GraphWithPerform
performDelete
in class com.hp.hpl.jena.graph.impl.GraphBase
public 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 |