Version: 1.1.1

org.biomoby.shared
Class NamespaceContextImpl

java.lang.Object
  extended by org.biomoby.shared.NamespaceContextImpl
All Implemented Interfaces:
NamespaceContext

public class NamespaceContextImpl
extends Object
implements NamespaceContext

This class is used to provide namespace context for XPath expression evaluation in the Seahawk data mapping rules file, and includes default mappings for prefixes such as moby:


Constructor Summary
NamespaceContextImpl()
          Populates the mapping table with an assortment of prefixes and namespaces used in Moby (see MobyPrefixResolver)
NamespaceContextImpl(Node contextNode, String defaultNSPrefix)
          Traverses up the DOM from the given element to enumerate all of the prefix <-> namespace mappings valid for this node.
NamespaceContextImpl(String ns, String nsPrefix)
          Sets just one prefix, the one provided, which also gets mapped to the blank prefix
 
Method Summary
 String getNamespaceURI(String prefix)
           
 String getPrefix(String namespaceURI)
           
 Iterator getPrefixes(String namespaceURI)
           
 void setPrefix(String namespaceURI, String prefix)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamespaceContextImpl

public NamespaceContextImpl(String ns,
                            String nsPrefix)
Sets just one prefix, the one provided, which also gets mapped to the blank prefix


NamespaceContextImpl

public NamespaceContextImpl(Node contextNode,
                            String defaultNSPrefix)
Traverses up the DOM from the given element to enumerate all of the prefix <-> namespace mappings valid for this node. Note that the DOM does not explicitly contain the xmlns attributes therefore we glean this info from the qualified elements and attributes.


NamespaceContextImpl

public NamespaceContextImpl()
Populates the mapping table with an assortment of prefixes and namespaces used in Moby (see MobyPrefixResolver)

Method Detail

getNamespaceURI

public String getNamespaceURI(String prefix)
Specified by:
getNamespaceURI in interface NamespaceContext

getPrefix

public String getPrefix(String namespaceURI)
Specified by:
getPrefix in interface NamespaceContext

setPrefix

public void setPrefix(String namespaceURI,
                      String prefix)

getPrefixes

public Iterator getPrefixes(String namespaceURI)
Specified by:
getPrefixes in interface NamespaceContext

Version: 1.1.1

Submit a bug or feature
Generated: Sat May 29 04:26:35 EDT 2010