Mercurial > dive4elements > framework
view artifacts/src/main/java/de/intevation/artifacts/ArtifactNamespaceContext.java @ 57:cf9848c85755 0.2
RELEASE 0.2: Summarized NEWS and Changes
artifacts/trunk@338 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Hans Plum <hans.plum@intevation.de> |
---|---|
date | Fri, 13 Nov 2009 18:37:51 +0000 |
parents | 4ae4dc99127d |
children | 48d1a9a082c2 |
line wrap: on
line source
package de.intevation.artifacts; import javax.xml.XMLConstants; import javax.xml.namespace.NamespaceContext; import java.util.Iterator; /** * @author Sascha L. Teichmann (sascha.teichmann@intevation) */ public class ArtifactNamespaceContext implements NamespaceContext { /** * The URI of the namespace of the artifacts. */ public final static String NAMESPACE_URI = "http://www.intevation.de/2009/artifacts"; /** * The XML prefix for the artifacts namespace. */ public final static String NAMESPACE_PREFIX = "art"; public static final ArtifactNamespaceContext INSTANCE = new ArtifactNamespaceContext(); public ArtifactNamespaceContext() { } public String getNamespaceURI(String prefix) { if (prefix == null) { throw new NullPointerException("Null prefix"); } if (NAMESPACE_PREFIX.equals(prefix)) { return NAMESPACE_URI; } if ("xml".equals(prefix)) { return XMLConstants.XML_NS_URI; } return XMLConstants.NULL_NS_URI; } public String getPrefix(String uri) { throw new UnsupportedOperationException(); } public Iterator getPrefixes(String uri) { throw new UnsupportedOperationException(); } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8: