Package com.apicatalog.rdf.model
Interface RdfTriple
-
- All Superinterfaces:
RdfTerm
- All Known Subinterfaces:
RdfQuad
public interface RdfTriple extends RdfTerm
Represents an immutable RDF triple, consisting of a subject, predicate, and object.An
RdfTriplemodels a single statement in an RDF graph. Each triple is composed of:- A subject that identifies what the statement is about.
- A predicate that indicates the relationship or property.
- An object that provides the value or target of the statement.
This interface extends
RdfTermand provides methods to access each component of the triple. It also identifies itself as an RDF triple via theisTriple()method.Experimental support for RDF-star (RDF 1.2) allows the object of a triple to be another
RdfTriple.- See Also:
- RDF 1.1 Triple
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default RdfTripleasTriple()Returns this term as anRdfTriple.default booleanisTriple()Indicates whether this term is an RDF triple.RdfTermobject()Returns the object of the triple.RdfResourcepredicate()Returns the predicate of the triple.RdfResourcesubject()Returns the subject of the triple.-
Methods inherited from interface com.apicatalog.rdf.model.RdfTerm
asLiteral, asResource, equals, hashCode, isLiteral, isResource, toString
-
-
-
-
Method Detail
-
subject
RdfResource subject()
Returns the subject of the triple.The subject is either an absolute IRI or a blank node identifier, denoting the resource being described by the statement.
- Returns:
- a
RdfResourcerepresenting the subject of the triple; nevernull
-
predicate
RdfResource predicate()
Returns the predicate of the triple.The predicate is an absolute IRI that specifies the property or relationship between the subject and the object of the triple.
- Returns:
- a
RdfResourcerepresenting the predicate of the triple; nevernull
-
object
RdfTerm object()
Returns the object of the triple.The object can be:
- An absolute IRI or blank node identifier (
RdfResource) - A literal value (
RdfLiteral) - Another
RdfTriple(RDF 1.2 - experimental support)
- Returns:
- a
RdfTermrepresenting the object of the triple; nevernull
- An absolute IRI or blank node identifier (
-
isTriple
default boolean isTriple()
Description copied from interface:RdfTermIndicates whether this term is an RDF triple.RDF triples are supported for RDF-star (RDF 1.2) compatibility.
-
-