.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "MAGE::Association 3pm" .TH MAGE::Association 3pm "2020-11-27" "perl v5.32.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "Bio::MAGE::Association" .IX Header "Bio::MAGE::Association" .SS "\s-1SYNOPSIS\s0" .IX Subsection "SYNOPSIS" .Vb 1 \& 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); .Ve .SS "\s-1DESCRIPTION\s0" .IX Subsection "DESCRIPTION" This class holds the two association ends for each \s-1UML\s0 association. \f(CW\*(C`self\*(C'\fR is the end nearest the class of interest, while \&\f(CW\*(C`other\*(C'\fR is the end furthest away. The ends are of type \&\f(CW\*(C`Bio::MAGE::Association::End\*(C'\fR. .SS "\s-1CARDINALITY\s0" .IX Subsection "CARDINALITY" Associations in \s-1UML\s0 have a \f(CW\*(C`cardinality\*(C'\fR that determines how many objects can be associated. In the \f(CW\*(C`Bio::MAGE::Association\*(C'\fR modulte, \f(CW\*(C`cardinality\*(C'\fR has two primary dimensions: \fBoptional\fR or \&\fBrequired\fR, and \fBsingle\fR or \fBlist\fR. So there are four combinations of the two dimensions: .IP "\(bu" 4 0..1 .Sp This is an \fBoptional\fR \fBsingle\fR association, meaning it can have one object associated, but it is optional. .IP "\(bu" 4 1 .Sp This is a \fBrequired\fR \fBsingle\fR association, meaning it \fBmust\fR have exactly one object associated. .IP "\(bu" 4 0..N .Sp This is an \fBoptional\fR \fBlist\fR association, meaning it can have many objects associated. .IP "\(bu" 4 1..N .Sp This is an \fBrequired\fR \fBlist\fR association, meaning it must have \fBat least\fR one object, but it \fBmay\fR have many. .PP There are four constants defined in this module for handling the cardinalities, and they can be imported into an application using the \&\fB\s-1CARD\s0\fR import tag: .PP .Vb 1 \& use Bio::MAGE::Association qw(:CARD); .Ve .PP The four constants are: \fB\s-1CARD_0_OR_1\s0\fR, \fB\s-1CARD_1\s0\fR, \fB\s-1CARD_0_TO_N\s0\fR, and \&\fB\s-1CARD_1_TO_N\s0\fR. .SH "Bio::MAGE::Association::End" .IX Header "Bio::MAGE::Association::End" .SS "\s-1SYNOPSIS\s0" .IX Subsection "SYNOPSIS" .Vb 1 \& 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(); .Ve .SS "\s-1DESCRIPTION\s0" .IX Subsection "DESCRIPTION" This class stores the information in a single \s-1UML\s0 association end.