net.sourceforge.fluxion.api
Interface DataSource

All Known Implementing Classes:
BeanModelDataSource, OWLFileDataSource

public interface DataSource

A particular data source that exposes data through OWL. For a detailed description of the semantics of the calls in this interface, see FluxionService. FluxionService can be trivially implemented given a Map.

Version:
0.3
Author:
Matthew Pocock, Tony Burdett, Tom Oinn

Method Summary
 java.net.URI getReasonerLevel()
          The reasoner level at which this datasource operates.
 org.semanticweb.owl.model.OWLOntology getSchema()
          The "schema" ontology for this datasource (sometimes called the T-Box).
 java.net.URI getURI()
          The URI of this datasource.
 org.semanticweb.owl.model.OWLOntology query(org.semanticweb.owl.model.OWLOntology ontology, java.net.URI queryClass)
          Queries this datasource for all instances that may be instances of the OWL class with the URI given by the queryClass parameter.
 

Method Detail

getURI

java.net.URI getURI()
The URI of this datasource. Generally, this will correspond to the URI assigned to the OWL Ontology this datasource exposes data for.

Returns:
the (usually ontology) URI

getReasonerLevel

java.net.URI getReasonerLevel()
                              throws DataSourceException
The reasoner level at which this datasource operates. Normally this should be OWL-DL, but this method is there to future-proof against datasources that may need OWL-Full expressivity.

Returns:
the URI of the flavour of OWL this datasource utilises
Throws:
DataSourceException - if there was a problem retrieving the expressivity of this datasource

getSchema

org.semanticweb.owl.model.OWLOntology getSchema()
                                                throws DataSourceException
The "schema" ontology for this datasource (sometimes called the T-Box). This is the ontology, without any individual axioms representing A-Box data.

Returns:
the schema OWL Ontology
Throws:
DataSourceException - if the schema could not be recovered

query

org.semanticweb.owl.model.OWLOntology query(org.semanticweb.owl.model.OWLOntology ontology,
                                            java.net.URI queryClass)
                                            throws DataSourceException
Queries this datasource for all instances that may be instances of the OWL class with the URI given by the queryClass parameter.

Implementations are free to return as much data as they choose here, but must guarantee to return at least all individuals belonging to the given query class, and never less. It would be viable (but not helpful) to return every individual in this datasource, for example.

The ontology parameter supplied is the query ontology; any extra axioms here, compared with the schema ontology, should be merged before returning results. This means querying clients can add extra assertions to restrict the results they acquire. This can include adding new classes - so, for example, clients can declare a new class "foo" where foo is the union of classes A and B, and then query for all instances of foo by passing the newly declared URI.

The result is the knowledgebase, contains all schema axioms, all newly added axioms supplied by the client, and all instances that satisfy the query (plus, optionally, more).

Parameters:
ontology - the ontology containing any axioms we need to describe the query
queryClass - the URI of the class we require individuals of
Returns:
an ontology containing all asserted axioms and the individuals of the query class
Throws:
DataSourceException - if there was any problem acquiring results


Copyright © 2010. All Rights Reserved.