org.sixdml.xindice
Class xiNamespaceAwareService
java.lang.Object
|
+--org.sixdml.xindice.xiServiceBase
|
+--org.sixdml.xindice.xiNamespaceAwareService
- All Implemented Interfaces:
- Configurable, Service, SixdmlConstants
- Direct Known Subclasses:
- xiSixdmlQueryService, xiSixdmlUpdateService
- abstract class xiNamespaceAwareService
- extends xiServiceBase
xiNamespaceAwareService.java
This is the base class for services that perform XPath queries and need to
manage relationships between prefixes and namespace URI in these queries.
- Version:
- 1.0
|
Field Summary |
private SixdmlNamespaceMap |
namespaceMap
This is the table of prefix to namespace mapping used when performing XPath queries
against the database. |
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
namespaceMap
private SixdmlNamespaceMap namespaceMap
- This is the table of prefix to namespace mapping used when performing XPath queries
against the database.
xiNamespaceAwareService
xiNamespaceAwareService()
setNamespaceMap
public void setNamespaceMap(SixdmlNamespaceMap nsMap)
throws XMLDBException
- Set the SixdmlNamespaceMap used by this class to map prefixes to namespace URIs used
in XPath queries. .
- Parameters:
nsMap - the new namespace map to use.
addNamespaceMapping
public void addNamespaceMapping(String prefix,
String namespaceURI)
throws XMLDBException
- Add a mapping between a given prefix and a namespace to the service's internal namespace
map.
- Parameters:
prefix - key with which the specified namespace URI is associated.namespaceURI - value to be associated with the specified prefix.
removeNamespaceMapping
public void removeNamespaceMapping(String prefix)
throws XMLDBException
- Remove a mapping between a given prefix and a namespace to the service's internal namespace
map. .
- Parameters:
prefix - key with which the specified namespace URI is associated.
clearNamespaceMappings
public void clearNamespaceMappings()
throws XMLDBException
- Clear all namespace mappings in the service's internal namespace map.
getNamespaceMapping
public String getNamespaceMapping(String prefix)
throws XMLDBException
- Obtain the namespace URI mapped to a particular .
- Parameters:
prefix - the prefix whose namespace is being sought.- Returns:
- the namespace URI mapped to the prefix or null if the map contains
no mapping for this prefix.
getNamespaceNode
protected Node getNamespaceNode()
throws ParserConfigurationException
- Creates an DOM element node containing all the prefix<->namespace bindings in this object's
namespace map.
- Returns:
- a DOM node containing this objects prefix<->namespace mapping as xmlns declarations.
- Throws:
ParserConfigurationException - if an error occurs in utilizing the XML DOM.