Interface RdfTerm

    • Method Detail

      • isLiteral

        default boolean isLiteral()
        Indicates whether this term is an RDF literal.
        Returns:
        true if the term is an RdfLiteral; false otherwise.
      • isResource

        default boolean isResource()
        Indicates whether this term is a resource, which includes absolute IRIs and blank node identifiers.
        Returns:
        true if the term is an RdfResource; false otherwise.
      • isTriple

        default boolean isTriple()
        Indicates whether this term is an RDF triple.

        RDF triples are supported for RDF-star (RDF 1.2) compatibility.

        Returns:
        true if the term is an RdfTriple; false otherwise.
      • asLiteral

        default RdfLiteral asLiteral()
        Returns this term as an RdfLiteral.
        Returns:
        the RdfLiteral representation of this term.
        Throws:
        java.lang.ClassCastException - if this term is not an RdfLiteral.
      • asTriple

        default RdfTriple asTriple()
        Returns this term as an RdfTriple.
        Returns:
        the RdfTriple representation of this term.
        Throws:
        java.lang.ClassCastException - if this term is not an RdfTriple.
      • equals

        boolean equals​(java.lang.Object o)
        Compares this RDF term to the specified object. Implementations must override this method to provide equality checks appropriate to the term type.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        o - the object to compare with this term.
        Returns:
        true if the specified object is equal to this term; false otherwise.
      • hashCode

        int hashCode()
        Returns a hash code value for this RDF term.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        a hash code consistent with equals(Object).
      • toString

        java.lang.String toString()
        Returns a string representation of this RDF term.
        Overrides:
        toString in class java.lang.Object
        Returns:
        a string describing this RDF term.