|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.uka.ipd.consensus.impl.QueryEngineImpl
TODO
| Constructor Summary | |
QueryEngineImpl(LoggingManager logging,
OntologyManager om)
|
|
| Method Summary | |
QueryEngineResultSet |
executeQuery(User user,
String query)
Executes a query string and returns the result as a QueryEngineResultSet. |
Association |
getAssociationById(User user,
String id)
Returns an association for a given id. |
int |
getAssociationCount(User user)
Returns the number of associations in the ontology that the user may see. |
Collection |
getAssociationRoles(User user,
Association assoc)
Returns a collection of all AssociationRole objects that are part of the given association. |
Collection |
getAssociations(User user,
Topic topic)
Returns a collection of all Association objects in which the given topic plays a role. |
Collection |
getAssociationsOfType(User user,
Topic type)
Returns a collection of all Association objects with the given type. |
Collection |
getClassRoots(User user)
Returns a collection of class Topic objects that have no superclasses. |
int |
getClassTopicCount(User user)
Returns the number of class topics in the ontology that the user may see. |
Collection |
getClassTopics(User user)
Returns a collection of all class Topic objects. |
Collection |
getClassTopicsByBeginning(User user,
String beginning)
Returns a collection of class Topic objects whose names match the given beginning (case-insensitive). |
Collection |
getClassTopicsBySubstring(User user,
String substring,
boolean searchComment)
Returns a collection of class Topic objects whose name (and optionally comment) contain the given substring (case-insensitive). |
Concept |
getConceptById(User user,
String id)
Returns a concept for a given id. |
Collection |
getInstanceRoots(User user)
Returns a collection of instance Topic objects that have no types. |
Collection |
getInstances(User user,
Topic topic)
Returns a collection of TypeInstance objects that represent the instances of a given type topic. |
int |
getInstanceTopicCount(User user)
Returns the number of non-class topics in the ontology that the user may see. |
Collection |
getInstanceTopics(User user)
Returns a collection of all non-class Topic objects. |
Collection |
getInstanceTopicsByBeginning(User user,
String beginning)
Returns a collection of non-class Topic objects whose names match the given beginning (case-insensitive). |
Collection |
getInstanceTopicsBySubstring(User user,
String substring,
boolean searchComment)
Returns a collection of non-class Topic objects whose name (and optionally comment) contain the given substring (case-insensitive). |
String |
getQuerySyntaxName()
Returns the name of the query language that is provided by the implementation of the QueryEngine. |
String |
getQuerySyntaxURL()
Returns a URL with human-readable information about the syntax of the query language that is provided by the implementation of the QueryEngine. |
String |
getQuerySyntaxVersion()
Returns the version of the query language that is provided by the implementation of the QueryEngine. |
Collection |
getSubclasses(User user,
Topic topic)
Returns a collection of SuperSubclass objects that represent the subclasses of a given class topic. |
Collection |
getSuperclasses(User user,
Topic topic)
Returns a collection of SuperSubclass objects that represent the superclasses of a given class topic. |
Topic |
getTopicById(User user,
String id)
Returns a topic for a given id. |
int |
getTopicCount(User user)
Returns the total number of topics in the ontology that the user may see. |
Collection |
getTopics(User user)
Returns a collection of all Topic objects. |
Collection |
getTopicsByBeginning(User user,
String beginning)
Returns a collection of Topic objects whose names match the given beginning (case-insensitive). |
Collection |
getTopicsBySubstring(User user,
String substring,
boolean searchComment)
Returns a collection of Topic objects whose name (and optionally comment) contain the given substring (case-insensitive). |
Collection |
getTypes(User user,
Topic topic)
Returns a collection of TypeInstance objects that represent the types of a given instance topic. |
String |
getVersion()
Returns an implementation specific version of the QueryEngine. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public QueryEngineImpl(LoggingManager logging,
OntologyManager om)
| Method Detail |
public QueryEngineResultSet executeQuery(User user,
String query)
throws QueryEngineException,
DynamicRightsManagerException
QueryEngine
executeQuery in interface QueryEngineuser - the user who wants to do the queryquery - the query string
null
QueryEngineException - if any other error occurs
DynamicRightsManagerException - if the user is not allowed to execute free queries in the query languageDynamicRightsManager.mayQuery(User, String),
QueryEngine.getQuerySyntaxName(),
QueryEngine.getQuerySyntaxURL(),
QueryEngine.getQuerySyntaxVersion()
public Topic getTopicById(User user,
String id)
throws QueryEngineException
QueryEngine
getTopicById in interface QueryEngineuser - the user who wants to get the topicid - the topic's id
null if the id does not exist
QueryEngineException - if the topic could not be readDynamicRightsManager.mayViewTopic(User, Topic)
public Association getAssociationById(User user,
String id)
throws QueryEngineException
QueryEngine
getAssociationById in interface QueryEngineuser - the user who wants to get the associationid - the association's id
null if the id does not exist
QueryEngineException - if the association could not be readDynamicRightsManager.mayViewAssociation(User, Association)
public Concept getConceptById(User user,
String id)
throws QueryEngineException
QueryEngine
getConceptById in interface QueryEngineuser - the user who wants to get the conceptid - the concept's id
null if the id does not exist
QueryEngineException - if the concept could not be readDynamicRightsManager.mayViewTopic(User, Topic),
DynamicRightsManager.mayViewAssociation(User, Association),
DynamicRightsManager.mayViewAttribute(User, Attribute)
public Collection getTopics(User user)
throws QueryEngineException
QueryEngine
getTopics in interface QueryEngineuser - the user who wants to get the topics
null
QueryEngineException - if the topics could not be readTopic,
DynamicRightsManager.mayViewTopic(User, Topic)
public Collection getClassTopics(User user)
throws QueryEngineException
QueryEngine
getClassTopics in interface QueryEngineuser - the user who wants to get the topics
null
QueryEngineException - if the topics could not be readTopic,
Topic.isClassTopic(),
DynamicRightsManager.mayViewTopic(User, Topic)
public Collection getInstanceTopics(User user)
throws QueryEngineException
QueryEngine
getInstanceTopics in interface QueryEngineuser - the user who wants to get the topics
null
QueryEngineException - if the topics could not be readTopic,
Topic.isClassTopic(),
DynamicRightsManager.mayViewTopic(User, Topic)
public Collection getAssociations(User user,
Topic topic)
throws QueryEngineException
QueryEngine
getAssociations in interface QueryEngineuser - the user who wants to get the associationstopic - the topic that is player in all returned associations
null
QueryEngineException - if the associations could not be readAssociation,
DynamicRightsManager.mayViewAssociation(User, Association)
public Collection getAssociationsOfType(User user,
Topic type)
throws QueryEngineException
QueryEngine
getAssociationsOfType in interface QueryEngineuser - the user who wants to get the associationstype - the type of all returned associations, including null for typeless associations
null
QueryEngineException - if the associations could not be readAssociation,
DynamicRightsManager.mayViewAssociation(User, Association)
public Collection getAssociationRoles(User user,
Association assoc)
throws QueryEngineException
QueryEngine
getAssociationRoles in interface QueryEngineuser - the user who wants to get the association rolesassoc - the association for which the roles are returned
null
QueryEngineException - if the association roles could not be readAssociationRole,
DynamicRightsManager.mayViewTopic(User, Topic)
public Collection getTopicsByBeginning(User user,
String beginning)
throws QueryEngineException
QueryEngine
getTopicsByBeginning in interface QueryEngineuser - the user who wants to get the topicsbeginning - the required beginning of a topic name; null or the empty string match all topics
null
QueryEngineException - if the topics could not be readTopic,
DynamicRightsManager.mayViewTopic(User, Topic)
public Collection getClassTopicsByBeginning(User user,
String beginning)
throws QueryEngineException
QueryEngine
getClassTopicsByBeginning in interface QueryEngineuser - the user who wants to get the topicsbeginning - the required beginning of a topic name; null or the empty string match all class topics
null
QueryEngineException - if the topics could not be readTopic,
Topic.isClassTopic(),
DynamicRightsManager.mayViewTopic(User, Topic)
public Collection getInstanceTopicsByBeginning(User user,
String beginning)
throws QueryEngineException
QueryEngine
getInstanceTopicsByBeginning in interface QueryEngineuser - the user who wants to get the topicsbeginning - the required beginning of a topic name; null or the empty string match all non-class topics
null
QueryEngineException - if the topics could not be readTopic,
Topic.isClassTopic(),
DynamicRightsManager.mayViewTopic(User, Topic)
public Collection getTopicsBySubstring(User user,
String substring,
boolean searchComment)
throws QueryEngineException
QueryEngine
getTopicsBySubstring in interface QueryEngineuser - the user who wants to get the topicssubstring - the required substring of a topic name or comment; null or the empty string match all topicssearchComment - if true, the comments are searched for the substring, too, otherwise only the topic name is searched
null
QueryEngineException - if the topics could not be readTopic,
DynamicRightsManager.mayViewTopic(User, Topic)
public Collection getClassTopicsBySubstring(User user,
String substring,
boolean searchComment)
throws QueryEngineException
QueryEngine
getClassTopicsBySubstring in interface QueryEngineuser - the user who wants to get the topicssubstring - the required substring of a topic name or comment; null or the empty string match all class topicssearchComment - if true, the comments are searched for the substring, too, otherwise only the topic name is searched
null
QueryEngineException - if the topics could not be readTopic,
Topic.isClassTopic(),
DynamicRightsManager.mayViewTopic(User, Topic)
public Collection getInstanceTopicsBySubstring(User user,
String substring,
boolean searchComment)
throws QueryEngineException
QueryEngine
getInstanceTopicsBySubstring in interface QueryEngineuser - the user who wants to get the topicssubstring - the required substring of a topic name or comment; null or the empty string match all non-class topicssearchComment - if true, the comments are searched for the substring, too, otherwise only the topic name is searched
null
QueryEngineException - if the topics could not be readTopic,
Topic.isClassTopic(),
DynamicRightsManager.mayViewTopic(User, Topic)
public Collection getTypes(User user,
Topic topic)
throws QueryEngineException
QueryEngine
getTypes in interface QueryEngineuser - the user who wants to get the typestopic - the instance topic for which the types are returned
null
QueryEngineException - if the types could not be readTypeInstance,
DynamicRightsManager.mayViewTopic(User, Topic)
public Collection getInstances(User user,
Topic topic)
throws QueryEngineException
QueryEngine
getInstances in interface QueryEngineuser - the user who wants to get the instancestopic - the type topic for which the instances are returned
null
QueryEngineException - if the instances could not be readTypeInstance,
DynamicRightsManager.mayViewTopic(User, Topic)
public Collection getInstanceRoots(User user)
throws QueryEngineException
QueryEngine
getInstanceRoots in interface QueryEngineuser - the user who wants to get the root instance topics
null
QueryEngineException - if the root instance topics could not be readTopic,
DynamicRightsManager.mayViewTopic(User, Topic)
public Collection getSuperclasses(User user,
Topic topic)
throws QueryEngineException
QueryEngineIf the implementation does not support classes, an empty collection is returned.
getSuperclasses in interface QueryEngineuser - the user who wants to get the superclassestopic - the class topic for which the superclasses are returned
null
QueryEngineException - if the superclasses could not be readSuperSubclass,
DynamicRightsManager.mayViewTopic(User, Topic)
public Collection getSubclasses(User user,
Topic topic)
throws QueryEngineException
QueryEngineIf the implementation does not support classes, an empty collection is returned.
getSubclasses in interface QueryEngineuser - the user who wants to get the subclassestopic - the class topic for which the subclasses are returned
null
QueryEngineException - if the subclasses could not be readSuperSubclass,
DynamicRightsManager.mayViewTopic(User, Topic)
public Collection getClassRoots(User user)
throws QueryEngineException
QueryEngineIf the implementation does not support classes, an empty collection is returned.
getClassRoots in interface QueryEngineuser - the user who wants to get the root class topics
null
QueryEngineException - if the root class topics could not be readTopic,
Topic.isClassTopic(),
DynamicRightsManager.mayViewTopic(User, Topic)public int getTopicCount(User user)
QueryEngine
getTopicCount in interface QueryEngineuser - the user who wants to read the number of topics
DynamicRightsManager.mayViewTopic(User, Topic)public int getClassTopicCount(User user)
QueryEngine
getClassTopicCount in interface QueryEngineuser - the user who wants to read the number of class topics
Topic.isClassTopic(),
DynamicRightsManager.mayViewTopic(User, Topic)public int getInstanceTopicCount(User user)
QueryEngine
getInstanceTopicCount in interface QueryEngineuser - the user who wants to read the number of non-class topics
Topic.isClassTopic(),
DynamicRightsManager.mayViewTopic(User, Topic)public int getAssociationCount(User user)
QueryEngine
getAssociationCount in interface QueryEngineuser - the user who wants to read the number of associations
DynamicRightsManager.mayViewAssociation(User, Association)public String getVersion()
QueryEngine
getVersion in interface QueryEnginepublic String getQuerySyntaxName()
QueryEngine
getQuerySyntaxName in interface QueryEngineQueryEngine.getQuerySyntaxVersion(),
QueryEngine.executeQuery(User, String)public String getQuerySyntaxVersion()
QueryEngine
getQuerySyntaxVersion in interface QueryEngineQueryEngine.getQuerySyntaxName(),
QueryEngine.executeQuery(User, String)public String getQuerySyntaxURL()
QueryEngine
getQuerySyntaxURL in interface QueryEngineQueryEngine.executeQuery(User, String)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||