MAGE::XML::Handler(3pm) User Contributed Perl Documentation MAGE::XML::Handler(3pm)
start_element_objecthandler($handler)
Use this method to get/set the start handler that will be called to process Bio::MAGE objects as they are created. $handler must be
instances of the Bio::MAGE::XMLUtils::ObjectHandlerI class.
Calling start_element objecthandler() with no arguments returns a reference to the currently registered
Bio::MAGE::XMLUtils::ObjectHandlerI object.
end_element_objecthandler($handler)
Use this method to get/set the end handler that will be called to process Bio::MAGE objects as they are finished (when the end tag
event occurs. $handler must be instances of the Bio::MAGE::XMLUtils::ObjectHandlerI class.
Calling end_element_objecthandler() with no arguments returns a reference to the currently registered
Bio::MAGE::XMLUtils::ObjectHandlerI object.
character_objecthandler($handler)
Use this method to get/set the start handler that will be called to process character data as it is . $handler must be instances of
the Bio::MAGE::XMLUtils::ObjectHandlerI class.
Calling character_objecthandler() with no arguments returns a reference to the currently registered Bio::MAGE::XMLUtils::ObjectHandlerI
object.
POD ERRORS
Hey! The above document had some coding errors, which are explained below:
Around line 140:
'=item' outside of any '=over'
perl v5.10.1 2006-08-23 MAGE::XML::Handler(3pm)
Check Out this Related Man Page
MAGE::Association(3pm) User Contributed Perl Documentation MAGE::Association(3pm)Bio::MAGE::Association
SYNOPSIS
use Bio::MAGE::Association qw(:CARD);
# creating an empty instance
my $association = Bio::MAGE::Association->new();
# populating the instance in the constructor
my $association = Bio::MAGE::Association->new(self=>$assoc_end1,
other=>$assoc_end2);
# setting and retrieving the association ends
my $self_end = $association->self();
$association->self($value);
my $other_end = $association->other();
$association->other($value);
DESCRIPTION
This class holds the two association ends for each UML association. "self" is the end nearest the class of interest, while "other" is the
end furthest away. The ends are of type "Bio::MAGE::Association::End".
CARDINALITY
Associations in UML have a "cardinality" that determines how many objects can be associated. In the "Bio::MAGE::Association" modulte,
"cardinality" has two primary dimensions: optional or required, and single or list. So there are four combinations of the two dimensions:
o 0..1
This is an optional single association, meaning it can have one object associated, but it is optional.
o 1
This is a required single association, meaning it must have exactly one object associated.
o 0..N
This is an optional list association, meaning it can have many objects associated.
o 1..N
This is an required list association, meaning it must have at least one object, but it may have many.
There are four constants defined in this module for handling the cardinalities, and they can be imported into an application using the CARD
import tag:
use Bio::MAGE::Association qw(:CARD);
The four constants are: CARD_0_OR_1, CARD_1, CARD_0_TO_N, and CARD_1_TO_N.
Bio::MAGE::Association::End
SYNOPSIS
use Bio::MAGE::Association qw(:CARD);
# creating an empty instance
my $assoc_end = Bio::MAGE::Association::End->new();
# populating the instance in the constructor
my $assoc_end = Bio::MAGE::Association::End->new(
name=>$name,
is_ref=>$bool,
cardinality=>CARD_0_TO_N,
class_name=>$class_name,
documentation=>$doc_string,
rank=>$rank,
ordered=>$bool,
);
# setting and retrieving object attributes
my $name = $assoc_end->name();
$assoc_end->name($value);
my $is_ref = $assoc_end->is_ref();
$assoc_end->is_ref($value);
my $cardinality = $assoc_end->cardinality();
$assoc_end->cardinality($value);
my $class_name = $assoc_end->class_name();
$assoc_end->class_name($value);
my $documentation = $assoc_end->documentation();
$assoc_end->documentation($value);
my $rank = $assoc_end->rank();
$assoc_end->rank($value);
my $ordered = $assoc_end->ordered();
$assoc_end->ordered($value);
#
# Utility methods
#
# does this end of list cardinality (0..N or 1..N)
my $bool = $assoc_end->is_list();
DESCRIPTION
This class stores the information in a single UML association end.
perl v5.10.1 2007-05-14 MAGE::Association(3pm)