net.ontopia.topicmaps.query.parser
Interface ParseContextIF

All Known Implementing Classes:
GlobalParseContext, LocalParseContext

public interface ParseContextIF

INTERNAL: Represents an interpretation context for tolog queries.


Field Summary
static int ITEM_IDENTIFIER
           
static int MODULE
           
static int SUBJECT_IDENTIFIER
           
static int SUBJECT_LOCATOR
           
 
Method Summary
 LocatorIF absolutify(java.lang.String uriref)
           
 void addPredicate(PredicateIF predicate)
          INTERNAL: Adds a new predicate to the context.
 void addPrefixBinding(java.lang.String prefix, java.lang.String uri, int qualification)
          INTERNAL: Adds a prefix binding to the context.
 void dump()
          INTERNAL: Used for debugging.
 ModuleIF getModule(java.lang.String uri)
           
 TMObjectIF getObject(QName qname)
           
 TMObjectIF getObjectByItemId(java.lang.String uri)
           
 TMObjectIF getObjectByObjectId(java.lang.String id)
           
 PredicateIF getPredicate(ParsedRule rule)
           
 PredicateIF getPredicate(QName qname, boolean assoc)
          INTERNAL: Returns the named predicate, or null if it does not exist.
 PredicateIF getPredicate(TopicIF topic, boolean assoc)
           
 TopicIF getTopic(QName qname)
          INTERNAL: Interprets the given prefix and localname as a topic, returning null if none is found.
 TopicIF getTopicBySubjectIdentifier(java.lang.String uri)
           
 TopicIF getTopicBySubjectLocator(java.lang.String uri)
           
 TopicMapIF getTopicMap()
          INTERNAL: Returns the topic map being parsed against.
 boolean isBuiltInPredicate(java.lang.String name)
          INTERNAL: Used to find out if the given predicate name is the name of a built-in predicate.
 boolean isLoading(java.lang.String uri)
          INTERNAL: Returns true if the uri is being loaded or has already been loaded.
 LocatorIF resolveQName(QName qname)
          INTERNAL: Returns the full locator for the given QName, or reports an error if the prefix is unbound, or if the prefix is bound to something other than a subject identifier namespace (since this is used for the CTM part of tolog INSERT only).
 

Field Detail

SUBJECT_IDENTIFIER

static final int SUBJECT_IDENTIFIER
See Also:
Constant Field Values

SUBJECT_LOCATOR

static final int SUBJECT_LOCATOR
See Also:
Constant Field Values

ITEM_IDENTIFIER

static final int ITEM_IDENTIFIER
See Also:
Constant Field Values

MODULE

static final int MODULE
See Also:
Constant Field Values
Method Detail

getTopicMap

TopicMapIF getTopicMap()
INTERNAL: Returns the topic map being parsed against.


resolveQName

LocatorIF resolveQName(QName qname)
INTERNAL: Returns the full locator for the given QName, or reports an error if the prefix is unbound, or if the prefix is bound to something other than a subject identifier namespace (since this is used for the CTM part of tolog INSERT only). FIXME: what exception to throw?


addPrefixBinding

void addPrefixBinding(java.lang.String prefix,
                      java.lang.String uri,
                      int qualification)
                      throws AntlrWrapException
INTERNAL: Adds a prefix binding to the context.

Parameters:
prefix - The prefix whose binding is being defined.
uri - The (possibly relative) URI reference to which the prefix is bound.
qualification - The interpretation of the URI. (Defined using local constants.)
Throws:
AntlrWrapException

addPredicate

void addPredicate(PredicateIF predicate)
                  throws AntlrWrapException
INTERNAL: Adds a new predicate to the context.

Throws:
AntlrWrapException

getTopic

TopicIF getTopic(QName qname)
                 throws AntlrWrapException
INTERNAL: Interprets the given prefix and localname as a topic, returning null if none is found.

Throws:
AntlrWrapException

getObject

TMObjectIF getObject(QName qname)
                     throws AntlrWrapException
Throws:
AntlrWrapException

getPredicate

PredicateIF getPredicate(QName qname,
                         boolean assoc)
                         throws AntlrWrapException
INTERNAL: Returns the named predicate, or null if it does not exist.

Throws:
AntlrWrapException

getPredicate

PredicateIF getPredicate(TopicIF topic,
                         boolean assoc)

getPredicate

PredicateIF getPredicate(ParsedRule rule)

getModule

ModuleIF getModule(java.lang.String uri)

absolutify

LocatorIF absolutify(java.lang.String uriref)
                     throws AntlrWrapException
Throws:
AntlrWrapException

getTopicBySubjectIdentifier

TopicIF getTopicBySubjectIdentifier(java.lang.String uri)
                                    throws AntlrWrapException
Throws:
AntlrWrapException

getTopicBySubjectLocator

TopicIF getTopicBySubjectLocator(java.lang.String uri)
                                 throws AntlrWrapException
Throws:
AntlrWrapException

getObjectByItemId

TMObjectIF getObjectByItemId(java.lang.String uri)
                             throws AntlrWrapException
Throws:
AntlrWrapException

getObjectByObjectId

TMObjectIF getObjectByObjectId(java.lang.String id)
                               throws AntlrWrapException
Throws:
AntlrWrapException

isLoading

boolean isLoading(java.lang.String uri)
INTERNAL: Returns true if the uri is being loaded or has already been loaded. This method is used to make sure that there are no infinite recursion when importing modules.


isBuiltInPredicate

boolean isBuiltInPredicate(java.lang.String name)
INTERNAL: Used to find out if the given predicate name is the name of a built-in predicate. Needed for error checking, see bug #1082.


dump

void dump()
INTERNAL: Used for debugging.



Copyright © 2000-2012 Ontopia.