org.openanzo.serialization.handlers
Class ClientHandler

java.lang.Object
  extended by org.openanzo.serialization.handlers.HandlerAdapter
      extended by org.openanzo.serialization.handlers.ClientHandler
All Implemented Interfaces:
IRepositoryHandler

public class ClientHandler
extends HandlerAdapter

IRepositoryHandler that processes Statement and NamedGraph messages into a set of additions and deletions lists

Author:
Matthew Roy ( mroy@cambridgesemantics.com )

Constructor Summary
ClientHandler()
           
 
Method Summary
 java.util.Map<org.openrdf.model.URI,java.util.ArrayList<org.openrdf.model.Statement>> getAdditions()
          Get the map of NamedGraph's URI and the set of additions
 java.util.Map<org.openrdf.model.URI,java.util.ArrayList<org.openrdf.model.Statement>> getDeletions()
          Get the map of NamedGraph's URI and the set of deletions
 boolean handleNamedGraph(boolean additions, org.openrdf.model.URI namedGraph, org.openrdf.model.URI metaGraph, java.lang.Long revision, org.openrdf.model.URI createdByURIId, org.openrdf.model.URI acl, java.lang.Long modified, org.openrdf.model.URI lastModifiedBy)
          Handle NamedGraph message
 boolean handleStatement(boolean additions, org.openrdf.model.URI namedGraphId, org.openrdf.model.Resource subject, org.openrdf.model.URI predicate, org.openrdf.model.Value object)
          Handle statement message
 
Methods inherited from class org.openanzo.serialization.handlers.HandlerAdapter
handleAci, handleAcl, handleCommandEnd, handleCommandStart, handleEndDocument, handleError, handleNode, handleReset, handleRole, handleStartDocument, handleSubRoleOf, handleTransactionEnd, handleTransactionStart, handleUser, handleUserInRole
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientHandler

public ClientHandler()
Method Detail

handleStatement

public boolean handleStatement(boolean additions,
                               org.openrdf.model.URI namedGraphId,
                               org.openrdf.model.Resource subject,
                               org.openrdf.model.URI predicate,
                               org.openrdf.model.Value object)
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
namedGraphId - URI of NamedGraph that statement belongs to
subject - Subject value
predicate - Predicate value
object - Object value
Returns:
Message handled successfully

handleNamedGraph

public boolean handleNamedGraph(boolean additions,
                                org.openrdf.model.URI namedGraph,
                                org.openrdf.model.URI metaGraph,
                                java.lang.Long revision,
                                org.openrdf.model.URI createdByURIId,
                                org.openrdf.model.URI acl,
                                java.lang.Long modified,
                                org.openrdf.model.URI lastModifiedBy)
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
namedGraph - URI of NamedGraph
metaGraph - URI of NamedGraph's metadata graph
revision - Revision value of NamedGraph
createdByURIId - URI of ACL that this NamedGraph uses
acl - User that created the NamedGraph
modified - When graph was last modified
lastModifiedBy - Who last modified graph
Returns:
Message handled successfully

getAdditions

public java.util.Map<org.openrdf.model.URI,java.util.ArrayList<org.openrdf.model.Statement>> getAdditions()
Get the map of NamedGraph's URI and the set of additions

Returns:
Map of NamedGraph's URI and the set of additions

getDeletions

public java.util.Map<org.openrdf.model.URI,java.util.ArrayList<org.openrdf.model.Statement>> getDeletions()
Get the map of NamedGraph's URI and the set of deletions

Returns:
Map of NamedGraph's URI and the set of deletions


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