Interface TripleLike

All Known Subinterfaces:
JsonLdQuad, JsonLdQuadLike<G>, JsonLdTriple, JsonLdTripleLike, Quad, QuadLike<G>, RDF4JQuad, RDF4JTriple, RDF4JTripleLike, Triple
All Known Implementing Classes:
JsonLdQuadImpl, JsonLdQuadLikeImpl, JsonLdTripleImpl, QuadImpl, QuadImpl, TripleImpl, TripleImpl

public interface TripleLike
A generalised "triple-like" interface, extended by Triple and Quad.

A TripleLike statement has at least a getSubject(), getPredicate() and getObject(), but unlike a Triple does not have a formalised Triple.equals(Object) or Triple.hashCode() semantics and is not required to be immutable or thread-safe. This interfaced can also be used for generalised triples (e.g. a BlankNode as predicate).

Implementations should specialise which specific RDFTerm types they return by overriding getSubject(), getPredicate() and getObject().

Since:
0.3.0-incubating
See Also:
  • Method Details

    • getSubject

      RDFTerm getSubject()
      The subject of this statement.
      Returns:
      The subject, typically an IRI or BlankNode.
    • getPredicate

      RDFTerm getPredicate()
      The predicate of this statement.
      Returns:
      The predicate, typically an IRI.
    • getObject

      RDFTerm getObject()
      The object of this statement.
      Returns:
      The object, typically an IRI, BlankNode or Literal.