line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# Copyright (c) 2006 IBM Corporation. |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# All rights reserved. This program and the accompanying materials |
5
|
|
|
|
|
|
|
# are made available under the terms of the Eclipse Public License v1.0 |
6
|
|
|
|
|
|
|
# which accompanies this distribution, and is available at |
7
|
|
|
|
|
|
|
# http://www.eclipse.org/legal/epl-v10.html |
8
|
|
|
|
|
|
|
# |
9
|
|
|
|
|
|
|
# File: $Source: /var/lib/cvs/ODO/lib/ODO/Ontology/ObjectWriter/AccessorMethod.pm,v $ |
10
|
|
|
|
|
|
|
# Created by: Stephen Evanchik( evanchik@us.ibm.com ) |
11
|
|
|
|
|
|
|
# Created on: 11/28/2006 |
12
|
|
|
|
|
|
|
# Revision: $Id: AccessorMethod.pm,v 1.2 2009-11-25 17:58:26 ubuntu Exp $ |
13
|
|
|
|
|
|
|
# |
14
|
|
|
|
|
|
|
# Contributors: |
15
|
|
|
|
|
|
|
# IBM Corporation - initial API and implementation |
16
|
|
|
|
|
|
|
# |
17
|
|
|
|
|
|
|
package ODO::Ontology::ObjectWriter::AccessorMethod; |
18
|
|
|
|
|
|
|
|
19
|
2
|
|
|
2
|
|
13
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
59
|
|
20
|
2
|
|
|
2
|
|
12
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
49
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
12
|
use base qw/ODO::Ontology::ObjectWriter/; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
171
|
|
23
|
|
|
|
|
|
|
|
24
|
2
|
|
|
2
|
|
10
|
use vars qw /$VERSION/; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
454
|
|
25
|
|
|
|
|
|
|
$VERSION = sprintf "%d.%02d", q$Revision: 1.2 $ =~ /: (\d+)\.(\d+)/; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
our @METHODS = qw/shortName packageName/; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(@METHODS); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 NAME |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 SYNOPSIS |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 DESCRIPTION |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 METHODS |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=over |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=item serialize( [ %parameters ] ) |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=cut |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub serialize { |
48
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
49
|
|
|
|
|
|
|
|
50
|
0
|
|
|
|
|
|
my $accessor_method_data = { |
51
|
|
|
|
|
|
|
shortName=> $self->shortName(), |
52
|
|
|
|
|
|
|
packageName=> $self->packageName(), |
53
|
|
|
|
|
|
|
}; |
54
|
|
|
|
|
|
|
|
55
|
0
|
|
|
|
|
|
return $self->ODO::Ontology::ObjectWriter::serialize(template_data=> $accessor_method_data); |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
sub init { |
60
|
0
|
|
|
0
|
1
|
|
my ($self, $config) = @_; |
61
|
0
|
|
|
|
|
|
$self->SUPER::init($config); |
62
|
0
|
|
|
|
|
|
$self->params($config, @METHODS); |
63
|
0
|
|
|
|
|
|
return $self; |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=back |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 COPYRIGHT |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
Copyright (c) 2006 IBM Corporation. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
All rights reserved. This program and the accompanying materials |
73
|
|
|
|
|
|
|
are made available under the terms of the Eclipse Public License v1.0 |
74
|
|
|
|
|
|
|
which accompanies this distribution, and is available at |
75
|
|
|
|
|
|
|
http://www.eclipse.org/legal/epl-v10.html |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=cut |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
1; |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
__END__ |