org.sixdml.excelon
Class xlnNamespaceAwareService

java.lang.Object
  |
  +--org.sixdml.excelon.xlnServiceBase
        |
        +--org.sixdml.excelon.xlnNamespaceAwareService
All Implemented Interfaces:
Configurable, Service, SixdmlConstants
Direct Known Subclasses:
xlnSixdmlQueryService, xlnSixdmlUpdateService

public abstract class xlnNamespaceAwareService
extends xlnServiceBase

  
 xlnNamespaceAwareService.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. 

 Created: Tue Dec 04 04:27:01 2001

 

Version:
1.0
Author:
Dare Obasanjo

Field Summary
private  org.sixdml.SixdmlNamespaceMap namespaceMap
          This is the table of prefix to namespace mapping used when performing XPath queries against the database.
 
Fields inherited from class org.sixdml.excelon.xlnServiceBase
collection, properties
 
Fields inherited from interface org.sixdml.SixdmlConstants
SIXDML_NS, SIXDML_VERSION
 
Constructor Summary
xlnNamespaceAwareService()
           
 
Method Summary
 void addNamespaceMapping(String prefix, URI namespaceURI)
          Add a mapping between a given prefix and a namespace to the service's internal namespace map.
 void clearNamespaceMappings()
          Clear all namespace mappings in the service's internal namespace map.
 URI getNamespaceMapping(String prefix)
          Obtain the namespace URI mapped to a particular prefix.
 void removeNamespaceMapping(String prefix)
          Remove a mapping between a given prefix and a namespace to the service's internal namespace map.
 void setNamespaceMap(org.sixdml.SixdmlNamespaceMap nsMap)
          Set the SixdmlNamespaceMap used by this class to map prefixes to namespace URIs used in XPath queries.
 
Methods inherited from class org.sixdml.excelon.xlnServiceBase
getName, getProperty, getVersion, setCollection, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

namespaceMap

private org.sixdml.SixdmlNamespaceMap namespaceMap
This is the table of prefix to namespace mapping used when performing XPath queries against the database. NOTE: eXcelon does not support mapping prefixes to namespaces in XPath queries so this table is unused.

Constructor Detail

xlnNamespaceAwareService

public xlnNamespaceAwareService()
Method Detail

setNamespaceMap

public void setNamespaceMap(org.sixdml.SixdmlNamespaceMap nsMap)
                     throws XMLDBException
Set the SixdmlNamespaceMap used by this class to map prefixes to namespace URIs used in XPath queries. UNIMPLEMENTED.

Parameters:
nsMap - the new namespace map to use.
Throws:
XMLDBException - if anything goes wrong.
See Also:
ErrorMessages.CANT_MAP_PREFIX_TO_URI

addNamespaceMapping

public void addNamespaceMapping(String prefix,
                                URI namespaceURI)
                         throws XMLDBException
Add a mapping between a given prefix and a namespace to the service's internal namespace map. UNIMPLEMENTED.

Parameters:
prefix - key with which the specified namespace URI is associated.
namespaceURI - value to be associated with the specified prefix.
Throws:
XMLDBException - if anything goes wrong.
See Also:
ErrorMessages.CANT_MAP_PREFIX_TO_URI

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. UNIMPLEMENTED.

Parameters:
prefix - key with which the specified namespace URI is associated.
Throws:
XMLDBException - if anything goes wrong.
See Also:
ErrorMessages.CANT_MAP_PREFIX_TO_URI

clearNamespaceMappings

public void clearNamespaceMappings()
                            throws XMLDBException
Clear all namespace mappings in the service's internal namespace map.

Throws:
XMLDBException - if anything goes wrong. UNIMPLEMENTED.
See Also:
ErrorMessages.CANT_MAP_PREFIX_TO_URI

getNamespaceMapping

public URI getNamespaceMapping(String prefix)
                        throws XMLDBException
Obtain the namespace URI mapped to a particular prefix. UNIMPLEMENTED.

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.
XMLDBException
See Also:
ErrorMessages.CANT_MAP_PREFIX_TO_URI