text
Usage - print $def->text() or $def->text($text)
Returns - the definition text (string)
Args - the definition text (string)
Function - gets/sets the definition text
dbxref_set
Usage - $def->dbxref_set() or $def->dbxref_set($dbxref_set)
Returns - the definition dbxref set (CCO::Util::DbxrefSet)
Args - the definition dbxref set (CCO::Util::DbxrefSet)
Function - gets/sets the definition dbxref set
dbxref_set_as_string
Usage - $definition->dbxref_set_as_string() or $definition->dbxref_set_as_string("[GOC:elh, PMID:9334324]")
Returns - the dbxref set (string) of this definition; [] if the set is empty
Args - the dbxref set (string) describing the source(s) of this definition
Function - gets/sets the dbxref set of this definition
equals
Usage - $def->equals($another_def)
Returns - either 1 (true) or 0 (false)
Args - the definition to compare with
Function - tells whether this definition is equal to the parameter
NAME CCO::Core::Def - Definition structure. =head1 SYNOPSIS
use CCO::Core::Def; use CCO::Core::Dbxref; use strict;
# three new def's my $def1 = CCO::Core::Def->new(); my $def2 = CCO::Core::Def->new(); my $def3 = CCO::Core::Def->new();
$def1->text("CCO:vm text"); $def2->text("CCO:ls text"); $def3->text("CCO:ea text");
my $ref1 = CCO::Core::Dbxref->new(); my $ref2 = CCO::Core::Dbxref->new(); my $ref3 = CCO::Core::Dbxref->new();
$ref1->name("CCO:vm"); $ref2->name("CCO:ls"); $ref3->name("CCO:ea");
my $dbxref_set1 = CCO::Util::DbxrefSet->new(); $dbxref_set1->add($ref1);
my $dbxref_set2 = CCO::Util::DbxrefSet->new(); $dbxref_set2->add($ref2);
my $dbxref_set3 = CCO::Util::DbxrefSet->new(); $dbxref_set3->add($ref3);
$def1->dbxref_set($dbxref_set1); $def2->dbxref_set($dbxref_set2); $def3->dbxref_set($dbxref_set3);
# dbxref_set_as_string $def2->dbxref_set_as_string("[CCO:vm, CCO:ls, CCO:ea \"Erick Antezana\"] {opt=first}"); my @refs_def2 = $def2->dbxref_set()->get_set(); my %r_def2; foreach my $ref_def2 (@refs_def2) { $r_def2{$ref_def2->name()} = $ref_def2->name(); }
DESCRIPTION A Def object encapsules a definition for a universal.
AUTHOR
Erick Antezana, <erant@psb.ugent.be>
COPYRIGHT AND LICENSE
Copyright (C) 2006 by erant
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.