|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.openrdf.model.impl.GraphImpl
GraphImpl - an implementation of the graph interface that uses a local repository as storage backend. GraphImpl is not thread-safe.
| Constructor Summary | |
GraphImpl()
Creates a new GraphImpl. |
|
GraphImpl(LocalRepository repository)
Creates a new GraphImpl that uses the supplied LocalRepository as storage backend. |
|
GraphImpl(RdfRepository sail)
Deprecated. low-level SAIL api should not be exposed in access APIs; use constructor with LocalRepository object instead. |
|
| Method Summary | |
void |
add(Collection statements)
Adds all statements in the Collection to the graph. |
void |
add(Collection statements,
boolean joinBlankNodes)
Adds all statements in the Collection to the graph. |
void |
add(Graph graph)
Adds all statements in the supplied graph to this graph. |
void |
add(Graph graph,
boolean joinBlankNodes)
Adds all statements in the supplied graph to this graph. |
void |
add(Resource subject,
URI predicate,
Value object)
Adds a single statement to the graph. |
void |
add(Statement st)
Adds a single statement to the graph. |
void |
add(StatementIterator iterator)
Adds all statements in the iterator to the graph. |
void |
add(StatementIterator iterator,
boolean joinBlankNodes)
Adds all statements in the iterator to the graph. |
void |
clear()
Clears the graph. |
boolean |
contains(Resource subject,
URI predicate,
Value object)
Checks if a statement matching the (subject, predicate, object) pattern is present in the graph. |
boolean |
contains(Statement st)
Checks if the supplied statement is present in the graph. |
Collection |
getStatementCollection(Resource subject,
URI predicate,
Value object)
Retrieves all statements matching the (subject, predicate, object) pattern in the graph as a Collection. |
StatementIterator |
getStatements()
Retrieves all statements in the graph as an iterator |
StatementIterator |
getStatements(Resource subject,
URI predicate,
Value object)
Retrieves all statements matching the (subject, predicate, object) pattern in the graph as an iterator. |
ValueFactory |
getValueFactory()
Retrieves a ValueFactory for this graph. |
int |
remove(Graph graph)
Remove all statements in the supplied graph from this graph. |
int |
remove(Resource subject,
URI predicate,
Value object)
Remove all statements matching the (subject, predicate, object) pattern from the graph. |
int |
remove(Statement st)
Remove the supplied statement from the graph. |
int |
remove(StatementIterator iterator)
Remove all statements in the StatementIterator from the graph. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public GraphImpl()
public GraphImpl(LocalRepository repository)
repository - The LocalRepository to be used as backend.public GraphImpl(RdfRepository sail)
sail - the Sail object to be used as storage backend| Method Detail |
public void add(Resource subject,
URI predicate,
Value object)
Graph
add in interface Graphsubject - the statement subjectpredicate - the statement predicateobject - the statement objectpublic void add(Statement st)
Graph
add in interface Graphst - the statement to be addedpublic void add(StatementIterator iterator)
Graph
add in interface Graphiterator - an iterator containing statements
public void add(StatementIterator iterator,
boolean joinBlankNodes)
Graph
add in interface Graphiterator - an iterator containing statementsjoinBlankNodes - specifies whether blank nodes in the supplied iterator should be
joined with this graph. If false, new blank nodes will be created for each blank node
in the supplied iterator.public void add(Collection statements)
Graph
add in interface Graphstatements - a Collection containing Statement objects.
public void add(Collection statements,
boolean joinBlankNodes)
Graph
add in interface Graphstatements - a Collection containing statementsjoinBlankNodes - specifies whether blank nodes in the supplied Collection should be
joined with this graph. If false, new blank nodes will be created for each blank node
in the supplied Collection.public void add(Graph graph)
Graph
add in interface Graphgraph - the supplied graph, to be added to this graph.
public void add(Graph graph,
boolean joinBlankNodes)
Graph
add in interface Graphgraph - the supplied graph, to be added to this graph.joinBlankNodes - specifies whether blank nodes in the supplied graph should be
joined with this graph. If false, new blank nodes will be created for each blank node
in the supplied graph.
public boolean contains(Resource subject,
URI predicate,
Value object)
Graph
contains in interface Graphsubject - the statement subject, or null for a wildcard.predicate - the statement predicate, or null for a wildcard.object - the statement object, or null for a wildcard.
public boolean contains(Statement st)
Graph
contains in interface Graphst - the statement for which presence is checked.
public StatementIterator getStatements()
Graph
getStatements in interface Graph
public StatementIterator getStatements(Resource subject,
URI predicate,
Value object)
Graph
getStatements in interface Graphsubject - the statement subject, or null for a wildcardpredicate - the statement predicate, or null for a wildcardobject - the statement object, or null for a wildcard
public int remove(Resource subject,
URI predicate,
Value object)
Graph
remove in interface Graphsubject - the statement subject, or null for a wildcard.predicate - the statement predicate, or null for a wildcard.object - the statement object, or null for a wildcard.
public int remove(Statement st)
Graph
remove in interface Graphst - the statement to be removed.
public int remove(StatementIterator iterator)
Graph
remove in interface Graphiterator - A StatementIterator containing all statements to be removed.
public void clear()
Graph
clear in interface Graph
public Collection getStatementCollection(Resource subject,
URI predicate,
Value object)
Graph
getStatementCollection in interface Graphsubject - the statement subject, or null for a wildcard.predicate - the statement predicate, or null for a wildcard.object - the statement object, or null for a wildcard.
public int remove(Graph graph)
Graph
remove in interface Graphgraph -
public ValueFactory getValueFactory()
Graph
getValueFactory in interface Graph
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||