rdf::helper::rdfredland::query(3pm) [debian man page]
RDF::Helper::RDFRedland::Query(3pm) User Contributed Perl Documentation RDF::Helper::RDFRedland::Query(3pm)NAME
RDF::Helper::RDFReland::Query - Perlish convenience extension for RDF::Redland::Query
SYNOPSIS
my $model = RDF::Redland::Model->new(
RDF::Redland::Storage->new( %storage_options )
);
my $rdf = RDF::Helper->new(
Namespaces => \%namespaces,
BaseURI => 'http://domain/NS/2004/09/03-url#'
);
my $q_obj = $rdf->new_query( $sparql_text, 'sparql' );
# arrays
while ( my $row = $q_obj->selectrow_arrayref ) {
# $row is an array reference.
}
# hashes
while ( my $row = $q_obj->selectrow_hashref ) {
# $row is a hash reference.
}
DESCRIPTION
RDF::Helper::RDFRedland::Query is the object retuned from RDF::Helper's new_query() method when using RDF::Redland as the base interface
class. This object provides everything that an instance of RDF::Redland::Query offers, plus the convenience methods detailed below.
METHODS
selectrow_arrayref
Returns each row as a Perl array references. The order of the array's indices will correspond to the order of the variable bindings in the
query.
selectrow_hashref
Returns each row as a Perl hash references. The keys in the hash will have the same names as the variable bindings in the query.
AUTHOR
Kip Hampton, khampton@totalcinema.com
COPYRIGHT
Copyright (c) 2004 Kip Hampton. =head1 LICENSE
This module is free sofrware; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
RDF::Helper RDF::Redland::Query.
perl v5.14.2 2011-06-24 RDF::Helper::RDFRedland::Query(3pm)
Check Out this Related Man Page
RDF::Redland::Serializer(3pm) User Contributed Perl Documentation RDF::Redland::Serializer(3pm)NAME
RDF::Redland::Serializer - Redland RDF Serializing to Syntax Class
SYNOPSIS
use RDF::Redland;
...
my $serializer=new RDF::Redland::Serializer("ntriples");
$serializer->serialize_model_to_file("foo.rdf", $base_uri, $model);
DESCRIPTION
This class represents serializers that turn RDF graphs into various syntaxes. from an RDF::Redland::Model object.
CONSTRUCTORS
new [NAME [MIME_TYPE [URI]]]
Create a new RDF::Redland::Serializer object for a syntax serializer named NAME, with MIME Type MIME_TYPE and/or URI URI. Any field
can be undef or omitted; if all are omitted, the default serializer is used, currently 'ntriples'.
METHODS
serialize_model_to_file FILENAME BASE_URI MODEL
Serialize the RDF Graph MODEL as syntax with the base RDF::Redland::URI BASE_URI to file FILENAME.
serialize_model_to_string BASE-URI MODEL
Serialize the RDF Graph MODEL to a syntax. If no serializer name is given, the default serializer RDF/XML is used.
set_namespace PREFIX URI
Define a namespace URI with the supplied PREFIX for use in serializing an RDF Graph.
feature URI [VALUE]
Get/set a serializer feature. The feature is named via RDF::Redland::URI URI and the value is a string. If VALUE is given, the
feature is set to that value, otherwise the current value is returned.
SEE ALSO
RDF::Redland::Parser, RDF::Redland::URI
AUTHOR
Dave Beckett - http://www.dajobe.org/
perl v5.14.2 2011-02-04 RDF::Redland::Serializer(3pm)
I have to assign a result of a query to a vairable like this
how can i do this
Query = select count(*) from table
x=`db2 ${Query}| sed -n '4p'`
but this doesn't work, is there any other way to assign the result without redirecting the result to temp file. .
Thanks
Mark. (3 Replies)
I have a report I need to format into a nice looking fixed length for each column of output
The report looks like this
1. First Query Title
First Query syntax (select * from tablea)
column1a ,column2a
ROWDATA.......
ROWDATA.......
ROWDATA ......
2. Second Query Title
... (3 Replies)
Hi,
I am not that good at Perl.
But here's what I wanna do.
I want to create a hash where the keys would point to different arrays. This is what I have tried to do but in vain :(
@arr=(1,2,3);
@arr1=(3,2,1);
%hashOfLists=();
$hashOfLists{Key1}=@arr."\n";
$hashOfLists{Key2}=@arr1."\n";... (3 Replies)
I have a array reference which has some number of array references inside it.The nested array references also contains the array references.
my $Filename = "sample.xml";
my $Parser = new XML::Parser( Style => 'tree' );
my $Tree = $Parser->parsefile( $Filename );
Here the $Tree is the... (6 Replies)
Dear All,
I need an output file in a way as described below
the above data should be static i.e. will remain the same
and the second feild will print a value comming from another script as per time (please note script will be scheduled for 30 min interval in crontab, so it will run at... (1 Reply)
I have a file which has data like this
*** Query completed. One row found.
*** Query completed. One row found.
*** Query completed. One row found.
*** Insert completed. 5 rows added.
*** Query completed. No rows found.
*** Query completed. One row found.
*** Query completed. One... (2 Replies)
Hi All
I have a doubt and want to be cleared I am using
@array = (10, 20);
$rarray = \@array;
#print "$rarray\n";
#print "@$rarray\n";
$rr= \$array;
#print $$rr;
$rr++;
print $$rr;
As you can see the $rr contains the reference to the first element of the array , now as the... (5 Replies)