public abstract class GraphBase2 extends Object implements com.hp.hpl.jena.graph.impl.GraphWithPerform
emptyGraph
Constructor and Description |
---|
GraphBase2()
Initialise this graph
|
Modifier and Type | Method and Description |
---|---|
void |
add(Triple t)
Add a triple, and notify the event manager.
|
void |
close()
Close this graph.
|
boolean |
contains(Node s,
Node p,
Node o)
Answer
true if this graph contains (s, p, o) ;
this canonical implementation cannot be over-ridden. |
boolean |
contains(Triple t)
Answer
true iff t is in the graph as revealed by
find(t) being non-empty. |
void |
delete(Triple t)
Delete a triple, and notify the event manager.
|
boolean |
dependsOn(Graph other)
Default implementation answers
true iff this graph is the
same graph as the argument graph. |
com.hp.hpl.jena.util.iterator.ExtendedIterator<Triple> |
find(Node s,
Node p,
Node o) |
com.hp.hpl.jena.util.iterator.ExtendedIterator<Triple> |
find(TripleMatch m)
Answer an (extended) iterator over all the triples in this Graph matching
m . |
com.hp.hpl.jena.util.iterator.ExtendedIterator<Triple> |
forTestingOnly_graphBaseFind(TripleMatch tm) |
BulkUpdateHandler |
getBulkUpdateHandler()
Answer a BulkUpdateHandler bound to this graph.
|
Capabilities |
getCapabilities()
Answer the capabilities of this graph; the default is an AllCapabilities object
(the same one each time, not that it matters - Capabilities should be
immutable).
|
GraphEventManager |
getEventManager()
Answer the event manager for this graph; allocate a new one if required.
|
PrefixMapping |
getPrefixMapping()
Answer the PrefixMapping object for this graph, the same one each time.
|
Reifier |
getReifier()
Answer this graph's reifier.
|
GraphStatisticsHandler |
getStatisticsHandler() |
TransactionHandler |
getTransactionHandler()
Answer a transaction handler bound to this graph.
|
boolean |
isClosed() |
boolean |
isEmpty()
Answer true iff this graph contains no triples (hidden reification quads do
not count).
|
boolean |
isIsomorphicWith(Graph g)
Answer true iff this graph is isomorphic to
g according to
the algorithm (indeed, method) in GraphMatcher . |
void |
notifyAdd(Triple t)
Tell the event manager that the triple
t has been added to the graph. |
void |
notifyDelete(Triple t)
Tell the event manager that the triple
t has been deleted from the
graph. |
void |
performAdd(Triple t)
Add a triple to the triple store.
|
void |
performDelete(Triple t)
Remove a triple from the triple store.
|
abstract QueryHandler |
queryHandler()
Answer a QueryHandler bound to this graph.
|
int |
size()
Answer the size of this graph (ie the number of exposed triples).
|
String |
toString()
Answer a human-consumable representation of this graph.
|
public void close()
public boolean dependsOn(Graph other)
true
iff this graph is the
same graph as the argument graph.public abstract QueryHandler queryHandler()
queryHandler
in interface Graph
public GraphStatisticsHandler getStatisticsHandler()
getStatisticsHandler
in interface Graph
public GraphEventManager getEventManager()
getEventManager
in interface Graph
public void notifyAdd(Triple t)
t
has been added to the graph.public void notifyDelete(Triple t)
t
has been deleted from the
graph.public TransactionHandler getTransactionHandler()
getTransactionHandler
in interface Graph
public BulkUpdateHandler getBulkUpdateHandler()
getBulkUpdateHandler
in interface Graph
public Capabilities getCapabilities()
getCapabilities
in interface Graph
public PrefixMapping getPrefixMapping()
getPrefixMapping
in interface Graph
public void add(Triple t)
public void performAdd(Triple t)
performAdd
in interface com.hp.hpl.jena.graph.impl.GraphWithPerform
public final void delete(Triple t)
public void performDelete(Triple t)
performDelete
in interface com.hp.hpl.jena.graph.impl.GraphWithPerform
public final com.hp.hpl.jena.util.iterator.ExtendedIterator<Triple> find(TripleMatch m)
m
. Subclasses cannot over-ride this, because it implements
the appending of reification quadlets; instead they must implement
graphBaseFind(TripleMatch).public com.hp.hpl.jena.util.iterator.ExtendedIterator<Triple> forTestingOnly_graphBaseFind(TripleMatch tm)
public final com.hp.hpl.jena.util.iterator.ExtendedIterator<Triple> find(Node s, Node p, Node o)
public final boolean contains(Triple t)
true
iff t
is in the graph as revealed by
find(t)
being non-empty. t
may contain ANY
wildcards. Sub-classes may over-ride reifierContains and graphBaseContains
for efficiency.public final boolean contains(Node s, Node p, Node o)
true
if this graph contains (s, p, o)
;
this canonical implementation cannot be over-ridden.public Reifier getReifier()
constructReifier
instead.getReifier
in interface Graph
public final int size()
public boolean isEmpty()
size() == 0
, which is
fine if size
is reasonable efficient. Subclasses may override
if necessary. This method may become final and defined in terms of other
methods.public boolean isIsomorphicWith(Graph g)
g
according to
the algorithm (indeed, method) in GraphMatcher
.isIsomorphicWith
in interface Graph
Licenced under the Apache License, Version 2.0