1RDF::Trine::Iterator::GUrsaeprh(C3o)ntributed Perl DocumReDnFt:a:tTiroinne::Iterator::Graph(3)
2
3
4

NAME

6       RDF::Trine::Iterator::Graph - Iterator class for graph query results
7

VERSION

9       This document describes RDF::Trine::Iterator::Graph version 1.019
10

SYNOPSIS

12        use RDF::Trine::Iterator::Graph;
13
14        my $iterator = RDF::Trine::Iterator::Graph->new( \&data );
15        while (my $st = $iterator->next) {
16          # $st is a RDF::Trine::Statement object
17          print $st->as_string;
18        }
19

METHODS

21       Beyond the methods documented below, this class inherits methods from
22       the RDF::Trine::Iterator class.
23
24       "new ( \@results, %args )"
25       "new ( \&results, %args )"
26           Returns a new SPARQL Result interator object. Results must be
27           either an reference to an array containing results or a CODE
28           reference that acts as an iterator, returning successive items when
29           called, and returning undef when the iterator is exhausted.
30
31           $type should be one of: bindings, boolean, graph.
32
33       "as_bindings ( $s, $p, $o )"
34           Returns the iterator as a Bindings iterator, using the supplied
35           triple nodes to determine the variable bindings.
36
37       "materialize"
38           Returns a materialized version of the current graph iterator.  The
39           materialization process will leave this iterator empty. The
40           materialized iterator that is returned should be used for any
41           future need for the iterator's data.
42
43       "unique"
44           Returns a Graph iterator that ensures the returned statements are
45           unique. While the underlying RDF graph is the same regardless of
46           uniqueness, the iterator's serialization methods assume the results
47           are unique, and so use this method before serialization.
48
49           Uniqueness is opt-in for efficiency concerns -- this method
50           requires O(n) memory, and so may have noticeable effects on large
51           graphs.
52
53       "is_graph"
54           Returns true if the underlying result is an RDF graph.
55
56       "as_string ( $max_size [, \$count] )"
57           Returns a string table serialization of the stream data.
58
59       "as_xml ( $max_size )"
60           Returns an XML serialization of the stream data.
61
62       "print_xml ( $fh, $max_size )"
63           Prints an XML serialization of the stream data to the filehandle
64           $fh.
65
66       "as_json ( $max_size )"
67           Returns a JSON serialization of the stream data.
68
69       "as_hashref"
70           Returns a hashref representing the model in an RDF/JSON-like
71           manner.
72
73           See "as_hashref" at RDF::Trine::Model for full documentation of the
74           hashref format.
75
76       "construct_args"
77           Returns the arguments necessary to pass to the stream constructor
78           _new to re-create this stream (assuming the same closure as the
79           first
80

DEPENDENCIES

82       JSON
83
84       Scalar::Util
85

BUGS

87       Please report any bugs or feature requests to through the GitHub web
88       interface at <https://github.com/kasei/perlrdf/issues>.
89

AUTHOR

91       Gregory Todd Williams  "<gwilliams@cpan.org>"
92
94       Copyright (c) 2006-2012 Gregory Todd Williams. This program is free
95       software; you can redistribute it and/or modify it under the same terms
96       as Perl itself.
97
98
99
100perl v5.32.1                      2021-01-27    RDF::Trine::Iterator::Graph(3)
Impressum