eu.larkc.core.pluginregistry
Class PluginRegistry

java.lang.Object
  extended by eu.larkc.core.pluginregistry.PluginRegistry
Direct Known Subclasses:
ResourceRegistry

public class PluginRegistry
extends java.lang.Object

The LarKC platform plug-in registry. This class stores all the plug-in meta data and is able to execute queries agaisnt the plug-ins KB

Author:
Blaz Fortuna, Luka Bradesko

Constructor Summary
PluginRegistry()
          Initializes the registry and populates its KB (ex Cyc KB).
 
Method Summary
 java.util.Collection<org.openrdf.model.URI> getAllDeciders()
          Returns the URIs of all the Decider plug-ins available to the platform
 java.util.Collection<org.openrdf.model.URI> getAllIdentifiers()
          Returns the URIs of all the Identifier plug-ins available to the platform
 java.util.Collection<org.openrdf.model.URI> getAllPlugins()
          Returns the URIs of all the plug-ins available to the platform
 java.util.Collection<org.openrdf.model.URI> getAllReasoners()
          Returns the URIs of all the Reasoner plug-ins available to the platform
 java.util.Collection<org.openrdf.model.URI> getAllSelecters()
          Returns the URIs of all the Selecter plug-ins available to the platform
 java.util.Collection<org.openrdf.model.URI> getAllTransformers()
          Returns the URIs of all the Transformer plug-ins available to the platform
 Plugin getNewPluginInstance(org.openrdf.model.URI pluginUri)
          Instantiates the plug-in
 java.lang.String getPluginEndpoint(org.openrdf.model.URI _Plugin)
          Returns the Endpoint (how to access it) of the given plug-ins
 java.util.Collection<org.openrdf.model.URI> getPluginSparql(java.lang.String sparqlQuery)
          Returns a collection of all the plug-ins that correspond to the specified input SPARQL query
 void loadPlugins()
          Load plug-ins from the ini file and from PLATFORM/plugins.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginRegistry

public PluginRegistry()
Initializes the registry and populates its KB (ex Cyc KB).

Method Detail

getNewPluginInstance

public Plugin getNewPluginInstance(org.openrdf.model.URI pluginUri)
                            throws java.lang.InstantiationException,
                                   java.lang.IllegalAccessException,
                                   java.lang.IllegalArgumentException,
                                   java.lang.reflect.InvocationTargetException
Instantiates the plug-in

Parameters:
pluginUri -
Returns:
plug-in instance
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.IllegalArgumentException

loadPlugins

public void loadPlugins()
Load plug-ins from the ini file and from PLATFORM/plugins.


getAllPlugins

public java.util.Collection<org.openrdf.model.URI> getAllPlugins()
                                                          throws PluginRegistryQueryException
Returns the URIs of all the plug-ins available to the platform

Returns:
Collection of Plugin URIs
Throws:
PluginRegistryQueryException

getAllDeciders

public java.util.Collection<org.openrdf.model.URI> getAllDeciders()
                                                           throws PluginRegistryQueryException
Returns the URIs of all the Decider plug-ins available to the platform

Returns:
Collection of Decider Plugin URIs
Throws:
PluginRegistryQueryException

getAllIdentifiers

public java.util.Collection<org.openrdf.model.URI> getAllIdentifiers()
                                                              throws PluginRegistryQueryException
Returns the URIs of all the Identifier plug-ins available to the platform

Returns:
Collection of Identifier Plugin URIs
Throws:
PluginRegistryQueryException

getAllTransformers

public java.util.Collection<org.openrdf.model.URI> getAllTransformers()
                                                               throws PluginRegistryQueryException
Returns the URIs of all the Transformer plug-ins available to the platform

Returns:
Collection of Transformer Plugin URIs
Throws:
PluginRegistryQueryException

getAllSelecters

public java.util.Collection<org.openrdf.model.URI> getAllSelecters()
                                                            throws PluginRegistryQueryException
Returns the URIs of all the Selecter plug-ins available to the platform

Returns:
Collection of Selecter Plugin URIs
Throws:
PluginRegistryQueryException

getAllReasoners

public java.util.Collection<org.openrdf.model.URI> getAllReasoners()
                                                            throws PluginRegistryQueryException
Returns the URIs of all the Reasoner plug-ins available to the platform

Returns:
Collection of Reasoner Plugin URIs
Throws:
PluginRegistryQueryException

getPluginEndpoint

public java.lang.String getPluginEndpoint(org.openrdf.model.URI _Plugin)
                                   throws PluginRegistryQueryException
Returns the Endpoint (how to access it) of the given plug-ins

Parameters:
_Plugin - URI of the plug-in
Returns:
Endpoint location
Throws:
PluginRegistryQueryException

getPluginSparql

public java.util.Collection<org.openrdf.model.URI> getPluginSparql(java.lang.String sparqlQuery)
                                                            throws MalformedSparqlQueryException,
                                                                   SparqlQueryTransformException,
                                                                   PluginRegistryQueryException
Returns a collection of all the plug-ins that correspond to the specified input SPARQL query

Parameters:
sparqlQuery -
Returns:
collection of plug-in URIs
Throws:
MalformedSparqlQueryException
SparqlQueryTransformException
PluginRegistryQueryException