org.dllearner.core
Class Component

java.lang.Object
  extended by org.dllearner.core.Component
Direct Known Subclasses:
KnowledgeSource, LearningAlgorithm, LearningProblem, ReasonerComponent

public abstract class Component
extends Object

Base class of all components. See also http://dl-learner.org/wiki/Architecture.

Author:
Jens Lehmann

Constructor Summary
Component()
           
 
Method Summary
static Collection<ConfigOption<?>> createConfigOptions()
          Returns all configuration options supported by this component.
abstract  Configurator getConfigurator()
          For each component, a configurator class is generated in package org.dllearner.core.configurators using the script ConfigJavaGenerator.
static String getName()
          Returns the name of this component.
abstract  void init()
          Method to be called after the component has been configured.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Component

public Component()
Method Detail

getConfigurator

public abstract Configurator getConfigurator()
For each component, a configurator class is generated in package org.dllearner.core.configurators using the script ConfigJavaGenerator. The configurator provides set and get methods for the configuration options of a component.

Returns:
An object allowing to configure this component.

getName

public static String getName()
Returns the name of this component. By default, "unnamed component" is returned, but all implementations of components are strongly encouraged to provide a static method returning the name.

Returns:
The name of this component.

createConfigOptions

public static Collection<ConfigOption<?>> createConfigOptions()
Returns all configuration options supported by this component.

Returns:
A list of supported configuration options for this component.

init

public abstract void init()
                   throws ComponentInitException
Method to be called after the component has been configured. Implementation of components can overwrite this method to perform setup and initialisation tasks for this component.

Throws:
ComponentInitException - This exception is thrown if any exceptions occur within the initialisation process of this component. As component developer, you are encouraged to rethrow occuring exception as ComponentInitException and giving an error message as well as the actualy exception by using the constructor ComponentInitException.ComponentInitException(String, Throwable).


SourceForge.net Logo DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2008 Jens Lehmann