org.openanzo.server.repository.indexer
Class IndexUpdateHandler.IndexerUpdateHandler

java.lang.Object
  extended by org.openanzo.serialization.handlers.HandlerAdapter
      extended by org.openanzo.server.repository.indexer.IndexUpdateHandler.IndexerUpdateHandler
All Implemented Interfaces:
IRepositoryHandler
Enclosing class:
IndexUpdateHandler

public class IndexUpdateHandler.IndexerUpdateHandler
extends HandlerAdapter

Handler for parsing transaction events that come from UpdateHandler. For every transaction start, preIndex and preRemove are called. Statements with string literal objects are indexed. When the transaction ends, postIndex and postRemove are called.

Author:
Wing Yung (wingyung@us.ibm.com)

Method Summary
 boolean handleAci(boolean addition, org.openrdf.model.URI namedGraphUri, org.openrdf.model.URI acl, org.openrdf.model.URI role, java.lang.Boolean canRead, java.lang.Boolean canUpdate, java.lang.Boolean canDelete, java.lang.Boolean canInsert, java.lang.Boolean canRemove, java.lang.Boolean canChangeAcl)
          Handle ACI message
 boolean handleAcl(boolean addition, org.openrdf.model.URI acl, boolean isTemplate)
          Handle ACL message
 boolean handleNamedGraph(boolean additions, org.openrdf.model.URI namedGraphUri, org.openrdf.model.URI metadataGraphUri, 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 handleRole(boolean addition, org.openrdf.model.URI role)
          Handle role message
 boolean handleStatement(boolean additions, org.openrdf.model.URI graphUri, org.openrdf.model.Resource subject, org.openrdf.model.URI predicate, org.openrdf.model.Value object)
          Handle statement 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 id, java.lang.Long timestamp)
          Handle start of transaction message
 boolean handleUser(boolean addition, org.openrdf.model.URI user, org.openrdf.model.URI defaultRole, org.openrdf.model.URI defaultAclTemplate, java.lang.String userId, java.lang.String password)
          Handle user message
 boolean handleUserInRole(boolean addition, org.openrdf.model.URI user, org.openrdf.model.URI role)
          Handle User in Role message
 
Methods inherited from class org.openanzo.serialization.handlers.HandlerAdapter
handleCommandEnd, handleCommandStart, handleEndDocument, handleError, handleNode, handleReset, handleStartDocument
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

handleAci

public boolean handleAci(boolean addition,
                         org.openrdf.model.URI namedGraphUri,
                         org.openrdf.model.URI acl,
                         org.openrdf.model.URI role,
                         java.lang.Boolean canRead,
                         java.lang.Boolean canUpdate,
                         java.lang.Boolean canDelete,
                         java.lang.Boolean canInsert,
                         java.lang.Boolean canRemove,
                         java.lang.Boolean canChangeAcl)
                  throws AnzoException
Description copied from interface: IRepositoryHandler
Handle ACI message

Specified by:
handleAci in interface IRepositoryHandler
Overrides:
handleAci in class HandlerAdapter
Parameters:
addition - Is this message an addition or deletion
namedGraphUri - URI of NamedGraph that this ACI belongs
acl - URI of ACL
role - Role that this ACI affects
canRead - Can this role read the graph
canUpdate - Can this role add to the graph
canDelete - Can this role remove from the graph
canInsert - Can this role insert a new NamedGraph
canRemove - Can this role remove a NamedGraph
canChangeAcl - Can this role change the ACL properties
Returns:
Message handled successfully
Throws:
AnzoException

handleAcl

public boolean handleAcl(boolean addition,
                         org.openrdf.model.URI acl,
                         boolean isTemplate)
                  throws AnzoException
Description copied from interface: IRepositoryHandler
Handle ACL message

Specified by:
handleAcl in interface IRepositoryHandler
Overrides:
handleAcl in class HandlerAdapter
Parameters:
addition - Is this message an addition or deletion
acl - URI of ACL
isTemplate - Is this acl a template
Returns:
Message handled successfully
Throws:
AnzoException

handleRole

public boolean handleRole(boolean addition,
                          org.openrdf.model.URI role)
                   throws AnzoException
Description copied from interface: IRepositoryHandler
Handle role message

Specified by:
handleRole in interface IRepositoryHandler
Overrides:
handleRole in class HandlerAdapter
Parameters:
addition - Is this message an addition or deletion
role - Role added or deleted
Returns:
Message handled successfully
Throws:
AnzoException

handleSubRoleOf

public boolean handleSubRoleOf(boolean addition,
                               org.openrdf.model.URI role,
                               org.openrdf.model.URI parentRole)
                        throws AnzoException
Description copied from interface: IRepositoryHandler
Handle Role subrole of another role message

Specified by:
handleSubRoleOf in interface IRepositoryHandler
Overrides:
handleSubRoleOf in class HandlerAdapter
Parameters:
addition - Is this message an addition or deletion
role - Role value
parentRole - Parent role to which role is a subrole
Returns:
Message handled successfully
Throws:
AnzoException

handleUser

public boolean handleUser(boolean addition,
                          org.openrdf.model.URI user,
                          org.openrdf.model.URI defaultRole,
                          org.openrdf.model.URI defaultAclTemplate,
                          java.lang.String userId,
                          java.lang.String password)
                   throws AnzoException
Description copied from interface: IRepositoryHandler
Handle user message

Specified by:
handleUser in interface IRepositoryHandler
Overrides:
handleUser in class HandlerAdapter
Parameters:
addition - Is this message an addition or deletion
user - User value
defaultRole - Default role for this user
defaultAclTemplate - URI for the default ACL template for this user
userId - UserId for this user
password - Password for this user
Returns:
Message handled successfully
Throws:
AnzoException

handleUserInRole

public boolean handleUserInRole(boolean addition,
                                org.openrdf.model.URI user,
                                org.openrdf.model.URI role)
                         throws AnzoException
Description copied from interface: IRepositoryHandler
Handle User in Role message

Specified by:
handleUserInRole in interface IRepositoryHandler
Overrides:
handleUserInRole in class HandlerAdapter
Parameters:
addition - Is this message an addition or deletion
user - User value
role - Role user is being added to or deleted from
Returns:
Message handled successfully
Throws:
AnzoException

handleNamedGraph

public boolean handleNamedGraph(boolean additions,
                                org.openrdf.model.URI namedGraphUri,
                                org.openrdf.model.URI metadataGraphUri,
                                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
Description copied from interface: IRepositoryHandler
Handle NamedGraph message

Specified by:
handleNamedGraph in interface IRepositoryHandler
Overrides:
handleNamedGraph in class HandlerAdapter
Parameters:
additions - Is this message an addition or deletion
namedGraphUri - URI of NamedGraph
metadataGraphUri - URI of NamedGraph's metadata graph
revision - Revision value of NamedGraph
aclTemplate - URI of ACL that this NamedGraph uses
createdBy - User that created the NamedGraph
modified - When graph was last modified
lastModifiedBy - Who last modified graph
Returns:
Message handled successfully
Throws:
AnzoException

handleStatement

public boolean handleStatement(boolean additions,
                               org.openrdf.model.URI graphUri,
                               org.openrdf.model.Resource subject,
                               org.openrdf.model.URI predicate,
                               org.openrdf.model.Value object)
                        throws AnzoException
Description copied from interface: IRepositoryHandler
Handle statement message

Specified by:
handleStatement in interface IRepositoryHandler
Overrides:
handleStatement in class HandlerAdapter
Parameters:
additions - Is this a statement addition or deletion
graphUri - URI of NamedGraph that statement belongs to
subject - Subject value
predicate - Predicate value
object - Object value
Returns:
Message handled successfully
Throws:
AnzoException

handleTransactionStart

public boolean handleTransactionStart(java.lang.Long id,
                                      java.lang.Long timestamp)
                               throws AnzoException
Description copied from interface: IRepositoryHandler
Handle start of transaction message

Specified by:
handleTransactionStart in interface IRepositoryHandler
Overrides:
handleTransactionStart in class HandlerAdapter
Parameters:
id - Id of transaction
timestamp - timestamp when transaction was committed
Returns:
Message handled successfully
Throws:
AnzoException

handleTransactionEnd

public boolean handleTransactionEnd()
                             throws AnzoException
Description copied from interface: IRepositoryHandler
Handle end of transaction message

Specified by:
handleTransactionEnd in interface IRepositoryHandler
Overrides:
handleTransactionEnd in class HandlerAdapter
Returns:
Message handled successfully
Throws:
AnzoException


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.