Package com.tailf.conf
Class ConfNamespace
Object
com.tailf.conf.ConfNamespace
- Direct Known Subclasses:
ConfNamespaceStub
,Inet
,MaapiSchemaNS
,Ncs
,NcsAlarms
,NcsNed
,NcsSnmp
,NcsState
,NetconfNcs
,Yang
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ConfNamespace
findNamespace
(int hash, ArrayList<ConfNamespace> nsList) Locate a namespace in a namespace list, given a name space hash.static ConfNamespace
findNamespace
(String id) Locate a namespace in a namespace list, given a name space string.static ConfNamespace
findNamespace
(String id, ArrayList<ConfNamespace> nsList) static ConfNamespace
findNamespaceFromNsName
(ConfPath path, MountIdInterface mountIdGetter, String namespaceName) static ConfNamespace
findNamespaceFromPrefix
(ConfPath path, MountIdInterface mountIdGetter, String prefix) static ConfNamespace
findNamespaceFromPrefix
(String prefix) static ConfNamespace
findNamespaceFromPrefix
(String prefix, ArrayList<ConfNamespace> nsList) static ConfNamespace
findNamespaceFromRootTag
(String tagName) abstract int
hash()
static String
hashToString
(int tagHash) Transforms a namespace hash value into its corresponding string representation.abstract String
id()
static boolean
isCrunchedNs
(String uri) static ConfNamespace
lookupNamespaceFromHash
(int hash) Locate a namespace in a namespace list, given a name space hash.static ConfNamespace
lookupNamespaceFromPrefix
(ConfPath path, MountIdInterface mountIdGetter, String prefix) static ConfNamespace
lookupNamespaceFromPrefix
(String prefix) Locate a namespace in a namespace list, given a name space string.static ConfNamespace
Locate a namespace in a namespace list, given a name space string.abstract String
prefix()
static void
reinstallRemovedNs
(List<ConfNamespace> removedNsList) This method should only be used in cdb data migration scenarios.static int
stringToHash
(String tagString) Transforms a string into a namespace hash.static int
stringToTag
(String str) Deprecated.static int
stringToTag
(String str, ArrayList<ConfNamespace> nsList) Deprecated.static String
tagToString
(int tag, ArrayList<ConfNamespace> nsList) Deprecated.int
Deprecated.toString()
Return a string representation on the namespace.toString
(int hash) Deprecated.static String
truncateToXMLUri
(String uri) abstract String
uri()
abstract String
xmlUri()
-
Constructor Details
-
ConfNamespace
public ConfNamespace()
-
-
Method Details
-
toString
Return a string representation on the namespace. -
hash
public abstract int hash() -
id
-
uri
-
xmlUri
-
prefix
-
toHash
Deprecated.Locate a tags hash value given a string. -
toString
Deprecated.Locate a string given a hash value. -
findNamespace
Locate a namespace in a namespace list, given a name space hash. -
findNamespace
Locate a namespace in a namespace list, given a name space string. Search on full uri or short name. -
findNamespace
-
findNamespaceFromPrefix
-
findNamespaceFromPrefix
-
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
-
lookupNamespaceFromHash
Locate a namespace in a namespace list, given a name space hash. -
lookupNamespaceFromURI
Locate a namespace in a namespace list, given a name space string. Search on full uri or short name. -
lookupNamespaceFromPrefix
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
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.Locate a tags name given a hash value and a list of namespaces. -
stringToHash
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.Locate a tags hash value given a string. -
stringToTag
Deprecated.Locate a tags hash value given a string and a list of namespaces. -
reinstallRemovedNs
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
-
truncateToXMLUri
-
stringToHash(String)