Interface RDFTerm

All Known Subinterfaces:
BlankNode, BlankNodeOrIRI, IRI, JsonLdBlankNode, JsonLdIRI, JsonLdLiteral, JsonLdTerm, Literal, RDF4JBlankNode, RDF4JBlankNodeOrIRI, RDF4JIRI, RDF4JLiteral, RDF4JTerm, SimpleRDF.SimpleRDFTerm
All Known Implementing Classes:
AbstractRDFTerm, BlankNodeImpl, BlankNodeImpl, IRIImpl, IRIImpl, JsonLdBlankNodeImpl, JsonLdIRIImpl, JsonLdLiteralImpl, JsonLdTermImpl, LiteralImpl, LiteralImpl, Types, W3CRDFSyntax.FormatIRI

public interface RDFTerm
An RDF-1.1 Term, as defined by RDF-1.1 Concepts and Abstract Syntax, a W3C Recommendation published on 25 February 2014.

A RDFTerm object in Commons RDF is considered immutable, that is, over its life time it will have consistent behaviour for its equals(Object) and hashCode(), and objects returned from its getter methods (e.g. IRI.getIRIString() and Literal.getLanguageTag()) will have consistent equals(Object) behaviour.

Note that methods in RDFTerm and its Commons RDF specialisations IRI, BlankNode and Literal are not required to return object identical (==) instances as long as they are equivalent according to their Object.equals(Object). Further specialisations may provide additional methods that are documented to be mutable.

Methods in RDFTerm and its Commons RDF specialisations IRI, BlankNode and Literal are thread-safe, however further specialisations may add additional methods that are documented to not be thread-safe.

RDFTerms can be safely used in hashing collections like HashSet and HashMap.

Any RDFTerm can be used interchangeably across Commons RDF implementations.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object other)
    Check it this RDFTerm is equal to another RDFTerm.
    int
    Calculate a hash code for this RDFTerm.
    Return the term serialised as specified by the RDF-1.1 N-Triples Canonical form.