com.cafesoft.cams.attr
Class StandardAttributeMatch

java.lang.Object
  |
  +--com.cafesoft.cams.attr.StandardAttributeMatch
All Implemented Interfaces:
AttributeMatch

public class StandardAttributeMatch
extends Object
implements AttributeMatch

AttributeMatch defines the interface matching EvaluationContext Attributes designated by and AttributeDesignator against a value or pattern using a MatchFunction.

Since:
5/5/2004

Constructor Summary
StandardAttributeMatch(URI attrCategory, Function function, AttributeValue matchAttributeValue, Evaluatable evaluatable)
          Create a new StandardAttributeMatch instance.
 
Method Summary
 URI getAttributeCategory()
          Returns the attribute category of this TargetMatch.
 Evaluatable getMatchEvaluatable()
          Returns the Evaluatable AttributeDesignator used by the matching function.
 Function getMatchFunction()
          Returns the Function used to do the matching.
 AttributeValue getMatchValue()
          Returns the AttributeValue used by the matching function.
 MatchResult match(EvaluationContext evalContext)
          Determines whether this AttributeMatch matches the input request (whether it is applicable)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardAttributeMatch

public StandardAttributeMatch(URI attrCategory,
                              Function function,
                              AttributeValue matchAttributeValue,
                              Evaluatable evaluatable)
                       throws IllegalArgumentException
Create a new StandardAttributeMatch instance.

Parameters:
attrCategory - the associated attribute category.
function - the MatchFunction to be used for matching.
matchAttributeValue - the AttributeValue to compare against.
evaluatable - the evaluatable AttributeDesignator to select applicable request Attributes.
Method Detail

getAttributeCategory

public URI getAttributeCategory()
Returns the attribute category of this TargetMatch.

Specified by:
getAttributeCategory in interface AttributeMatch
Returns:
the attribute category.

getMatchFunction

public Function getMatchFunction()
Returns the Function used to do the matching.

Specified by:
getMatchFunction in interface AttributeMatch
Returns:
the match function

getMatchValue

public AttributeValue getMatchValue()
Returns the AttributeValue used by the matching function.

Specified by:
getMatchValue in interface AttributeMatch
Returns:
the AttributeValue for the match

getMatchEvaluatable

public Evaluatable getMatchEvaluatable()
Returns the Evaluatable AttributeDesignator used by the matching function.

NOTE: Eventually, an "attribute selector" may also be associated with an AttributeMatch, thus the use of the Evaluatable interface rather than AttributeDesignator.

Specified by:
getMatchEvaluatable in interface AttributeMatch
Returns:
the attribute designator (and eventually a attribute selector) for the match

match

public MatchResult match(EvaluationContext evalContext)
Determines whether this AttributeMatch matches the input request (whether it is applicable)

Specified by:
match in interface AttributeMatch
Parameters:
evalContext - the representation of the request
Returns:
the result of trying to match the AttributeMatch and the request


Generated on 5:16:42 PM May 12, 2008, © 1996-2005 Cafésoft LLC. All rights reserved.