Bio::EnsEMBL Attribute
SummaryPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
Bio::EnsEMBL::Attribute - A generic Attribute class.
Package variables
No package variables defined.
Included modules
Bio::EnsEMBL::Utils::Argument qw ( rearrange )
Synopsis
  use Bio::EnsEMBL::Attribute;
my $attribute = Bio::EnsEMBL::Attribute->new (-CODE => 'myCode', -NAME => 'My Attribute', -DESCRIPTION => 'This is my attribute description.', -VALUE => '10023'); print $attrib->name(), "\n"; print $attrib->code(), "\n"; print $attrib->description(), "\n"; print $attrib->value(), "\n";
Description
This is a generic attribute class used to represent attributes
associated with seq_regions (and their Slices) and MiscFeatures.
Also see Bio::EnsEMBL::Slice, Bio::EnsEMBL::MiscFeature and
Bio::EnsEMBL::DBSQL::AttributeAdaptor.
Methods
codeDescriptionCode
descriptionDescriptionCode
nameDescriptionCode
newDescriptionCode
new_fastDescriptionCode
valueDescriptionCode
Methods description
codecode    nextTop
  Arg [1]    : string $code (optional)x
Example : $code = $attribute->code();
Description: Getter/Setter for code attribute
Returntype : string
Exceptions : none
Caller : general
Status : Stable
descriptioncodeprevnextTop
  Arg [1]    : string $description (optional)
Example : $description = $attribute->description();
Description: Getter/Setter for description attribute
Returntype : string
Exceptions : none
Caller : general
Status : Stable
namecodeprevnextTop
  Arg [1]    : string $name (optional)
Example : $name = $attribute->name();
Description: Getter/Setter for name attribute
Returntype : string
Exceptions : none
Caller : general
Status : Stable
newcodeprevnextTop
  Arg [-CODE]   : string - the code for this attribute
Arg [-NAME] : string - a human readable name for this attribute
Arg [-DESCRIPTION] : string - a description for this attribute
Arg [-VALUE] : value - the value of this attribute
Example : my $attribute = Bio::EnsEMBL::Attribute->new
(-CODE => 'myCode',
-NAME => 'My Attribute',
-DESCRIPTION => 'This is my attribute description.',
-VALUE => '10023');
Description: Constructor. Instantiates a Bio::EnsEMBL::Attribute object.
Returntype : Bio::EnsEMBL::Attribute
Exceptions : none
Caller : general
Status : Stable
new_fastcodeprevnextTop
  Arg [1]    : hashref to be blessed
Description: Construct a new Bio::EnsEMBL::Attribute using the hashref.
Exceptions : none
Returntype : Bio::EnsEMBL::Attribute
Caller : general, subclass constructors
Status : Stable
valuecodeprevnextTop
  Arg [1]    : string $value (optional)
Example : $value = $attribute->value();
Description: Getter/Setter for value attribute
Returntype : string
Exceptions : none
Caller : general
Status : Stable
Methods code
codedescriptionprevnextTop
sub code {
  my $self = shift;
  $self->{'code'} = shift if(@_);
  return $self->{'code'};
}
descriptiondescriptionprevnextTop
sub description {
  my $self = shift;
  $self->{'description'} = shift if(@_);
  return $self->{'description'};
}
namedescriptionprevnextTop
sub name {
  my $self = shift;
  $self->{'name'} = shift if(@_);
  return $self->{'name'};
}
newdescriptionprevnextTop
sub new {
  my $caller = shift;

  # allow to be called as class or object method
my $class = ref($caller) || $caller; my ($code, $name, $desc, $value) = rearrange([qw(CODE NAME DESCRIPTION VALUE)], @_); return bless {'code' => $code, 'name' => $name, 'description' => $desc, 'value' => $value}, $class;
}
new_fastdescriptionprevnextTop
sub new_fast {
  my $class = shift;
  my $hashref = shift;
  return bless $hashref, $class;
}
valuedescriptionprevnextTop
sub value {
  my $self = shift;
  $self->{'value'} = shift if(@_);
  return $self->{'value'};
}


1;
}
General documentation
CONTACTTop
This modules is part of the Ensembl project
Questions can be posted to the ensembl-dev mailing list: ensembl-dev@ebi.ac.uk