|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.model.transaction.impl.TransactionNamedGraphProxy
public class TransactionNamedGraphProxy
Graph that contains a transaction queue, so all operations go into transactions before they are applied to a parent graph. All calls to find contain the results of the parentGraph overlaid with the contents of the transactions.
| Constructor Summary | |
|---|---|
TransactionNamedGraphProxy(INamedGraph baseGraph,
ITransactionQueueManager transactionQueueManager,
boolean isMetadataGraph)
Create new TransactionNamedGraphProxy for baseGraph with given ITransactionQueueManager |
|
TransactionNamedGraphProxy(INamedGraph baseGraph,
org.openrdf.model.URI namedGraphUri,
boolean isMetadataGraph)
Create new TransactionNamedGraphProxy for baseGraph with given URI |
|
TransactionNamedGraphProxy(org.openrdf.model.URI namedGraphUri,
INamedGraph baseGraph,
ITransactionQueueManager transactionQueueHandler,
boolean isMetadataGraph)
Create new TransactionNamedGraphProxy for baseGraph with given ITransactionQueueManager |
|
| Method Summary | |
|---|---|
void |
add(info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> statements)
Add a set of statements from graph |
void |
add(org.openrdf.model.Resource subj,
org.openrdf.model.URI pred,
org.openrdf.model.Value obj)
Add a new statement with given subj,pred,obj |
void |
add(org.openrdf.model.Statement... statements)
Add one or more statements to graph |
void |
clear()
Delete all statements in graph |
void |
close()
Close the graph. |
boolean |
commitTransactionQueue()
Commit the transaction queue. |
boolean |
contains(org.openrdf.model.Resource s,
org.openrdf.model.URI p,
org.openrdf.model.Value o)
Return true if the graph contains at least 1 statement that matches the pattern of subj,prop,obj |
boolean |
contains(org.openrdf.model.Statement statement)
Return true if the graph contains at least 1 statement that matches the statement provided |
void |
delete(info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> statements)
Delete a set of statements from graph |
void |
delete(org.openrdf.model.Resource subj,
org.openrdf.model.URI pred,
org.openrdf.model.Value obj)
Delete a statement from graph |
void |
delete(org.openrdf.model.Statement... statements)
Delete a set of statements from graph |
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)
Return an iterator of all statements that match the pattern of subj,prop,obj |
org.openrdf.model.URI |
getBaseNamedGraphUri()
Get the NamedGraphURI for this proxy |
INamedGraphEventManager |
getEventManager()
Return INamedGraphEventManager for this graph |
org.openrdf.model.URI |
getNamedGraphUri()
Get the NamedGraphURI for the parent graph |
INamedGraph |
getParentGraph()
Get the graph to which this proxy is proxing information. |
info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> |
getStatements()
Get an iterator of all statements within this graph |
ITransactionManager |
getTransactionManager()
Return ITransactionManager for this graph |
ITransactionQueueManager |
getTransactionQueueManager()
Get the ITransactionQueueManager for this graph. |
boolean |
isClosed()
Return if graph is closed |
boolean |
isEmpty()
Return if graph is empty |
boolean |
isMetadataGraph()
Determine if this is a proxy for a metadata graph |
boolean |
processTransactions(java.util.List<ITransaction> transactionQueue)
Process a list of transactions, most commonly from another ITransactionGraph. |
void |
redo()
Redo the last command in the current transaction. |
void |
setITransactionQueueHandler(ITransactionQueueManager transactionQueueManager)
Set the transactionQueueManager for this proxy |
void |
setNamedGraphUri(org.openrdf.model.URI namedGraphUri)
Set NamedGraph's URI |
void |
setParentGraph(INamedGraph graph)
Set the base graph for this proxy if not already set |
int |
size()
Return number of statements in graph |
void |
undo()
Undo the last command in the current transaction. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TransactionNamedGraphProxy(INamedGraph baseGraph,
org.openrdf.model.URI namedGraphUri,
boolean isMetadataGraph)
baseGraph - Parent graphnamedGraphUri - URI for graphisMetadataGraph - true if basegraph is a metadata graph
public TransactionNamedGraphProxy(INamedGraph baseGraph,
ITransactionQueueManager transactionQueueManager,
boolean isMetadataGraph)
baseGraph - Parent graphisMetadataGraph - true if basegraph is a metadata graphtransactionQueueManager - TransactionQueueManager to use
public TransactionNamedGraphProxy(org.openrdf.model.URI namedGraphUri,
INamedGraph baseGraph,
ITransactionQueueManager transactionQueueHandler,
boolean isMetadataGraph)
namedGraphUri - URI for this graphbaseGraph - graph which proxy is operating uponisMetadataGraph - true if baseGraph is a metadata graphtransactionQueueHandler - | Method Detail |
|---|
public org.openrdf.model.URI getBaseNamedGraphUri()
public org.openrdf.model.URI getNamedGraphUri()
getNamedGraphUri in interface INamedGraphpublic void setNamedGraphUri(org.openrdf.model.URI namedGraphUri)
INamedGraph
setNamedGraphUri in interface INamedGraphpublic boolean isMetadataGraph()
public INamedGraph getParentGraph()
IProxyGraph
getParentGraph in interface IProxyGraph
public void setParentGraph(INamedGraph graph)
throws TransactionGraphException
graph - parent graph
TransactionGraphException - if the baseGraph is already set
public void add(org.openrdf.model.Resource subj,
org.openrdf.model.URI pred,
org.openrdf.model.Value obj)
INamedGraph
add in interface INamedGraphsubj - Subject of statementpred - Predicate of statementobj - Object of statement
public void delete(org.openrdf.model.Resource subj,
org.openrdf.model.URI pred,
org.openrdf.model.Value obj)
INamedGraph
delete in interface INamedGraphsubj - Subject of statementpred - Predicate of statementobj - Object of statementpublic void add(org.openrdf.model.Statement... statements)
INamedGraph
add in interface INamedGraphstatements - statements to add to graphpublic void delete(org.openrdf.model.Statement... statements)
INamedGraph
delete in interface INamedGraphstatements - statements to delete from graphpublic void add(info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> statements)
INamedGraph
add in interface INamedGraphstatements - statements to delete from graphpublic void delete(info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> statements)
INamedGraph
delete in interface INamedGraphstatements - statements to delete from graphpublic void setITransactionQueueHandler(ITransactionQueueManager transactionQueueManager)
transactionQueueManager - for this proxypublic ITransactionQueueManager getTransactionQueueManager()
ITransactionGraph
getTransactionQueueManager in interface ITransactionGraphpublic void clear()
INamedGraph
clear in interface INamedGraphpublic info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> getStatements()
INamedGraph
getStatements in interface INamedGraphpublic void close()
INamedGraph
close in interface INamedGraph
public boolean contains(org.openrdf.model.Resource s,
org.openrdf.model.URI p,
org.openrdf.model.Value o)
INamedGraph
contains in interface INamedGraphs - Subject resource to match, or wildcard if nullp - Predicate uri to match, or wildcard if nullo - Object value to match, or wildcard if null
public boolean contains(org.openrdf.model.Statement statement)
INamedGraph
contains in interface INamedGraphstatement - Statement to check for existence in graph
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)
INamedGraph
find in interface INamedGraphs - Subject resource to match, or wildcard if nullp - Predicate uri to match, or wildcard if nullo - Object value to match, or wildcard if null
public boolean isEmpty()
INamedGraph
isEmpty in interface INamedGraphpublic int size()
INamedGraph
size in interface INamedGraphpublic boolean processTransactions(java.util.List<ITransaction> transactionQueue)
ITransactionGraph
processTransactions in interface ITransactionGraphtransactionQueue - List of transactions to apply to local queue.
public boolean commitTransactionQueue()
throws java.lang.Throwable
ITransactionGraph
commitTransactionQueue in interface ITransactionGraphjava.lang.Throwable
public void undo()
throws AnzoException
ITransactionGraph
undo in interface ITransactionGraphAnzoException - if there was an error undoing last command on graph
public void redo()
throws AnzoException
ITransactionGraph
redo in interface ITransactionGraphAnzoException - if there was an error undoing last command on graphpublic boolean isClosed()
INamedGraph
isClosed in interface INamedGraphpublic INamedGraphEventManager getEventManager()
INamedGraph
getEventManager in interface INamedGraphpublic ITransactionManager getTransactionManager()
INamedGraph
getTransactionManager in interface INamedGraph
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||