NAME
RDF::Query::Stream - Stream (iterator) class for query results.
METHODS
new ( $closure, $type, $names, %args )
-
Returns a new stream (interator) object.
$closure
must be a CODE reference that acts as an iterator, returning successive items when called, and returning undef when the iterator is exhausted. get_boolean
-
Returns the boolean value of the first item in the stream.
get_all
-
Returns an array containing all the items in the stream.
to_string ( $format )
-
Returns a string representation of the stream data in the specified
$format
. If$format
is missing, defaults to XML serialization. Other options are:http://www.w3.org/2001/sw/DataAccess/json-sparql/
as_xml ( $max_size )
-
Returns an XML serialization of the stream data.
as_json ( $max_size )
-
Returns a JSON serialization of the stream data.
boolean_as_xml
-
Returns an XML serialization of the first stream item, interpreted as a boolean value.
boolean_as_json
-
Returns a JSON serialization of the first stream item, interpreted as a boolean value.
bindings_as_xml ( $max_size )
-
Returns an XML serialization of the stream data, interpreted as query variable binding results.
bindings_as_json ( $max_size )
-
Returns a JSON serialization of the stream data, interpreted as query variable binding results.
graph_as_xml
-
Returns an XML serialization of the stream data, interpreted as a results graph.
REVISION HISTORY
$Log$
Revision 1.4 2005/07/27 00:30:29 greg
- Added binding_value_by_name() method.
Revision 1.3 2005/06/02 19:31:22 greg
- Bridge object is now passed to the Stream constructor.
- bindings_count() now returns the right number even if there is no data.
- XML Result format now works with RDF::Core models.
- Added XML Results support for graph queries (DESCRIBE, CONSTRUCT).
Revision 1.2 2005/06/01 22:34:18 greg
- Added Boolean XML Results format.
Revision 1.1 2005/06/01 22:10:46 greg
- Moved Stream class to lib/RDF/Query/Stream.pm.
- Fixed tests that broke with previous fix to CONSTRUCT queries.
- Fixed tests that broke with previous change to ASK query results.
AUTHOR
Gregory Williams <gwilliams@cpan.org>