net.ontopia.topicmaps.query.utils
Class QueryUtils

java.lang.Object
  extended by net.ontopia.topicmaps.query.utils.QueryUtils

public class QueryUtils
extends java.lang.Object

PUBLIC: Utility methods for getting QueryProcessorIFs for a topic map.

Since:
1.4

Constructor Summary
QueryUtils()
           
 
Method Summary
static QueryProcessorIF createQueryProcessor(TopicMapIF topicmap)
          PUBLIC: Factory method for creating a query processor for a given topic map; always returns a new processor.
static QueryProcessorIF createQueryProcessor(TopicMapIF topicmap, LocatorIF base)
          PUBLIC: Factory method for creating a new query processor for a given topic map and base address.
static QueryProcessorIF createQueryProcessor(TopicMapIF topicmap, LocatorIF base, java.util.Map properties)
          EXPERIMENTAL: ...
static QueryProcessorIF createQueryProcessor(TopicMapIF topicmap, java.util.Map properties)
          EXPERIMENTAL: ...
static QueryProcessorIF getQueryProcessor(TopicMapIF topicmap)
          PUBLIC: Returns a query processor for the given topic map; will always return the same processor for the same topic map.
static QueryProcessorIF getQueryProcessor(TopicMapIF topicmap, LocatorIF base)
          PUBLIC: Returns the default query processor for the given topic map and base address.
static DeclarationContextIF parseDeclarations(TopicMapIF topicmap, java.lang.String declarations)
          PUBLIC: Parses a set of tolog declarations and returns an object representing the resulting declaration context.
static DeclarationContextIF parseDeclarations(TopicMapIF topicmap, java.lang.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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryUtils

public QueryUtils()
Method Detail

getQueryProcessor

public static QueryProcessorIF getQueryProcessor(TopicMapIF topicmap)
PUBLIC: Returns a query processor for the given topic map; will always return the same processor for the same topic map. The base address of the topic map store will be the base address of the query processor.


getQueryProcessor

public static QueryProcessorIF getQueryProcessor(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 (topic map, base address) combination.

Since:
2.0

createQueryProcessor

public static QueryProcessorIF createQueryProcessor(TopicMapIF topicmap)
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 static QueryProcessorIF createQueryProcessor(TopicMapIF topicmap,
                                                    LocatorIF base)
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(TopicMapIF topicmap,
                                                    java.util.Map properties)
EXPERIMENTAL: ...


createQueryProcessor

public static QueryProcessorIF createQueryProcessor(TopicMapIF topicmap,
                                                    LocatorIF base,
                                                    java.util.Map properties)
EXPERIMENTAL: ...


parseDeclarations

public static DeclarationContextIF parseDeclarations(TopicMapIF topicmap,
                                                     java.lang.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,
                                                     java.lang.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


Copyright © 2000-2009 Ontopia.