Archive Ensembl HomeArchive Ensembl Home
Bio::EnsEMBL::Compara::Graph::CGObject Class Reference
Inheritance diagram for Bio::EnsEMBL::Compara::Graph::CGObject:

List of all members.


Class Summary

Description

 

Synopsis

Description

Abstract superclass to mimic some of the functionality of Foundation/NSObject
Implements a 'reference count' system based on the OpenStep retain/release design. 
Is used as the Root class for the Compara::Graph system (Node and Link) which is 
the foundation on which Compara::Graph (Node/Link) and Compara::NestedSet are built
 

Definition at line 22 of file CGObject.pm.

Available Methods

protected void _load_tags ()
public Subclass adaptor ()
public Boolean add_tag ()
public alloc ()
public void AUTOLOAD ()
public
Bio::EnsEMBL::Compara::Graph::CGObject 
copy ()
public dealloc ()
public delete_tag ()
public DESTROY ()
public Array get_all_tags ()
public ArrayRef get_all_values_for_tag ()
public Scalar get_tagvalue ()
public Hashref get_tagvalue_hash ()
public Scalar get_value_for_tag ()
public Boolean has_tag ()
public init ()
public name ()
public new ()
public obj_id ()
public refcount ()
public release ()
public retain ()
public store ()
public store_tag ()

Method Documentation

protected void Bio::EnsEMBL::Compara::Taggable::_load_tags ( ) [inherited]
  Description: loads all the tags (from the database) if possible.
               Otherwise, an empty hash is created
  Example    : $ns_node->_load_tags();
  Returntype : none
  Exceptions : none
  Caller     : internal
 
Code:
click to view
public Subclass Bio::EnsEMBL::Compara::Graph::CGObject::adaptor ( )
  Arg [1]    : (opt.) subcalss of Bio::EnsEMBL::DBSQL::BaseAdaptor
  Example    : my $object_adaptor = $object->adaptor();
  Example    : $object->adaptor($object_adaptor);
  Description: Getter/Setter for the adaptor this object uses for database
               interaction.
  Returntype : subclass of Bio::EnsEMBL::DBSQL::BaseAdaptor
  Exceptions : none
  Caller     : general
 
Code:
click to view

Reimplemented in Bio::EnsEMBL::Compara::SpeciesSet.

public Boolean Bio::EnsEMBL::Compara::Taggable::add_tag ( ) [inherited]
  Description: adds metadata tags to a node.  Both tag and value are added
               as metdata with the added ability to retreive the value given
               the tag (like a perl hash). In case of one to many relation i.e.
               one tag and different values associated with it, the values are
               returned in a array reference.
  Arg [1]    : <string> tag
  Arg [2]    : <string> value
  Arg [3]    : (optional) <int> allows overloading the tag with different values
               default is 0 (no overloading allowed, one tag points to one value)
  Example    : $ns_node->add_tag('scientific name', 'Mammalia');
               $ns_node->add_tag('lost_taxon_id', 9593, 1);
  Returntype : Boolean indicating if the tag could be added
  Exceptions : none
  Caller     : general
 
Code:
click to view
public Bio::EnsEMBL::Compara::Graph::CGObject::alloc ( )

Undocumented method

Code:
click to view
public void Bio::EnsEMBL::Compara::Taggable::AUTOLOAD ( ) [inherited]
  Description: matches the get_value_for_XXX calls to get_value_for_tag('XXX') and other calls
  Returntype : none
  Exceptions : none
  Caller     : system
 
Code:
click to view
public Bio::EnsEMBL::Compara::Graph::CGObject Bio::EnsEMBL::Compara::Graph::CGObject::copy ( )
  Overview   : copies object content but not identity
               copies tags, but not objc_id and adaptor
  Example    : my $clone = $self->copy;
  Returntype : Bio::EnsEMBL::Compara::Graph::CGObject
  Exceptions : none
  Caller     : general
 
Code:
click to view

Reimplemented in Bio::EnsEMBL::Compara::GeneTreeMember, Bio::EnsEMBL::Compara::GenomicAlignTree, Bio::EnsEMBL::Compara::Graph::Link, Bio::EnsEMBL::Compara::Graph::Node, Bio::EnsEMBL::Compara::NCBITaxon, and Bio::EnsEMBL::Compara::NestedSet.

public Bio::EnsEMBL::Compara::Graph::CGObject::dealloc ( )

Undocumented method

Code:
click to view

Reimplemented in Bio::EnsEMBL::Compara::Graph::Link, Bio::EnsEMBL::Compara::Graph::Node, Bio::EnsEMBL::Compara::NestedSet, Bio::EnsEMBL::Compara::Production::GeneSet, and Bio::EnsEMBL::Compara::Production::HomologySet.

public Bio::EnsEMBL::Compara::Taggable::delete_tag ( ) [inherited]
  Description: removes a tag from the metadata. If the value is provided, it tries
               to delete only it (if present). Otherwise, it just clears the tag,
               whatever value it was containing
  Arg [1]    : <string> tag
  Arg [2]    : (optional) <string> value
  Example    : $ns_node->remove_tag('scientific name', 'Mammalia');
               $ns_node->remove_tag('lost_taxon_id', 9593);
  Returntype : 0 if the tag couldn't be removed,
               1 if it is only in the PERL object,
               2 if it is also stored in the database
  Exceptions : none
  Caller     : general
 
Code:
click to view
public Bio::EnsEMBL::Compara::Graph::CGObject::DESTROY ( )

Undocumented method

Code:
click to view
public Array Bio::EnsEMBL::Compara::Taggable::get_all_tags ( ) [inherited]
  Description: returns an array of all the available tags
  Example    : $ns_node->get_all_tags();
  Returntype : Array
  Exceptions : none
  Caller     : general
 
Code:
click to view
public ArrayRef Bio::EnsEMBL::Compara::Taggable::get_all_values_for_tag ( ) [inherited]
  Description: returns all the values of the tag, or $default (undef
               if not provided) if the tag doesn't exist. In case of
               a single value, it is wrapped with an array
  Arg [1]    : <string> tag
  Arg [2]    : (optional) <scalar> default
  Example    : $ns_node->get_tagvalue('scientific name');
  Returntype : ArrayRef
  Exceptions : none
  Caller     : general
 
Code:
click to view
public Scalar Bio::EnsEMBL::Compara::Taggable::get_tagvalue ( ) [inherited]
  Description: returns the value(s) of the tag, or $default (undef
               if not provided) if the tag doesn't exist.
  Arg [1]    : <string> tag
  Arg [2]    : (optional) <scalar> default
  Example    : $ns_node->get_tagvalue('scientific name');
  Returntype : Scalar or ArrayRef
  Exceptions : none
  Caller     : general
 
Code:
click to view
public Hashref Bio::EnsEMBL::Compara::Taggable::get_tagvalue_hash ( ) [inherited]
  Description: returns the underlying hash that contains all
               the tags
  Example    : $ns_node->get_tagvalue_hash();
  Returntype : Hashref
  Exceptions : none
  Caller     : general
 
Code:
click to view
public Scalar Bio::EnsEMBL::Compara::Taggable::get_value_for_tag ( ) [inherited]
  Description: returns the value of the tag, or $default (undef
               if not provided) if the tag doesn't exist. In case
               of multiple values, the first one is returned.
  Arg [1]    : <string> tag
  Arg [2]    : (optional) <scalar> default
  Example    : $ns_node->get_tagvalue('scientific name');
  Returntype : Scalar
  Exceptions : none
  Caller     : general
 
Code:
click to view
public Boolean Bio::EnsEMBL::Compara::Taggable::has_tag ( ) [inherited]
  Description: indicates whether the tag exists in the metadata
  Arg [1]    : <string> tag
  Example    : $ns_node->has_tag('scientific name');
  Returntype : Boolean
  Exceptions : none
  Caller     : general
 
Code:
click to view
public Bio::EnsEMBL::Compara::Graph::CGObject::init ( )

Undocumented method

Code:
click to view

Reimplemented in Bio::EnsEMBL::Compara::Graph::Node, Bio::EnsEMBL::Compara::NestedSet, Bio::EnsEMBL::Compara::Production::GeneSet, and Bio::EnsEMBL::Compara::Production::HomologySet.

public Bio::EnsEMBL::Compara::Graph::CGObject::name ( )

Undocumented method

Code:
click to view

Reimplemented in Bio::EnsEMBL::Compara::GeneTreeMember, and Bio::EnsEMBL::Compara::GenomicAlignTree.

public Bio::EnsEMBL::Compara::Graph::CGObject::new ( )

Undocumented method

Code:
click to view

Reimplemented in Bio::EnsEMBL::Compara::Graph::Link, and Bio::EnsEMBL::Compara::SpeciesSet.

public Bio::EnsEMBL::Compara::Graph::CGObject::obj_id ( )
  Example    : my $nsetID = $object->obj_id();
  Description: returns the unique identifier of this object.  
  Returntype : <string> uuid
  Exceptions : none
  Caller     : general
 
Code:
click to view
public Bio::EnsEMBL::Compara::Graph::CGObject::refcount ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::Graph::CGObject::release ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::Graph::CGObject::retain ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::Graph::CGObject::store ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::Taggable::store_tag ( ) [inherited]
  Description: calls add_tag and then stores the tag in the database. Has the
               exact same arguments as add_tag
  Arg [1]    : <string> tag
  Arg [2]    : <string> value
  Arg [3]    : (optional) <int> allows overloading the tag with different values
               default is 0 (no overloading allowed, one tag points to one value)
  Example    : $ns_node->store_tag('scientific name', 'Mammalia');
               $ns_node->store_tag('lost_taxon_id', 9593, 1);
  Returntype : 0 if the tag couldn't be stored,
               1 if it is only in the PERL object,
               2 if it is also stored in the database
  Exceptions : none
  Caller     : general
 
Code:
click to view

The documentation for this class was generated from the following file: