The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

RDF::AllegroGraph::Catalog - AllegroGraph catalog handle

SYNOPSIS

   my $server = new RDF::AllegroGraph::Server (ADDRESS => 'http://localhost:8080');
   my $vienna = new RDF::AllegroGraph::Catalog (NAME => '/vienna', SERVER => $server);

   warn "all repositories in vienna: ".Dumper $vienna->repositories;

   # open an existing
   my $air   = $vienna->repository ('/air-quality');
   # create one if it does not exist
   use Fcntl;
   my $water = $vienna->repository ('/water', mode => O_CREAT);

DESCRIPTION

Allegrograph catalogs are a container for individual repositories (RDF::AllegrGraph::Repository). The latter roughly correspond to what the RDF folks call a model. You can get a catalog handle from the AG server (RDF::AllegroGraph::Server).

INTERFACE

Constructor

The constructor expects the following options:

NAME (mandatory, string)

This is a string of the form /mycatalog and it identifies that very catalog on the server.

SERVER (mandatory, RDF::AllegroGraph::Server object)

This is the handle to the server.

Example:

   my $server = new RDF::AllegroGraph::Server (...);
   my $vienna = new RDF::AllegroGraph::Catalog (NAME => '/vienna', SERVER => $server);

Methods

repositories

@repos = $cat->repositories

This method returns RDF::AllegroGraph::Repository objects for all repositories in the catalog.

repository

$repo = $cat->repository ($repo_id [, $mode ])

This method returns an RDF::AllegroGraph::Repository object for the repository with the provided id. That id always has the form /somerepository.

If that repository does not exist in the catalog, then an exception cannot open will be raised. That is, unless the optional mode is provided having the POSIX value O_CREAT. Then the repository will be created.

version

This method simply returns the version supported by the protocol, in the form of 3.3, or similar.

protocol

@@@@

AUTHOR

Robert Barta, <rho at devc.at>

COPYRIGHT & LICENSE

Copyright 20(09|10) 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