| 1 | #!/usr/bin/env perl | ||
| 2 | package OWL::Simple::Class; | ||
| 3 | |||
| 4 | 1 | ▶ | use Moose 0.89; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | =head1 NAME | ||
| 7 | |||
| 8 | OWL::Simple::Class | ||
| 9 | |||
| 10 | =head1 DESCRIPTION | ||
| 11 | |||
| 12 | Helper class to store information for a single owl:Class parsed by | ||
| 13 | the OWL::Simple::Parser. Not to be used directly. | ||
| 14 | |||
| 15 | Public properties label, id, synonyms, definition and subClassOf return | ||
| 16 | array references. | ||
| 17 | |||
| 18 | =head1 AUTHOR | ||
| 19 | |||
| 20 | Tomasz Adamusiak <tomasz@cpan.org> | ||
| 21 | |||
| 22 | =head1 COPYRIGHT AND LICENSE | ||
| 23 | |||
| 24 | Copyright (c) 2010 European Bioinformatics Institute. All Rights Reserved. | ||
| 25 | |||
| 26 | This module is free software; you can redistribute it and/or modify it | ||
| 27 | under GPLv3. | ||
| 28 | |||
| 29 | This software is provided "as is" without warranty of any kind. | ||
| 30 | |||
| 31 | =cut | ||
| 32 | |||
| 33 | 1 | our $VERSION = 0.05; | |
| 34 | |||
| 35 | 1 | has 'label' => ( is => 'rw', isa => 'Str' ); | |
| 36 | 0 | ▶ | has 'synonyms' => ( is => 'ro', isa => 'ArrayRef', default => sub { [] } ); |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 37 | 0 | ▶ | has 'definitions' => ( is => 'ro', isa => 'ArrayRef', default => sub { [] } ); |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 38 | 1 | has 'annotation' => ( is => 'rw', isa => 'Str', default => ''); | |
| 39 | 0 | ▶ | has 'xrefs' => ( is => 'ro', isa => 'ArrayRef', default => sub { [] } ); |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 40 | 0 | ▶ | has 'subClassOf' => ( is => 'ro', isa => 'ArrayRef', default => sub { [] } ); |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 41 | 0 | ▶ | has 'part_of' => ( is => 'ro', isa => 'ArrayRef', default => sub { [] } ); |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 42 | has 'id' => ( | ||
| 43 | is => 'rw', | ||
| 44 | isa => 'Str', | ||
| 45 | 0 | ▶ | trigger => sub { |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 46 | 0 | my ( $self, $id ) = @_; | |
| 47 | 0 | $self->{id} =~ s!http://www.ebi.ac.uk/efo/!!; # strip the efo namespace from id | |
| 48 | } | ||
| 49 | 1 | ); | |
| 50 | |||
| 51 | 1 | 1; | |