Class Graph
In: lib/basicrdf.rb
lib/RDF4R/pastiche.rb
Parent: Object

same again re ../../lib/basicrdf.rb

Methods

ask   default   getBlank   getLiteral   getResource   load   new   ns   objects   predicates   reg_xmlns   size   statements   subjects   tell   tell_all   toDotGraph   toNtriples   toSQL   toSQLInserts  

Included Modules

RDF4R::Pastiche::SWAP

Public Class methods

Starting to ape the Cwm API (well, method name anyway)

Public Instance methods

Graph.ask

Basic query method for our RDF graph. passed a (template) statement w/ nils …and returns a graph (which we can probe with subjects(), predicates() etc

Notes: this is all pretty inefficient, creating new graphs all over the shop when we needn‘t, new statements etc etc. todo: change @fp and @bp to store refs to statements not nodes

      ...and think about how we can return sub-graph matches

without having to go index them. maybe do indexing on demand? (see also tell()

nodes that know… (about a graph)

return all the sharp ends of the arcs in this graph

return all the label nodes for the arcs in this graph

XML Namespace registration

return all the blunt ends of the arcs in this graph

tell the graph something (add and index a statement)

Add a bunch of statements (merge into tell() maybe?)

A simple dump to the Dot format used by GraphViz, www.graphviz.org/

[Validate]