Class ConfNamespace

Object
com.tailf.conf.ConfNamespace
Direct Known Subclasses:
ConfNamespaceStub, Inet, MaapiSchemaNS, Ncs, NcsAlarms, NcsNed, NcsSnmp, NcsState, NetconfNcs, Yang

public abstract class ConfNamespace extends Object
Base class of the ConfNamespace objects. Namespace objects are normally generated by confdc using the --emit-java option. They contain information to map enumeration constants and tags into strings.
  • Constructor Details

    • ConfNamespace

      public ConfNamespace()
  • Method Details

    • toString

      public String toString()
      Return a string representation on the namespace.
      Overrides:
      toString in class Object
      Returns:
      null or the string representation, uri, of the namespace.
    • hash

      public abstract int hash()
    • id

      public abstract String id()
    • uri

      public abstract String uri()
    • xmlUri

      public abstract String xmlUri()
    • prefix

      public abstract String prefix()
    • toHash

      @Deprecated public int toHash(String str)
      Deprecated.
      Locate a tags hash value given a string.
    • toString

      @Deprecated public String toString(int hash)
      Deprecated.
      Locate a string given a hash value.
    • findNamespace

      public static ConfNamespace findNamespace(int hash, ArrayList<ConfNamespace> nsList)
      Locate a namespace in a namespace list, given a name space hash.
    • findNamespace

      public static ConfNamespace findNamespace(String id)
      Locate a namespace in a namespace list, given a name space string. Search on full uri or short name.
    • findNamespace

      public static ConfNamespace findNamespace(String id, ArrayList<ConfNamespace> nsList)
    • findNamespaceFromPrefix

      public static ConfNamespace findNamespaceFromPrefix(String prefix)
    • findNamespaceFromPrefix

      public static ConfNamespace findNamespaceFromPrefix(String prefix, ArrayList<ConfNamespace> nsList)
    • findNamespaceFromPrefix

      public static ConfNamespace findNamespaceFromPrefix(ConfPath path, MountIdInterface mountIdGetter, String prefix)
    • findNamespaceFromNsName

      public static ConfNamespace findNamespaceFromNsName(ConfPath path, MountIdInterface mountIdGetter, String namespaceName) throws ConfException, IOException
      Throws:
      ConfException
      IOException
    • findNamespaceFromRootTag

      public static ConfNamespace findNamespaceFromRootTag(String tagName)
    • lookupNamespaceFromHash

      public static ConfNamespace lookupNamespaceFromHash(int hash)
      Locate a namespace in a namespace list, given a name space hash.
    • lookupNamespaceFromURI

      public static ConfNamespace lookupNamespaceFromURI(String uri)
      Locate a namespace in a namespace list, given a name space string. Search on full uri or short name.
    • lookupNamespaceFromPrefix

      public static ConfNamespace lookupNamespaceFromPrefix(String prefix)
      Locate a namespace in a namespace list, given a name space string. Search on full uri or short name.
    • lookupNamespaceFromPrefix

      public static ConfNamespace lookupNamespaceFromPrefix(ConfPath path, MountIdInterface mountIdGetter, String prefix)
    • hashToString

      public static String hashToString(int tagHash)
      Transforms a namespace hash value into its corresponding string representation. Tags and enumerations are represented as hash values (integer) by the system.
      Parameters:
      tagHash - the identifier to turn into a string.
      Returns:
      null or the string representation of the hash value.
    • tagToString

      @Deprecated public static String tagToString(int tag, ArrayList<ConfNamespace> nsList)
      Deprecated.
      Locate a tags name given a hash value and a list of namespaces.
    • stringToHash

      public static int stringToHash(String tagString)
      Transforms a string into a namespace hash.
      Parameters:
      tagString - the identifier to turn into a hash value.
      Returns:
      0 or the hash value corresponding to the string
    • stringToTag

      @Deprecated public static int stringToTag(String str)
      Deprecated.
      Locate a tags hash value given a string.
    • stringToTag

      @Deprecated public static int stringToTag(String str, ArrayList<ConfNamespace> nsList)
      Deprecated.
      Locate a tags hash value given a string and a list of namespaces.
    • reinstallRemovedNs

      public static void reinstallRemovedNs(List<ConfNamespace> removedNsList)
      This method should only be used in cdb data migration scenarios. In this situation old namespaces that have been removed need to be temporarily used to lookup tags, prefixes etc at a phase0 cdb data retrieval
      Parameters:
      removedNsList - List<ConfNamespace> of obsolete namespaces
    • isCrunchedNs

      public static boolean isCrunchedNs(String uri)
    • truncateToXMLUri

      public static String truncateToXMLUri(String uri)