| RDF-AllegroGraph-Easy documentation | view source | Contained in the RDF-AllegroGraph-Easy distribution. |
RDF::AllegroGraph::Session4 - AllegroGraph session handle for AGv4
$pong = $session->ping
This method will keep the "connection" with the HTTP server alive (it probably resets the
timeout). In the regular case it should return pong, in the error case it will time out.
$session->rules (" .... prolog rules encoded in LISP, brr ...")
This method parks additional ontological knowledge as rules onto the server. If they can be parsed correctly, they will be used with the onboard PROLOG reasoner. See the Franz Prolog tutorial (./doc/prolog-tutorial.html) for details.
This method creates one generator, in the AGv4 sense. As parameter you have to pass in
A symbol, just a simple string, probably better without any fancy characters.
Here you name various predicates (full URIs, no namespaces seem to work) and also whether these edges should be followed
forward direction, orreverse direction (inverseOf in the OWL sense), orbidirectionalExample:
$session->generator ('associates',
{ '<http://www.franz.com/lesmis#knows_well>' => 'bidirectional',
'<http://www.franz.com/lesmis#knows>' => 'bidirectional' }
);
While all of the following can be (and actually are) emulated via generator and prolog
invocations, you might find the following handy:
@members = $session->SNA_members ($start_node, { generator specification })
This method returns the member nodes which can be reached when starting at a particular node and
when particular edges are followed. That edge specification is the same as for the method
generator.
NOTE: Internally an SNA generator is created and - using this method - it will be always overwritten. So, if you need to query this heavily, it is better to fall back to the low-level generator method and use that instead of a full specification:
$session->generator ('intimates',
{ '<http://www.franz.com/lesmis#knows_well>' => 'bidirectional' });
@ms = $session->SNA_members ('<where-to-start>', 'intimates');
@cliques = $session->SNA_cliques ($node, $generator)
This method returns a list of list references to the cliques the node is part of. The generator can
again be one predefined (see generator), or an adhoc one (see SNA_members).
Robert Barta, <rho at devc.at>
Copyright 2011 Robert Barta, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| RDF-AllegroGraph-Easy documentation | view source | Contained in the RDF-AllegroGraph-Easy distribution. |