org.openanzo.services.trackers
Interface ISerializableTracker

All Superinterfaces:
INotificationSelector, ITracker
All Known Implementing Classes:
JenaSelectorTracker, SelectorTracker

public interface ISerializableTracker
extends ITracker

Extension of ITracker that allows for the serialization of the trackers definition into an RDF store

Author:
Matthew Roy ( mroy@cambridgesemantics.com )

Method Summary
 void addListener(org.openrdf.model.URI trackerSetURI, TrackerListener listener)
          Add a new TrackerListener for this tracker
 void addTrackerSet(org.openrdf.model.URI trackerSetURI)
          Add a new TrackerSet to this tracker
 java.util.Set<TrackerListener> getListeners()
          Get the TrackerListeners for this tracker
 java.util.Set<org.openrdf.model.URI> getTrackerSets()
          Get the TrackerSets for this tracker
 org.openrdf.model.Resource getURI()
          Get the URI of the tracker
 boolean isDeleted()
          Determine if this tracker was deleted since the last replication
 boolean isReplicated()
          Determine if this tracker was added since the last replication, or else return true
 void removeListener(org.openrdf.model.URI trackerSetURI, TrackerListener listener)
          Remove a TrackerListener from this tracker
 void removeSerialization(INamedGraph graph)
          Removes the RDF statements that make up any and all serializations of this tracker from the given RDF graph.
 void removeTrackerSet(org.openrdf.model.URI trackerSetURI)
          Remove a TrackerSet from this tracker
 org.openrdf.model.Resource serialize(INamedGraph graph)
          Serializes this tracker into the given RDF graph.
 void setDeleted(boolean deleted)
          Set deleted flag of tracker
 void setReplicated(boolean replicated)
          Set replicated state of tracker
 
Methods inherited from interface org.openanzo.services.trackers.ITracker
equals, getContext, getObject, getPredicate, getQueryString, getSubject, hashCode, matchNamedGraphUri, matchStatement
 
Methods inherited from interface org.openanzo.services.INotificationSelector
getMessageSelector
 

Method Detail

getURI

org.openrdf.model.Resource getURI()
Get the URI of the tracker

Returns:
the URI of the tracker

isReplicated

boolean isReplicated()
Determine if this tracker was added since the last replication, or else return true

Returns:
false if this tracker was added since the last replication, or else return true

isDeleted

boolean isDeleted()
Determine if this tracker was deleted since the last replication

Returns:
true if this tracker was deleted since the last replication

setReplicated

void setReplicated(boolean replicated)
Set replicated state of tracker

Parameters:
replicated - true if this tracker has been replicated

setDeleted

void setDeleted(boolean deleted)
Set deleted flag of tracker

Parameters:
deleted - true if this tracker was deleted since last replication

serialize

org.openrdf.model.Resource serialize(INamedGraph graph)
Serializes this tracker into the given RDF graph. If this method is called multiple times on the same graph, then it is possible that multiple serializations of the tracker will exist. In that case, those serializations may each have different RDF data but when loaded, they must all be equal via the equals method. The returned RDF resource node is useful for adding extra properties to the serialized tracker.

Parameters:
graph - in which to serialize definition and state of trackers
Returns:
the RDF resource which represents the tracker in the graph.

removeSerialization

void removeSerialization(INamedGraph graph)
Removes the RDF statements that make up any and all serializations of this tracker from the given RDF graph.

Parameters:
graph - in which to serialize definition and state of trackers

getListeners

java.util.Set<TrackerListener> getListeners()
Get the TrackerListeners for this tracker

Returns:
the TrackerListeners for this tracker

addListener

void addListener(org.openrdf.model.URI trackerSetURI,
                 TrackerListener listener)
Add a new TrackerListener for this tracker

Parameters:
trackerSetURI - URI of set to which this listener belongs
listener - TrackerListener to add

removeListener

void removeListener(org.openrdf.model.URI trackerSetURI,
                    TrackerListener listener)
Remove a TrackerListener from this tracker

Parameters:
trackerSetURI - URI of set to which this listener belongs
listener - TrackerListener to remove

getTrackerSets

java.util.Set<org.openrdf.model.URI> getTrackerSets()
Get the TrackerSets for this tracker

Returns:
the TrackerSets for this tracker

addTrackerSet

void addTrackerSet(org.openrdf.model.URI trackerSetURI)
Add a new TrackerSet to this tracker

Parameters:
trackerSetURI - to add to this tracker

removeTrackerSet

void removeTrackerSet(org.openrdf.model.URI trackerSetURI)
Remove a TrackerSet from this tracker

Parameters:
trackerSetURI - to remove from this tracker


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