Interface ParseContextIF
-
- All Known Implementing Classes:
GlobalParseContext
,LocalParseContext
public interface ParseContextIF
INTERNAL: Represents an interpretation context for tolog queries.
-
-
Field Summary
Fields Modifier and Type Field Description static int
ITEM_IDENTIFIER
static int
MODULE
static int
SUBJECT_IDENTIFIER
static int
SUBJECT_LOCATOR
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LocatorIF
absolutify(String uriref)
void
addPredicate(PredicateIF predicate)
INTERNAL: Adds a new predicate to the context.void
addPrefixBinding(String prefix, String uri, int qualification)
INTERNAL: Adds a prefix binding to the context.void
dump()
INTERNAL: Used for debugging.ModuleIF
getModule(String uri)
TMObjectIF
getObject(QName qname)
TMObjectIF
getObjectByItemId(String uri)
TMObjectIF
getObjectByObjectId(String id)
PredicateIF
getPredicate(TopicIF topic, boolean assoc)
PredicateIF
getPredicate(ParsedRule rule)
PredicateIF
getPredicate(QName qname, boolean assoc)
INTERNAL: Returns the named predicate, or null if it does not exist.TopicIF
getTopic(QName qname)
INTERNAL: Interprets the given prefix and localname as a topic, returning null if none is found.TopicIF
getTopicBySubjectIdentifier(String uri)
TopicIF
getTopicBySubjectLocator(String uri)
TopicMapIF
getTopicMap()
INTERNAL: Returns the topic map being parsed against.boolean
isBuiltInPredicate(String name)
INTERNAL: Used to find out if the given predicate name is the name of a built-in predicate.boolean
isLoading(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(String prefix, 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)
-
absolutify
LocatorIF absolutify(String uriref) throws AntlrWrapException
- Throws:
AntlrWrapException
-
getTopicBySubjectIdentifier
TopicIF getTopicBySubjectIdentifier(String uri) throws AntlrWrapException
- Throws:
AntlrWrapException
-
getTopicBySubjectLocator
TopicIF getTopicBySubjectLocator(String uri) throws AntlrWrapException
- Throws:
AntlrWrapException
-
getObjectByItemId
TMObjectIF getObjectByItemId(String uri) throws AntlrWrapException
- Throws:
AntlrWrapException
-
getObjectByObjectId
TMObjectIF getObjectByObjectId(String id) throws AntlrWrapException
- Throws:
AntlrWrapException
-
isLoading
boolean isLoading(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(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.
-
-