public class GlobalParseContext extends Object implements ParseContextIF
ITEM_IDENTIFIER, MODULE, SUBJECT_IDENTIFIER, SUBJECT_LOCATOR| Constructor and Description |
|---|
GlobalParseContext(PredicateFactoryIF factory,
TopicMapIF topicmap) |
GlobalParseContext(PredicateFactoryIF factory,
TopicMapIF topicmap,
LocatorIF base) |
| Modifier and Type | Method and 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 |
getObjectByIdentifier(String id) |
TMObjectIF |
getObjectByItemId(String uri) |
TMObjectIF |
getObjectByObjectId(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(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).
|
public GlobalParseContext(PredicateFactoryIF factory, TopicMapIF topicmap)
public GlobalParseContext(PredicateFactoryIF factory, TopicMapIF topicmap, LocatorIF base)
public TopicMapIF getTopicMap()
ParseContextIFgetTopicMap in interface ParseContextIFpublic LocatorIF resolveQName(QName qname)
ParseContextIFresolveQName in interface ParseContextIFpublic void addPrefixBinding(String prefix, String uri, int qualification)
ParseContextIFaddPrefixBinding in interface ParseContextIFprefix - 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.)public void addPredicate(PredicateIF predicate)
ParseContextIFaddPredicate in interface ParseContextIFpublic LocatorIF absolutify(String uriref) throws AntlrWrapException
absolutify in interface ParseContextIFAntlrWrapExceptionpublic TMObjectIF getObjectByIdentifier(String id)
public TMObjectIF getObjectByObjectId(String id) throws AntlrWrapException
getObjectByObjectId in interface ParseContextIFAntlrWrapExceptionpublic TopicIF getTopicBySubjectIdentifier(String uri) throws AntlrWrapException
getTopicBySubjectIdentifier in interface ParseContextIFAntlrWrapExceptionpublic TopicIF getTopicBySubjectLocator(String uri) throws AntlrWrapException
getTopicBySubjectLocator in interface ParseContextIFAntlrWrapExceptionpublic TMObjectIF getObjectByItemId(String uri) throws AntlrWrapException
getObjectByItemId in interface ParseContextIFAntlrWrapExceptionpublic TMObjectIF getObject(QName qname) throws AntlrWrapException
getObject in interface ParseContextIFAntlrWrapExceptionpublic TopicIF getTopic(QName qname) throws AntlrWrapException
ParseContextIFgetTopic in interface ParseContextIFAntlrWrapExceptionpublic PredicateIF getPredicate(QName qname, boolean assoc) throws AntlrWrapException
ParseContextIFgetPredicate in interface ParseContextIFAntlrWrapExceptionpublic PredicateIF getPredicate(TopicIF topic, boolean assoc)
getPredicate in interface ParseContextIFpublic PredicateIF getPredicate(ParsedRule rule)
getPredicate in interface ParseContextIFpublic ModuleIF getModule(String uri)
getModule in interface ParseContextIFpublic boolean isLoading(String uri)
ParseContextIFisLoading in interface ParseContextIFpublic boolean isBuiltInPredicate(String name)
ParseContextIFisBuiltInPredicate in interface ParseContextIFpublic void dump()
ParseContextIFdump in interface ParseContextIF