Class QueryUtils
java.lang.Object
net.ontopia.topicmaps.query.utils.QueryUtils
PUBLIC: Utility methods for getting QueryProcessorIFs for a topic
map.
- Since:
- 1.4
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic QueryProcessorIFcreateQueryProcessor(String queryLanguage, TopicMapIF topicmap, Map properties) static QueryProcessorIFcreateQueryProcessor(String queryLanguage, TopicMapIF topicmap, LocatorIF base) static QueryProcessorIFcreateQueryProcessor(String queryLanguage, TopicMapIF topicmap, LocatorIF base, Map properties) EXPERIMENTAL: ...static QueryProcessorIFcreateQueryProcessor(TopicMapIF topicmap) PUBLIC: Factory method for creating a query processor for a given topic map; always returns a new processor.static QueryProcessorIFcreateQueryProcessor(TopicMapIF topicmap, Map properties) EXPERIMENTAL: ...static QueryProcessorIFcreateQueryProcessor(TopicMapIF topicmap, LocatorIF base) PUBLIC: Factory method for creating a new query processor for a given topic map and base address.static QueryProcessorIFcreateQueryProcessor(TopicMapIF topicmap, LocatorIF base, Map properties) static Collection<String>PUBLIC: Returns all available query language implementations.static QueryProcessorIFgetQueryProcessor(String queryLanguage, TopicMapIF topicmap) static QueryProcessorIFgetQueryProcessor(String queryLanguage, TopicMapIF topicmap, LocatorIF base) PUBLIC: Returns the default query processor for the given topic map and base address.static QueryProcessorIFgetQueryProcessor(TopicMapIF topicmap) PUBLIC: Returns a query processor for the given topic map; will always return the same processor with the default query language for the same topic map.static QueryProcessorIFgetQueryProcessor(TopicMapIF topicmap, LocatorIF base) static QueryProcessorFactoryIFgetQueryProcessorFactory(String language) PUBLIC: Returns theQueryProcessorFactoryIFinstance associated with a specific query language.static DeclarationContextIFparseDeclarations(TopicMapIF topicmap, String declarations) PUBLIC: Parses a set of tolog declarations and returns an object representing the resulting declaration context.static DeclarationContextIFparseDeclarations(TopicMapIF topicmap, String declarations, DeclarationContextIF context) PUBLIC: Parses a set of tolog declarations in an existing context, and returns an object representing the resulting nested declaration context.
-
Constructor Details
-
QueryUtils
public QueryUtils()
-
-
Method Details
-
getAvailableQueryLanguages
PUBLIC: Returns all available query language implementations.- Returns:
- a
Collectionof all available query languages. - Since:
- 5.1
-
getQueryProcessorFactory
PUBLIC: Returns theQueryProcessorFactoryIFinstance associated with a specific query language. If the language is not available, null will be returned.- Parameters:
language- the query language to be used (case insensitive).- Returns:
- the
QueryProcessorFactoryIFinstance for this language, or null, if not available. - Since:
- 5.1
-
getQueryProcessor
PUBLIC: Returns a query processor for the given topic map; will always return the same processor with the default query language for the same topic map. The base address of the topic map store will be the base address of the query processor. -
getQueryProcessor
-
getQueryProcessor
-
getQueryProcessor
public static QueryProcessorIF getQueryProcessor(String queryLanguage, TopicMapIF topicmap, LocatorIF base) PUBLIC: Returns the default query processor for the given topic map and base address. Will always return the same processor for the same (query language, topic map, base address) combination.- Since:
- 2.0
-
createQueryProcessor
PUBLIC: Factory method for creating a query processor for a given topic map; always returns a new processor. The base address of the topic map store will be the base address of the query processor.- Since:
- 2.0
-
createQueryProcessor
PUBLIC: Factory method for creating a new query processor for a given topic map and base address. Always returns a new processor.- Since:
- 2.0
-
createQueryProcessor
public static QueryProcessorIF createQueryProcessor(String queryLanguage, TopicMapIF topicmap, LocatorIF base) -
createQueryProcessor
EXPERIMENTAL: ... -
createQueryProcessor
public static QueryProcessorIF createQueryProcessor(TopicMapIF topicmap, LocatorIF base, Map properties) -
createQueryProcessor
public static QueryProcessorIF createQueryProcessor(String queryLanguage, TopicMapIF topicmap, Map properties) -
createQueryProcessor
public static QueryProcessorIF createQueryProcessor(String queryLanguage, TopicMapIF topicmap, LocatorIF base, Map properties) EXPERIMENTAL: ... -
parseDeclarations
public static DeclarationContextIF parseDeclarations(TopicMapIF topicmap, String declarations) throws InvalidQueryException PUBLIC: Parses a set of tolog declarations and returns an object representing the resulting declaration context. The context cannot be introspected, but it can be given to a query processor to execute queries in that context.- Throws:
InvalidQueryException- Since:
- 2.1
-
parseDeclarations
public static DeclarationContextIF parseDeclarations(TopicMapIF topicmap, String declarations, DeclarationContextIF context) throws InvalidQueryException PUBLIC: Parses a set of tolog declarations in an existing context, and returns an object representing the resulting nested declaration context. The context cannot be introspected, but it can be given to a query processor to execute queries in that context.- Throws:
InvalidQueryException- Since:
- 2.1
-