|
TUM CCSM Commons | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.tum.cs.commons.xml.ConstantNamespaceContext
public class ConstantNamespaceContext
A minimalistic implementation of NamespaceContext
to be used with
XPath
. Method getNamespaceURI(String)
always returns the
string provided to the constructor. All other methods throw
UnsupportedOperationException
s. These methods are not needed for
XPath resolution.
Implementation is inspired by snippet on http://www.ibm.com/developerworks/library/x-javaxpathapi.html.
Constructor Summary | |
---|---|
ConstantNamespaceContext(java.lang.String namesspaceURI)
Create new context. |
Method Summary | |
---|---|
java.lang.String |
getNamespaceURI(java.lang.String prefix)
Always returns the string provided to the constructor. |
java.lang.String |
getPrefix(java.lang.String uri)
Throws UnsupportedOperationException . |
java.util.Iterator |
getPrefixes(java.lang.String uri)
Throws UnsupportedOperationException . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConstantNamespaceContext(java.lang.String namesspaceURI)
Method Detail |
---|
public java.lang.String getNamespaceURI(java.lang.String prefix)
getNamespaceURI
in interface javax.xml.namespace.NamespaceContext
public java.lang.String getPrefix(java.lang.String uri)
UnsupportedOperationException
. This method isn't
necessary for XPath processing.
getPrefix
in interface javax.xml.namespace.NamespaceContext
public java.util.Iterator getPrefixes(java.lang.String uri)
UnsupportedOperationException
. This method isn't
necessary for XPath processing.
getPrefixes
in interface javax.xml.namespace.NamespaceContext
|
TUM CCSM Commons | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |