RDF::T...riples(3pm)

πŸ“¦
version 1.019 Β· 7 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’… RDF::Trine::Serializer::NTriples β€” the manual, but make it cute

okay bestie, pull up a chair, this is the page for RDF::Trine::Serializer::NTriples (that's the 3pm section of the User Contributed Perl Documentation, iykyk). It's literally the N-Triples Serializer. That's the whole personality. ✨


🌸 VERSION

This doc describes RDF::Trine::Serializer::NTriples version 1.019. Yes, we're on 1.019. Slay.


πŸŽ€ SYNOPSIS

use RDF::Trine::Serializer::NTriples;
my $serializer = RDF::Trine::Serializer::NTriples->new();

like. two lines. that's it. main character energy fr fr. πŸ’–


πŸ¦‹ DESCRIPTION

So the RDF::Trine::Serializer::NTriples class? It hands you an API for serializing RDF graphs into the N-Triples syntax. That's the vibe. That's what it does. No notes. πŸ‘‘


✨ METHODS

okay so beyond the methods we're about to list, this class also inherits a bunch of methods from the RDF::Trine::Serializer class. family inheritance, we love to see it. 🫢

  • new β€” returns a brand new N-Triples serializer object. fresh out the box, no cap. 🎁
  • serialize_model_to_file ( $fh, $model ) β€” takes $model and serializes it to N-Triples, printing the results out to the supplied filehandle < $fh >. go off.
  • serialize_model_to_string ( $model ) β€” serializes $model to N-Triples and hands the result back to you as a string. a little gift. πŸ’
  • serialize_iterator_to_file ( $file, $iter ) β€” serializes the iterator to N-Triples, printing the results to the supplied filehandle < $fh >. (yes, that's genuinely what it says β€” the text calls it $fh even though the signature is all $file, $iter. the lore is the lore, I don't make the rules. πŸ’€)
  • serialize_iterator_to_string ( $iter ) β€” serializes the iterator to N-Triples and returns the result as a string. string girlies rise. 🌈
  • statement_as_string ( $st ) β€” returns a string with the supplied RDF::Trine::Statement object serialized as N-Triples, and it ends in a DOT and a newline. periodt. literally.
  • serialize_node ( $node ) β€” returns a string containing the N-Triples serialization of $node. one node, one string, iconic behavior. ⭐

🌟 NOTES

Real talk time: as described in "as_ntriples" over in RDF::Trine::Node::Resource, N-Triples serialization will decode any punycode (that's <http://www.ietf.org/rfc/rfc3492.txt> if you wanna read the source material, and honestly? respect) that's chillin' inside the IRI, and then serialize it using unicode codepoint escapes. so it comes out the other side looking different. that's intentional. that's the design. πŸ’…


πŸ’€ BUGS

Found a bug? Want a feature? Please report it through the GitHub web interface at <https://github.com/kasei/perlrdf/issues>. do NOT suffer in silence, bestie, the issue tracker is right there and it wants to hear from you. πŸ™ˆ


πŸ”₯ SEE ALSO


πŸ‘‘ AUTHOR

Gregory Todd Williams <gwilliams@cpan.org>. we stan. πŸŽ€


Copyright (c) 2006-2012 Gregory Todd Williams. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


okay that's the whole page, you're basically an N-Triples expert now, no cap 🧚✨ this was the User Contributed Perl Documentation page for RDF::T...riples(3pm), generated by perl v5.38.2 on 2024-01-13. drink some water, hydrate, and go serialize something beautiful. bye bestie! πŸ’–πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from