| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | =head1 NAME | 
| 2 |  |  |  |  |  |  |  | 
| 3 |  |  |  |  |  |  | AtteanX::Serializer::NTriples - N-Triples Serializer | 
| 4 |  |  |  |  |  |  |  | 
| 5 |  |  |  |  |  |  | =head1 VERSION | 
| 6 |  |  |  |  |  |  |  | 
| 7 |  |  |  |  |  |  | This document describes AtteanX::Serializer::NTriples version 0.033 | 
| 8 |  |  |  |  |  |  |  | 
| 9 |  |  |  |  |  |  | =head1 SYNOPSIS | 
| 10 |  |  |  |  |  |  |  | 
| 11 |  |  |  |  |  |  | use Attean; | 
| 12 |  |  |  |  |  |  | my $serializer = Attean->get_serializer('NTriples')->new(); | 
| 13 |  |  |  |  |  |  | $serializer->serialize_iter_to_io( $iter, $fh ); | 
| 14 |  |  |  |  |  |  |  | 
| 15 |  |  |  |  |  |  | =head1 DESCRIPTION | 
| 16 |  |  |  |  |  |  |  | 
| 17 |  |  |  |  |  |  | Serializes triples into the RDF 1.1 N-Triples format. | 
| 18 |  |  |  |  |  |  |  | 
| 19 |  |  |  |  |  |  | =head1 ATTRIBUTES | 
| 20 |  |  |  |  |  |  |  | 
| 21 |  |  |  |  |  |  | =over 4 | 
| 22 |  |  |  |  |  |  |  | 
| 23 |  |  |  |  |  |  | =item C<< canonical_media_type >> | 
| 24 |  |  |  |  |  |  |  | 
| 25 |  |  |  |  |  |  | =item C<< file_extensions >> | 
| 26 |  |  |  |  |  |  |  | 
| 27 |  |  |  |  |  |  | =back | 
| 28 |  |  |  |  |  |  |  | 
| 29 |  |  |  |  |  |  | =head1 METHODS | 
| 30 |  |  |  |  |  |  |  | 
| 31 |  |  |  |  |  |  | =over 4 | 
| 32 |  |  |  |  |  |  |  | 
| 33 |  |  |  |  |  |  | =item C<< serialize_iter_to_io( $fh, $iterator ) >> | 
| 34 |  |  |  |  |  |  |  | 
| 35 |  |  |  |  |  |  | =item C<< serialize_iter_to_bytes( $fh ) >> | 
| 36 |  |  |  |  |  |  |  | 
| 37 |  |  |  |  |  |  | =cut | 
| 38 |  |  |  |  |  |  |  | 
| 39 | 6 |  |  | 6 |  | 6787 | use v5.14; | 
|  | 6 |  |  |  |  | 25 |  | 
| 40 | 6 |  |  | 6 |  | 35 | use warnings; | 
|  | 6 |  |  |  |  | 14 |  | 
|  | 6 |  |  |  |  | 310 |  | 
| 41 |  |  |  |  |  |  |  | 
| 42 |  |  |  |  |  |  | use Moo; | 
| 43 | 6 |  |  | 6 |  | 39 | use Types::Standard qw(Str ArrayRef); | 
|  | 6 |  |  |  |  | 10 |  | 
|  | 6 |  |  |  |  | 39 |  | 
| 44 | 6 |  |  | 6 |  | 1991 | use Encode qw(encode); | 
|  | 6 |  |  |  |  | 22 |  | 
|  | 6 |  |  |  |  | 107 |  | 
| 45 | 6 |  |  | 6 |  | 4357 | use Attean::ListIterator; | 
|  | 6 |  |  |  |  | 19 |  | 
|  | 6 |  |  |  |  | 319 |  | 
| 46 | 6 |  |  | 6 |  | 50 | use List::MoreUtils qw(any); | 
|  | 6 |  |  |  |  | 15 |  | 
|  | 6 |  |  |  |  | 163 |  | 
| 47 | 6 |  |  | 6 |  | 30 | use namespace::clean; | 
|  | 6 |  |  |  |  | 16 |  | 
|  | 6 |  |  |  |  | 59 |  | 
| 48 | 6 |  |  | 6 |  | 5918 |  | 
|  | 6 |  |  |  |  | 16 |  | 
|  | 6 |  |  |  |  | 56 |  | 
| 49 |  |  |  |  |  |  | extends 'AtteanX::Serializer::NTuples'; | 
| 50 |  |  |  |  |  |  | has 'canonical_media_type' => (is => 'ro', isa => Str, init_arg => undef, default => 'application/n-triples'); | 
| 51 |  |  |  |  |  |  |  | 
| 52 |  |  |  |  |  |  | =item C<< media_types >> | 
| 53 |  |  |  |  |  |  |  | 
| 54 |  |  |  |  |  |  | Returns a list of media types that identify the format produced by this serializer. | 
| 55 |  |  |  |  |  |  |  | 
| 56 |  |  |  |  |  |  | =cut | 
| 57 |  |  |  |  |  |  |  | 
| 58 |  |  |  |  |  |  | return [qw(application/n-triples text/plain)]; | 
| 59 |  |  |  |  |  |  | } | 
| 60 | 22 |  |  | 22 | 1 | 96 |  | 
| 61 |  |  |  |  |  |  | =item C<< file_extensions >> | 
| 62 |  |  |  |  |  |  |  | 
| 63 |  |  |  |  |  |  | Returns a list of file extensions associated with the serialized format. | 
| 64 |  |  |  |  |  |  |  | 
| 65 |  |  |  |  |  |  | =cut | 
| 66 |  |  |  |  |  |  |  | 
| 67 |  |  |  |  |  |  |  | 
| 68 |  |  |  |  |  |  | with 'Attean::API::TripleSerializer'; | 
| 69 | 32 |  |  | 32 | 1 | 106 | with 'Attean::API::AppendableSerializer'; | 
| 70 |  |  |  |  |  |  | } | 
| 71 |  |  |  |  |  |  |  | 
| 72 |  |  |  |  |  |  | 1; | 
| 73 |  |  |  |  |  |  |  | 
| 74 |  |  |  |  |  |  |  | 
| 75 |  |  |  |  |  |  | =back | 
| 76 |  |  |  |  |  |  |  | 
| 77 |  |  |  |  |  |  | =head1 BUGS | 
| 78 |  |  |  |  |  |  |  | 
| 79 |  |  |  |  |  |  | Please report any bugs or feature requests to through the GitHub web interface | 
| 80 |  |  |  |  |  |  | at L<https://github.com/kasei/perlrdf/issues>. | 
| 81 |  |  |  |  |  |  |  | 
| 82 |  |  |  |  |  |  | =head1 SEE ALSO | 
| 83 |  |  |  |  |  |  |  | 
| 84 |  |  |  |  |  |  | L<https://www.w3.org/TR/n-triples/> | 
| 85 |  |  |  |  |  |  |  | 
| 86 |  |  |  |  |  |  | =head1 AUTHOR | 
| 87 |  |  |  |  |  |  |  | 
| 88 |  |  |  |  |  |  | Gregory Todd Williams  C<< <gwilliams@cpan.org> >> | 
| 89 |  |  |  |  |  |  |  | 
| 90 |  |  |  |  |  |  | =head1 COPYRIGHT | 
| 91 |  |  |  |  |  |  |  | 
| 92 |  |  |  |  |  |  | Copyright (c) 2014--2022 Gregory Todd Williams. This | 
| 93 |  |  |  |  |  |  | program is free software; you can redistribute it and/or modify it under | 
| 94 |  |  |  |  |  |  | the same terms as Perl itself. | 
| 95 |  |  |  |  |  |  |  | 
| 96 |  |  |  |  |  |  | =cut |