1 22 23 package org.xquark.util; 24 25 import java.util.Collection ; 26 import java.util.List ; 27 28 import org.xml.sax.XMLReader ; 29 30 public class NamespaceContextFilter extends DecoratorFilter implements NamespaceContext 31 { 32 private static final String RCSRevision = "$Revision: 1.2 $"; 33 private static final String RCSName = "$Name: $"; 34 35 public NamespaceContextFilter() 36 { 37 super(new NamespaceContextHandler()); 38 } 39 40 public NamespaceContextFilter(XMLReader reader) 41 { 42 super(reader, new NamespaceContextHandler()); 43 } 44 45 public NamespaceContext getNamespaceContext() 46 { 47 return ((NamespaceContextHandler)decorator).getNamespaceContext(); 48 } 49 50 public String getNamespaceURI(String prefix) 51 { 52 return ((NamespaceContextHandler)decorator).getNamespaceURI(prefix); 53 } 54 55 public Collection getNamespaceURIs() { 56 return ((NamespaceContextHandler)decorator).getNamespaceURIs(); 57 } 58 59 public String getPrefix(String uri) 60 { 61 return ((NamespaceContextHandler)decorator).getPrefix(uri); 62 } 63 64 public List getDeclaredPrefixes() 65 { 66 return ((NamespaceContextHandler)decorator).getDeclaredPrefixes(); 67 } 68 69 public Collection getPrefixes() 70 { 71 return ((NamespaceContextHandler)decorator).getPrefixes(); 72 } 73 74 public Collection getPrefixes(String uri) 75 { 76 return ((NamespaceContextHandler)decorator).getPrefixes(uri); 77 } 78 } 79 | Popular Tags |