|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.fluxion.datasource.utils.QueryUtils
public class QueryUtils
A general utility class for producing filters given an incoming query class.
This should be the first pot of call when trying to obtain the results for a
particular OWL query. In most cases, given an incoming OWL query class, "q",
a client can simply call QueryUtils.createFilters(ontology, q)
and get back a set of filters which, when used to generate and execute a
query, is guaranteed to return at least all instances of the query class.
OWLUtils
,
BeanUtils
Constructor Summary | |
---|---|
QueryUtils()
|
Method Summary | |
---|---|
static boolean |
checkQueryIntegrity(org.semanticweb.owl.model.OWLOntology ontology,
org.semanticweb.owl.model.OWLDescription query)
This method checks the integrity of a query against the supplied ontology. |
static BeanConverter |
createConverterForFilter(ReasonerSession session,
org.semanticweb.owl.model.OWLOntology schemaOntology,
org.semanticweb.owl.model.OWLOntology resultOntology,
org.semanticweb.owl.model.OWLDescription query,
Filter filter)
|
static java.util.Set<Filter> |
createFilters(ReasonerSession session,
org.semanticweb.owl.model.OWLOntology ontology,
org.semanticweb.owl.model.OWLDescription query)
Convert an OWLClass into a Set of filters. |
static Query |
createQuery(java.lang.Class queryManager,
Filter filter)
Creates a new Query using
the given QueryManager class and the Filter supplied. |
static java.util.Set<org.semanticweb.owl.model.OWLEntity> |
getBadlyFormedQueryEntities(org.semanticweb.owl.model.OWLOntology ontology,
org.semanticweb.owl.model.OWLDescription query)
Use this method to recover those entities that cause the query OWLDescription to fail and integrity check. |
static java.lang.Class |
getQueryManagerClass(ReasonerSession session,
org.semanticweb.owl.model.OWLOntology ontology,
org.semanticweb.owl.model.OWLDescription query)
Get the QueryManager object for a given OWL class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QueryUtils()
Method Detail |
---|
public static boolean checkQueryIntegrity(org.semanticweb.owl.model.OWLOntology ontology, org.semanticweb.owl.model.OWLDescription query)
ontology
- the ontology to checkquery
- the query being integrity-checked
public static java.util.Set<org.semanticweb.owl.model.OWLEntity> getBadlyFormedQueryEntities(org.semanticweb.owl.model.OWLOntology ontology, org.semanticweb.owl.model.OWLDescription query)
checkQueryIntegrity()
and if this returns false
and you want to obtain extra debugging info, call this method to get a set
of those terms not present in the ontology.
ontology
- the ontology being checkedquery
- the OWLDescription being assessed
public static java.lang.Class getQueryManagerClass(ReasonerSession session, org.semanticweb.owl.model.OWLOntology ontology, org.semanticweb.owl.model.OWLDescription query) throws MissingElementException
ontology
- the ontology being queriedquery
- the OWLDescription describing our query
MissingElementException
- if the QueryManager class can't be discoveredpublic static java.util.Set<Filter> createFilters(ReasonerSession session, org.semanticweb.owl.model.OWLOntology ontology, org.semanticweb.owl.model.OWLDescription query) throws OWLTransformationException
ontology
- the ontology we're querying againstquery
- the incoming query description
OWLTransformationException
- if there is some problem in translating
the owlpublic static Query createQuery(java.lang.Class queryManager, Filter filter) throws OWLTransformationException
Query
using
the given QueryManager
class and the Filter
supplied.
queryManager
- the QueryManager class, which must be on the current
classpathfilter
- the Filter
to use to create this query
OWLTransformationException
- if there is a problem generating the
querypublic static BeanConverter createConverterForFilter(ReasonerSession session, org.semanticweb.owl.model.OWLOntology schemaOntology, org.semanticweb.owl.model.OWLOntology resultOntology, org.semanticweb.owl.model.OWLDescription query, Filter filter) throws OWLTransformationException
OWLTransformationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |