org.ourgrid.common.matcher
Class Matcher

java.lang.Object
  extended by org.ourgrid.common.matcher.Matcher

public class Matcher
extends java.lang.Object

The Matcher is responsible for evaluate an expression (i.e, given a set of attributes, verify if the expression matches with them)


Field Summary
static int ATT_FALSE
           
static int ATT_TRUE
           
static int ATT_UNDEFINED
           
 
Method Summary
static boolean match(java.lang.String jobRequirement, java.util.Map<java.lang.String,java.lang.String> machineAtt)
          Verifies if an expression matches with a set of attributes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATT_FALSE

public static final int ATT_FALSE
See Also:
Constant Field Values

ATT_TRUE

public static final int ATT_TRUE
See Also:
Constant Field Values

ATT_UNDEFINED

public static final int ATT_UNDEFINED
See Also:
Constant Field Values
Method Detail

match

public static boolean match(java.lang.String jobRequirement,
                            java.util.Map<java.lang.String,java.lang.String> machineAtt)
Verifies if an expression matches with a set of attributes.

Parameters:
jobRequirement - The expression following the JDF grammar definitions
machineAtt - Is a map with name and value pairs.
Returns:
true if matched and false otherwise.