ensembl-hive  2.6
ResourceClass.pm
Go to the documentation of this file.
1 =pod
2 
3 =head1 NAME
4 
6 
7 =head1 DESCRIPTION
8 
9  A data container object (the only methods are getters/setters) that corresponds to a row in 'resource_class' table
10 
11 =head1 LICENSE
12 
13  Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
14  Copyright [2016-2024] EMBL-European Bioinformatics Institute
15 
16  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
17  You may obtain a copy of the License at
18 
19  http://www.apache.org/licenses/LICENSE-2.0
20 
21  Unless required by applicable law or agreed to in writing, software distributed under the License
22  is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23  See the License for the specific language governing permissions and limitations under the License.
24 
25 =head1 CONTACT
26 
27  Please subscribe to the Hive mailing list: http://listserver.ebi.ac.uk/mailman/listinfo/ehive-users to discuss Hive-related questions or to be notified of our updates
28 
29 =cut
30 
31 
32 package Bio::EnsEMBL::Hive::ResourceClass;
33 
34 use strict;
35 use warnings;
36 
37 use base ( 'Bio::EnsEMBL::Hive::Storable' );
38 
39 
40 sub unikey { # override the default from Cacheable parent
41  return [ 'name' ];
42 }
43 
44 
45 sub name {
46  my $self = shift @_;
47 
48  if(@_) {
49  $self->{'_name'} = shift @_;
50  }
51  return $self->{'_name'};
52 }
53 
54 
55 sub display_name {
56  my ($self) = @_;
57  return $self->name;
58 }
59 
60 
61 sub toString {
62  my $self = shift @_;
63 
64  return 'ResourceClass['.($self->dbID // '').']: '.$self->name;
65 }
66 
67 1;
68 
Bio::EnsEMBL::Hive::ResourceClass
Definition: ResourceClass.pm:9
Bio::EnsEMBL::Hive::Version
Definition: Version.pm:19
Bio::EnsEMBL::Hive::Cacheable
Definition: Cacheable.pm:6
Bio::EnsEMBL::Hive
Definition: Hive.pm:38