Interface RdfLiteral

  • All Superinterfaces:
    RdfValue

    public interface RdfLiteral
    extends RdfValue
    The RdfLiteral interface describes an immutable RDF Literal.
    • Method Detail

      • getValue

        String getValue()
        Get the lexical value of the literal.
        Specified by:
        getValue in interface RdfValue
        Returns:
        lexical value, never null
      • getDatatype

        String getDatatype()
        An absolute IRI denoting the datatype IRI of the literal. If the value is rdf:langString, getLanguage() value is present.
        Returns:
        an absolute IRI, never null
      • isIRI

        default boolean isIRI()
        Description copied from interface: RdfValue
        Indicates if the value type is an absolute IRI.
        Specified by:
        isIRI in interface RdfValue
        Returns:
        true if the value type is IRI, false otherwise.
      • isBlankNode

        default boolean isBlankNode()
        Description copied from interface: RdfValue
        Indicates if the value type is blank node identifier.
        Specified by:
        isBlankNode in interface RdfValue
        Returns:
        true if the value type is blank node, false otherwise.
      • asLiteral

        default RdfLiteral asLiteral()
        Description copied from interface: RdfValue
        Return the RdfValue as a RdfLiteral
        Specified by:
        asLiteral in interface RdfValue
        Returns:
        the RdfValue as a RdfLiteral