Redland RDF Application Framework - Perl RDF::Redland::Statement Class
RDF::Redland::Statement - Redland RDF Statement Class
use RDF::Redland;
my $statement=new RDF::Redland::Statement();
my $statement2=RDF::Redland::Statement->new_from_statement($statement);
my $statement3=RDF::Redland::Statement->new_from_nodes($subject, $predicate, $object);
...
Manipulate RDF statements which comprise three RDF::Redland::Node objects. Also used for partial statements which can have empty parts and are used for matching statements in statement queries of the model - see the the RDF::Redland::Model manpage.
- new
- Create a new empty RDF::Redland::Statement object.
- new_from_statement STATEMENT
- Create a new RDF::Redland::Statement object from RDF::Redland::Statement STATEMENT (copy constructor).
- new_from_nodes SUBJECT PREDICATE OBJECT
- Create a new RDF::Redland::Statement with the given RDF::Redland::Node objects as parts (or undef when empty for a partial statement).
NOTE: After construction, the RDF::Redland::Node objects become owned by the new RDF::Redland::Statement object and must not be used elsewhere. Existing nodes can be copied to use in this method with the RDF::Redland::Node copy constructor new_from_node like this:
$new_node = RDF::Redland::Node->new_from_node($node);
- subject [SUBJECT]
- Get/set the statement subject. When RDF::Redland::Node SUBJECT is given, sets the subject of the statement, otherwise returns a reference to the statement RDF::Redland::Node subject which must be copied if used elsewhere.
- predicate [PREDICATE]
- Get/set the statement predicate. When RDF::Redland::Node PREDICATE is given, sets the predicate of the statement, otherwise returns a reference to the statement RDF::Redland::Node predicate which must be copied if used elsewhere.
- object [OBJECT]
- Get/set the statement object. When RDF::Redland::Node OBJECT is given, sets the object of the statement, otherwise returns a reference to the statement RDF::Redland::Node object which must be copied if used elsewhere.
- as_string
- Return the statement formatted as a string (UTF-8 encoded).
the RDF::Redland::Node manpage
Dave Beckett - http://purl.org/net/dajobe/
Copyright 2000-2003 Dave Beckett, Institute for Learning and Research Technology, University of Bristol