|
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
UnsupportedOperationExceptions. 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(String namesspaceURI)
Create new context. |
|
| Method Summary | |
|---|---|
String |
getNamespaceURI(String prefix)
Always returns the string provided to the constructor. |
String |
getPrefix(String uri)
Throws UnsupportedOperationException. |
Iterator |
getPrefixes(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(String namesspaceURI)
| Method Detail |
|---|
public String getNamespaceURI(String prefix)
getNamespaceURI in interface NamespaceContextpublic String getPrefix(String uri)
UnsupportedOperationException. This method isn't
necessary for XPath processing.
getPrefix in interface NamespaceContextpublic Iterator getPrefixes(String uri)
UnsupportedOperationException. This method isn't
necessary for XPath processing.
getPrefixes in interface NamespaceContext
|
TUM CCSM Commons | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||