net.sourceforge.fluxion.spring
Class DelegatingFluxionService

java.lang.Object
  extended by net.sourceforge.fluxion.spring.DelegatingFluxionService
All Implemented Interfaces:
FluxionService

public class DelegatingFluxionService
extends java.lang.Object
implements FluxionService

Implementation of FluxionService which simply delegates to a list of DataSource implementations

Author:
Tom Oinn, Rob Davey

Constructor Summary
DelegatingFluxionService()
           
 
Method Summary
 java.util.Set<java.net.URI> getDataSources()
          Return a set of the URIs of all registered data sources
 java.net.URI getId()
          The ID of this service.
 java.net.URI getReasonerLevel(java.net.URI dataSourceURI)
          Get the reasoner level from the data source with the matching data source URI
 org.semanticweb.owl.model.OWLOntology getSchema(java.net.URI dataSourceURI)
          Get the schema from the data source with the matching data source URI
 org.semanticweb.owl.model.OWLOntology query(java.net.URI dataSourceURI, java.net.URI queryClassURI, org.semanticweb.owl.model.OWLOntology queryOntology)
          Delegates to the query method of the data source with the matching data source URI
 void setDataSources(java.util.List<DataSource> sources)
          Set the list of DataSource implementations used by this FluxionService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingFluxionService

public DelegatingFluxionService()
Method Detail

getId

public java.net.URI getId()
The ID of this service. In this instance, a URI minted from the service's toString.

Specified by:
getId in interface FluxionService
Returns:
a identifying this service.

setDataSources

public final void setDataSources(java.util.List<DataSource> sources)
Set the list of DataSource implementations used by this FluxionService


getDataSources

public java.util.Set<java.net.URI> getDataSources()
                                           throws DataSourceException
Return a set of the URIs of all registered data sources

Specified by:
getDataSources in interface FluxionService
Returns:
a of s giving each known data source
Throws:
DataSourceException

getReasonerLevel

public java.net.URI getReasonerLevel(java.net.URI dataSourceURI)
                              throws DataSourceException
Get the reasoner level from the data source with the matching data source URI

Specified by:
getReasonerLevel in interface FluxionService
Parameters:
dataSourceURI - the being operated upon
Returns:
a giving the reasoner semantics in effect
Throws:
DataSourceException - if the data source is not known by this service or if there was an error connecting to the data source

getSchema

public org.semanticweb.owl.model.OWLOntology getSchema(java.net.URI dataSourceURI)
                                                throws DataSourceException
Get the schema from the data source with the matching data source URI

Specified by:
getSchema in interface FluxionService
Parameters:
dataSourceURI - the being operated upon
Returns:
an describing the range of concepts this service may publish
Throws:
DataSourceException - if the data source is not known by this service or if there was an error connecting to the data source

query

public org.semanticweb.owl.model.OWLOntology query(java.net.URI dataSourceURI,
                                                   java.net.URI queryClassURI,
                                                   org.semanticweb.owl.model.OWLOntology queryOntology)
                                            throws DataSourceException
Delegates to the query method of the data source with the matching data source URI

Specified by:
query in interface FluxionService
Parameters:
dataSourceURI - the being operated upon
queryClassURI - the qualified name of the class from the specified ontology for which instances should be found
queryOntology - the ontology containing the specified query class
Returns:
the result of the query as an OWLOntology
Throws:
DataSourceException - if the data source is not known by this service or if there was an error connecting to the data source


Copyright © 2010. All Rights Reserved.