|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The NamespaceContextI interface is a replacement for the current NamespaceContextI interface. Once this stabilizes and has a real implementation, it will replace NamespaceContextI.
The NamespaceContextI interface provides an API for managing the
namespace stack. It provides methods to access the current set
of namespaces as well as to manage the stack. Most applications
should probably use the listen(CoreComponentI component) method
of the ComponentInputI
interface rather than managing the stack manually, but manual
management may be appropriate for applications that need to
create an initial context before using it.
Version 0.01 is the foundation of the interface.
Method Summary | |
NamespaceContextI |
collectContext(CoreComponentI component)
collectContext() builds a new namespaceContextI object by walking up the tree from the component used as a parameter. |
void |
declarePrefix(Namespace namespace)
Declares a mapping between a prefix and a URI at the current tree level. |
void |
declarePrefix(java.lang.String prefix,
java.lang.String URI)
Declares a mapping between a prefix and a URI at the current tree level. |
java.lang.String |
getFullDeclaration()
Returns a full set of namespace declarations for the current context. |
int |
getLevel()
getLevel() returns the current position of the stack. |
java.util.HashMap |
getNamespacesByPrefixes()
Returns an enumeration of all the prefixes and URIs in the current context, keyed to prefix. |
java.util.HashMap |
getNamespacesByURIs()
Returns an enumeration of all the prefixes and URIs in the current context, keyed to URI. |
java.lang.String |
getPrefix(java.lang.String URI)
Given a prefix, it returns the URI to which that prefix maps. |
java.lang.String |
getURI(java.lang.String prefix)
Given a URI, it returns the first prefix it finds matching it. |
boolean |
isDeclared(java.lang.String prefix,
java.lang.String URI)
isDeclared() says whether a particular URI/prefix combination has been declared. |
void |
popLevel()
popLevel() is called when an element ends, and strips out old namespace declarations which no longer apply. |
void |
pushLevel()
pushLevel() is called when an element starts, and doesn't have much to do. |
void |
reset()
reset() is called when the object needs to be emptied for reuse. |
void |
setParent(CoreComponentI _parent)
Not sure if this goes here or in NamespaceSetI or anywhere |
Method Detail |
public void declarePrefix(java.lang.String prefix, java.lang.String URI)
public void declarePrefix(Namespace namespace)
public java.lang.String getURI(java.lang.String prefix)
public java.lang.String getPrefix(java.lang.String URI)
public java.util.HashMap getNamespacesByPrefixes()
public java.util.HashMap getNamespacesByURIs()
public java.lang.String getFullDeclaration()
public void setParent(CoreComponentI _parent)
public void pushLevel()
public void popLevel()
public int getLevel()
public NamespaceContextI collectContext(CoreComponentI component)
public boolean isDeclared(java.lang.String prefix, java.lang.String URI)
public void reset()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |