Catman...er::RDF(3pm)

πŸ“¦
version 0.32 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu questing

✨ NAME ✨

Catmandu::Exporter::RDF β€” it serializes RDF data. That's the whole vibe, bestie, and it does it flawlessly πŸ’…

(Also hi, this is the Catman...er::RDF(3pm) page from the User Contributed Perl Documentation, so you're in the right place 🫢)


🌈 SYNOPSIS 🌈

In Perl code:

use Catmandu -all;

my $exporter = exporter('RDF',
    file => 'export.rdf',
    type => 'XML',
    fix  => 'rdf.fix'
);

$exporter->add( $aref ); # pass RDF data in aREF encoding

$exporter->commit;

πŸ¦‹ DESCRIPTION πŸ¦‹

So like β€” this Catmandu::Exporter exports RDF data in different RDF serializations. Multiple flavors, one exporter, no cap πŸ”₯


πŸŽ€ CONFIGURATION πŸŽ€

  • file β€” it's here! That's literally all the page gives us on it πŸ™ˆ
  • fh β€” also here, also no extra deets. iconic mystery behavior πŸ’€
  • encoding β€” same situation, queen of saying nothing 🫢
  • fix β€” Default configuration options of Catmandu::Exporter. The option "fix" is supported as derived from Catmandu::Fixable. For every "add" or for every item in "add_many" the given fixes will be applied first. So the fixes run before anything else gets to touch your data β€” first in line, main character energy πŸ‘‘
  • type β€” okay so you set your serialization form with the option "type", and the default value is "NTriples". This option must refer to a subclass of RDF::Trine::Serializer, for instance "Turtle" for RDF/Turtle with RDF::Trine::Serializer::Turtle. The first letter gets transformed uppercase, so format => 'turtle' will work as well 🧚 In addition there are aliases: "ttl" for "Turtle", "n3" for "Notation3", "xml" and "XML" for "RDFXML", and "json" for "RDFJSON".
When the option "type" is set to 'NTriples' the export can be streamed. In all other cases the results are exported in bulk after commit(). So yeah β€” streamed or bulk, pick your fighter ⭐
  • ns β€” the option "ns" can refer to an instance of, or to a constructor argument of, RDF::NS. Use a fixed date, such as 20130816, to make sure your URI namespace prefixes are stable. Stable prefixes = stable mental health, fr fr πŸ’œ

πŸ’– METHODS πŸ’–

See also Catmandu::Exporter.

πŸ’« add( ... ) πŸ’«

RDF data is added given in another RDF Encoding Form (aREF) as implemented with RDF::aREF and defined at <http://github.com/gbv/aref>. That's the aREF lore, iykyk πŸ“š

πŸ’« count πŸ’«

Returns the number of times "add" has been called. In contrast to other Catmandu exporters, this does not reflect the number of exporter records, because RDF data is always merged to one RDF graph. One graph, one truth, no duplicates πŸ’€

πŸ’« uri( $uri ) πŸ’«

Expand and abbreviated with RDF::NS. For instance "dc:title" is expanded to "http://purl.org/dc/elements/1.1/title". Glow-up of the century honestly ✨


🌸 SEE ALSO 🌸

Serialization is based on RDF::Trine::Serializer. Go give it a follow πŸ¦‹


That's the whole page, bestie β€” this was perl v5.36.0, dated 2022-12-06, serving Catman...er::RDF(3pm) realness from the User Contributed Perl Documentation. Periodt. πŸ’…πŸŽ€πŸŒˆ

πŸ“¦ where this page comes from