Description
Immutable RDF triples.
The predicate is typed as an IRI rather than a Term, so a literal or a blank node in predicate position is a compile error rather than a runtime check. Nothing here validates positions, because nothing can reach this package holding an invalid one.
"="
function "=" (Left, Right : Triple) return Boolean
Compare two triples componentwise.
Parameters
- Left
First triple
- Right
Second triple
Return value
True when all three components are equal
Create
function Create
(Subject : Terms.Term;
Predicate : IRIs.IRI;
Object : Terms.Term) return Triple
Build a triple from its three components.
Parameters
- Subject
Subject term
- Predicate
Predicate IRI
- Object
Object term
Return value
The corresponding triple
Object
function Object (Value : Triple) return Terms.Term
Return a copy of the object.
Parameters
- Value
Triple to inspect
Return value
The object term
Predicate
function Predicate (Value : Triple) return IRIs.IRI
Return a copy of the predicate.
Parameters
- Value
Triple to inspect
Return value
The predicate IRI
Query_Components
procedure Query_Components
(Value : Triple;
Process : not null access procedure
(Subject : Terms.Term;
Predicate : IRIs.IRI;
Object : Terms.Term))
Borrow all three components for the duration of Process.
Unlike the selectors above, this returns nothing by copy. On any path that runs once per statement, prefer it: the selectors each copy a whole term, and a term may be an arbitrarily deep quoted triple.
Parameters
- Value
Triple to borrow from
- Process
Callback receiving the three components
Subject
function Subject (Value : Triple) return Terms.Term
Return a copy of the subject.
Parameters
- Value
Triple to inspect
Return value
The subject term
Triple
type Triple (<>) is private;
An immutable RDF triple.