Package de.christofreichardt.diagnosis
Class TracerConfigNamespaceContextImpl
- java.lang.Object
-
- de.christofreichardt.diagnosis.TracerConfigNamespaceContextImpl
-
- All Implemented Interfaces:
NamespaceContext
public class TracerConfigNamespaceContextImpl extends Object implements NamespaceContext
Since the TracerFactory uses XPath to access the XML configuration involving namespaces an implementation of the NamespaceContext interface is necessary. The implementation is simplified as only the namespace "http://www.christofreichardt.de/java/tracer" and the prefix "dns" will be considered.- Author:
- Christof Reichardt
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classTracerConfigNamespaceContextImpl.IteratorSimplified implementation of an iterator.
-
Constructor Summary
Constructors Constructor Description TracerConfigNamespaceContextImpl()default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetNamespaceURI(String prefix)Returns the fixed namespace URI for the prefix "dns".StringgetPrefix(String namespaceURI)Returns the prefix for the fixed namespace "http://www.christofreichardt.de/java/tracer".TracerConfigNamespaceContextImpl.IteratorgetPrefixes(String namespaceURI)Returns a special iterator implementation.
-
-
-
Method Detail
-
getNamespaceURI
public String getNamespaceURI(String prefix)
Returns the fixed namespace URI for the prefix "dns". Other prefixes will cause an IllegalArgumentException.- Specified by:
getNamespaceURIin interfaceNamespaceContext- Parameters:
prefix- the namespace prefix- Returns:
- the URI "http://www.christofreichardt.de/java/tracer"
-
getPrefix
public String getPrefix(String namespaceURI)
Returns the prefix for the fixed namespace "http://www.christofreichardt.de/java/tracer". Other namespaces will cause an IllegalArgumentException.- Specified by:
getPrefixin interfaceNamespaceContext- Parameters:
namespaceURI- the namespace URI- Returns:
- the prefix "dns"
-
getPrefixes
public TracerConfigNamespaceContextImpl.Iterator getPrefixes(String namespaceURI)
Returns a special iterator implementation.- Specified by:
getPrefixesin interfaceNamespaceContext- Parameters:
namespaceURI- the namespace URI- Returns:
- an iterator
-
-