viper.comparison
Class EvaluationParameters

java.lang.Object
  extended byviper.comparison.EvaluationParameters

public class EvaluationParameters
extends java.lang.Object

Describes a set of parameters for setting up an evaluation.


Nested Class Summary
 class EvaluationParameters.ScopeRules
          Rules for what attributes and descriptors are to be regarded as visible or important.
 
Field Summary
static viper.comparison.EvaluationParameters.DescNameComparator descriptorComparator
          Sorts descriptors by their full name.
 
Constructor Summary
EvaluationParameters(DescriptorConfigs descriptorProtos)
          Creates a new instance of EvaluationParameters
 
Method Summary
 RuleHolder getCandidateInputFilter()
          Gets the rules for candidate descriptors that are worthy of even parsing.
 java.util.Iterator getEvas()
          Gets all evaluations.
 Equivalencies getMap()
          Get the map from target to candidate descriptors and attributes.
 EvaluationParameters.ScopeRules getScopeRulesFor(Evaluation current)
          Get the scope rules for the the given evaluation.
 RuleHolder getTargetInputFilter()
          Gets the rules for target descriptors that are worthy of even parsing.
 void parse(VReader reader, int level, int targetMatch)
          Parses the given evaluation parameters file, using the given level and match filter information, which must somehow be acquired elsewhere, for now.
 void printTerseParameters(java.io.PrintWriter raw)
          Prints the parameters in raw format.
 void printVerboseParameters(java.io.PrintWriter out)
          Prints the parameters in long form.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

descriptorComparator

public static final viper.comparison.EvaluationParameters.DescNameComparator descriptorComparator
Sorts descriptors by their full name.

Constructor Detail

EvaluationParameters

public EvaluationParameters(DescriptorConfigs descriptorProtos)
Creates a new instance of EvaluationParameters

Parameters:
descriptorProtos - the descriptor schema
Method Detail

getTargetInputFilter

public RuleHolder getTargetInputFilter()
Gets the rules for target descriptors that are worthy of even parsing.

Returns:
rules for which target descriptors to parse

getCandidateInputFilter

public RuleHolder getCandidateInputFilter()
Gets the rules for candidate descriptors that are worthy of even parsing.

Returns:
rules for which candidate descriptors to parse

parse

public void parse(VReader reader,
                  int level,
                  int targetMatch)
Parses the given evaluation parameters file, using the given level and match filter information, which must somehow be acquired elsewhere, for now.

Parameters:
reader - the source to parse
level - the level to bring the comparisons to, if using them
targetMatch - the type of match filter to use, if applicable

getMap

public Equivalencies getMap()
Get the map from target to candidate descriptors and attributes.

Returns:
the map from targets to candidates

printTerseParameters

public void printTerseParameters(java.io.PrintWriter raw)
Prints the parameters in raw format.

Parameters:
raw - the raw output stream

printVerboseParameters

public void printVerboseParameters(java.io.PrintWriter out)
Prints the parameters in long form.

Parameters:
out - the legible output stream

getScopeRulesFor

public EvaluationParameters.ScopeRules getScopeRulesFor(Evaluation current)
Get the scope rules for the the given evaluation.

Parameters:
current - the evaluation
Returns:
rules regarding which descriptor or attribute is worth evaluating or which should be marked as don't care

getEvas

public java.util.Iterator getEvas()
Gets all evaluations.

Returns:
the evaluations