AtteanX/Serializer/NQuads.pm

filter: Statementstmt 96.8% 31 / 32 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 90.9% 10 / 11 Podpod 100% 3 / 3 totaltotal 95.6% 44 / 46 CC 1 SCAR 0.9
CC
1
Cov
97%
canonical_iri
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« AtteanX/SPARQL/Token.pm ↑ Summary AtteanX/Serializer/NTriples.pm »
1 =head1 NAME
2  
3 AtteanX::Serializer::NQuads - N-Triples Serializer
4  
5 =head1 VERSION
6  
7 This document describes AtteanX::Serializer::NQuads version 0.041
8  
9 =head1 SYNOPSIS
10  
11 use Attean;
12 my $serializer = Attean->get_serializer('NQuads')->new();
13 $serializer->serialize_iter_to_io( $iter, $fh );
14  
15 =head1 DESCRIPTION
16  
17 Serializes triples and quads into the RDF 1.1 N-Quads 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<< canonical_iri >>
34  
35 Returns the canonical IRI of this format.
36  
37 =item C<< serialize_iter_to_io( $fh, $iterator ) >>
38  
39 =item C<< serialize_iter_to_bytes( $fh ) >>
40  
41 =cut
42  
43 4 ▶use v5.14;
Subroutine BEGIN: called CC=1 SCAR=0.0
44 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
45  
46 4 package AtteanX::Serializer::NQuads 0.041 {
47 4 ▶ use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
48 4 ▶ use Types::Standard qw(Str ArrayRef);
Subroutine BEGIN: called CC=1 SCAR=0.0
49 4 ▶ use Encode qw(encode);
Subroutine BEGIN: called CC=1 SCAR=0.0
50 4 ▶ use Attean::ListIterator;
Subroutine BEGIN: called CC=1 SCAR=0.0
51 4 ▶ use List::Util qw(any);
Subroutine BEGIN: called CC=1 SCAR=0.0
52 4 ▶ use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
53  
54 4 extends 'AtteanX::Serializer::NTuples';
55 0 ▶ sub canonical_iri { return 'http://www.w3.org/ns/formats/N-Quads' }
Subroutine canonical_iri: not called CC=1 SCAR=6.9
Pod documented
56 4 has 'canonical_media_type' => (is => 'ro', isa => Str, init_arg => undef, default => 'application/n-quads');
57  
58 =item C<< media_types >>
59  
60 Returns a list of media types that identify the format produced by this serializer.
61  
62 =cut
63  
64 13 ▶ sub media_types {
Subroutine media_types: called CC=1 SCAR=0.0
Pod documented
65 13 return [qw(application/n-quads)];
66 }
67  
68  
69 =item C<< file_extensions >>
70  
71 Returns a list of file extensions associated with the serialized format.
72  
73 =cut
74  
75 14 ▶ sub file_extensions { return [qw(nq)] };
Subroutine file_extensions: called CC=1 SCAR=0.0
Pod documented
76  
77 4 with 'Attean::API::MixedStatementSerializer';
78 4 with 'Attean::API::AppendableSerializer';
79 }
80  
81 4 1;
82  
83 __END__
« AtteanX/SPARQL/Token.pm ↑ Summary AtteanX/Serializer/NTriples.pm »