deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.framework.xml
Class NamespaceContext

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

public class NamespaceContext
extends java.lang.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: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18 Jun 2009) $
Author:
Markus Schneider , last edited by: $Author: mschneider $

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.
 
Method Summary
 void addAll(NamespaceContext nsc)
          registeres all prexifes and assigned namespaces from another NamespaceContext.
 void addNamespace(java.lang.String prefix, java.net.URI namespace)
          registers a new prefix with an assigned namespace URI
 java.util.Map<java.lang.String,java.net.URI> getNamespaceMap()
           
 java.net.URI getURI(java.lang.String prefix)
           
 java.lang.String toString()
           
 java.lang.String translateNamespacePrefixToUri(java.lang.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
Method Detail

getNamespaceMap

public java.util.Map<java.lang.String,java.net.URI> getNamespaceMap()
Returns:
the namespace map of the context.

addNamespace

public void addNamespace(java.lang.String prefix,
                         java.net.URI namespace)
registers a new prefix with an assigned namespace URI

Parameters:
prefix -
namespace -

addAll

public void addAll(NamespaceContext nsc)
registeres all prexifes and assigned namespaces from another NamespaceContext. If a prefix already exists in this NamespaceContext it will be ignored.

Parameters:
nsc -

translateNamespacePrefixToUri

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

getURI

public java.net.URI getURI(java.lang.String prefix)
Parameters:
prefix - to get the namespace for
Returns:
the URI (namespace) associated with the given prefix, or null if it was not found.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

deegree 2.5 (2011/06/29 09:44 build-8-official)

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