public abstract class BaseInfGraph extends com.hp.hpl.jena.graph.impl.GraphBase implements InfGraph
| Modifier and Type | Class and Description |
|---|---|
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 |
TOSTRING_TRIPLE_BASE, TOSTRING_TRIPLE_LIMITemptyGraph| Constructor and Description |
|---|
BaseInfGraph(Graph data,
Reasoner reasoner)
Constructor
|
BaseInfGraph(Graph data,
Reasoner reasoner,
ReificationStyle style) |
| Modifier and Type | Method and Description |
|---|---|
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()
Answer a BulkUpdateHandler bound to this graph.
|
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()
Answer a transaction handler bound to this graph.
|
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.
|
add, contains, contains, delete, dependsOn, find, find, forTestingOnly_graphBaseFind, getEventManager, getReifier, getStatisticsHandler, isClosed, isIsomorphicWith, notifyAdd, notifyDelete, queryHandler, size, toString, toStringequals, getClass, hashCode, notify, notifyAll, wait, wait, waitcontains, contains, delete, dependsOn, find, find, getEventManager, getReifier, getStatisticsHandler, isClosed, isIsomorphicWith, queryHandler, sizepublic 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)
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()
com.hp.hpl.jena.graph.impl.GraphBasegetBulkUpdateHandler in interface GraphgetBulkUpdateHandler in class com.hp.hpl.jena.graph.impl.GraphBasepublic TransactionHandler getTransactionHandler()
com.hp.hpl.jena.graph.impl.GraphBasegetTransactionHandler 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)
public void rebind()
public void reset()
public void prepare()
public Graph getDeductionsGraph()
getDeductionsGraph in interface InfGraphpublic Node getGlobalProperty(Node property)
getGlobalProperty in interface InfGraphproperty - the URI of the property to be testedpublic boolean testGlobalProperty(Node property)
testGlobalProperty in interface InfGraphpublic ValidityReport validate()
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.GraphBasepublic com.hp.hpl.jena.util.iterator.ExtendedIterator<Triple> graphBaseFind(Node subject, Node property, Node object)
graphBaseFind in class com.hp.hpl.jena.graph.impl.GraphBasepublic 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 datapublic 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()
public void close()
public 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.Licenced under the Apache License, Version 2.0