net.sf.taverna.t2.partition
Interface Query<ItemType>

Type Parameters:
ItemType - the parameterised type of the result set of the query
All Superinterfaces:
java.util.Collection<ItemType>, java.lang.Iterable<ItemType>, java.util.Set<ItemType>, SetModel<ItemType>

public interface Query<ItemType>
extends SetModel<ItemType>

Defines a query which can be re-run and which presents a set view on its results. The Query is intended to represent both the old Taverna scavenger class (which were queries in all but name) and new integration with external search-able repositories in which case the term 'query' is a more literal description.

Author:
Tom Oinn

Method Summary
 void doQuery()
          Run the query.
 java.util.Date getLastQueryTime()
          Returns the time at which the query was last invoked, or null if the query has not been invoked yet.
 
Methods inherited from interface net.sf.taverna.t2.partition.SetModel
addSetModelChangeListener, removeSetModelChangeListener
 
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Method Detail

doQuery

void doQuery()
Run the query. The query has internal state from any previous runs (including the initial empty state) and will notify all listeners from the SetModel interface of any items that are present in the new query result and not in the old state or vice versa. It also updates the query time to be the current time.


getLastQueryTime

java.util.Date getLastQueryTime()
Returns the time at which the query was last invoked, or null if the query has not been invoked yet.

Returns:
time of last call to doQuery or null if this hasn't happened yet.