Class StandardNamespaceContext

  • All Implemented Interfaces:
    javax.xml.namespace.NamespaceContext

    public class StandardNamespaceContext
    extends java.lang.Object
    implements javax.xml.namespace.NamespaceContext
    Singleton to hold all well-known BCD-UI namespaces and their prefixes The prefixes must be used in client js code because they are made known to the browser's parser
    • Constructor Detail

      • StandardNamespaceContext

        protected StandardNamespaceContext()
        Constructor for singelton
    • Method Detail

      • getAsJs

        public java.lang.String getAsJs()
        For usage by the client
        Returns:
        A js map named "namespaces" containing prefix-namespace mappings
      • getNamespaceURI

        public java.lang.String getNamespaceURI​(java.lang.String prefix)
        Specified by:
        getNamespaceURI in interface javax.xml.namespace.NamespaceContext
      • getPrefix

        public java.lang.String getPrefix​(java.lang.String namespaceURI)
        Specified by:
        getPrefix in interface javax.xml.namespace.NamespaceContext
      • getMapping

        public java.util.SortedMap<java.lang.String,​java.lang.String> getMapping()
        Returns:
        the mapping (unmodifiable)
      • getPrefixes

        public java.util.Iterator getPrefixes​(java.lang.String namespaceURI)
        Specified by:
        getPrefixes in interface javax.xml.namespace.NamespaceContext
      • getXMLPrefix

        public java.lang.String getXMLPrefix​(java.lang.String namespaceURI)
        getXMLPrefix
        Parameters:
        namespaceURI -
        Returns:
        the String "prefix:" or an empty String if not prefix for the given namespaceURI