This module provides a method to generate a stream of statements, suitable for outputing from RDF/XML parsers, returning as the results of queries and serialising models in order to manipulate them or transform into another syntax.
Get the context of the current Statement in the stream
# File lib/rdf/redland/stream.rb, line 62 def context() if not self.stream return true end my_node = Redland.librdf_stream_get_context(@stream) if not my_node return nil else return Node.new(:from_object=>my_node) end end
Get the current Statement in the stram
# File lib/rdf/redland/stream.rb, line 39 def current if not self.stream return nil end my_statement = Redland.librdf_stream_get_object(self.stream) unless my_statement return nil else return Statement.new(:from_object=>my_statement,:model=>@model) end end
Test if the stream has ended
# File lib/rdf/redland/stream.rb, line 30 def end? if not @stream return true else return (Redland.librdf_stream_end(self.stream) != 0) end end
Move to the next Statement in the stream
# File lib/rdf/redland/stream.rb, line 53 def next() if not self.stream return true else return Redland.librdf_stream_next(self.stream) end end
Generated with the Darkfish Rdoc Generator 2.