line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package XML::NewsML_G2::Location; |
2
|
|
|
|
|
|
|
|
3
|
18
|
|
|
18
|
|
123
|
use Moose; |
|
18
|
|
|
|
|
43
|
|
|
18
|
|
|
|
|
114
|
|
4
|
18
|
|
|
18
|
|
76832
|
use namespace::autoclean; |
|
18
|
|
|
|
|
48
|
|
|
18
|
|
|
|
|
129
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
with 'XML::NewsML_G2::Role::HasQCode'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
has 'relevance', isa => 'Int', is => 'ro'; |
9
|
|
|
|
|
|
|
has 'parent', isa => __PACKAGE__, is => 'rw'; |
10
|
|
|
|
|
|
|
has 'direct', isa => 'Bool', is => 'rw', default => ''; |
11
|
|
|
|
|
|
|
has 'iso_code', isa => 'Str', is => 'rw'; |
12
|
|
|
|
|
|
|
has 'longitude', isa => 'Num', is => 'rw'; |
13
|
|
|
|
|
|
|
has 'latitude', isa => 'Num', is => 'rw'; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
1; |
18
|
|
|
|
|
|
|
__END__ |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 NAME |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
XML::NewsML_G2::Location - a location (city, region, country, ...) |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 SYNOPSIS |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
my $at = XML::NewsML_G2::Location->new |
27
|
|
|
|
|
|
|
(name => 'Austria', qcode => 'at', relevance => 90, iso_code => 'AT'); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
my $vie = XML::NewsML_G2::Location->new |
30
|
|
|
|
|
|
|
(name => 'Vienna', qcode => 'vie', relevance => 100, parent => $at); |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=over 4 |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=item relevance |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
Value (0..100) specifying how relevant the location is for the news item |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=item parent |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
points to the broader location (e.g., the city's country) |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=item direct |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
whether the location has been manually specified by the editor |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=item iso_code |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
for countries, the code in the ISO 3166-1a2 vocabulary - see |
51
|
|
|
|
|
|
|
L<http://www.iso.org/iso/home/standards/country_codes/country_names_and_code_elements.htm> |
52
|
|
|
|
|
|
|
for a reference |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=back |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 AUTHOR |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
Philipp Gortan C<< <philipp.gortan@apa.at> >> |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 LICENCE AND COPYRIGHT |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Copyright (c) 2013-2014, APA-IT. All rights reserved. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
See L<XML::NewsML_G2> for the license. |