org.openanzo.client
Class TrackerManager

java.lang.Object
  extended by org.openanzo.client.TrackerManager

public class TrackerManager
extends java.lang.Object

The trackerManager keeps track of trackers, and provides indexer matching to find trackers that match statements.

Author:
Matthew Roy ( mroy@cambridgesemantics.com )

Constructor Summary
TrackerManager()
          Create a new TrackerManager
 
Method Summary
 void addTracker(ISerializableTracker tracker)
          Add a new tracker and index it
 void clear()
          Clear the contents of trackers and all indexes.
 boolean containsTracker(ISerializableTracker tracker)
          Determine if the manager contains this tracker
 ISerializableTracker getTracker(ISerializableTracker tracker)
          Get the tracker that matches the provided tracker
 java.util.Collection<ISerializableTracker> getTrackers()
          Get the collection of trackers in the manager
 java.util.Collection<ISerializableTracker> matchingTrackers(org.openrdf.model.Resource subj, org.openrdf.model.URI prop, org.openrdf.model.Value obj, org.openrdf.model.Resource context)
          Find the set of trackers that match the statement
 void removeTracker(ISerializableTracker tracker)
          Remove a tracker and remove it from the indexes
 int size()
          Get the size of the trackers
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrackerManager

public TrackerManager()
Create a new TrackerManager

Method Detail

clear

public void clear()
Clear the contents of trackers and all indexes.


containsTracker

public boolean containsTracker(ISerializableTracker tracker)
Determine if the manager contains this tracker

Parameters:
tracker -
Returns:
true if the manager contains this tracker

getTracker

public ISerializableTracker getTracker(ISerializableTracker tracker)
Get the tracker that matches the provided tracker

Parameters:
tracker - tracker to look for
Returns:
tracker currently stored that matches provided tracker

size

public int size()
Get the size of the trackers

Returns:
the size of the trackers

getTrackers

public java.util.Collection<ISerializableTracker> getTrackers()
Get the collection of trackers in the manager

Returns:
the collection of trackers in the manager

addTracker

public void addTracker(ISerializableTracker tracker)
Add a new tracker and index it

Parameters:
tracker - to add

removeTracker

public void removeTracker(ISerializableTracker tracker)
Remove a tracker and remove it from the indexes

Parameters:
tracker - to add

matchingTrackers

public java.util.Collection<ISerializableTracker> matchingTrackers(org.openrdf.model.Resource subj,
                                                                   org.openrdf.model.URI prop,
                                                                   org.openrdf.model.Value obj,
                                                                   org.openrdf.model.Resource context)
Find the set of trackers that match the statement

Parameters:
subj - subject of statement
prop - property of statement
obj - object of statement
context - context of statement
Returns:
set of trackers that match statement


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