|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.server.repository.update.TransactionUpdateResults
public class TransactionUpdateResults
Tracks adds, updates, removes and errors in an update transaction. Update operations on a statement are merged so that only the final state of the statment is stored. Removed NamedGraphs are tracked seperate from statements.
| Field Summary | |
|---|---|
int |
addCount
Statements added |
int |
removeCount
Statements removed |
| Constructor Summary | |
|---|---|
TransactionUpdateResults(java.lang.Long userId,
java.lang.Long timestamp,
long transactionId)
Create a new TransactionUpdateResults |
|
| Method Summary | |
|---|---|
void |
addNamedGraph(org.openrdf.model.URI namedGraphUri,
NamedGraph ng)
Add a NamedGraph and its URI to set of NamedGraphs |
java.util.List<org.openrdf.model.Statement> |
getAdditionStatements()
|
java.util.HashMap<org.openrdf.model.URI,java.lang.Boolean> |
getCanAdd()
Get Cache of user's permission to add to a namedGraph |
java.lang.Boolean |
getCanInsertNamedGraphs()
Cache of user's permission to insert a new namedGraph |
java.util.HashMap<org.openrdf.model.URI,java.lang.Boolean> |
getCanRemove()
Cache of user's permission to remove from a namedGraph |
java.util.HashMap<org.openrdf.model.URI,java.lang.Boolean> |
getCanRemoveNamedGraphs()
Cache of user's permission to remove a namedGraph |
java.util.List<org.openrdf.model.Statement> |
getDeletionStatements()
|
java.io.ByteArrayOutputStream |
getErrorOutputStream()
Get the errors as an outputStream to which errors can be written |
java.util.List<AnzoException> |
getErrors()
Get the List of errors that occured during this transaction |
IRepositoryHandler |
getHandler()
Get the IBocaHandler that handles writting udpates to client |
java.util.HashMap<java.lang.Long,java.lang.Boolean> |
getIsSysAdmin()
Get Cache of user's membership in sysamin role |
java.util.HashMap<org.openrdf.model.URI,NamedGraph> |
getNamedGraphUpdates()
Get the map of URIs to NamedGraphs that have been updated in this transaction |
java.io.ByteArrayOutputStream |
getOutputStream()
Get the results outputStream that can be handed to a stream parser. |
long |
getTransactionId()
Get the id of this transaction |
java.lang.Long |
getTransactionTimestamp()
Get the timestamp when this transaction was commited |
java.lang.Long |
getUpdateUserId()
Get the User that created this transaction |
void |
handleError(int errorNumber,
int errorSubNumber,
java.lang.String... errorMessageArgs)
Handle an error by creating a AnzoException and writing error to handler |
boolean |
hasError()
Return true if any errors have occurred during this transaction |
void |
removeNamedGraph(org.openrdf.model.URI namedGraphUri)
Remove a NamedGraph from set of NamedGraphs |
void |
setCanAdd(java.util.HashMap<org.openrdf.model.URI,java.lang.Boolean> canAdd)
Set Cache of user's permission to add to a namedGraph |
void |
setCanInsertNamedGraphs(java.lang.Boolean canInsertNamedGraphs)
Set Cache of user's permission to insert a new namedGraph |
void |
setCanRemove(java.util.HashMap<org.openrdf.model.URI,java.lang.Boolean> canRemove)
Set Cache of user's permission to remove from a namedGraph |
void |
setCanRemoveNamedGraphs(java.util.HashMap<org.openrdf.model.URI,java.lang.Boolean> canRemoveNamedGraphs)
Set Cache of user's permission to remove a namedGraph |
void |
setIsSysAdmin(java.util.HashMap<java.lang.Long,java.lang.Boolean> isSysAdmin)
Set Cache of user's membership in sysadmin role |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int addCount
public int removeCount
| Constructor Detail |
|---|
public TransactionUpdateResults(java.lang.Long userId,
java.lang.Long timestamp,
long transactionId)
userId - User who created transactiontimestamp - Timestamp when transaction occurredtransactionId - ID for transaction| Method Detail |
|---|
public java.util.List<AnzoException> getErrors()
getErrors in interface IModelTransactionUpdatespublic java.lang.Long getTransactionTimestamp()
getTransactionTimestamp in interface IModelTransactionUpdatespublic java.lang.Long getUpdateUserId()
public void addNamedGraph(org.openrdf.model.URI namedGraphUri,
NamedGraph ng)
namedGraphUri - URI of NamedGraphng - NamedGraphpublic void removeNamedGraph(org.openrdf.model.URI namedGraphUri)
namedGraphUri - URI of NamedGraph
public void handleError(int errorNumber,
int errorSubNumber,
java.lang.String... errorMessageArgs)
throws AnzoException
errorNumber - Major code for errorerrorSubNumber - Minor code for errorerrorMessageArgs - Arguments for error messages
AnzoExceptionpublic java.io.ByteArrayOutputStream getErrorOutputStream()
IModelTransactionUpdates
getErrorOutputStream in interface IModelTransactionUpdatespublic boolean hasError()
public java.io.ByteArrayOutputStream getOutputStream()
IModelTransactionUpdates
getOutputStream in interface IModelTransactionUpdatespublic long getTransactionId()
IModelTransactionUpdates
getTransactionId in interface IModelTransactionUpdatespublic java.util.HashMap<org.openrdf.model.URI,NamedGraph> getNamedGraphUpdates()
public IRepositoryHandler getHandler()
public java.util.HashMap<java.lang.Long,java.lang.Boolean> getIsSysAdmin()
public java.util.HashMap<org.openrdf.model.URI,java.lang.Boolean> getCanAdd()
public java.lang.Boolean getCanInsertNamedGraphs()
public java.util.HashMap<org.openrdf.model.URI,java.lang.Boolean> getCanRemove()
public java.util.HashMap<org.openrdf.model.URI,java.lang.Boolean> getCanRemoveNamedGraphs()
public void setIsSysAdmin(java.util.HashMap<java.lang.Long,java.lang.Boolean> isSysAdmin)
isSysAdmin - Cache of user's membership in sysadmin rolepublic void setCanAdd(java.util.HashMap<org.openrdf.model.URI,java.lang.Boolean> canAdd)
canAdd - Cache of user's permission to remove from a namedGraphpublic void setCanInsertNamedGraphs(java.lang.Boolean canInsertNamedGraphs)
canInsertNamedGraphs - Set Cache of user's permission to insert a new namedGraphpublic void setCanRemove(java.util.HashMap<org.openrdf.model.URI,java.lang.Boolean> canRemove)
canRemove - Set Cache of user's permission to remove from a namedGraphpublic void setCanRemoveNamedGraphs(java.util.HashMap<org.openrdf.model.URI,java.lang.Boolean> canRemoveNamedGraphs)
canRemoveNamedGraphs - Set Cache of user's permission to remove a namedGraphpublic java.util.List<org.openrdf.model.Statement> getAdditionStatements()
public java.util.List<org.openrdf.model.Statement> getDeletionStatements()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||