Catman...ommons(3pm)
π Catmandu::Store::FedoraCommons π
okay bestie, so this is a User Contributed Perl Documentation page β the manual for Catmandu::Store::FedoraCommons(3pm) β and I am so excited to walk you through it. it's giving β¨archival storage but make it fashionβ¨. let's go π¦
πΈ NAME πΈ
Catmandu::Store::FedoraCommons β a Catmandu::Store plugin for the Fedora Commons repository π
β¨ SYNOPSIS β¨
here's the whole vibe, verbatim, no cap:
use Catmandu::Store::FedoraCommons;
my $store = Catmandu::Store::FedoraCommons->new(
baseurl => 'http://localhost:8080/fedora',
username => 'fedoraAdmin',
password => 'fedoraAdmin',
model => 'Catmandu::Store::FedoraCommons::DC' # default
);
# We use the DC model, lets store some DC
my $obj1 = $store->bag->add({
title => ['The Master and Margarita'] ,
creator => ['Bulgakov, Mikhail'] }
);
printf "obj1 stored as %s\n" , $obj1->{_id};
# Force an id in the store
my $obj2 = $store->bag->add({ _id => 'demo:120812' , title => ['The Master and Margarita'] });
my $obj3 = $store->bag->get('demo:120812');
$store->bag->delete('demo:120812');
$store->bag->delete_all;
# All bags are iterators
$store->bag->each(sub {
my $obj = $_[0];
my $pid = $obj->{_id};
my $ds = $store->fedora->listDatastreams(pid => $pid)->parse_content;
});
$store->bag->take(10)->each(sub { ... });
likeβ¦ look at that. storing Mikhail Bulgakov's The Master and Margarita in a Fedora repo. iconic behavior honestly π
π DESCRIPTION π
Catmandu::Store::FedoraCommons is a Perl package that can store data into FedoraCommons backed databases. the database as a whole is called a 'store'. databases also have compartments (e.g. tables) called Catmandu::Bag-s π. in Fedora we have namespaces. a bag corresponds to a namespace. the default bag corresponds to the default namespace in Fedora. iykyk.
by default Catmandu::Store::FedoraCommons works with a Dublin Core data model. you can use the add, get and delete methods of the store to retrieve and insert Perl HASH-es that mimic Dublin Core records. optionally other models can be provided by creating a model package that implements a 'get' and 'update' method. slay π
π«Ά METHODS π«Ά
π new(baseurl => $fedora_baseurl , username => $username , password => $password , model => $model )
create a new Catmandu::Store::FedoraCommons store at $fedora_baseurl. optionally provide a name of a $model to serialize your Perl hashes into a Fedora Commons model. yes bestie, you get to pick the model π
π bag('$namespace')
create or retrieve a bag. returns a Catmandu::Bag. use this for storing or retrieving records from a fedora namespace. it's literally the doorway to your records πͺβ¨
πΈ fedora
returns a low level Catmandu::FedoraCommons reference. it's givingβ¦ backstage pass ποΈ
π INHERITED METHODS π
this Catmandu::Store implements:
Catmandu::Store
each Catmandu::Bag in this Catmandu::Store implements:
Catmandu::Bag
periodt. no notes π
π SEE ALSO π
Catmandu::FedoraCommons
β AUTHOR β
- Patrick Hochstenbach,
"<patrick.hochstenbach at ugent.be>"β thank you for your service king π«‘π
okay that's the whole page bestie, you ate that π
this manual page shipped withperl v5.36.0and is dated2023-02-05, under the manual nameCatman...ommons(3pm). mwah, bye ππ
π¦ where this page comes from
- debian bookworm: libcatmandu-fedoracommons-perl 0.5-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libcatmandu-fedoracommons-perl 0.5-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcatmandu-fedoracommons-perl 0.5-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatmandu-fedoracommons-perl 0.5-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatmandu-fedoracommons-perl 0.5-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms