RDF::R...atement(3pm)
π RDF::Redland::Statement β Redland RDF Statement Class π
okay bestie, gather round, because we're about to talk about RDF::Redland::Statement from the RDF::Redland crew β¨ it's literally the little triple-shaped icon that RDF is made of, and honestly? she's serving. no cap. π
β¨ SYNOPSIS β¨
use RDF::Redland;
my $statement1=new RDF::Redland::Statement($statement);
my $statement2=new RDF::Redland::Statement($subject,$predicate,$object);
...
if($statement->subject->equals($node)) {
...
}
π¦ DESCRIPTION π¦
So what is this thing? You're manipulating RDF statements, which are made up of three RDF::Redland::Node objects β that's the whole vibe. subject, predicate, object, periodt. π
She's also the girl for partial statements, the ones that can have empty parts, which get used for matching statements in the statement queries of the model β peek at RDF::Redland::Model for that whole situation, iykyk. π₯
πΈ CONSTRUCTORS πΈ
new NODE NODE NODE|STATEMENTβ make a brand new statement out of nodes, or copy one that already exists. slay.
If you hand her three NODEs, she makes a fresh new statement from them. Each Node can be a Redland::RDF:Node, a Redland::RDF::URI, a perl URI or a string literal. Otherwise, STATEMENT has to be an existing statement to copy. π
cloneβ copy aRDF::Redland::Statement. twin energy. π«Ά
π METHODS π
subject [SUBJECT]β get or set the statement subject. When aRDF::Redland::NodeSUBJECT is given, she sets the subject of the statement; otherwise she returns a reference to the statement'sRDF::Redland::Nodesubject. get it, set it, iconic. β¨predicate [PREDICATE]β get or set the statement predicate. WhenRDF::Redland::NodePREDICATE is given, she sets the predicate of the statement; otherwise she returns a reference to the statement'sRDF::Redland::Nodepredicate. πobject [OBJECT]β get or set the statement object. WhenRDF::Redland::NodeOBJECT is given, she sets the object of the statement; otherwise she returns a reference to the statement'sRDF::Redland::Nodeobject. main character behaviour, fr fr. πas_stringβ returns the statement formatted as a string (UTF-8 encoded). it's giving pretty print. πequals STATEMENTβ returns non-zero if this statement is equal to STATEMENT. a lil comparison moment. π¦
π OLD METHODS π
okay these are the legacy girlies β still here, still valid, but you have better options now. use the new ones bestie. π
new_from_nodes SUBJECT PREDICATE OBJECTβ creates a newRDF::Redland::Statementwith the givenRDF::Redland::Nodeobjects as parts (orundefwhen empty, for a partial statement). Use instead:
$a=new RDF::Redland::Statement($subject, $predicate, $object);
new_from_statement STATEMENTβ creates a newRDF::Redland::Statementobject fromRDF::Redland::StatementSTATEMENT (that's the copy constructor, yes ma'am). Use instead:
$s=$old_statement->clone;
π₯ SEE ALSO π₯
RDF::Redland::Node β go read her next, they're literally a matched set π
π AUTHOR π
Dave Beckett - http://www.dajobe.org/ π
and that's the whole page bestie, go forth and triple π this was brought to you by perl v5.42.3, dated 2026-08-20 β stay iconic, stay hydrated, and remember: subject, predicate, object, always. periodt. πβ¨π¦
π¦ where this page comes from
- ubuntu stonking: librdf-perl 1.0.17.1+dfsg-9build1 Β· LGPL-2.1-or-later OR Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms