Interface ParseContextIF
- All Known Implementing Classes:
GlobalParseContext,LocalParseContext
public interface ParseContextIF
INTERNAL: Represents an interpretation context for tolog queries.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionabsolutify(String uriref) voidaddPredicate(PredicateIF predicate) INTERNAL: Adds a new predicate to the context.voidaddPrefixBinding(String prefix, String uri, int qualification) INTERNAL: Adds a prefix binding to the context.voiddump()INTERNAL: Used for debugging.getObjectByItemId(String uri) getPredicate(TopicIF topic, boolean assoc) getPredicate(ParsedRule rule) getPredicate(QName qname, boolean assoc) INTERNAL: Returns the named predicate, or null if it does not exist.INTERNAL: Interprets the given prefix and localname as a topic, returning null if none is found.INTERNAL: Returns the topic map being parsed against.booleanisBuiltInPredicate(String name) INTERNAL: Used to find out if the given predicate name is the name of a built-in predicate.booleanINTERNAL: Returns true if the uri is being loaded or has already been loaded.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 Details
-
SUBJECT_IDENTIFIER
static final int SUBJECT_IDENTIFIER- See Also:
-
SUBJECT_LOCATOR
static final int SUBJECT_LOCATOR- See Also:
-
ITEM_IDENTIFIER
static final int ITEM_IDENTIFIER- See Also:
-
MODULE
static final int MODULE- See Also:
-
-
Method Details
-
getTopicMap
TopicMapIF getTopicMap()INTERNAL: Returns the topic map being parsed against. -
resolveQName
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
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
INTERNAL: Adds a new predicate to the context.- Throws:
AntlrWrapException
-
getTopic
INTERNAL: Interprets the given prefix and localname as a topic, returning null if none is found.- Throws:
AntlrWrapException
-
getObject
- Throws:
AntlrWrapException
-
getPredicate
INTERNAL: Returns the named predicate, or null if it does not exist.- Throws:
AntlrWrapException
-
getPredicate
-
getPredicate
-
getModule
-
absolutify
- Throws:
AntlrWrapException
-
getTopicBySubjectIdentifier
- Throws:
AntlrWrapException
-
getTopicBySubjectLocator
- Throws:
AntlrWrapException
-
getObjectByItemId
- Throws:
AntlrWrapException
-
getObjectByObjectId
- Throws:
AntlrWrapException
-
isLoading
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
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.
-