| 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::Query Class</title> |
| 6 |
</head> |
| 7 |
<body> |
| 8 |
|
| 9 |
<h1 style="text-align:center">Redland RDF Application Framework - Perl RDF::Redland::Query 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 |
</div> |
| 29 |
|
| 30 |
|
| 31 |
<h2><a name="name">NAME</a></h2> |
| 32 |
<p>RDF::Redland::Query - Redland RDF Syntax Query Class</p> |
| 33 |
|
| 34 |
<h2><a name="synopsis">SYNOPSIS</a></h2> |
| 35 |
<pre> |
| 36 |
use RDF::Redland; |
| 37 |
</pre> |
| 38 |
<pre> |
| 39 |
... |
| 40 |
my $query=new RDF::Redland::Query($query_string); # default query language |
| 41 |
my $results=$query->execute($model); |
| 42 |
# or my $results=$model->query_execute($query); |
| 43 |
while(!$results->finished) { |
| 44 |
for (my $i=0; $i < $results->bindings_count(); $i++) { |
| 45 |
my $name=$results->binding_name($i); |
| 46 |
my $value=$results->binding_value($i); |
| 47 |
# ... do something with the results |
| 48 |
} |
| 49 |
$results->next_result; |
| 50 |
} |
| 51 |
</pre> |
| 52 |
|
| 53 |
<h2><a name="description">DESCRIPTION</a></h2> |
| 54 |
<p>This class represents queries of various syntaxes over an RDF::Redland::Model returning a sequence of results that (currently) bind variable names to RDF::Redland::Node values.</p> |
| 55 |
|
| 56 |
<h2><a name="constructors">CONSTRUCTORS</a></h2> |
| 57 |
<dl> |
| 58 |
<dt><strong><a name="new_query_string_base_uri_query_lang_uri_query_lang" class="item">new QUERY-STRING [BASE-URI [QUERY-LANG-URI [QUERY-LANG]]]</a></strong></dt> |
| 59 |
<dd> |
| 60 |
<p>Create a new RDF::Redland::Query object for a query string <em>QUERY-STRING</em> with optional base URI <em>BASE-URI</em> IN QUERY language <em>QUERY-LANG</em> or query language URI <em>QUERY-LANG-URI</em> (both can be undef). If <em>QUERY-LANG-URI</em> is omitted, the current directory is used as the base URI. If <em>QUERY-LANG-NAME</em> is undef, the default query language "rdql" is used. If <em>BASE-URI</em> is omitted, no base URI is used.</p> |
| 61 |
</dd> |
| 62 |
</dl> |
| 63 |
|
| 64 |
<h2><a name="methods">METHODS</a></h2> |
| 65 |
<dl> |
| 66 |
<dt><strong><a name="execute" class="item">execute MODEL</a></strong></dt> |
| 67 |
<dd> |
| 68 |
<p>Run the query against model <em>MODEL</em> returning a RDF::Redland::QueryResults object or undef on failure.</p> |
| 69 |
</dd> |
| 70 |
</dl> |
| 71 |
|
| 72 |
<h2><a name="see_also">SEE ALSO</a></h2> |
| 73 |
<p><a href="QueryResults.html">the RDF::Redland::QueryResults manpage</a></p> |
| 74 |
|
| 75 |
<h2><a name="author">AUTHOR</a></h2> |
| 76 |
<p>Dave Beckett - <a href="http://www.dajobe.org/">http://www.dajobe.org/</a></p> |
| 77 |
<hr /> |
| 78 |
|
| 79 |
<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> |
| 80 |
|
| 81 |
</body> |
| 82 |
</html> |