UNICORE Resource Broker NJS Plugin
1.5α1

org.eurogrid.broker.server.globus
Class Translation.SearchResult

java.lang.Object
  |
  +--org.eurogrid.broker.server.globus.Translation.SearchResult
All Implemented Interfaces:
Cloneable, Serializable
Enclosing class:
Translation

public class Translation.SearchResult
extends Object
implements Cloneable, Serializable

The results of searching for a node in a Globus information service.

Author:
Donal K. Fellows
See Also:
Translation.Search, Serialized Form

Field Summary
 Translation.Search search
          What search is this a result for
 
Method Summary
 boolean find(Translation.Search targetSearch, Translation.Constraint targetConstraint, Translation.SearchTest testOperation)
          Find whether there is (search-result,constraint-result) pair that satisfies the given test.
 Translation.ConstraintResult getConstraint(int index)
          Get the index'th constraint result.
 Translation.ConstraintResult getConstraint(Translation.Constraint c)
          Get the result associated with the given constraint.
 List getConstraints()
          Get the list of constraint results that were generated as part of this search result.
 List getResultList(int index)
          Get the list of search results for the index'th sub-search of the search associated with this result.
 List getResultList(Translation.Search subsearch)
          Get the list of search results for the sub-search of the search associated with this result that is identical to the given subsearch.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

search

public final Translation.Search search
What search is this a result for

Method Detail

find

public boolean find(Translation.Search targetSearch,
                    Translation.Constraint targetConstraint,
                    Translation.SearchTest testOperation)
Find whether there is (search-result,constraint-result) pair that satisfies the given test.

Parameters:
targetSearch - The sub-search of the given search to look for.
targetConstraint - The constraint on the given sub-search to ensure is present, or null if not necessary (when no constraint-result will be passed to the test callback.)
testOperation - The test operation to see if the search is successful.
Returns:
Whether the test operation ever returned true.

getConstraint

public Translation.ConstraintResult getConstraint(int index)
Get the index'th constraint result.


getConstraint

public Translation.ConstraintResult getConstraint(Translation.Constraint c)
Get the result associated with the given constraint.

Returns:
null if the constraint isn't recognised.

getConstraints

public List getConstraints()
Get the list of constraint results that were generated as part of this search result.


getResultList

public List getResultList(int index)
Get the list of search results for the index'th sub-search of the search associated with this result.


getResultList

public List getResultList(Translation.Search subsearch)
Get the list of search results for the sub-search of the search associated with this result that is identical to the given subsearch.

Returns:
null if the search isn't recognised.

UNICORE Resource Broker NJS Plugin
1.5α1

Submit a bug or feature
Copyright © 2002-2004 University of Manchester, U.K. See license.terms for details.