RDF::Redland::Iterator(3pm) User Contributed Perl Documentation RDF::Redland::Iterator(3pm)NAME
RDF::Redland::Iterator - Redland RDF Iterator Class
SYNOPSIS
use RDF::Redland;
...
my $iterator=$model->targets_iterator($source_node, $arc_node);
while($iterator && !$iterator->end) {
my $node=$iterator->current;
...
$iterator->next;
}
DESCRIPTION
This class is used to return lists of RDF::Redland::Node objects from a method that returns an RDF::Redland::Iterator - commonly one of the
get_sources_iterator, get_targets_iterator or get_arcs_iterator methods of the RDF::Redland::Model class.
This allows efficient retrieval of long lists of RDF::Redland::Node objects but isn't really very Perl-friendly. The get_sources,
get_targets or get_arcs methods of RDF::Redland::Model class return Perl lists and the get_source, get_target and get_arc methods return
single arbitrary results.
CONSTRUCTORS
No public constructors - are created and returned from various methods of classes including RDF::Redland::Model
METHODS
end Return non 0 if the iterator has finished
current
Returns the current RDF::Redland::Node object from the iteration or undef if the iteration is finished.
next
Moves the iterator to the next item, returns undef if the iteration is finished.
context
Returns the context RDF::Redland::Node object from the iteration or undef if the iteration is finished.
SEE ALSO
RDF::Redland::Model and RDF::Redland::Node
AUTHOR
Dave Beckett - http://www.dajobe.org/
perl v5.14.2 2011-02-04 RDF::Redland::Iterator(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)
Hello, i should finished this program, if anyone could tell me whats wrong... This is an optional university work, though i cant leave this nearly finished. I need to see where is my error :(
What my program should do.
The user must type "num_proc" ( number of children). The program creates a... (4 Replies)
Is is possible to make STL-Iterator to work with user defined class ,like the one below?
#include <iostream>
#include <stdexcept>
using namespace std;
template <class T>
class Array
{
public:
T& operator (unsigned i) throw(out_of_range)
{ return data_; }
protected:
... (2 Replies)
Have a small doubt .
While using an iterator , i need to take the fields as seen as below .
But the Iterator is not been displayed . Can you please help with this .
Code:
ITERATOR=0COUNT=`cat test.txt`echo "$COUNT" while do echo $ITERATOR echo "$COUNT" awk... (3 Replies)