line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lingua::Ogmios::Annotations::AnaphoraRelation; |
2
|
|
|
|
|
|
|
|
3
|
16
|
|
|
16
|
|
74
|
use strict; |
|
16
|
|
|
|
|
29
|
|
|
16
|
|
|
|
|
6201
|
|
4
|
16
|
|
|
16
|
|
78
|
use warnings; |
|
16
|
|
|
|
|
269
|
|
|
16
|
|
|
|
|
1063
|
|
5
|
|
|
|
|
|
|
|
6
|
16
|
|
|
16
|
|
325
|
use Lingua::Ogmios::Annotations::Element; |
|
16
|
|
|
|
|
29
|
|
|
16
|
|
|
|
|
15414
|
|
7
|
|
|
|
|
|
|
our @ISA = qw(Lingua::Ogmios::Annotations::Element); |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# |
10
|
|
|
|
|
|
|
# |
11
|
|
|
|
|
|
|
# |
12
|
|
|
|
|
|
|
#
|
13
|
|
|
|
|
|
|
# (log_id?, comments*, |
14
|
|
|
|
|
|
|
# anaphora_relation+) > |
15
|
|
|
|
|
|
|
# |
16
|
|
|
|
|
|
|
#
|
17
|
|
|
|
|
|
|
# (id, log_id?, |
18
|
|
|
|
|
|
|
# anaphora_relation_type, |
19
|
|
|
|
|
|
|
# anaphora, antecedent) > |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# |
22
|
|
|
|
|
|
|
#
|
23
|
|
|
|
|
|
|
# (refid_semantic_unit) > |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
# |
27
|
|
|
|
|
|
|
#
|
28
|
|
|
|
|
|
|
# (#PCDATA) > |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub new { |
31
|
0
|
|
|
0
|
0
|
|
my ($class, $fields) = @_; |
32
|
|
|
|
|
|
|
|
33
|
0
|
0
|
|
|
|
|
if (!defined $fields->{'id'}) { |
34
|
0
|
|
|
|
|
|
$fields->{'id'} = -1; |
35
|
|
|
|
|
|
|
} |
36
|
0
|
0
|
|
|
|
|
if (!defined $fields->{'anaphora_relation_type'}) { |
37
|
0
|
|
|
|
|
|
die("anaphora_relation_type is not defined"); |
38
|
|
|
|
|
|
|
} |
39
|
0
|
0
|
|
|
|
|
if (!defined $fields->{'anaphora'}) { |
40
|
0
|
|
|
|
|
|
die("anaphora is not defined"); |
41
|
|
|
|
|
|
|
} |
42
|
0
|
0
|
|
|
|
|
if (!defined $fields->{'antecedent'}) { |
43
|
0
|
|
|
|
|
|
die("antecedent is not defined"); |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
my $anaphorarelation = $class->SUPER::new({ |
46
|
0
|
|
|
|
|
|
'id' => $fields->{'id'}, |
47
|
|
|
|
|
|
|
# 'form' => $fields->{'form'}, |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
); |
50
|
0
|
|
|
|
|
|
bless ($anaphorarelation,$class); |
51
|
|
|
|
|
|
|
|
52
|
0
|
|
|
|
|
|
$anaphorarelation->anaphora_relation_type($fields->{'domain_specific_relation_type'}); |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
# $anaphorarelation->list_refid_semantic_unit($fields->{'list_refid_semantic_unit'}); |
55
|
|
|
|
|
|
|
|
56
|
0
|
0
|
|
|
|
|
if (defined $fields->{'log_id'}) { |
57
|
0
|
|
|
|
|
|
$anaphorarelation->setLogId($fields->{'log_id'}); |
58
|
|
|
|
|
|
|
} |
59
|
0
|
|
|
|
|
|
return($anaphorarelation); |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
sub anaphora { |
63
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
64
|
|
|
|
|
|
|
|
65
|
0
|
0
|
|
|
|
|
if (@_) { |
66
|
0
|
|
|
|
|
|
$self->{anaphora}->{'reference'} = 'refid_semantic_unit'; |
67
|
0
|
|
|
|
|
|
$self->{anaphora}->{$self->{'reference'}} = shift; |
68
|
|
|
|
|
|
|
} |
69
|
0
|
|
|
|
|
|
return($self->{anaphora}->{$self->{'reference'}}); |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
sub list_refid_semantic_unit { |
74
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
75
|
|
|
|
|
|
|
|
76
|
0
|
|
|
|
|
|
my $ref; |
77
|
|
|
|
|
|
|
my $elt; |
78
|
|
|
|
|
|
|
|
79
|
0
|
0
|
|
|
|
|
if (@_) { |
80
|
0
|
|
|
|
|
|
$self->{antecedent}->{'reference'} = 'list_refid_semantic_unit'; |
81
|
0
|
|
|
|
|
|
$self->{antecedent}->{$self->{'reference'}} = []; |
82
|
0
|
|
|
|
|
|
$ref = shift; |
83
|
0
|
|
|
|
|
|
foreach $elt (@$ref) { |
84
|
0
|
|
|
|
|
|
push @{$self->{antecedent}->{$self->{'reference'}}}, $elt; |
|
0
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
} |
86
|
|
|
|
|
|
|
} |
87
|
0
|
|
|
|
|
|
return($self->{antecedent}->{$self->{'reference'}}); |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
} |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
sub anaphora_relation_type { |
92
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
93
|
|
|
|
|
|
|
|
94
|
0
|
0
|
|
|
|
|
$self->{'anaphora_relation_type'} = shift if @_; |
95
|
0
|
|
|
|
|
|
return($self->{'anaphora_relation_type'}); |
96
|
|
|
|
|
|
|
} |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
sub XMLout { |
99
|
0
|
|
|
0
|
0
|
|
my ($self, $order) = @_; |
100
|
|
|
|
|
|
|
|
101
|
0
|
|
|
|
|
|
return($self->SUPER::XMLout("anaphora_relation", $order)); |
102
|
|
|
|
|
|
|
} |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
1; |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
__END__ |