Class LocalParseContext
java.lang.Object
net.ontopia.topicmaps.query.parser.LocalParseContext
- All Implemented Interfaces:
DeclarationContextIF,ParseContextIF
INTERNAL: Represents the local context in which a tolog query or
rule file is being parsed. Context may be the context bound to a
QueryProcessorIF object, or it may be only a transient local
context for a query.
-
Field Summary
Fields inherited from interface net.ontopia.topicmaps.query.parser.ParseContextIF
ITEM_IDENTIFIER, MODULE, SUBJECT_IDENTIFIER, SUBJECT_LOCATOR -
Constructor Summary
Constructors -
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).
-
Constructor Details
-
LocalParseContext
-
-
Method Details
-
getTopicMap
Description copied from interface:ParseContextIFINTERNAL: Returns the topic map being parsed against.- Specified by:
getTopicMapin interfaceParseContextIF
-
resolveQName
Description copied from interface:ParseContextIFINTERNAL: 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?- Specified by:
resolveQNamein interfaceParseContextIF
-
addPrefixBinding
public void addPrefixBinding(String prefix, String uri, int qualification) throws AntlrWrapException Description copied from interface:ParseContextIFINTERNAL: Adds a prefix binding to the context.- Specified by:
addPrefixBindingin interfaceParseContextIF- 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
-
isLoading
Description copied from interface:ParseContextIFINTERNAL: 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.- Specified by:
isLoadingin interfaceParseContextIF
-
isBuiltInPredicate
Description copied from interface:ParseContextIFINTERNAL: Used to find out if the given predicate name is the name of a built-in predicate. Needed for error checking, see bug #1082.- Specified by:
isBuiltInPredicatein interfaceParseContextIF
-
addPredicate
Description copied from interface:ParseContextIFINTERNAL: Adds a new predicate to the context.- Specified by:
addPredicatein interfaceParseContextIF- Throws:
AntlrWrapException
-
getTopic
Description copied from interface:ParseContextIFINTERNAL: Interprets the given prefix and localname as a topic, returning null if none is found.- Specified by:
getTopicin interfaceParseContextIF- Throws:
AntlrWrapException
-
getObject
- Specified by:
getObjectin interfaceParseContextIF- Throws:
AntlrWrapException
-
getPredicate
Description copied from interface:ParseContextIFINTERNAL: Returns the named predicate, or null if it does not exist.- Specified by:
getPredicatein interfaceParseContextIF- Throws:
AntlrWrapException
-
getPredicate
- Specified by:
getPredicatein interfaceParseContextIF
-
getPredicate
- Specified by:
getPredicatein interfaceParseContextIF
-
getModule
- Specified by:
getModulein interfaceParseContextIF
-
absolutify
- Specified by:
absolutifyin interfaceParseContextIF- Throws:
AntlrWrapException
-
getObjectByObjectId
- Specified by:
getObjectByObjectIdin interfaceParseContextIF- Throws:
AntlrWrapException
-
getTopicBySubjectIdentifier
- Specified by:
getTopicBySubjectIdentifierin interfaceParseContextIF- Throws:
AntlrWrapException
-
getTopicBySubjectLocator
- Specified by:
getTopicBySubjectLocatorin interfaceParseContextIF- Throws:
AntlrWrapException
-
getObjectByItemId
- Specified by:
getObjectByItemIdin interfaceParseContextIF- Throws:
AntlrWrapException
-
dump
public void dump()Description copied from interface:ParseContextIFINTERNAL: Used for debugging.- Specified by:
dumpin interfaceParseContextIF
-