public class LocalParseContext extends Object implements ParseContextIF, DeclarationContextIF
ITEM_IDENTIFIER, MODULE, SUBJECT_IDENTIFIER, SUBJECT_LOCATOR
Constructor and Description |
---|
LocalParseContext(ParseContextIF subcontext) |
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 |
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 LocalParseContext(ParseContextIF subcontext)
public TopicMapIF getTopicMap()
ParseContextIF
getTopicMap
in interface ParseContextIF
public LocatorIF resolveQName(QName qname)
ParseContextIF
resolveQName
in interface ParseContextIF
public void addPrefixBinding(String prefix, String uri, int qualification) throws AntlrWrapException
ParseContextIF
addPrefixBinding
in interface ParseContextIF
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.)AntlrWrapException
public boolean isLoading(String uri)
ParseContextIF
isLoading
in interface ParseContextIF
public boolean isBuiltInPredicate(String name)
ParseContextIF
isBuiltInPredicate
in interface ParseContextIF
public void addPredicate(PredicateIF predicate) throws AntlrWrapException
ParseContextIF
addPredicate
in interface ParseContextIF
AntlrWrapException
public TopicIF getTopic(QName qname) throws AntlrWrapException
ParseContextIF
getTopic
in interface ParseContextIF
AntlrWrapException
public TMObjectIF getObject(QName qname) throws AntlrWrapException
getObject
in interface ParseContextIF
AntlrWrapException
public PredicateIF getPredicate(QName qname, boolean assoc) throws AntlrWrapException
ParseContextIF
getPredicate
in interface ParseContextIF
AntlrWrapException
public PredicateIF getPredicate(TopicIF topic, boolean assoc)
getPredicate
in interface ParseContextIF
public PredicateIF getPredicate(ParsedRule rule)
getPredicate
in interface ParseContextIF
public ModuleIF getModule(String uri)
getModule
in interface ParseContextIF
public LocatorIF absolutify(String uriref) throws AntlrWrapException
absolutify
in interface ParseContextIF
AntlrWrapException
public TMObjectIF getObjectByObjectId(String id) throws AntlrWrapException
getObjectByObjectId
in interface ParseContextIF
AntlrWrapException
public TopicIF getTopicBySubjectIdentifier(String uri) throws AntlrWrapException
getTopicBySubjectIdentifier
in interface ParseContextIF
AntlrWrapException
public TopicIF getTopicBySubjectLocator(String uri) throws AntlrWrapException
getTopicBySubjectLocator
in interface ParseContextIF
AntlrWrapException
public TMObjectIF getObjectByItemId(String uri) throws AntlrWrapException
getObjectByItemId
in interface ParseContextIF
AntlrWrapException
public void dump()
ParseContextIF
dump
in interface ParseContextIF