line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Geo::GoogleEarth::Pluggable::NetworkLink; |
2
|
1
|
|
|
1
|
|
1364
|
use base qw{Geo::GoogleEarth::Pluggable::Base}; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
85
|
|
3
|
1
|
|
|
1
|
|
565
|
use XML::LibXML::LazyBuilder qw{E}; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
use warnings; |
5
|
|
|
|
|
|
|
use strict; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION='0.14'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
Geo::GoogleEarth::Pluggable::NetworkLink - Geo::GoogleEarth::Pluggable::NetworkLink |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 SYNOPSIS |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
use Geo::GoogleEarth::Pluggable; |
16
|
|
|
|
|
|
|
my $document=Geo::GoogleEarth::Pluggable->new; |
17
|
|
|
|
|
|
|
$document->NetworkLink(url=>"./anotherdocument.cgi"); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 DESCRIPTION |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
Geo::GoogleEarth::Pluggable::NetworkLink is a L with a few other methods. |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 USAGE |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
my $networklink=$document->NetworkLink(name=>"My NetworkLink", |
26
|
|
|
|
|
|
|
url=>"./anotherdocument.cgi"); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head2 type |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Returns the object type. |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
my $type=$networklink->type; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=cut |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub type {"NetworkLink"}; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head2 node |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=cut |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub node { |
43
|
|
|
|
|
|
|
my $self=shift; |
44
|
|
|
|
|
|
|
my @element=(E(Snippet=>{maxLines=>scalar(@{$self->Snippet})}, join("\n", @{$self->Snippet}))); |
45
|
|
|
|
|
|
|
my @link=(); |
46
|
|
|
|
|
|
|
my %link=map {$_=>1} qw{href refreshMode refreshInterval viewRefreshMode viewRefreshTime viewBoundScale viewFormat httpQuery}; |
47
|
|
|
|
|
|
|
foreach my $key (keys %$self) { |
48
|
|
|
|
|
|
|
next if $key eq "Snippet"; |
49
|
|
|
|
|
|
|
if ($key eq "url") { |
50
|
|
|
|
|
|
|
push @link, E(href=>{}, $self->url); |
51
|
|
|
|
|
|
|
} elsif(exists $link{$key}) { #these go in the Link element |
52
|
|
|
|
|
|
|
push @link, E($key=>{}, $self->{$key}) unless ref($self->{$key}); |
53
|
|
|
|
|
|
|
} else { |
54
|
|
|
|
|
|
|
push @element, E($key=>{}, $self->{$key}) unless ref($self->{$key}); |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
push @element, E(Link=>{}, @link) if @link; |
58
|
|
|
|
|
|
|
return E(NetworkLink=>{}, @element); |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head2 url |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
Sets or returns the Uniform Resource Locator (URL) for the NetworkLink |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
my $url=$networklink->url; |
66
|
|
|
|
|
|
|
$networklink->url("./newdoc.cgi"); |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=cut |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
sub url { |
71
|
|
|
|
|
|
|
my $self=shift(); |
72
|
|
|
|
|
|
|
if (@_) { |
73
|
|
|
|
|
|
|
$self->{'url'}=shift(); |
74
|
|
|
|
|
|
|
} |
75
|
|
|
|
|
|
|
return defined($self->{'url'}) ? $self->{'url'} : 'http://localhost/'; |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 BUGS |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Please log on RT and send to the geo-perl email list. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 SUPPORT |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
DavisNetworks.com supports all Perl applications including this package. |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head1 AUTHOR |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
Michael R. Davis (mrdvt92) |
89
|
|
|
|
|
|
|
CPAN ID: MRDVT |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head1 COPYRIGHT |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
This program is free software licensed under the... |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
The BSD License |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
The full text of the license can be found in the LICENSE file included with this module. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 SEE ALSO |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
L creates a GoogleEarth Document. |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=cut |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
1; |