Catman...Profile(3pm)

πŸ’– Catmandu::FedoraCommons::Model::datastreamProfile πŸ’–

okay bestie, so this is a Perl model β€” and ngl the whole thing lives in Catmandu::FedoraCommons::Model::datastreamProfile, a 3pm manual page from the User Contributed Perl Documentation. It's the lil model that handles the Fedora REST calls addDatastream, getDatastream, modifyDatastream, setDatastreamState and setDatastreamVersionable. Iconic behavior fr fr πŸ’…


✨ NAME ✨

Catmandu::FedoraCommons::Model::datastreamProfile β€” the Perl model for the Fedora addDatastream, getDatastream, modifyDatastream, setDatastreamState and setDatastreamVersionable REST call. She does all five. Main character energy πŸ‘‘


🌸 SYNOPSIS 🌸

so here's how you actually use her:

  use Catmandu::FedoraCommons;

  my $fedora = Catmandu::FedoraCommons->new('http://localhost:8080/fedora','fedoraAdmin','fedoraAdmin');

  my $obj = $fedora->getDatastream(pid => 'demo:29', dsID => 'DC')->parse_content;

and $obj comes back looking like this:

  {
     'pid'  => 'demo:29' ,
     'dsID' => 'DC',
     'dateTime' => '2008-07-02T05:09:43.234Z' ,
     'profile' => {
        'dsLabel' => 'Dublin Core Record for this object' ,
        'dsVersionID' => 'DC1.0' ,
        'dsCreateDate' => '2008-07-02T05:09:43.234Z' ,
        'dsState' => 'A' ,
        'dsMIME' => 'text/xml' ,
        'dsFormatURI' => 'http://www.openarchives.org/OAI/2.0/oai_dc/' ,
        'dsControlGroup' => 'X' ,
        'dsSize' => 626,
        'dsVersionable' => 'true' ,
        'dsInfoType' => '' ,
        'dsLocation' => 'demo:29+DC+DC1.0' ,
        'dsLocationType' => '' ,
        'dsChecksumType' => 'DISABLED' ,
        'dsChecksum' => 'none' ,
     }
  }

like. look at that hash. the nesting? the vibes? 'dsChecksumType' => 'DISABLED' and 'dsChecksum' => 'none' living their truth. no cap, she ate πŸ“


πŸ¦‹ SEE ALSO πŸ¦‹

  • Catmandu::FedoraCommons β€” the parent module, the blueprint, the blueprint's blueprint iykyk 🫢

and that's the whole page, bestie! 🌈 nothing skipped, nothing skipped, every single field preserved exactly as she is πŸ’œ

this page is perl v5.36.0, dated 2023-02-05, and it comes to you straight from the User Contributed Perl Documentation. slay, go call some datastreams πŸ’…βœ¨πŸŽ€
πŸ“¦ where this page comes from