Interface QualifiedName

  • All Known Implementing Classes:
    QualifiedName

    public interface QualifiedName

    Interface for PROV Qualified Name.

    PROV-DM Definition for Qualified Name: A qualified name is a name subject to namespace interpretation. It consists of a namespace, denoted by an optional prefix, and a local name.

    PROV-DM stipulates that a qualified name can be mapped into an IRI by concatenating the IRI associated with the prefix and the local part.

    A qualified name's prefix is optional. If a prefix occurs in a qualified name, it refers to a namespace declared in a namespace declaration. In the absence of prefix, the qualified name refers to the default namespace.

    This interface specification is derived from QName without the implied syntactic restrictions of xsd:QName.

    PROV-N production for Qualified Name:.

    [52]    <QUALIFIED_NAME>    ::=    ( PN_PREFIX ":" )? PN_LOCAL
    | PN_PREFIX ":"
    [53]    <PN_LOCAL>    ::=    ( PN_CHARS_U | [0-9] | PN_CHARS_OTHERS ) ( ( PN_CHARS | "." | PN_CHARS_OTHERS )* ( PN_CHARS | PN_CHARS_OTHERS ) )?
    [54]    <PN_CHARS_OTHERS>    ::=    "/"
    | "@"
    | "~"
    | "&"
    | "+"
    | "*"
    | "?"
    | "#"
    | "$"
    | "!"
    | PERCENT
    | PN_CHARS_ESC
    [55]    <PN_CHARS_ESC>    ::=    "\" ( "=" | "'" | "(" | ")" | "," | "-" | ":" | ";" | "[" | "]" | "." )
    [56]    <PERCENT>    ::=    "%" HEX HEX
    [57]    <HEX>    ::=    [0-9]
    | [A-F]
    | [a-f]
    Author:
    lavm
    • Method Detail

      • toQName

        QName toQName()
        Converts this QualifiedName to a valid xsd:QName by unescaping \-characters in the local names, and _-encoding the local name.
        Returns:
        a valid javax.xml.namespace.QName
        See Also:
        a reversible encoding
      • setUri

        void setUri​(String uri)
      • getLocalPart

        String getLocalPart()
        Get the local part of this QualifiedName.
        Returns:
        a string, the local part of this QualifiedName.
      • setLocalPart

        void setLocalPart​(String local)
        Set the local part of this QualifiedName.
        Parameters:
        local - the local part
      • getNamespaceURI

        String getNamespaceURI()
        Get the Namespace URI of this QualifiedName.
        Returns:
        a string, namespace URI of this QualifiedName.
      • setNamespaceURI

        void setNamespaceURI​(String namespaceURI)
        Set the Namespace URI of this QualifiedName.
        Parameters:
        namespaceURI - the namespace URI
      • getPrefix

        String getPrefix()
        Get the prefix of this Qualified Name.
        Returns:
        a string, prefix for the Qualifed Name.
      • setPrefix

        void setPrefix​(String prefix)
      • hashCode

        int hashCode()

        Generate the hash code for this QualifiedName.

        The hash code is calculated using both the Namespace URI and the local part of the QualifiedName. The prefix is NOT used to calculate the hash code.

        This method satisfies the general contract of Object.hashCode().

        Overrides:
        hashCode in class Object
        Returns:
        hash code for this QualifiedName Object