Class AbstractModuleStringInstanceIdentifierCodec

    • Constructor Detail

      • AbstractModuleStringInstanceIdentifierCodec

        public AbstractModuleStringInstanceIdentifierCodec()
    • Method Detail

      • moduleForPrefix

        protected abstract @Nullable Module moduleForPrefix​(@NonNull String prefix)
        Resolve a string prefix into the corresponding module.
        Parameters:
        prefix - Prefix
        Returns:
        module mapped to prefix, or null if the module cannot be resolved
      • createQName

        protected final QName createQName​(String prefix,
                                          String localName)
        Create a QName for a prefix and local name.
        Parameters:
        prefix - Prefix for namespace
        localName - local name
        Returns:
        QName
      • prefixForNamespace

        protected abstract @Nullable String prefixForNamespace​(@NonNull URI namespace)
        Return string prefix for a particular namespace, allocating a new one if necessary.
        Parameters:
        namespace - Namespace to map
        Returns:
        Allocated unique prefix, or null if the prefix cannot be mapped.
      • appendQName

        protected StringBuilder appendQName​(StringBuilder sb,
                                            QName qname,
                                            @Nullable QNameModule lastModule)
        Append a QName, potentially taking into account last QNameModule encountered in the serialized path.
        Parameters:
        sb - target StringBuilder
        qname - QName to append
        lastModule - last QNameModule encountered, may be null
        Returns:
        target StringBuilder
      • parseQName

        protected final QName parseQName​(String str)