|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.server.repository.update.ServerWriter
public class ServerWriter
Implementation of IBocaHandler that handles writing updates from the server into an OutputStream that is sent to the client
| Constructor Summary | |
|---|---|
ServerWriter(RepositoryConnection repositoryConnection,
java.io.OutputStream out)
Create a new ServerWriter |
|
ServerWriter(RepositoryConnection repositoryConnection,
java.io.OutputStream out,
java.util.HashMap<java.lang.Long,org.openrdf.model.Value> visitedUris)
Create a new ServerWriter |
|
| Method Summary | |
|---|---|
org.openrdf.model.Value |
getNode(java.lang.Long id)
Get the URI for a given ID |
boolean |
handleAci(boolean addition,
java.lang.Long namedGraph,
java.lang.Long acl,
java.lang.Long role,
java.lang.Boolean canRead,
java.lang.Boolean canAdd,
java.lang.Boolean canRemove,
java.lang.Boolean canInsertNamedGraph,
java.lang.Boolean canRemoveNamedGraph,
java.lang.Boolean canChangeAcl)
Handle ACI message |
boolean |
handleAci(boolean addition,
org.openrdf.model.URI namedGraph,
org.openrdf.model.URI acl,
org.openrdf.model.URI role,
java.lang.Boolean canRead,
java.lang.Boolean canAdd,
java.lang.Boolean canRemove,
java.lang.Boolean canInsertNamedGraph,
java.lang.Boolean canRemoveNamedGraph,
java.lang.Boolean canChangeAcl)
Handle ACI message |
boolean |
handleAcl(boolean addition,
java.lang.Long acl,
boolean isTemplate)
Handle ACL message |
boolean |
handleAcl(boolean addition,
org.openrdf.model.URI acl,
boolean isTemplate)
Handle ACL message |
boolean |
handleCommandEnd()
Handle end of command message |
boolean |
handleCommandStart(java.lang.Long commandId,
java.lang.String commandType,
java.lang.String commadPreReq)
Handle start of command message |
boolean |
handleEndDocument()
Handle end of document message |
boolean |
handleError(int errorNumber,
int errorSubNumber,
java.lang.String... errorMessageArgs)
Handle an error message |
boolean |
handleNamedGraph(boolean addition,
java.lang.Long graph,
java.lang.Long metaGraph,
java.lang.Long revision,
java.lang.Long aclTemplate,
java.lang.Long createdBy,
java.lang.Long modified,
java.lang.Long lastModifiedBy)
Handle NamedGraph message |
boolean |
handleNamedGraph(boolean addition,
org.openrdf.model.URI graph,
org.openrdf.model.URI metaGraph,
java.lang.Long revision,
org.openrdf.model.URI aclTemplate,
org.openrdf.model.URI createdBy,
java.lang.Long modified,
org.openrdf.model.URI lastModifiedBy)
Handle NamedGraph message |
boolean |
handleNode(java.lang.Long id,
org.openrdf.model.Value node)
Handle Node message |
boolean |
handleReset()
Handle reset message |
boolean |
handleRole(boolean addition,
java.lang.Long role)
Handle role message |
boolean |
handleRole(boolean addition,
org.openrdf.model.URI role)
Handle role message |
boolean |
handleStartDocument()
Handle start of document message |
boolean |
handleStatement(boolean addition,
IRdbTerm graphId,
IRdbTerm subj,
IRdbTerm prop,
IRdbTerm obj)
Handle statement message |
boolean |
handleStatement(boolean addition,
java.lang.Long graphId,
java.lang.Long subj,
java.lang.Long prop,
java.lang.Long obj,
java.util.Map<java.lang.Long,org.openrdf.model.Value> nodes)
Handle statement message |
boolean |
handleStatement(boolean addition,
org.openrdf.model.URI graphId,
org.openrdf.model.Resource subj,
org.openrdf.model.URI prop,
org.openrdf.model.Value obj)
Handle statement message |
boolean |
handleSubRoleOf(boolean addition,
java.lang.Long role,
java.lang.Long parentRole)
Handle Role subrole of another role message |
boolean |
handleSubRoleOf(boolean addition,
org.openrdf.model.URI role,
org.openrdf.model.URI parentRole)
Handle Role subrole of another role message |
boolean |
handleTransactionEnd()
Handle end of transaction message |
boolean |
handleTransactionStart(java.lang.Long transactionId,
java.lang.Long commited)
Handle start of transaction message |
boolean |
handleUser(boolean addition,
java.lang.Long user,
java.lang.Long defaultRole,
java.lang.Long defaultAcl,
java.lang.String userId,
java.lang.String password)
Handle user message |
boolean |
handleUser(boolean addition,
org.openrdf.model.URI user,
org.openrdf.model.URI defaultRole,
org.openrdf.model.URI defaultAcl,
java.lang.String userId,
java.lang.String password)
Handle user message |
boolean |
handleUserInRole(boolean addition,
java.lang.Long user,
java.lang.Long role)
Handle User in Role message |
boolean |
handleUserInRole(boolean addition,
org.openrdf.model.URI user,
org.openrdf.model.URI role)
Handle User in Role message |
void |
writeNode(java.lang.Long id,
java.util.Map<java.lang.Long,org.openrdf.model.Value> cache)
Write Node with ID to outputstream |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServerWriter(RepositoryConnection repositoryConnection,
java.io.OutputStream out,
java.util.HashMap<java.lang.Long,org.openrdf.model.Value> visitedUris)
repositoryConnection - RepositoryConnection to run queries againstout - OutputStream to which results are writtenvisitedUris - Mapping of IDs to URIs that have already been seen and written
public ServerWriter(RepositoryConnection repositoryConnection,
java.io.OutputStream out)
repositoryConnection - RepositoryConnection to run queries againstout - OutputStream to which results are written| Method Detail |
|---|
public org.openrdf.model.Value getNode(java.lang.Long id)
id - ID for URI
public void writeNode(java.lang.Long id,
java.util.Map<java.lang.Long,org.openrdf.model.Value> cache)
throws AnzoException
id - ID of Nodecache - cache of IDs to Values
AnzoException
public boolean handleAci(boolean addition,
java.lang.Long namedGraph,
java.lang.Long acl,
java.lang.Long role,
java.lang.Boolean canRead,
java.lang.Boolean canAdd,
java.lang.Boolean canRemove,
java.lang.Boolean canInsertNamedGraph,
java.lang.Boolean canRemoveNamedGraph,
java.lang.Boolean canChangeAcl)
throws AnzoException
addition - Is this message an addition or deletionnamedGraph - ID for URI of NamedGraph that this ACI belongsacl - URI of ACLrole - Role that this ACI affectscanRead - Can this role read the graphcanAdd - Can this role add to the graphcanRemove - Can this role remove from the graphcanInsertNamedGraph - Can this role insert a new NamedGraphcanRemoveNamedGraph - Can this role remove a NamedGraphcanChangeAcl - Can this role change the ACL properties
AnzoException
public boolean handleAci(boolean addition,
org.openrdf.model.URI namedGraph,
org.openrdf.model.URI acl,
org.openrdf.model.URI role,
java.lang.Boolean canRead,
java.lang.Boolean canAdd,
java.lang.Boolean canRemove,
java.lang.Boolean canInsertNamedGraph,
java.lang.Boolean canRemoveNamedGraph,
java.lang.Boolean canChangeAcl)
throws AnzoException
IRepositoryHandler
handleAci in interface IRepositoryHandleraddition - Is this message an addition or deletionnamedGraph - URI of NamedGraph that this ACI belongsacl - URI of ACLrole - Role that this ACI affectscanRead - Can this role read the graphcanAdd - Can this role add to the graphcanRemove - Can this role remove from the graphcanInsertNamedGraph - Can this role insert a new NamedGraphcanRemoveNamedGraph - Can this role remove a NamedGraphcanChangeAcl - Can this role change the ACL properties
AnzoException
public boolean handleAcl(boolean addition,
org.openrdf.model.URI acl,
boolean isTemplate)
throws AnzoException
IRepositoryHandler
handleAcl in interface IRepositoryHandleraddition - Is this message an addition or deletionacl - URI of ACLisTemplate - Is this acl a template
AnzoException
public boolean handleAcl(boolean addition,
java.lang.Long acl,
boolean isTemplate)
throws AnzoException
addition - Is this message an addition or deletionacl - ID for URI of ACLisTemplate - Is this acl a template
AnzoException
public boolean handleCommandStart(java.lang.Long commandId,
java.lang.String commandType,
java.lang.String commadPreReq)
throws AnzoException
IRepositoryHandler
handleCommandStart in interface IRepositoryHandlercommandId - Id of commandcommandType - Type of commandcommadPreReq - Serialized graph representation of precondition for command
AnzoException
public boolean handleCommandEnd()
throws AnzoException
IRepositoryHandler
handleCommandEnd in interface IRepositoryHandlerAnzoException
public boolean handleEndDocument()
throws AnzoException
IRepositoryHandler
handleEndDocument in interface IRepositoryHandlerAnzoException
public boolean handleNamedGraph(boolean addition,
org.openrdf.model.URI graph,
org.openrdf.model.URI metaGraph,
java.lang.Long revision,
org.openrdf.model.URI aclTemplate,
org.openrdf.model.URI createdBy,
java.lang.Long modified,
org.openrdf.model.URI lastModifiedBy)
throws AnzoException
IRepositoryHandler
handleNamedGraph in interface IRepositoryHandleraddition - Is this message an addition or deletiongraph - URI of NamedGraphmetaGraph - URI of NamedGraph's metadata graphrevision - Revision value of NamedGraphaclTemplate - URI of ACL that this NamedGraph usescreatedBy - User that created the NamedGraphmodified - When graph was last modifiedlastModifiedBy - Who last modified graph
AnzoException
public boolean handleNamedGraph(boolean addition,
java.lang.Long graph,
java.lang.Long metaGraph,
java.lang.Long revision,
java.lang.Long aclTemplate,
java.lang.Long createdBy,
java.lang.Long modified,
java.lang.Long lastModifiedBy)
throws AnzoException
addition - Is this message an addition or deletiongraph - ID of URI of NamedGraphmetaGraph - URI of NamedGraph's metadata graphrevision - Revision value of NamedGraphaclTemplate - URI of ACL that this NamedGraph usescreatedBy - User that created the NamedGraphmodified - When graph was last modifiedlastModifiedBy - Who last modified graph
AnzoException
public boolean handleNode(java.lang.Long id,
org.openrdf.model.Value node)
throws AnzoException
IRepositoryHandler
handleNode in interface IRepositoryHandlerid - ID of nodenode - Value of node
AnzoException
public boolean handleRole(boolean addition,
org.openrdf.model.URI role)
throws AnzoException
IRepositoryHandler
handleRole in interface IRepositoryHandleraddition - Is this message an addition or deletionrole - Role added or deleted
AnzoException
public boolean handleRole(boolean addition,
java.lang.Long role)
throws AnzoException
addition - Is this message an addition or deletionrole - ID of Role added or deleted
AnzoException
public boolean handleStartDocument()
throws AnzoException
IRepositoryHandler
handleStartDocument in interface IRepositoryHandlerAnzoException
public boolean handleStatement(boolean addition,
org.openrdf.model.URI graphId,
org.openrdf.model.Resource subj,
org.openrdf.model.URI prop,
org.openrdf.model.Value obj)
throws AnzoException
IRepositoryHandler
handleStatement in interface IRepositoryHandleraddition - Is this a statement addition or deletiongraphId - URI of NamedGraph that statement belongs tosubj - Subject valueprop - Predicate valueobj - Object value
AnzoException
public boolean handleStatement(boolean addition,
IRdbTerm graphId,
IRdbTerm subj,
IRdbTerm prop,
IRdbTerm obj)
throws AnzoException
addition - Is this a statement addition or deletiongraphId - URI of NamedGraph that statement belongs tosubj - Subject valueprop - Predicate valueobj - Object value
AnzoException
public boolean handleStatement(boolean addition,
java.lang.Long graphId,
java.lang.Long subj,
java.lang.Long prop,
java.lang.Long obj,
java.util.Map<java.lang.Long,org.openrdf.model.Value> nodes)
throws AnzoException
addition - Is this a statement addition or deletiongraphId - URI of NamedGraph that statement belongs tosubj - Subject valueprop - Predicate valueobj - Object valuenodes - map of ids to their values
AnzoException
public boolean handleSubRoleOf(boolean addition,
org.openrdf.model.URI role,
org.openrdf.model.URI parentRole)
throws AnzoException
IRepositoryHandler
handleSubRoleOf in interface IRepositoryHandleraddition - Is this message an addition or deletionrole - Role valueparentRole - Parent role to which role is a subrole
AnzoException
public boolean handleSubRoleOf(boolean addition,
java.lang.Long role,
java.lang.Long parentRole)
throws AnzoException
addition - Is this message an addition or deletionrole - id of Role valueparentRole - id of Parent role to which role is a subrole
AnzoException
public boolean handleTransactionStart(java.lang.Long transactionId,
java.lang.Long commited)
throws AnzoException
IRepositoryHandler
handleTransactionStart in interface IRepositoryHandlertransactionId - Id of transactioncommited - timestamp when transaction was committed
AnzoException
public boolean handleTransactionEnd()
throws AnzoException
IRepositoryHandler
handleTransactionEnd in interface IRepositoryHandlerAnzoException
public boolean handleUser(boolean addition,
org.openrdf.model.URI user,
org.openrdf.model.URI defaultRole,
org.openrdf.model.URI defaultAcl,
java.lang.String userId,
java.lang.String password)
throws AnzoException
IRepositoryHandler
handleUser in interface IRepositoryHandleraddition - Is this message an addition or deletionuser - User valuedefaultRole - Default role for this userdefaultAcl - URI for the default ACL template for this useruserId - UserId for this userpassword - Password for this user
AnzoException
public boolean handleUser(boolean addition,
java.lang.Long user,
java.lang.Long defaultRole,
java.lang.Long defaultAcl,
java.lang.String userId,
java.lang.String password)
throws AnzoException
addition - Is this message an addition or deletionuser - User valuedefaultRole - Default role for this userdefaultAcl - id of URI for the default ACL template for this useruserId - UserId for this userpassword - Password for this user
AnzoException
public boolean handleUserInRole(boolean addition,
org.openrdf.model.URI user,
org.openrdf.model.URI role)
throws AnzoException
IRepositoryHandler
handleUserInRole in interface IRepositoryHandleraddition - Is this message an addition or deletionuser - User valuerole - Role user is being added to or deleted from
AnzoException
public boolean handleUserInRole(boolean addition,
java.lang.Long user,
java.lang.Long role)
throws AnzoException
addition - Is this message an addition or deletionuser - id of User valuerole - id of Role user is being added to or deleted from
AnzoException
public boolean handleError(int errorNumber,
int errorSubNumber,
java.lang.String... errorMessageArgs)
throws AnzoException
IRepositoryHandler
handleError in interface IRepositoryHandlererrorNumber - Major error codeerrorSubNumber - Minor error codeerrorMessageArgs - Arguments to error message
AnzoException
public boolean handleReset()
throws AnzoException
IRepositoryHandler
handleReset in interface IRepositoryHandlerAnzoException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||