|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IContainer
An IContainer is an object that holds Statement quads, where a quad is a statement that has a Subject,Predicate,Object and Context(NamedGraph URI). You can add and delete statements, run SPARQL queries against, do basic finds and contains operations. The IContainer also provides and event manager which facilitates notifying listeners when data in IContainer changes.
| Method Summary | |
|---|---|
void |
add(java.util.Iterator<org.openrdf.model.Statement> statements)
Add a set of statements from container |
void |
add(org.openrdf.model.Resource subj,
org.openrdf.model.URI pred,
org.openrdf.model.Value obj,
org.openrdf.model.Resource context)
Add a new statement with given subj,pred,obj,context |
void |
add(org.openrdf.model.Statement... statements)
Add one or more statements to container |
void |
clear()
Delete all statements in container |
void |
clear(org.openrdf.model.Resource... context)
Delete all statements in container for given contexts |
void |
close()
Disconnect container from its source and close the container Note: Once a container is closed, it is based on the source of the container's data whether or not subsequent calls to connect will return the same data |
void |
connect()
Connect container to its source |
boolean |
contains(org.openrdf.model.Resource subj,
org.openrdf.model.URI prop,
org.openrdf.model.Value obj,
org.openrdf.model.Resource... context)
Return true if the container contains atleast 1 statement that matches the pattern of subj,prop,obj,context |
boolean |
contains(org.openrdf.model.Statement statement)
Return true if the container contains atleast 1 statement that matches the statement provided |
void |
delete(java.util.Iterator<org.openrdf.model.Statement> statements)
Delete a set of statements from container |
void |
delete(org.openrdf.model.Resource subj,
org.openrdf.model.URI prop,
org.openrdf.model.Value obj,
org.openrdf.model.Resource context)
Delete a statement from container |
void |
delete(org.openrdf.model.Statement... statements)
Delete a set of statements from container |
QueryResult |
executeQuery(java.util.Set<org.openrdf.model.URI> defaultNamedGraphs,
java.util.Set<org.openrdf.model.URI> namedGraphs,
java.lang.String query)
Execute a SPARQL query against the data within this container |
info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> |
find(org.openrdf.model.Resource subj,
org.openrdf.model.URI prop,
org.openrdf.model.Value obj,
org.openrdf.model.Resource... context)
Return an iterator over all statements that match the pattern of subj,prop,obj |
java.util.Collection<org.openrdf.model.URI> |
getContexts()
Get the set of Context URIs that are container within this Container |
INamedGraphEventManager |
getEventManager()
Return INamedGraphEventManager for this container |
info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> |
getStatements()
Get an iterator over all statements within this container |
ITransactionManager |
getTransactionManager()
Return ITransactionManager for this container |
org.openrdf.model.URI |
getURI()
Get URI of IContainer |
boolean |
isClosed()
Return if container is closed |
boolean |
isConnected()
Return if the container is connected to its source |
boolean |
isEmpty()
Return if container is empty |
boolean |
isEmpty(org.openrdf.model.Resource... context)
Return if container is empty for given contexts |
void |
setEventManager(INamedGraphEventManager eventManager)
Set INamedGraphEventManager for this container |
void |
setTransactionManager(ITransactionManager transactionManager)
Set ITransactionManager for this container |
int |
size()
Return number of statements in container |
int |
size(org.openrdf.model.Resource... context)
Return number of statements in container |
| Method Detail |
|---|
org.openrdf.model.URI getURI()
info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> getStatements()
info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> find(org.openrdf.model.Resource subj,
org.openrdf.model.URI prop,
org.openrdf.model.Value obj,
org.openrdf.model.Resource... context)
subj - Subject resource to match, or wildcard if nullprop - Predicate uri to match, or wildcard if nullobj - Object value to match, or wildcard if nullcontext - Context values to match, or wildcard if null
boolean contains(org.openrdf.model.Resource subj,
org.openrdf.model.URI prop,
org.openrdf.model.Value obj,
org.openrdf.model.Resource... context)
subj - Subject resource to match, or wildcard if nullprop - Predicate uri to match, or wildcard if nullobj - Object value to match, or wildcard if nullcontext - Context values to match, or wildcard if null
boolean contains(org.openrdf.model.Statement statement)
statement - Statement to check for existence in container
void add(org.openrdf.model.Resource subj,
org.openrdf.model.URI pred,
org.openrdf.model.Value obj,
org.openrdf.model.Resource context)
subj - Subject of statementpred - Predicate of statementobj - Object of statementcontext - Context of statementvoid add(java.util.Iterator<org.openrdf.model.Statement> statements)
statements - statements to add to containervoid add(org.openrdf.model.Statement... statements)
statements - statements to add to container
void delete(org.openrdf.model.Resource subj,
org.openrdf.model.URI prop,
org.openrdf.model.Value obj,
org.openrdf.model.Resource context)
subj - Subject resource to match, or wildcard if nullprop - Predicate uri to match, or wildcard if nullobj - Object value to match, or wildcard if nullcontext - Context values to match, or wildcard if nullvoid delete(org.openrdf.model.Statement... statements)
statements - statements to delete from containervoid delete(java.util.Iterator<org.openrdf.model.Statement> statements)
statements - statements to delete from containervoid clear()
void clear(org.openrdf.model.Resource... context)
context - Contexts to clear from containerint size()
int size(org.openrdf.model.Resource... context)
context - Contexts of statements to count
boolean isEmpty()
boolean isEmpty(org.openrdf.model.Resource... context)
context - Contexts of statements to count
boolean isConnected()
void connect()
void close()
boolean isClosed()
INamedGraphEventManager getEventManager()
void setEventManager(INamedGraphEventManager eventManager)
eventManager - set the Containers eventManagetITransactionManager getTransactionManager()
void setTransactionManager(ITransactionManager transactionManager)
transactionManager - set ITransactionManager for this container
QueryResult executeQuery(java.util.Set<org.openrdf.model.URI> defaultNamedGraphs,
java.util.Set<org.openrdf.model.URI> namedGraphs,
java.lang.String query)
throws AnzoException
defaultNamedGraphs - Set<URI> of URIs for NamedGraphs that will make up the default graph for this querynamedGraphs - Set<URI> of URIs for NamedGraphs that will make up the NamedGraphs for this queryquery - SPARQL query string
AnzoExceptionjava.util.Collection<org.openrdf.model.URI> getContexts()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||