|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.dllearner.core.AbstractComponent
org.dllearner.core.AbstractKnowledgeSource
org.dllearner.kb.KBFile
public class KBFile
KB files are an internal convenience format used in DL-Learner. Their syntax is close to Description Logics and easy to use. KB files can be exported to OWL for usage outside of DL-Learner.
| Constructor Summary | |
|---|---|
KBFile()
Default constructor (needed for reflection in ComponentManager). |
|
KBFile(KB kb)
Constructor allowing you to treat an already existing KB object as a KBFile knowledge source. |
|
| Method Summary | ||
|---|---|---|
|
applyConfigEntry(ConfigEntry<T> entry)
Applies a configuration option to this component. |
|
static Collection<ConfigOption<?>> |
createConfigOptions()
|
|
void |
export(File file,
OntologyFormat format)
Export the knowledge source to the specified file in the specified format. |
|
KBFileConfigurator |
getConfigurator()
For each component, a configurator class is generated in package org.dllearner.core.configurators using the script { org.dllearner.scripts.ConfigJavaGenerator}. |
|
static String |
getName()
|
|
URL |
getURL()
|
|
void |
init()
Method to be called after the component has been configured. |
|
String |
toDIG(URI kbURI)
Transforms this knowledge source to DIG 1.1 code according to the specification. |
|
KB |
toKB()
Transforms this knowledge source into an internal knowledge base. |
|
String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public KBFile()
public KBFile(KB kb)
ComponentManager.
kb - A KB object.| Method Detail |
|---|
public KBFileConfigurator getConfigurator()
AbstractComponent
getConfigurator in class AbstractComponentpublic static String getName()
public static Collection<ConfigOption<?>> createConfigOptions()
public <T> void applyConfigEntry(ConfigEntry<T> entry)
throws InvalidConfigOptionValueException
AbstractComponentComponentManager.
T - Type of the config entry (Integer, String etc.).entry - A configuration entry.
InvalidConfigOptionValueException - This exception is thrown if the
value of the config entry is not valid. For instance, a config option
may only accept values, which are within intervals 0.1 to 0.3 or 0.5 to 0.8.
If the value is outside of those intervals, an exception is thrown. Note
that many of the common cases are already caught in the constructor of
ConfigEntry (for instance for a DoubleConfigOption you can specify
an interval for the value). This means that, as a component developer, you
often do not need to implement further validity checks.AbstractComponent.getConfigurator()
public void init()
throws ComponentInitException
Component
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).public String toDIG(URI kbURI)
AbstractKnowledgeSource
toDIG in class AbstractKnowledgeSourcekbURI - The URI which is assigned to the knowledge base. The URI
is used to refer to the knowledge base in queries (DIG supports using
several knowledge bases).
public String toString()
toString in class Object
public void export(File file,
OntologyFormat format)
AbstractKnowledgeSource
export in class AbstractKnowledgeSourcefile - File to store the knowledge base.format - Format of the knowledge base, e.g. N-Triples.public URL getURL()
public KB toKB()
AbstractKnowledgeSource
toKB in class AbstractKnowledgeSource
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||