Interface YangNamespaceContext

    • Method Detail

      • findNamespaceForPrefix

        @NonNull Optional<QNameModule> findNamespaceForPrefix​(String prefix)
        Return QNameModule to which a particular prefix is bound.
        Parameters:
        prefix - Prefix to look up
        Returns:
        QNameModule bound to specified prefix
        Throws:
        NullPointerException - if prefix is null
      • findPrefixForNamespace

        @NonNull Optional<String> findPrefixForNamespace​(QNameModule namespace)
        Return a prefix to which a particular QNameModule is bound. If a namespace is bound to multiple prefixes, it is left unspecified which of those prefixes is returned.
        Parameters:
        namespace - QNameModule to look up
        Returns:
        Prefix to which the QNameModule is bound
        Throws:
        NullPointerException - if module is null
      • createQName

        default @NonNull QName createQName​(String prefix,
                                           String localName)
        Create a QName by resolving a prefix against currently-bound prefixes and combining it with specified local name.
        Parameters:
        prefix - Namespace prefix
        localName - QName local name
        Returns:
        A QName.
        Throws:
        NullPointerException - if any argument is null
        IllegalArgumentException - if localName does not conform to local name requirements or if the prefix is not bound in this context.