deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

org.deegree.commons.xml
Class NamespaceContext

java.lang.Object
  extended by org.deegree.commons.xml.NamespaceContext
All Implemented Interfaces:
org.jaxen.NamespaceContext

public class NamespaceContext
extends Object
implements org.jaxen.NamespaceContext

Implementation of Jaxen's (http://jaxen.codehaus.org) NamespaceContext interface.

NOTE: This should be used everywhere inside deegree, don't use org.jaxen.SimpleNamespaceContext -- this prevents unnecessary binding to Jaxen.

Version:
$Revision: 21077 $, $Date: 2009-11-26 15:29:48 +0100 (Do, 26 Nov 2009) $
Author:
Markus Schneider , last edited by: $Author: aschmitz $

Constructor Summary
NamespaceContext()
          Creates a new instance of NamespaceContext with only the prefix 'xmlns:' being bound.
NamespaceContext(NamespaceContext nsContext)
          Creates a new instance of NamespaceContext that contains all the bindings from the argument NamespaceContext.
NamespaceContext(NamespaceContext nsContext)
          Creates a new instance of NamespaceContext that contains all the bindings from the argument NamespaceContext.
 
Method Summary
 NamespaceContext addNamespace(String prefix, String namespace)
          registers a new prefix with an assigned namespace URI
 String getURI(String prefix)
           
 String toString()
           
 String translateNamespacePrefixToUri(String prefix)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NamespaceContext

public NamespaceContext()
Creates a new instance of NamespaceContext with only the prefix 'xmlns:' being bound.


NamespaceContext

public NamespaceContext(NamespaceContext nsContext)
Creates a new instance of NamespaceContext that contains all the bindings from the argument NamespaceContext.

Parameters:
nsContext - bindings to copy

NamespaceContext

public NamespaceContext(NamespaceContext nsContext)
Creates a new instance of NamespaceContext that contains all the bindings from the argument NamespaceContext.

Parameters:
nsContext - bindings to copy
Method Detail

addNamespace

public NamespaceContext addNamespace(String prefix,
                                     String namespace)
registers a new prefix with an assigned namespace URI

Parameters:
prefix -
namespace -
Returns:
this: new XPath(..., new NamespaceContext().addNamespace(...)

translateNamespacePrefixToUri

public String translateNamespacePrefixToUri(String prefix)
Specified by:
translateNamespacePrefixToUri in interface org.jaxen.NamespaceContext

getURI

public String getURI(String prefix)
Parameters:
prefix -
Returns:
namespcae URI assigned to a prefix

toString

public String toString()
Overrides:
toString in class Object

deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org

]]>