it.unitn.disi.smatch.loaders.context
Class OWLContextLoader
java.lang.Object
it.unitn.disi.smatch.components.Configurable
it.unitn.disi.smatch.loaders.context.BaseContextLoader
it.unitn.disi.smatch.loaders.context.OWLContextLoader
- All Implemented Interfaces:
- IConfigurable, IContextLoader
public class OWLContextLoader
- extends BaseContextLoader
- implements IContextLoader
Loads a context from an ontology OWL API and HermiT reasoner.
Takes in a topClass parameter, which defines the starting class. If not specified, the Thing will be used.
Takes in an excludeNothing parameter, which specifies whether to exclude Nothing class. Default true.
Takes in a replaceUnderscore parameter, which specifies whether to replace _ in class names. Default true.
- Author:
- Aliaksandr Autayeu
|
Method Summary |
void |
buildHierarchy(org.semanticweb.owlapi.reasoner.OWLReasoner reasoner,
org.semanticweb.owlapi.model.OWLOntology o,
IContext c,
INode root,
org.semanticweb.owlapi.model.OWLClass clazz)
|
java.lang.String |
getDescription()
Returns the description of the format. |
ILoader.LoaderType |
getType()
Returns the type of the loader. |
IContext |
loadContext(java.lang.String fileName)
Loads the context from a file or database. |
boolean |
setProperties(java.util.Properties newProperties)
Sets component configuration properties. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OWLContextLoader
public OWLContextLoader()
setProperties
public boolean setProperties(java.util.Properties newProperties)
throws ConfigurableException
- Description copied from interface:
IConfigurable
- Sets component configuration properties. The component might check for properties change and
reconfigure or reload subcomponents.
- Specified by:
setProperties in interface IConfigurable- Overrides:
setProperties in class Configurable
- Parameters:
newProperties - a new configuration
- Returns:
- true if properties have been changed
- Throws:
ConfigurableException - ConfigurableException
buildHierarchy
public void buildHierarchy(org.semanticweb.owlapi.reasoner.OWLReasoner reasoner,
org.semanticweb.owlapi.model.OWLOntology o,
IContext c,
INode root,
org.semanticweb.owlapi.model.OWLClass clazz)
throws org.semanticweb.owlapi.model.OWLException
- Throws:
org.semanticweb.owlapi.model.OWLException
loadContext
public IContext loadContext(java.lang.String fileName)
throws ContextLoaderException
- Description copied from interface:
IContextLoader
- Loads the context from a file or database.
- Specified by:
loadContext in interface IContextLoader
- Parameters:
fileName - file to load (or DB connection string)
- Returns:
- interface to data structure of context
- Throws:
ContextLoaderException - ContextLoaderException
getDescription
public java.lang.String getDescription()
- Description copied from interface:
IContextLoader
- Returns the description of the format.
- Specified by:
getDescription in interface IContextLoader
- Returns:
- the description of the format
getType
public ILoader.LoaderType getType()
- Description copied from interface:
IContextLoader
- Returns the type of the loader.
- Specified by:
getType in interface IContextLoader
- Returns:
- the type of the loader
© 2010-2011 Knowdive @ DISI