| 1 |
<?xml version="1.0" encoding="iso-8859-1"?> |
| 2 |
<?xml version="1.0"?> |
| 3 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
| 4 |
<head> |
| 5 |
<title>Redland RDF Application Framework - Perl RDF::Redland::Statement Class</title> |
| 6 |
</head> |
| 7 |
<body> |
| 8 |
|
| 9 |
<h1 style="text-align:center">Redland RDF Application Framework - Perl RDF::Redland::Statement Class</h1> |
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
<div name="index"> |
| 14 |
<p><a name="__index__"></a></p> |
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
</div> |
| 30 |
|
| 31 |
|
| 32 |
<h2><a name="name">NAME</a></h2> |
| 33 |
<p>RDF::Redland::Statement - Redland RDF Statement Class</p> |
| 34 |
|
| 35 |
<h2><a name="synopsis">SYNOPSIS</a></h2> |
| 36 |
<pre> |
| 37 |
use RDF::Redland; |
| 38 |
my $statement1=new RDF::Redland::Statement($statement); |
| 39 |
my $statement2=new RDF::Redland::Statement($subject,$predicate,$object); |
| 40 |
... |
| 41 |
</pre> |
| 42 |
<pre> |
| 43 |
if($statement->subject->equals($node)) { |
| 44 |
... |
| 45 |
} |
| 46 |
</pre> |
| 47 |
|
| 48 |
<h2><a name="description">DESCRIPTION</a></h2> |
| 49 |
<p>Manipulate RDF statements which comprise three RDF::Redland::Node objects. Also used for <em>partial</em> statements which can have empty parts and are used for matching statements in statement queries of the model - see the <a href="Model.html">the RDF::Redland::Model manpage</a>.</p> |
| 50 |
|
| 51 |
<h2><a name="constructors">CONSTRUCTORS</a></h2> |
| 52 |
<dl> |
| 53 |
<dt><strong><a name="new_node_node_node_statement" class="item">new NODE NODE NODE|STATEMENT</a></strong></dt> |
| 54 |
<dd> |
| 55 |
<p>Create a new statement from nodes or copy an existing statement.</p> |
| 56 |
<p>If three <em>NODE</em>s are given, make a new statement from them. Each Node can be a Redland::RDF:Node, a Redland::RDF::URI, a perl URI or a string literal. Otherwise <em>STATEMENT</em> must be an existing statement to copy.</p> |
| 57 |
</dd> |
| 58 |
<dt><strong><a name="clone" class="item">clone</a></strong></dt> |
| 59 |
<dd> |
| 60 |
<p>Copy a RDF::Redland::Statement.</p> |
| 61 |
</dd> |
| 62 |
</dl> |
| 63 |
|
| 64 |
<h2><a name="methods">METHODS</a></h2> |
| 65 |
<dl> |
| 66 |
<dt><strong><a name="subject_subject" class="item">subject [SUBJECT]</a></strong></dt> |
| 67 |
<dd> |
| 68 |
<p>Get/set the statement subject. When a RDF::Redland::Node <em>SUBJECT</em> is given, sets the subject of the statement, otherwise returns a reference to the statement RDF::Redland::Node subject.</p> |
| 69 |
</dd> |
| 70 |
<dt><strong><a name="predicate_predicate" class="item">predicate [PREDICATE]</a></strong></dt> |
| 71 |
<dd> |
| 72 |
<p>Get/set the statement predicate. When RDF::Redland::Node <em>PREDICATE</em> is given, sets the predicate of the statement, otherwise returns a reference to the statement RDF::Redland::Node predicate.</p> |
| 73 |
</dd> |
| 74 |
<dt><strong><a name="object_object" class="item">object [OBJECT]</a></strong></dt> |
| 75 |
<dd> |
| 76 |
<p>Get/set the statement object. When RDF::Redland::Node <em>OBJECT</em> is given, sets the object of the statement, otherwise returns a reference to the statement RDF::Redland::Node object.</p> |
| 77 |
</dd> |
| 78 |
<dt><strong><a name="as_string" class="item">as_string</a></strong></dt> |
| 79 |
<dd> |
| 80 |
<p>Return the statement formatted as a string (UTF-8 encoded).</p> |
| 81 |
</dd> |
| 82 |
<dt><strong><a name="equals" class="item">equals STATEMENT</a></strong></dt> |
| 83 |
<dd> |
| 84 |
<p>Return non zero if this statement is equal to STATEMENT</p> |
| 85 |
</dd> |
| 86 |
</dl> |
| 87 |
|
| 88 |
<h2><a name="old_methods">OLD METHODS</a></h2> |
| 89 |
<dl> |
| 90 |
<dt><strong><a name="new_from_nodes" class="item">new_from_nodes SUBJECT PREDICATE OBJECT</a></strong></dt> |
| 91 |
<dd> |
| 92 |
<p>Create a new RDF::Redland::Statement with the given RDF::Redland::Node objects as parts (or undef when empty for a <em>partial</em> statement). Use instead:</p> |
| 93 |
<pre> |
| 94 |
$a=new RDF::Redland::Statement($subject, $predicate, $object); |
| 95 |
</pre></dd> |
| 96 |
<dt><strong><a name="new_from_statement" class="item">new_from_statement STATEMENT</a></strong></dt> |
| 97 |
<dd> |
| 98 |
<p>Create a new RDF::Redland::Statement object from RDF::Redland::Statement <em>STATEMENT</em> (copy constructor). Use instead:</p> |
| 99 |
<pre> |
| 100 |
$s=$old_statement->clone; |
| 101 |
</pre></dd> |
| 102 |
</dl> |
| 103 |
|
| 104 |
<h2><a name="see_also">SEE ALSO</a></h2> |
| 105 |
<p><a href="Node.html">the RDF::Redland::Node manpage</a></p> |
| 106 |
|
| 107 |
<h2><a name="author">AUTHOR</a></h2> |
| 108 |
<p>Dave Beckett - <a href="http://www.dajobe.org/">http://www.dajobe.org/</a></p> |
| 109 |
<hr /> |
| 110 |
|
| 111 |
<p>(C) Copyright 2000-2011 <a href="http://www.dajobe.org/">Dave Beckett</a>, (C) Copyright 2000-2005 <a href="http://www.bristol.ac.uk/">University of Bristol</a></p> |
| 112 |
|
| 113 |
</body> |
| 114 |
</html> |