|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dllearner.gui.Config
public class Config
Config save all together used variables: ComponentManager, KnowledgeSource, Reasoner, ReasonerComponent, LearningProblem, LearningAlgorithm; also inits of these components.
| Constructor Summary | |
|---|---|
Config(ComponentManager cm,
KnowledgeSource source,
ReasonerComponent reasoner,
LearningProblem lp,
LearningAlgorithm la)
This constructor can be used systemwide to save configurations in conf files. |
|
Config(StartGUI gui)
Create central configuration object. |
|
| Method Summary | ||
|---|---|---|
|
applyConfigEntry(Component component,
ConfigEntry<T> entry)
Applies a configuration option and cares for all consequences the GUI needs to take. |
|
KnowledgeSource |
changeKnowledgeSource(Class<? extends KnowledgeSource> clazz)
Changes active knowledge source. |
|
LearningAlgorithm |
changeLearningAlgorithm(Class<? extends LearningAlgorithm> clazz)
Change the learning algorithm. |
|
LearningProblem |
changeLearningProblem(Class<? extends LearningProblem> clazz)
Change the learning problem and notify the depending components (learning algorithm). |
|
ReasonerComponent |
changeReasoner(Class<? extends ReasonerComponent> clazz)
Change the reasoner and notify the depending components (learning problem, learning algorithm). |
|
void |
enableComponentsIfPossible()
Tests whether components can be enabled. |
|
ComponentManager |
getComponentManager()
Get ComponentManager. |
|
|
getConfigOptionValue(Component component,
ConfigOption<T> option)
Delegate method for getting config option values. |
|
KnowledgeSource |
getKnowledgeSource()
Get KnowledgeSource. |
|
LearningAlgorithm |
getLearningAlgorithm()
Get LearningAlgorithm. |
|
LearningProblem |
getLearningProblem()
Get LearningProblem. |
|
ReasonerComponent |
getReasoner()
Get Reasoner. |
|
void |
init(List<Integer> tabIndex)
Initialises the specified components and records which ones where initialised. |
|
boolean |
isEnabled(int tabIndex)
Returns whether the corresponding tab is enabled (e.g. |
|
void |
loadFile(File file)
Loads a file using the commandline interface and asks it for loaded components and config options. |
|
boolean |
mandatoryOptionsSpecified(Component component)
Checks whether all mandatory options have been set for a component. |
|
boolean |
needsInitKnowledgeSource()
KnowledgeSource.init has run? |
|
boolean |
needsInitLearningAlgorithm()
LearningAlgorithm.init() has run? |
|
boolean |
needsInitLearningProblem()
LearningProblem.init has run? |
|
boolean |
needsInitReasoner()
Reasoner.init has run? |
|
KnowledgeSource |
newKnowledgeSource(Class<? extends KnowledgeSource> clazz)
Creates a knowledge source and makes it the active source. |
|
LearningAlgorithm |
newLearningAlgorithm(Class<? extends LearningAlgorithm> clazz)
Creates learning algorithm and makes it active. |
|
LearningProblem |
newLearningProblem(Class<? extends LearningProblem> clazz)
Creates learning problem and makes it active. |
|
ReasonerComponent |
newReasoner(Class<? extends ReasonerComponent> clazz)
Creates reasoner + reasoning service and makes it active. |
|
boolean |
tabNeedsInit(int tabIndex)
Returns whether the corresponding tab needs to be initialised. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Config(ComponentManager cm,
KnowledgeSource source,
ReasonerComponent reasoner,
LearningProblem lp,
LearningAlgorithm la)
cm - source - reasoner - rs - lp - la - public Config(StartGUI gui)
gui - The main gui object. It is passed as parameter, such that the
configuration handler can update the GUI appropriately.| Method Detail |
|---|
public void loadFile(File file)
file - The file to load.public ComponentManager getComponentManager()
public KnowledgeSource getKnowledgeSource()
public KnowledgeSource newKnowledgeSource(Class<? extends KnowledgeSource> clazz)
clazz - knowledge source class
public KnowledgeSource changeKnowledgeSource(Class<? extends KnowledgeSource> clazz)
clazz - knowledge source class
public ReasonerComponent getReasoner()
public ReasonerComponent newReasoner(Class<? extends ReasonerComponent> clazz)
clazz - The class of the reasoner.
public ReasonerComponent changeReasoner(Class<? extends ReasonerComponent> clazz)
clazz - The reasoner class.
public LearningProblem getLearningProblem()
public LearningProblem newLearningProblem(Class<? extends LearningProblem> clazz)
clazz - The class of the learning problem.
public LearningProblem changeLearningProblem(Class<? extends LearningProblem> clazz)
clazz - The learning problem class.
public LearningAlgorithm getLearningAlgorithm()
public LearningAlgorithm newLearningAlgorithm(Class<? extends LearningAlgorithm> clazz)
throws LearningProblemUnsupportedException
clazz - The class of the learning algorithm.
LearningProblemUnsupportedException - If the learning algorithm
does not support the learning problem (TODO should be handled intelligently
by GUI).
public LearningAlgorithm changeLearningAlgorithm(Class<? extends LearningAlgorithm> clazz)
throws LearningProblemUnsupportedException
clazz - The learning algorithm class.
LearningProblemUnsupportedException - If the learning algorithm
does not support the learning problem (TODO should be handled intelligently
by GUI).public boolean tabNeedsInit(int tabIndex)
tabIndex - Index of the tab (0 to 3).
public boolean needsInitKnowledgeSource()
public boolean needsInitReasoner()
public boolean needsInitLearningProblem()
public boolean needsInitLearningAlgorithm()
public boolean isEnabled(int tabIndex)
tabIndex - Index of the tab (0 to 3).
public void init(List<Integer> tabIndex)
tabIndex - A list of components (0 = knowledge source, 1 = reasoner, ...).
public <T> void applyConfigEntry(Component component,
ConfigEntry<T> entry)
T - The type of config entry.component - The component to apply the entry to.entry - The config entry to apply.ComponentManager.applyConfigEntry(Component, ConfigEntry)public void enableComponentsIfPossible()
public boolean mandatoryOptionsSpecified(Component component)
component - The component to test.
public <T> T getConfigOptionValue(Component component,
ConfigOption<T> option)
T - Type of option.component - Component, which has the option.option - The option for which we want to know the value.
ComponentManager.getConfigOptionValue(Component, ConfigOption)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||