Class Namespace


  • public class Namespace
    extends Object
    A class to manipulate Namespaces when creating, serializing and converting prov documents.
    Author:
    Luc Moreau
    • Method Detail

      • getThreadNamespace

        public static Namespace getThreadNamespace()
      • extendWith

        public void extendWith​(Namespace ns)
        Extends this Namespace with all the prefix/namespace registration of the Namespace received as argument.
        Parameters:
        ns - the Namespace whose prefix/namespace registration are added to this Namespace.
      • setParent

        public void setParent​(Namespace parent)
      • addKnownNamespaces

        public void addKnownNamespaces()
      • getDefaultNamespace

        public String getDefaultNamespace()
      • setDefaultNamespace

        public void setDefaultNamespace​(String defaultNamespace)
      • check

        public boolean check​(String prefix,
                             String namespace)
      • registerDefault

        public void registerDefault​(String namespace)
      • register

        public void register​(String prefix,
                             String namespace)
      • newPrefix

        public void newPrefix​(String namespace)
      • unregister

        public void unregister​(String prefix,
                               String namespace)
      • unregisterDeafult

        public void unregisterDeafult​(String namespace)
      • gatherNamespaces

        public static Namespace gatherNamespaces​(Bundle bundle)
      • qualifiedNameToStringWithNamespace

        public static String qualifiedNameToStringWithNamespace​(QualifiedName name)
      • qualifiedNameToString

        public String qualifiedNameToString​(QName name)
      • qualifiedNameToString

        public String qualifiedNameToString​(QualifiedName name,
                                            Namespace child)
        Parameters:
        name - the QualifiedName to convert to string
        child - argument used just for the purpose of debugging when throwing an exception
        Returns:
        a string representation of the QualifiedName
      • qualifiedNameToString

        public String qualifiedNameToString​(QName name,
                                            Namespace child)
        Parameters:
        name - the QName to convert to string
        child - argument used just for the purpose of debugging when throwing an exception
        Returns:
        a string representation of the QualifiedName