BioMart::Configuration ConfigurationTree
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
BioMart::Configuration::ConfigurationTree
Package variables
No package variables defined.
Inherit
BioMart::Root
Synopsis
BioMart::Configuration::ConfigurationTree represent the whole of the
datasetConfig XML recovered from the mart database/server for a
particluar dataset
Description
BioMart::Configuration::ConfigurationTree is the top level object of
the object hierarchy representing the datasetConfig XML which describes
the attributes, filters available for each dataset.
The ConfigurationTree is a container for BioMart::Configuration::FilterTree
and BioMart::Configuration::AttributeTree objects.
Methods
_new
No description
Code
addAttributeTreeDescriptionCode
addFilterTreeDescriptionCode
dataSetNameDescriptionCode
defaultDatasetDescriptionCode
entryLabelDescriptionCode
getAllAttributeTrees
No description
Code
getAllFilterTrees
No description
Code
getAttributeByName
No description
Code
getAttributeByNameKey
No description
Code
getAttributeTreeByName
No description
Code
getFilterByName
No description
Code
getFilterTreeByName
No description
Code
getOptionByName
No description
Code
mart_UsersDescriptionCode
optionalParametersDescriptionCode
primaryKeyRestrictionDescriptionCode
software_versionDescriptionCode
toXML
No description
Code
visibleFilterPageDescriptionCode
Methods description
addAttributeTreecode    nextTop
  Usage      : $ct->addAttributeTree($atree);
Description: adds an AttributeTree to this ConfigurationTree. The
order of addition of each AttributeTree is maintained.
Returntype : na
Exceptions : none
Caller : caller
addFilterTreecodeprevnextTop
  Usage      : $ct->addFilterTree($ag);
Description: adds a FilterTree to this ConfigurationTree. The
order of addition of each FilterTree is maintained.
Returntype : na
Exceptions : none
Caller : caller
dataSetNamecodeprevnextTop
  Usage        :  my $subName = $ct->dataSetName; $ct->dataSetName($newName);
Description : Gets/Sets the name of the Dataset from which this
ConfigurationTree originates.
Returntype : scalar $name
Exceptions : none
Caller : caller
defaultDatasetcodeprevnextTop
  Usage        :  my $subName = $ct->defaultDataset; 
$ct->defaultDataset($newName);
Description : Gets/Sets the defaultDataset setting. If set to true
the the dataset using this configuration becomes the
default.
Returntype : scalar $defaultDataset
Exceptions : none
Caller : caller
entryLabelcodeprevnextTop
  Usage        :  my $subName = $ct->entryLabel; 
$ct->entryLabel($newName);
Description : Gets/Sets the entryLabel associated with this
configuration.
Returntype : entryLabel
Exceptions : none
Caller : caller
mart_UserscodeprevnextTop
  Usage        :  my $subName = $ct->mart_Users; 
$ct->mart_Users($newName);
Description : Gets/Sets the mart_Users associated with this
configuration.
Returntype : mart_Users comma separated list
Exceptions : none
Caller : caller
optionalParameterscodeprevnextTop
  Usage        :  my $subName = $ct->optionalParameters; 
$ct->optionalParameters($newName);
Description : Gets/Sets the optionalParameters associated with this
configuration. Only used for GenomicSequence processing
at the moment.
Returntype : scalar $optionalParameters
Exceptions : none
Caller : caller
primaryKeyRestrictioncodeprevnextTop
  Usage        :  my $subName = $ct->primaryKeyRestriction; 
$ct->primaryKeyRestriction($newName);
Description : Gets/Sets the primaryKeyRestriction associated with this
configuration. Can be used to restict data in the mart
available for querying by certain users
Returntype : scalar $primaryKeyRestriction
Exceptions : none
Caller : caller
software_versioncodeprevnextTop
  Usage        :  my $subName = $ct->software_version; 
$ct->software_version($newName);
Description : Gets/Sets the software_version associated with this
configuration.
Returntype : software_version
Exceptions : none
Caller : caller
visibleFilterPagecodeprevnextTop
  Usage        :  my $subName = $ct->visibleFilterPage; 
$ct->visibleFilterPage($newName);
Description : Gets/Sets the visibleFilterPage associated with this
configuration.
Returntype : scalar $visibleFilterPage
Exceptions : none
Caller : caller
Methods code
_newdescriptionprevnextTop
sub _new {
  my ($self, @param) = @_;

  $self->SUPER::_new(@param);

  $self->addParams(TITLES, @param);

  $self->attr('attTs', []);
  $self->attr('filtTs', []);
  $self->attr(OPTPARAM, undef);
  $self->attr(RESTRICTEDPARAM, undef);
  $self->attr(DEFDATASET, undef);
  $self->attr(VISIBLEFILTERPAGE, undef);
  $self->attr(MARTUSERS, 'default');
  $self->attr(SOFTWAREVERSION, undef);
  $self->attr(ENTRYLABEL, undef);
}
addAttributeTreedescriptionprevnextTop
sub addAttributeTree {
  my ($self, $attTree) = @_;

  my $attTs = $self->get('attTs');
  push @{$attTs}, $attTree;
}
addFilterTreedescriptionprevnextTop
sub addFilterTree {
  my ($self, $filtTree) = @_;

  my $filtTs = $self->get('filtTs');
  push @{$filtTs}, $filtTree;
}
dataSetNamedescriptionprevnextTop
sub dataSetName {
  my ($self, $name) = @_;

  if ($name) {
    $self->setParam(DATASETNAME, $name);
  }

  return $self->getParam(DATASETNAME);
}
defaultDatasetdescriptionprevnextTop
sub defaultDataset {
  my ($self, $param) = @_;
  if ($param) {
    $self->set(DEFDATASET, $param);
  }
  return $self->get(DEFDATASET);
}
entryLabeldescriptionprevnextTop
sub entryLabel {
  my ($self, $param) = @_;
  if ($param) {
    $self->set(ENTRYLABEL, $param);
  }
  return $self->get(ENTRYLABEL);
}
getAllAttributeTreesdescriptionprevnextTop
sub getAllAttributeTrees {
  my $self = shift;

  return $self->get('attTs');
}
getAllFilterTreesdescriptionprevnextTop
sub getAllFilterTrees {
  my $self = shift;

  return $self->get('filtTs');
}
getAttributeByNamedescriptionprevnextTop
sub getAttributeByName {
  my ($self, $name) = @_;

  my $retAtt;

  my $attTs = $self->get('attTs');
  foreach my $attT (@{$attTs}) {
    $retAtt = $attT->getAttributeByName($name);
    last if ($retAtt);
  }

  return $retAtt;
}
getAttributeByNameKeydescriptionprevnextTop
sub getAttributeByNameKey {
  my ($self, $name, $key) = @_;

  my $retAtt;

  my $attTs = $self->get('attTs');
  foreach my $attT (@{$attTs}) {
    $retAtt = $attT->getAttributeByNameKey($name,$key);
    last if ($retAtt);
  }

  return $retAtt;
}
getAttributeTreeByNamedescriptionprevnextTop
sub getAttributeTreeByName {
  my ($self, $name) = @_;

  my $retTree;

  my $attTs = $self->get('attTs');

  foreach my $attT (@{$attTs}) {
    if (($attT->name() && $name) && $attT->name() eq $name) {
      $retTree = $attT;
      last;
	}
  }

  return $retTree;
}
getFilterByNamedescriptionprevnextTop
sub getFilterByName {
  my ($self, $name) = @_;

  my $retFilt;

  my $filtTs = $self->get('filtTs');
  foreach my $filtT (@{$filtTs}) {
    $retFilt = $filtT->getFilterByName($name);
  
    unless ($retFilt) {
	#then try option
my $opt = $filtT->getOptionByName($name); if ($opt) { $retFilt = $opt->filter; } } last if ($retFilt); } return $retFilt if ($retFilt); # if not found may be a filter in an attributePage
my $attTs = $self->get('attTs'); foreach my $attT (@{$attTs}) { my $potFilt = $attT->getFilterByName($name); if ($potFilt && $potFilt->isa("BioMart::Configuration::ValueFilter")){ $retFilt = $potFilt; last; } } return $retFilt;
}
getFilterTreeByNamedescriptionprevnextTop
sub getFilterTreeByName {
  my ($self, $name) = @_;

  my $retTree;

  my $filtTs = $self->get('filtTs');

  foreach my $filtT (@{$filtTs}) {
    if ($filtT->name() eq $name) {
      $retTree = $filtT;
      last;
	}
  }

  return $retTree;
}
getOptionByNamedescriptionprevnextTop
sub getOptionByName {
  my ($self, $name) = @_;

  my $retOption;

  my $filtTs = $self->get('filtTs');
  foreach my $filtT (@{$filtTs}) {
    $retOption = $filtT->getOptionByName($name);
    last if ($retOption);
  }

  return $retOption;
}
mart_UsersdescriptionprevnextTop
sub mart_Users {
  my ($self, $param) = @_;
  if ($param) {
    $self->set(MARTUSERS, $param);
  }
  return $self->get(MARTUSERS);
}
optionalParametersdescriptionprevnextTop
sub optionalParameters {
  my ($self, $param) = @_;
  if ($param) {
    $self->set(OPTPARAM, $param);
  }
  return $self->get(OPTPARAM);
}
primaryKeyRestrictiondescriptionprevnextTop
sub primaryKeyRestriction {
  my ($self, $param) = @_;
  if ($param) {
    $self->set(RESTRICTEDPARAM, $param);
  }
  return $self->get(RESTRICTEDPARAM);
}
software_versiondescriptionprevnextTop
sub software_version {
  my ($self, $param) = @_;
  if ($param) {
    $self->set(SOFTWAREVERSION, $param);
  }
  return $self->get(SOFTWAREVERSION);
}
toXMLdescriptionprevnextTop
sub toXML {
  my ($self, $xml) = @_;

  if ($xml) {
     $self->{'datasetConfigXML'}=$xml;
  }
  return $self->{'datasetConfigXML'};
}






1;
}
visibleFilterPagedescriptionprevnextTop
sub visibleFilterPage {
  my ($self, $param) = @_;
  if ($param) {
    $self->set(VISIBLEFILTERPAGE, $param);
  }
  return $self->get(VISIBLEFILTERPAGE);
}
General documentation
AUTHOR Arek Kasprzyk, Syed Haider, Darin London, Damian SmedleyTop
CONTACTTop
This module is part of the BioMart project http://www.biomart.org
Questions can be posted to the mart-dev mailing list: mart-dev@ebi.ac.uk