NAME
RDF::Trine::Store::AllegroGraph - Triple store implementation based on AGv4
SYNOPSIS
use RDF::Trine::Store::AllegroGraph;
my $trine = RDF::Trine::Store->new_with_string( "AllegroGraph;http://ag_server:10035/scratch/catlitter" );
# use the RDF::Trine::Store API
DESCRIPTION
This package implements the RDF::Trine::Store API on the basis of the AllegroGraph v4 Perl client.
You will almost never invoke any of the functions/methods here directly, but will peruse the Trine invocation stack. The only exception for that are those things which an AGv4 repository offers, but are not covered by the Trine API. These are, among other things:
Prolog rule based querying
sessions and transactions
geo-spatial support
social network analysis
For these I suggest that you pull out the AGv4 repository from the trine store like this:
my $repo = $store->{model};
my $result = $repo->prolog ("....");
NOTE: This will probably change as RDF::Trine evolves.
Restrictions/Shortcomings
- For the time being this will not be fast, and that for a number of reasons.
- This store has native support for SPQARL 1.0. You should be able to use SPARQL 1.1 as that will be intercepted by the Trine framework. It will be slow, though, as it will be pulling statements individually. To handle this properly will be future work.
INTERFACE
Constructor(s)
Are essentially those from RDF::Trine::Store with the following flavor:
_new_with_object
accepts one RDF::AllegroGraph::Repository4 object.-
That will be wrapped into the store and used from then on.
_new_with_string
accepts a string of the following form:-
AllegroGraph;<HTTP-address-of-server>/<catalog-name>/<repository-name>
such as
AllegroGraph;http://super:super@127.0.0.1:10035/test/experiment
NOTE: If the repository does not exist, it will be generated (that usually takes a bit of time with AG).
_new_with_config
accepts a hash with the following fields:-
storetype
-
must be
AllegroGraph
server
-
must be an HTTP URL of the server (excluding trailing slash), defaults to
http://127.0.0.1:10035
catalog
-
must be an identifier of the form /something
repository
-
must be an identifier of the form /somethingelse
username
-
is used for authentication
password
-
ditto
Methods
- temporary_store
-
This is not implemented as we need serious information to actually create a repository (and to get rid of it eventually).
TODO: As additional parameters could provide this information, one could use that.
- supports
-
Currently this store supports the following features:
- get_sparql
-
If you pass in a string holding a SPARQL query, then you will get back an RDF::Trine::Iterator::Bindings iterator.
- count_statements
-
As the mother class commands.
- add_statement
-
As the mother class, but:
We do not check for duplicates here. I.e. you can add any number of identical triples. They will not show up in your SPARQL results, but with
get_statements
they will.Quads are not (yet) supported.
- remove_statement
-
Same as mother class.
NOTE: No quads yet. And this does not work within bulk mode (yet).
- remove_statements
-
See
remove_statement
- get_statements
-
As the mother class.
- get_contexts
-
For now, this always will return an empty list.
TODO: When Perl AG supports more context features this will change.
- size
-
As for the mother class, but remember that AG allows you to hold duplicates.
- etag
-
Not implemented. Will die.
- _begin_bulk_ops, _end_bulk_ops
-
Currently bulk operation is only supporting adding statements. Not deleting them.
AUTHOR
Robert Barta, <drrho at cpan.org>
BUGS
Please report any bugs or feature requests to bug-rdf-trine-allegrograph at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=RDF-Trine-AllegroGraph. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SEE ALSO
ACKNOWLEDGEMENTS
The development of this package was supported by Franz Inc.
COPYRIGHT & LICENSE
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.