com.sun.faban.common
Class FabanNamespaceContext

java.lang.Object
  extended by com.sun.faban.common.FabanNamespaceContext
All Implemented Interfaces:
NamespaceContext

public class FabanNamespaceContext
extends Object
implements NamespaceContext

A NamespaceContext with Faban namespace conventions precoded. The Faban prefixes and namespace URIs are as follows:

PrefixNamespace URI
fahttp://faban.sunsource.net/ns/faban
fdhttp://faban.sunsource.net/ns/fabandriver
fhhttp://faban.sunsource.net/ns/fabanharness

You can add additional namespace prefixes using the addNamespace method.

Author:
Akara Sucharitakul

Constructor Summary
FabanNamespaceContext()
          Constructs the Faban namespace context that contains all Faban namespaces to start with.
 
Method Summary
 void addNamespace(String namespaceURI, String prefix)
          Adds a namespace prefix to the NamespaceContext.
 String getNamespaceURI(String prefix)
           
 String getPrefix(String namespaceURI)
           
 Iterator getPrefixes(String namespaceURI)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FabanNamespaceContext

public FabanNamespaceContext()
Constructs the Faban namespace context that contains all Faban namespaces to start with.

Method Detail

addNamespace

public void addNamespace(String namespaceURI,
                         String prefix)
Adds a namespace prefix to the NamespaceContext.

Parameters:
namespaceURI - The namespace URI
prefix - The prefix we use for referring to the elements/attributes

getNamespaceURI

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

getPrefix

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

getPrefixes

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