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_LIMIT
emptyGraph
Constructor and Description |
---|
BaseInfGraph(Graph data,
Reasoner reasoner)
Constructor
|
Modifier and Type | Method and Description |
---|---|
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()
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.
|
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.
|
add, contains, contains, delete, dependsOn, find, find, find, forTestingOnly_graphBaseFind, getEventManager, getStatisticsHandler, isClosed, isIsomorphicWith, notifyAdd, notifyDelete, size, toString, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
add, contains, contains, delete, dependsOn, find, find, find, getEventManager, getStatisticsHandler, isClosed, isIsomorphicWith, size
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()
com.hp.hpl.jena.graph.impl.GraphBase
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)
com.hp.hpl.jena.graph.impl.GraphBase
remove
in interface Graph
remove
in class com.hp.hpl.jena.graph.impl.GraphBase
public void clear()
com.hp.hpl.jena.graph.impl.GraphBase
clear
in interface Graph
clear
in class com.hp.hpl.jena.graph.impl.GraphBase
public TransactionHandler getTransactionHandler()
com.hp.hpl.jena.graph.impl.GraphBase
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)
public void rebind()
public void reset()
public void prepare()
public Graph getDeductionsGraph()
getDeductionsGraph
in interface InfGraph
public Node getGlobalProperty(Node property)
getGlobalProperty
in interface InfGraph
property
- the URI of the property to be testedpublic boolean testGlobalProperty(Node property)
testGlobalProperty
in interface InfGraph
public ValidityReport validate()
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 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 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.Licenced under the Apache License, Version 2.0