|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Graph is an interface for fast manipulation of collections of RDF statements in code.
| 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 statement)
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 statement)
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 statement)
Remove the supplied statement from the graph. |
int |
remove(StatementIterator iterator)
Remove all statements in the StatementIterator from the graph. |
| Method Detail |
public void add(Resource subject,
URI predicate,
Value object)
subject - the statement subjectpredicate - the statement predicateobject - the statement objectpublic void add(Statement statement)
statement - the statement to be addedpublic void add(StatementIterator iterator)
iterator - an iterator containing statements
public void add(StatementIterator iterator,
boolean joinBlankNodes)
iterator - 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)
statements - a Collection containing Statement objects.
public void add(Collection statements,
boolean joinBlankNodes)
statements - 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 - the supplied graph, to be added to this graph.
public void add(Graph graph,
boolean joinBlankNodes)
graph - 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)
subject - 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 statement)
statement - the statement for which presence is checked.
public StatementIterator getStatements()
public StatementIterator getStatements(Resource subject,
URI predicate,
Value object)
subject - 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 Collection getStatementCollection(Resource subject,
URI predicate,
Value object)
subject - 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(Resource subject,
URI predicate,
Value object)
subject - 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 statement)
statement - the statement to be removed.
public int remove(StatementIterator iterator)
iterator - A StatementIterator containing all statements to be removed.
public int remove(Graph graph)
graph -
public void clear()
public ValueFactory getValueFactory()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||