net.sf.taverna.t2.partition.algorithms
Class CustomPartitionAlgorithm

java.lang.Object
  extended by net.sf.taverna.t2.partition.algorithms.CustomPartitionAlgorithm
All Implemented Interfaces:
PartitionAlgorithm<java.lang.Object>

public class CustomPartitionAlgorithm
extends java.lang.Object
implements PartitionAlgorithm<java.lang.Object>

Takes a custom search term and checks against the properties eg "operation" of each of the available items. Adds the item to the activity palette if it matches

Author:
Ian Dunlop

Constructor Summary
CustomPartitionAlgorithm()
           
CustomPartitionAlgorithm(java.lang.String searchValue)
           
 
Method Summary
 void addProperty(java.lang.String propertyValue)
           
 java.lang.Object allocate(java.lang.Object newItem, PropertyExtractorRegistry reg)
          Checks against the items property to see if it contains the search term.
 java.lang.String getSearchValue()
           
 void setSearchValue(java.lang.String searchValue)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CustomPartitionAlgorithm

public CustomPartitionAlgorithm()

CustomPartitionAlgorithm

public CustomPartitionAlgorithm(java.lang.String searchValue)
Method Detail

getSearchValue

public java.lang.String getSearchValue()

setSearchValue

public void setSearchValue(java.lang.String searchValue)

addProperty

public void addProperty(java.lang.String propertyValue)

allocate

public java.lang.Object allocate(java.lang.Object newItem,
                                 PropertyExtractorRegistry reg)
Checks against the items property to see if it contains the search term. Search each of the properties in properties in turn

Specified by:
allocate in interface PartitionAlgorithm<java.lang.Object>
Returns:

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object