Catman...export(3pm)
β¨ NAME β¨
Catmandu::FedoraCommons::Model::export β it's the Perl model for the Fedora export and getObjectXML REST call, and it's giving very much "your Fedora object, but make it a hash" π
(also hello yes this is straight out of User Contributed Perl Documentation, section 3pm, we love a community-maintained era π«Ά)
πΈ SYNOPSIS πΈ
okay so here's the whole vibe, bestie. You spin up a Catmandu::FedoraCommons, you call export on a pid, you call parse_content on the result, and boom β you get back a plain old hash of the object. Watch:
use Catmandu::FedoraCommons;
my $fedora = Catmandu::FedoraCommons->new('http://localhost:8080/fedora','fedoraAdmin','fedoraAdmin');
my $obj = $fedora->export(pid => 'demo:29')->parse_content;
and the thing it hands you back looks exactly like this π no cap, this is the actual shape:
{
'pid' => 'demo:29' ,
'version' => '1.1',
'objectProperties' => {
'state' => 'Inactive' ,
'label' => 'Data Object for Image Manipulation Demo' ,
'ownerId' => 'fedoraAdmin' ,
'createdDate' => '2008-07-02T05:09:42.015Z' ,
'lastModifiedDate' => '2013-02-07T19:57:27.140Z' ,
},
'auditTrail' => [
{
'id' => 'AUDREC1' ,
'process' => 'Fedora API-M' ,
'action' => 'addDatastream' ,
'componentID' => 'TEST' ,
'responsibility' => 'fedoraAdmin' ,
'date' => '2013-02-07T18:42:24.518Z' ,
'justification' => '' ,
},
],
'dc' => {
'title' => [ 'Coliseum in Rome' ] ,
'creator' => [ 'Thornton Staples' ] ,
'subject' => [ 'Architecture, Roman' ] ,
'description' => [ 'Image of Coliseum in Rome' ] ,
'publisher' => [ 'University of Virginia Library' ] ,
'format' => [ 'image/jpeg' ] ,
'identifier' => [ 'demo:29' ],
},
}
let's do a lil vibe check on what you're looking at, because it's honestly kind of iconic:
pidβ the persistent identifier of the object you asked for, heredemo:29.versionβ the version, sitting pretty at1.1.objectPropertiesβ the receipts on the object itself:state(Inactivein the example),label,ownerId,createdDate, andlastModifiedDate.auditTrailβ an array of audit records, because Fedora keeps the whole group chat history. Each entry hasid,process,action,componentID,responsibility,dateandjustification.dcβ the Dublin Core, and note that each field here is an array ref, not a plain string:title,creator,subject,description,publisher,format,identifier.
heads up bestie: those dc values being arrayrefs is not a typo and not a glitch, that's just the shape. Don't come for me about it π
π¦ SEE ALSO π¦
Catmandu::FedoraCommonsβ the parent module, go say hi π
okay that's the whole page, you ate it, you're the main character of Fedora object retrieval now π
perl v5.36.0 π 2023-02-05 π Catman...export(3pm) β mwah, go forth and export π β¨
π¦ 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