|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.model.transaction.impl.TransactionContainerProxy
public class TransactionContainerProxy
Container that contains a transaction queue, so all operations go into transactions before they are applied to a parent graph. All calls to find and contains will include the results of the parent container overlaid with the contents of the transaction queue.
| Constructor Summary | |
|---|---|
TransactionContainerProxy(IContainer parentContainer,
ITransactionQueueManager transactionQueueManager)
Create a new TransactionContainerProxy, which wraps an IContainer with a transaction layer |
|
| 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 s,
org.openrdf.model.URI p,
org.openrdf.model.Value o,
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 pred,
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> defaultNamedGraphsIn,
java.util.Set<org.openrdf.model.URI> namedGraphsIn,
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 s,
org.openrdf.model.URI p,
org.openrdf.model.Value o,
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 transactionQueueManager)
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 |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TransactionContainerProxy(IContainer parentContainer,
ITransactionQueueManager transactionQueueManager)
parentContainer - to which a transaction layer is addedtransactionQueueManager - transaction layer to add| Method Detail |
|---|
public void add(java.util.Iterator<org.openrdf.model.Statement> statements)
IContainer
add in interface IContainerstatements - statements to add to containerpublic void delete(java.util.Iterator<org.openrdf.model.Statement> statements)
IContainer
delete in interface IContainerstatements - statements to delete from container
public void add(org.openrdf.model.Resource subj,
org.openrdf.model.URI pred,
org.openrdf.model.Value obj,
org.openrdf.model.Resource context)
IContainer
add in interface IContainersubj - Subject of statementpred - Predicate of statementobj - Object of statementcontext - Context of statement
public void delete(org.openrdf.model.Resource subj,
org.openrdf.model.URI pred,
org.openrdf.model.Value obj,
org.openrdf.model.Resource context)
IContainer
delete in interface IContainersubj - Subject resource to match, or wildcard if nullpred - Predicate uri to match, or wildcard if nullobj - Object value to match, or wildcard if nullcontext - Context values to match, or wildcard if nullpublic void add(org.openrdf.model.Statement... statements)
IContainer
add in interface IContainerstatements - statements to add to containerpublic void delete(org.openrdf.model.Statement... statements)
IContainer
delete in interface IContainerstatements - statements to delete from containerpublic void clear()
IContainer
clear in interface IContainerpublic void clear(org.openrdf.model.Resource... context)
IContainer
clear in interface IContainercontext - Contexts to clear from containerpublic void close()
IContainer
close in interface IContainerpublic void connect()
IContainer
connect in interface IContainer
public boolean contains(org.openrdf.model.Resource s,
org.openrdf.model.URI p,
org.openrdf.model.Value o,
org.openrdf.model.Resource... context)
IContainer
contains in interface IContainers - Subject resource to match, or wildcard if nullp - Predicate uri to match, or wildcard if nullo - Object value to match, or wildcard if nullcontext - Context values to match, or wildcard if null
public boolean contains(org.openrdf.model.Statement statement)
IContainer
contains in interface IContainerstatement - Statement to check for existence in container
public info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> find(org.openrdf.model.Resource s,
org.openrdf.model.URI p,
org.openrdf.model.Value o,
org.openrdf.model.Resource... context)
IContainer
find in interface IContainers - Subject resource to match, or wildcard if nullp - Predicate uri to match, or wildcard if nullo - Object value to match, or wildcard if nullcontext - Context values to match, or wildcard if null
public QueryResult executeQuery(java.util.Set<org.openrdf.model.URI> defaultNamedGraphsIn,
java.util.Set<org.openrdf.model.URI> namedGraphsIn,
java.lang.String query)
throws AnzoException
IContainer
executeQuery in interface IContainerdefaultNamedGraphsIn - Set<URI> of URIs for NamedGraphs that will make up the default graph for this querynamedGraphsIn - Set<URI> of URIs for NamedGraphs that will make up the NamedGraphs for this queryquery - SPARQL query string
AnzoExceptionpublic INamedGraphEventManager getEventManager()
IContainer
getEventManager in interface IContainerpublic info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> getStatements()
IContainer
getStatements in interface IContainerpublic ITransactionManager getTransactionManager()
IContainer
getTransactionManager in interface IContainerpublic org.openrdf.model.URI getURI()
IContainer
getURI in interface IContainerpublic boolean isClosed()
IContainer
isClosed in interface IContainerpublic boolean isConnected()
IContainer
isConnected in interface IContainerpublic boolean isEmpty()
IContainer
isEmpty in interface IContainerpublic boolean isEmpty(org.openrdf.model.Resource... context)
IContainer
isEmpty in interface IContainercontext - Contexts of statements to count
public int size()
IContainer
size in interface IContainerpublic int size(org.openrdf.model.Resource... context)
IContainer
size in interface IContainercontext - Contexts of statements to count
public void setEventManager(INamedGraphEventManager eventManager)
IContainer
setEventManager in interface IContainereventManager - set the Containers eventManagetpublic void setTransactionManager(ITransactionManager transactionQueueManager)
IContainer
setTransactionManager in interface IContainertransactionQueueManager - set ITransactionManager for this containerpublic java.util.Collection<org.openrdf.model.URI> getContexts()
IContainer
getContexts in interface IContainer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||