BioMart::Configuration Attribute
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
BioMart::Configuration::Attribute
Package variables
No package variables defined.
Included modules
Data::Dumper
Digest::MD5
Inherit
BioMart::Root
Synopsis
Represents an attribute in a BioMart query
Description
Attribute objects model the concept of a BioMart attribute ie a column in a
mart ResultTable that can be requested as part of a mart query.
Methods
_hashCode
No description
Code
_newDescriptionCode
addDependencyDescriptionCode
attributesDescriptionCode
dataSetNameDescriptionCode
datasetLinkDescriptionCode
defaultDescriptionCode
dependenciesDescriptionCode
dependsOnDescriptionCode
dependsOnTypeDescriptionCode
descriptionDescriptionCode
displayNameDescriptionCode
imageURLDescriptionCode
interfaceDescriptionCode
keyDescriptionCode
linkDescriptionCode
nameDescriptionCode
pointedFromAttributeDescriptionCode
pointedFromDatasetDescriptionCode
pointedFromInterfaceDescriptionCode
relationalAttributeDescriptionCode
tableDescriptionCode
toSQLDescriptionCode
widthDescriptionCode
Methods description
_newcode    nextTop
  Usage      : minimal (use setters for name, displayName, etc:
my $att = BioMart::Configuration::Attribute->new;
fully configured: my $att = BioMart::Configuration::Attribute->new( 'name' => $name, 'displayName' => $dname, 'table' => $table, 'relational_attribute' => $rattribute, 'dataSetName' => $subname ); Description: creates a new Attribute object. Returntype : BioMart::Configuration::Attribute Exceptions : insufficient arguments Caller : general
addDependencycodeprevnextTop
  Usage      : usage
Description: Description
Returntype :
Exceptions : none
Caller : caller
attributescodeprevnextTop
  Usage      : Arg [1] - (optional) string $attributes
Description: get/set for attributes.
Returntype : string
Exceptions : none
Caller : general
dataSetNamecodeprevnextTop
  Usage      : my $subName = $att->dataSetName; $att->dataSetName->($newName);
Description: get/set for the name of the dataSet which hosts this attribute.
Returntype : scalar $name
Exceptions : none
Caller : general
datasetLinkcodeprevnextTop
  Usage      : Arg [1] - (optional) string $datasetLink
Description: get/set for datasetLink
Returntype : string
Exceptions : none
Caller : general
defaultcodeprevnextTop
  Usage      : Arg [1] - (optional) string $default
Description: get/set for default atribute(s) for a dataset
Returntype : string
Exceptions : none
Caller : general
dependenciescodeprevnextTop
  Usage      : usage
Description: Description
Returntype :
Exceptions : none
Caller : caller
dependsOncodeprevnextTop
  Usage      : Arg [1] - (optional) string $dependsOn delimited by commas
Description: get/set for dependsOn atribute(s) for a dataset
Returntype : string
Exceptions : none
Caller : general
dependsOnTypecodeprevnextTop
  Usage      : Arg [1] - (optional) string $dependsOnType
Description: get/set for dependsOnType - all or any are acceptable.
Returntype : string
Exceptions : none
Caller : general
descriptioncodeprevnextTop
  Usage      : Arg [1] - (optional) string $description
Description: get/set for description
Returntype : string
Exceptions : none
Caller : general
displayNamecodeprevnextTop
  Usage      : Arg [1] - (optional) string $display_name
Description: get/set for display name
Returntype : string
Exceptions : none
Caller : general
imageURLcodeprevnextTop
  Usage      : Arg [1] - (optional) string $imageURL
Description: get/set for imageURL, a relative URL.
This is only used by MartView.
Returntype : string
Exceptions : none
Caller : general
interfacecodeprevnextTop
  Usage      : my $interface = $att->interface; $att->interface->($newName);
Description: get/set for the name of the interface which
hosts this attribute.
Returntype : scalar $name
Exceptions : none
Caller : general
keycodeprevnextTop
  Usage      : Arg [1] - (optional) string $key for table joining
Description: get/set for key
Returntype : string
Exceptions : none
Caller : general
linkcodeprevnextTop
  Usage      : Arg [1] - (optional) string $link for URL display
Description: get/set for linkURL
Returntype : string
Exceptions : none
Caller : general
namecodeprevnextTop
  Usage      : my $attName = $att->name; $att->name($newName);
Description: get/set for internal name
Returntype : scalar $name
Exceptions : none
Caller : general
pointedFromAttributecodeprevnextTop
  Usage      : Arg [1] - (optional) string $pointedFromDataset
Description: get/set for pointedFromDataset atribute(s) for a dataset
Returntype : string
Exceptions : none
Caller : general
pointedFromDatasetcodeprevnextTop
  Usage      : Arg [1] - (optional) string $pointedFromDataset
Description: get/set for pointedFromDataset atribute(s) for a dataset
Returntype : string
Exceptions : none
Caller : general
pointedFromInterfacecodeprevnextTop
  Usage      : Arg [1] - (optional) string $pointedFromInterface
Description: get/set for pointedFromInterface atribute(s) for a dataset
Returntype : string
Exceptions : none
Caller : general
relationalAttributecodeprevnextTop
  Usage      : Arg [1] - (optional) string $relational_attribute
Description: get/set for relational attribute
Returntype : string
Exceptions : none
Caller : general
tablecodeprevnextTop
  Usage      : Arg [1] - (optional) string $table
Description: get/set for table
Returntype : string
Exceptions : none
Caller : general
toSQLcodeprevnextTop
  Usage      : no arguments
Description: returns the SQL stub for the attribute (ie)
table.column
Returntype : string
Exceptions : none
Caller : general
widthcodeprevnextTop
  Usage      : Arg [1] - (optional) string $width for table joining
Description: get/set for width
Returntype : string
Exceptions : none
Caller : general
Methods code
_hashCodedescriptionprevnextTop
sub _hashCode {
  my $self = shift;

  my $digest = Digest::MD5->new;
  
  # Get uninitialized value in subroutine entry warnings whenever one of 
# the below params has been set from an XML::Simple hash ie dataSetName
# is always OK
# investigate keyAttrs setting in XMLIn
$digest->add($self->name) if ($self->name); $digest->add($self->displayName) if ($self->displayName); $digest->add($self->dataSetName) if ($self->dataSetName); $digest->add($self->table) if ($self->table); $digest->add($self->relationalAttribute) if ($self->relationalAttribute); $digest->add($self->key) if ($self->key); return $digest->hexdigest; } 1;
}
_newdescriptionprevnextTop
sub _new {
  
  my ($self, @param) = @_;

  $self->SUPER::_new(@param);
  $self->addParams(TITLES, @param);
  $self->attr('dependency', []);
}

#non interface Methods
}
addDependencydescriptionprevnextTop
sub addDependency {
  my ($self, $resolvedDependency) = @_;

  push @{$self->get('dependency')}, $resolvedDependency;
}
attributesdescriptionprevnextTop
sub attributes {
  # stores display name
my ($self, $value) = @_; if ($value){ $self->setParam(ATTRIBUTES, $value); } return $self->getParam(ATTRIBUTES);
}
dataSetNamedescriptionprevnextTop
sub dataSetName {
  my ($self, $value) = @_;
  
  if ($value){
      $self->setParam(DATASETNAME, $value);
  }
  return $self->getParam(DATASETNAME);
}
datasetLinkdescriptionprevnextTop
sub datasetLink {
  my ($self, $value) = @_;
  
  if ($value){
    $self->setParam(DATASETLINK, $value);
  }
  return $self->getParam(DATASETLINK);
}
defaultdescriptionprevnextTop
sub default {
  my ($self, $value) = @_;
  
  if ($value){
    $self->setParam(DEFAULT, $value);
  }
  return $self->getParam(DEFAULT);
}
dependenciesdescriptionprevnextTop
sub dependencies {
  my $self = shift;

  return $self->get('dependency');
}
dependsOndescriptionprevnextTop
sub dependsOn {
  my ($self, $value) = @_;
  
  if ($value){
    $self->setParam(DEPENDSON, $value);    
  }
  return $self->getParam(DEPENDSON);
}
dependsOnTypedescriptionprevnextTop
sub dependsOnType {
  my ($self, $value) = @_;
  
  if ($value){
    $self->setParam(DEPENDSONTYPE, $value);
  }
  return $self->getParam(DEPENDSONTYPE);
}
descriptiondescriptionprevnextTop
sub description {
  # stores description
my ($self, $value) = @_; if ($value){ $self->setParam(DESCRIPTION, $value); } return $self->getParam(DESCRIPTION);
}
displayNamedescriptionprevnextTop
sub displayName {
  my ($self, $value) = @_;
  
if ($value){
    $self->setParam(DISPLAYNAME, $value);
  }
  return $self->getParam(DISPLAYNAME);
}
imageURLdescriptionprevnextTop
sub imageURL {
  # stores display name
my ($self, $value) = @_; if ($value){ $self->setParam(IMAGEURL, $value); } return $self->getParam(IMAGEURL);
}
interfacedescriptionprevnextTop
sub interface {
  my ($self, $value) = @_;

  if ($value){
      $self->setParam(INTERFACE, $value);
  }
  return $self->getParam(INTERFACE);
}
keydescriptionprevnextTop
sub key {
  my ($self, $value) = @_;
  
  if ($value){
    $self->setParam(KEY, $value);
  }
  return $self->getParam(KEY);
}
linkdescriptionprevnextTop
sub link {
  my ($self, $value) = @_;
 
  if ($value){
    $self->setParam(LINK, $value);
  }
  return $self->getParam(LINK);
}
namedescriptionprevnextTop
sub name {
  my ($self, $value) = @_;

  if ($value){
      $self->setParam(NAME, $value);
  }
  return $self->getParam(NAME);
}
pointedFromAttributedescriptionprevnextTop
sub pointedFromAttribute {
  my ($self, $value) = @_;
  
  if ($value){
    $self->setParam(POINTEDFROMATTRIBUTE, $value);
  }
  return $self->getParam(POINTEDFROMATTRIBUTE);
}
pointedFromDatasetdescriptionprevnextTop
sub pointedFromDataset {
  my ($self, $value) = @_;
  
  if ($value){
    $self->setParam(POINTEDFROMDATASET, $value);
  }
  return $self->getParam(POINTEDFROMDATASET);
}
pointedFromInterfacedescriptionprevnextTop
sub pointedFromInterface {
  my ($self, $value) = @_;
  
  if ($value){
    $self->setParam(POINTEDFROMINTERFACE, $value);
  }
  return $self->getParam(POINTEDFROMINTERFACE);
}
relationalAttributedescriptionprevnextTop
sub relationalAttribute {
  my ($self, $value) = @_;

  if ($value){
    $self->setParam(RELATIONALATTRIBUTE, $value);
  }
  return $self->getParam(RELATIONALATTRIBUTE);
}
tabledescriptionprevnextTop
sub table {
  my ($self, $value) = @_;
  
  if ($value){
      $self->setParam(TABLE, $value);
  }
  return $self->getParam(TABLE);
}
toSQLdescriptionprevnextTop
sub toSQL {
  my $self = shift;
  
  return $self->getParam(TABLE).'.'.$self->getParam(RELATIONALATTRIBUTE);
}
widthdescriptionprevnextTop
sub width {
  my ($self, $value) = @_;

  if ($value){
    $self->setParam(WIDTH, $value);
  }
  return $self->getParam(WIDTH);
}
General documentation
AUTHOR - Arek Kasprzyk, Syed Haider, Richard Holland, 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