viper.comparison
Class EvaluationParameters.ScopeRules

java.lang.Object
  extended byviper.comparison.EvaluationParameters.ScopeRules
Enclosing class:
EvaluationParameters

public class EvaluationParameters.ScopeRules
extends java.lang.Object

Rules for what attributes and descriptors are to be regarded as visible or important.


Constructor Summary
EvaluationParameters.ScopeRules(Evaluation current)
          Constructs a new, empty set of scope rules.
EvaluationParameters.ScopeRules(java.util.Map evas)
          Constructs a new set of scope rules.
 
Method Summary
 boolean comparable(Descriptor T, Descriptor C)
          Determine if two descriptors are comparable.
 java.util.Map getAllMeasuresFor(Descriptor desc)
          Return all current mappings for the given descriptor type
 java.util.Iterator getInScopeAttributesFor(Descriptor desc)
          Gets the names of the attributes that are in scope.
 Equivalencies getMap()
          Gets the ontology mapping this set of scope rules uses.
 AttrMeasure getMeasure(Descriptor desc, java.lang.String attr)
          Gets the major measure for the given attribute.
 boolean inScope(Descriptor desc)
          Determine if the descriptor's type is compatable with the current set of evaluations.
 boolean isOutputableCandidate(Descriptor desc)
          Determine if the candidate descriptor meets the output scoping rules.
 boolean isOutputableTarget(Descriptor desc)
          Determine if the target descriptor meets the output scoping rules.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EvaluationParameters.ScopeRules

public EvaluationParameters.ScopeRules(java.util.Map evas)
Constructs a new set of scope rules.

Parameters:
evas - the associated ontology mapping

EvaluationParameters.ScopeRules

public EvaluationParameters.ScopeRules(Evaluation current)
Constructs a new, empty set of scope rules.

Parameters:
current - map of descriptors to their evaluations
Method Detail

getMap

public Equivalencies getMap()
Gets the ontology mapping this set of scope rules uses.

Returns:
the mapping

comparable

public boolean comparable(Descriptor T,
                          Descriptor C)
Determine if two descriptors are comparable.

Parameters:
T - the target
C - the candidate
Returns:
true when the scope rules and ontology mapping indicate the two descriptors are compatable

isOutputableTarget

public boolean isOutputableTarget(Descriptor desc)
Determine if the target descriptor meets the output scoping rules.

Parameters:
desc - a target descriptor
Returns:
if the target is worthy of using for evaluation. false indicates a don't-care descriptor.

isOutputableCandidate

public boolean isOutputableCandidate(Descriptor desc)
Determine if the candidate descriptor meets the output scoping rules.

Parameters:
desc - a candidate descriptor
Returns:
if the candidate is worthy of using for evaluation. false indicates a don't-care descriptor.

inScope

public boolean inScope(Descriptor desc)
Determine if the descriptor's type is compatable with the current set of evaluations.

Parameters:
desc - the descriptor to check
Returns:
if the descriptor type is to among those evaluated

getMeasure

public AttrMeasure getMeasure(Descriptor desc,
                              java.lang.String attr)
Gets the major measure for the given attribute. Note that some evaluation types can have multiple measures for each attribute; for these, use the more appropriate getAllMeasuresFor(Descriptor)method.

Parameters:
desc - the descriptor type
attr - the attribute
Returns:
the attribute measure on the specified attribute

getAllMeasuresFor

public java.util.Map getAllMeasuresFor(Descriptor desc)
Return all current mappings for the given descriptor type

Parameters:
desc - the descriptor type to look up
Returns:
the measure map for the descriptor type

getInScopeAttributesFor

public java.util.Iterator getInScopeAttributesFor(Descriptor desc)
Gets the names of the attributes that are in scope. The ordering depends on the implementation of the evaluator, but it should be deterministic.

Parameters:
desc - The type of descriptor to check for scope.
Returns:
java.util.Iterator containing String s