edu.ksu.cis.projects.bogor.module.config
Interface ISelfDescribingModule

All Superinterfaces:
Disposable, IModule
All Known Implementing Classes:
DefaultActionTaker, DefaultBacktrackingInfoFactory, DefaultCounterExampleWriter, DefaultExpEvaluator, DefaultSchedulingStrategist, DefaultSearcher, DefaultStateFactory, DefaultStateManager, DefaultTransformer, DefaultValueFactory

public interface ISelfDescribingModule
extends IModule

Type description here.

Version:
CVS $Revision: 1.2 $ $Date: 2005/02/18 22:30:24 $
Author:
Matt Hoosier

Method Summary
 Pair<Domain,Boolean> getOptionDomain(String id)
           
 Collection<Triple<String,Boolean,OptionScope>> getOptionIds()
           
 Collection<String> getSuggestedValues(String id, IBogorConfiguration bc, SymbolTable st)
           
 boolean validate(String id, String value, IBogorConfiguration bc, SymbolTable st, Collection<FileMessage> errors)
          Checks whether the value of a configuration option is legal.
 
Methods inherited from interface edu.ksu.cis.projects.bogor.module.IModule
connect, getCopyrightNotice, setOptions
 
Methods inherited from interface edu.ksu.cis.projects.bogor.util.Disposable
dispose
 

Method Detail

getOptionIds

Collection<Triple<String,Boolean,OptionScope>> getOptionIds()
Returns:
a set of tuples whose first element says the name of the option, and whose second element says whether the option is required, and whose third element says whether the option is private to this module (and thus prefixed by the interface implemented, e.g., edu.ksu.cis.projects.bogor.module.ISearcher) or global in scope (and thus no qualifier is prepended).

getOptionDomain

Pair<Domain,Boolean> getOptionDomain(String id)
Returns:
a tuple whose first element says the domain of the option values, and whose second element says whether the option is multivalued (that is, a comma-separated list)

getSuggestedValues

Collection<String> getSuggestedValues(String id,
                                      IBogorConfiguration bc,
                                      SymbolTable st)

validate

boolean validate(String id,
                 String value,
                 IBogorConfiguration bc,
                 SymbolTable st,
                 Collection<FileMessage> errors)
Checks whether the value of a configuration option is legal.

Parameters:
id - the option's name, as returned by the first tuple element of an item returned by getOptionIds()
value - the value of the option, or null if unconfigued
st - the symbol table for the BIR model
errors - a container into which errors should be put. Implementors should not assume that errors is empty upon entry into this method; it may aggregate the results of calling validate on many ISelfDescribingModule instances.
Returns:
true iff the option is supported and its value is legal