it.unitn.disi.smatch.loaders.context
Class SKOSContextLoader

java.lang.Object
  extended by it.unitn.disi.smatch.components.Configurable
      extended by it.unitn.disi.smatch.loaders.context.BaseContextLoader
          extended by it.unitn.disi.smatch.loaders.context.SKOSContextLoader
All Implemented Interfaces:
IConfigurable, IContextLoader

public class SKOSContextLoader
extends BaseContextLoader
implements IContextLoader

Loads a context from a SKOS file using SKOS API (based on OWL API) and HermiT reasoner. Takes in a preferredLanguage parameter, which defines the language which should be preferred for labels. If specified, the loader will search for the label in the specified language among preferred labels and then among alternative labels.

Author:

Field Summary
 
Fields inherited from class it.unitn.disi.smatch.loaders.context.BaseContextLoader
nodesParsed
 
Fields inherited from class it.unitn.disi.smatch.components.Configurable
GLOBAL_PREFIX, globalComponents, properties
 
Constructor Summary
SKOSContextLoader()
           
 
Method Summary
 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 it.unitn.disi.smatch.loaders.context.BaseContextLoader
createIds
 
Methods inherited from class it.unitn.disi.smatch.components.Configurable
configureComponent, getComponentProperties, getProperties, loadProperties, makeComponentPrefix, setProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface it.unitn.disi.smatch.components.IConfigurable
getProperties, setProperties
 

Constructor Detail

SKOSContextLoader

public SKOSContextLoader()
Method Detail

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

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