BioMart::Configuration
AttributeTree
Toolbar
Summary
BioMart::Configuration::AttributeTree
Package variables
No package variables defined.
Inherit
Synopsis
Holds a List of BioMart::AttributeGroup objects.
Description
Object to further define the Attributes available to the User Interface by
a Dataset. Holds a list of one or more BioMart::AttributeGroup objects.
Methods
Methods description
Usage : $at->addAttributeGroup($ag); Description: adds an AttributeGroup to this AttributeTree. The order of addition of each AttributeGroup is maintained. Returntype : na Exceptions : none Caller : caller |
Usage : Arg [1] - (optional) string $description Description: get/set for description Returntype : string Exceptions : none Caller : general |
Usage : Arg [1] - (optional) string $display_name Description: get/set for display name Returntype : string Exceptions : none Caller : general |
Usage : my $groups = $at->getAllAttributeGroups; foreach my $group (@{$groups}) { ... } Description : Returns a list_ref of all AttributeGroups held in this AttributeTree. Returntype : list_ref of BioMart::AttributeGroup objects Exceptions : none Caller : caller |
Usage : my $att = $at->getAttributeByName($name); Description : Get a specific BioMart::Attribute object named by $name. May return undef if no object is contained within this AttributeTree with the given name. Returntype : BioMart::Attribute or undef if none found with given name Exceptions : none Caller : caller |
Usage : my $att = $at->getAttributeByNameKey($name,$key); Description : Get a specific BioMart::Attribute object named by $name, $key. May return undef if no object is contained within this AttributeTree with the given name and key. Returntype : BioMart::Attribute or undef if none found with given name Exceptions : none Caller : caller |
Usage : my $ag = $at->getAttributeGroupByName($name); Description: Returns a BioMart::AttributeGroup object from this BioMart::AttributeTree object, named by the given name. If no object exists in this tree named by the given name, this method returns undef. Returntype : BioMart::AttributeGroup or undef if none found with given name. Exceptions : none Caller : caller |
Usage : my $filt = $filt->getFilterByName($name); Description : Get a specific BioMart::Filter object named by $name. May return undef if no object is contained within this AttributerTree with the given name. Returntype : BioMart::Filter or undef if none found with given name Exceptions : none Caller : caller |
Usage : Arg [1] - (optional) string $hideDisplay Description: get/set for hideDisplay toggle Returntype : string Exceptions : none Caller : general |
Usage : Arg [1] - stores maximum number of groups Description: get/set for maxSelect Returntype : number Exceptions : none Caller : general |
Usage : my $name = $att->name(); $att->name($newname); Description: sets/gets the name of the AttributeTree Returntype : string name Exceptions : none Caller : caller |
Usage : Arg [1] - (optional) string $outFormats Description: get/set for outFormats toggle Returntype : string Exceptions : none Caller : general |
Methods code
sub _new
{ my ($self, @param) = @_;
$self->SUPER::_new(@param);
$self->addParams(TITLES, @param);
$self->attr('attGs', []); } |
sub addAttributeGroup
{ my ($self, $attGroup) = @_;
my $attGs = $self->get('attGs');
push @{$attGs}, $attGroup; } |
sub description
{ my ($self, $value) = @_;
if ($value){
$self->setParam(DESCRIPTION, $value);
}
return $self->getParam(DESCRIPTION); } |
sub displayName
{ my ($self, $value) = @_;
if ($value){
$self->setParam(DISPLAYNAME, $value);
}
return $self->getParam(DISPLAYNAME); } |
sub getAllAttributeGroups
{ my $self = shift;
return $self->get('attGs'); } |
sub getAttributeByName
{ my ($self, $name) = @_;
my $retAtt;
my $attGs = $self->get('attGs');
GROUP: foreach my $attG (@{$attGs}) {
my $attColls = $attG->getAllCollections;
foreach my $attCol (@{$attColls}) {
my $atts = $attCol->getAllAttributes;
foreach my $att (@{$atts}) {
next if (!defined($att));
if ($att->name eq $name) {
$retAtt = $att;
last GROUP;
}
}
}
}
return $retAtt; } |
sub getAttributeByNameKey
{ my ($self, $name, $key) = @_;
my $retAtt;
my $attGs = $self->get('attGs');
GROUP: foreach my $attG (@{$attGs}) {
my $attColls = $attG->getAllCollections;
foreach my $attCol (@{$attColls}) {
my $atts = $attCol->getAllAttributes;
foreach my $att (@{$atts}) {
next if (!defined($att));
if ($att->name eq $name) {
if ($att->key){
$retAtt = $att if ($att->key eq $key);
}
else{
$retAtt = $att;
}
last GROUP;
}
}
}
}
return $retAtt;
}
1; } |
sub getAttributeGroupByName
{ my ($self, $name) = @_;
my $retGroup;
my $attGs = $self->get('attGs');
foreach my $attG (@{$attGs}) {
if ($attG->name() eq $name) {
$retGroup = $attG;
last;
}
}
return $retGroup; } |
sub getFilterByName
{ my ($self, $name) = @_;
my $retFilt;
my $attGs = $self->get('attGs');
GROUP: foreach my $attG (@{$attGs}) {
my $attColls = $attG->getAllCollections;
foreach my $attCol (@{$attColls}) {
my $filts = $attCol->getAllAttributes;
foreach my $filt (@{$filts}) {
if ($filt->name eq $name) {
$retFilt = $filt;
last GROUP;
}
}
}
}
return $retFilt; } |
sub hideDisplay
{ my ($self, $value) = @_;
if ($value){
$self->setParam(HIDEDISPLAY, $value);
}
return $self->getParam(HIDEDISPLAY); } |
sub maxSelect
{
my ($self, $value) = @_;
if ($value){
$self->setParam(MAXSELECT, $value);
}
return $self->getParam(MAXSELECT); } |
sub name
{ my ($self, $newName) = @_;
if ($newName) {
$self->setParam(NAMEKEY, $newName);
}
return $self->getParam(NAMEKEY); } |
sub outFormats
{ my ($self, $value) = @_;
if ($value){
$self->setParam(OUTFORMATS, $value);
}
return $self->getParam(OUTFORMATS); } |
General documentation
AUTHOR - Arek Kasprzyk, Syed Haider, Richard Holland, Darin London, Damian Smedley | Top |