PML/Schema/Root.pm

filter: Statementstmt 83.3% 25 / 30 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 71.4% 10 / 14 Podpod 100% 6 / 6 totaltotal 82.0% 41 / 50 CC 1 SCAR 2.5
CC
1
Cov
83%
is_root
2.0
is_atomic
2.0
get_decl_type_str
2.0
CRAP 1.3
« PML/StandardFactory.pm ↑ Summary PML/Seq/Element.pm »
1 package Treex::PML::Schema::Root;
2  
3 package Treex::PML::Schema::Root;
4 9 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 9 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 9 ▶use vars qw($VERSION);
Subroutine BEGIN: called CC=1 SCAR=0.0
8 9 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
9 9 $VERSION='2.29'; # version template
10 }
11 9 ▶no warnings 'uninitialized';
Subroutine BEGIN: called CC=1 SCAR=0.0
12 9 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 9 ▶use Treex::PML::Schema::Constants;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 9 ▶use base qw( Treex::PML::Schema::Decl );
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 =head1 NAME
17  
18 Treex::PML::Schema::Root - implements root PML-schema declaration
19  
20 =head1 INHERITANCE
21  
22 This class inherits from L<Treex::PML::Schema::Decl>.
23  
24 =head1 METHODS
25  
26 See the super-class for the complete list.
27  
28 =over 3
29  
30 =item $decl->is_root ()
31  
32 Returns 1.
33  
34 =item $decl->get_name ()
35  
36 Returns the declared PML root-element name.
37  
38 =item $decl->get_decl_type ()
39  
40 Returns the constant PML_ROOT_DECL.
41  
42 =item $decl->get_decl_type_str ()
43  
44 Returns the string 'root'.
45  
46 =item $decl->get_content_decl ()
47  
48 Returns declaration of the content type.
49  
50 =cut
51  
52 0 ▶sub is_root { 1 }
Subroutine is_root: not called CC=1 SCAR=6.9
Pod documented
53 0 ▶sub is_atomic { undef }
Subroutine is_atomic: not called CC=1 SCAR=6.9
Pod documented
54 192 ▶sub get_decl_type { return PML_ROOT_DECL; }
Subroutine get_decl_type: called CC=1 SCAR=0.0
Pod documented
55 0 ▶sub get_decl_type_str { return 'root'; }
Subroutine get_decl_type_str: not called CC=1 SCAR=6.9
Pod documented
56 116 ▶sub get_name { return $_[0]->{name}; }
Subroutine get_name: called CC=1 SCAR=0.0
Pod documented
57 0 ▶sub validate_object {
Subroutine validate_object: not called CC=1 SCAR=6.9
Pod documented
58 0 my $self = shift;
59 0 $self->get_content_decl->validate_object(@_);
60 }
61  
62 =back
63  
64 =cut
65  
66  
67 9 1;
68  
69 =head1 SEE ALSO
70  
71 L<Treex::PML::Schema::Decl>, L<Treex::PML::Schema>, L<Treex::PML::Instance>.
72  
73 =head1 COPYRIGHT AND LICENSE
74  
75 Copyright (C) 2008-2010 by Petr Pajas, 2010-2024 Jan Stepanek
76  
77 This library is free software; you can redistribute it and/or modify
78 it under the same terms as Perl itself, either Perl version 5.8.2 or,
79 at your option, any later version of Perl 5 you may have available.
80  
81 =head1 BUGS
82  
83 None reported... yet.
84  
85 =cut
86  
« PML/StandardFactory.pm ↑ Summary PML/Seq/Element.pm »