.\" 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 3pm" .TH MAGE 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 "NAME" Bio::MAGE \- Container module for classes in the MAGE package: MAGE .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Bio::MAGE; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This is a \fIpackage\fR module that encapsulates a number of classes in the Bio::MAGE hierarchy. These classes belong to the \&\s-1MAGE\s0 package of the MAGE-OM object model. .SH "CLASSES" .IX Header "CLASSES" The Bio::MAGE module contains the following Bio::MAGE classes: .IP "\(bu" 4 NameValueType .IP "\(bu" 4 Extendable .IP "\(bu" 4 Identifiable .IP "\(bu" 4 Describable .SH "CLASS METHODS" .IX Header "CLASS METHODS" .ie n .IP "@class_list = \fBBio::MAGE::classes()\fR;" 4 .el .IP "\f(CW@class_list\fR = \fBBio::MAGE::classes()\fR;" 4 .IX Item "@class_list = Bio::MAGE::classes();" This method returns a list of non-fully qualified class names (i.e. they do not have 'Bio::MAGE::' as a prefix) in this package. .ie n .IP "@list_names = \fBBio::MAGE::xml_packages()\fR;" 4 .el .IP "\f(CW@list_names\fR = \fBBio::MAGE::xml_packages()\fR;" 4 .IX Item "@list_names = Bio::MAGE::xml_packages();" This method returns an ordered list of the MAGE-ML packages that exist in the top level MAGE-ML element. .ie n .IP "$hash_ref = \fBBio::MAGE::class2fullclass()\fR;" 4 .el .IP "\f(CW$hash_ref\fR = \fBBio::MAGE::class2fullclass()\fR;" 4 .IX Item "$hash_ref = Bio::MAGE::class2fullclass();" This method returns a hash table that maps the fully qualified class name of a class given the abbreviated name for the complete Bio::MAGE class hierarchy. .ie n .IP "$obj = class\->new(%parameters)" 4 .el .IP "\f(CW$obj\fR = class\->new(%parameters)" 4 .IX Item "$obj = class->new(%parameters)" The \f(CW\*(C`new()\*(C'\fR method is the class constructor. .Sp \&\fBParameters\fR: if given a list of name/value parameters the corresponding slots, attributes, or associations will have their initial values set by the constructor. .Sp \&\fBReturn value\fR: It returns a reference to an object of the class. .Sp \&\fBSide effects\fR: It invokes the \f(CW\*(C`initialize()\*(C'\fR method if it is defined by the class. .ie n .IP "@names = class\->\fBget_slot_names()\fR" 4 .el .IP "\f(CW@names\fR = class\->\fBget_slot_names()\fR" 4 .IX Item "@names = class->get_slot_names()" The \f(CW\*(C`get_slot_names()\*(C'\fR method is used to retrieve the name of all slots defined in a given class. .Sp \&\fB\s-1NOTE\s0\fR: the list of names does not include attribute or association names. .Sp \&\fBReturn value\fR: A list of the names of all slots defined for this class. .Sp \&\fBSide effects\fR: none .ie n .IP "@name_list = \fBget_attribute_names()\fR" 4 .el .IP "\f(CW@name_list\fR = \fBget_attribute_names()\fR" 4 .IX Item "@name_list = get_attribute_names()" returns the list of attribute data members for this class. .ie n .IP "@name_list = \fBget_association_names()\fR" 4 .el .IP "\f(CW@name_list\fR = \fBget_association_names()\fR" 4 .IX Item "@name_list = get_association_names()" returns the list of association data members for this class. .ie n .IP "@class_list = \fBget_superclasses()\fR" 4 .el .IP "\f(CW@class_list\fR = \fBget_superclasses()\fR" 4 .IX Item "@class_list = get_superclasses()" returns the list of superclasses for this class. .ie n .IP "@class_list = \fBget_subclasses()\fR" 4 .el .IP "\f(CW@class_list\fR = \fBget_subclasses()\fR" 4 .IX Item "@class_list = get_subclasses()" returns the list of subclasses for this class. .ie n .IP "$name = \fBclass_name()\fR" 4 .el .IP "\f(CW$name\fR = \fBclass_name()\fR" 4 .IX Item "$name = class_name()" Returns the full class name for this class. .ie n .IP "$package_name = \fBpackage_name()\fR" 4 .el .IP "\f(CW$package_name\fR = \fBpackage_name()\fR" 4 .IX Item "$package_name = package_name()" Returns the base package name (i.e. no 'namespace::') of the package that contains this class. .ie n .IP "%assns = \fBassociations()\fR" 4 .el .IP "\f(CW%assns\fR = \fBassociations()\fR" 4 .IX Item "%assns = associations()" returns the association meta-information in a hash where the keys are the association names and the values are \f(CW\*(C`Association\*(C'\fR objects that provide the meta-information for the association. .SH "INSTANCE METHODS" .IX Header "INSTANCE METHODS" .ie n .IP "$obj_copy = $obj\->\fBnew()\fR" 4 .el .IP "\f(CW$obj_copy\fR = \f(CW$obj\fR\->\fBnew()\fR" 4 .IX Item "$obj_copy = $obj->new()" When invoked with an existing object reference and not a class name, the \f(CW\*(C`new()\*(C'\fR method acts as a copy constructor \- with the new object's initial values set to be those of the existing object. .Sp \&\fBParameters\fR: No input parameters are used in the copy constructor, the initial values are taken directly from the object to be copied. .Sp \&\fBReturn value\fR: It returns a reference to an object of the class. .Sp \&\fBSide effects\fR: It invokes the \f(CW\*(C`initialize()\*(C'\fR method if it is defined by the class. .ie n .IP "$obj\->set_slots(%parameters)" 4 .el .IP "\f(CW$obj\fR\->set_slots(%parameters)" 4 .IX Item "$obj->set_slots(%parameters)" .PD 0 .ie n .IP "$obj\->set_slots(\e@name_list, \e@value_list)" 4 .el .IP "\f(CW$obj\fR\->set_slots(\e@name_list, \e@value_list)" 4 .IX Item "$obj->set_slots(@name_list, @value_list)" .PD The \f(CW\*(C`set_slots()\*(C'\fR method is used to set a number of slots at the same time. It has two different invocation methods. The first takes a named parameter list, and the second takes two array references. .Sp \&\fBReturn value\fR: none .Sp \&\fBSide effects\fR: will call \f(CW\*(C`croak()\*(C'\fR if a slot_name is used that the class does not define. .ie n .IP "@obj_list = $obj\->get_slots(@name_list)" 4 .el .IP "\f(CW@obj_list\fR = \f(CW$obj\fR\->get_slots(@name_list)" 4 .IX Item "@obj_list = $obj->get_slots(@name_list)" The \f(CW\*(C`get_slots()\*(C'\fR method is used to get the values of a number of slots at the same time. .Sp \&\fBReturn value\fR: a list of instance objects .Sp \&\fBSide effects\fR: none .ie n .IP "$val = $obj\->set_slot($name,$val)" 4 .el .IP "\f(CW$val\fR = \f(CW$obj\fR\->set_slot($name,$val)" 4 .IX Item "$val = $obj->set_slot($name,$val)" The \f(CW\*(C`set_slot()\*(C'\fR method sets the slot \f(CW$name\fR to the value \f(CW$val\fR .Sp \&\fBReturn value\fR: the new value of the slot, i.e. \f(CW$val\fR .Sp \&\fBSide effects\fR: none .ie n .IP "$val = $obj\->get_slot($name)" 4 .el .IP "\f(CW$val\fR = \f(CW$obj\fR\->get_slot($name)" 4 .IX Item "$val = $obj->get_slot($name)" The \f(CW\*(C`get_slot()\*(C'\fR method is used to get the values of a number of slots at the same time. .Sp \&\fBReturn value\fR: a single slot value, or undef if the slot has not been initialized. .Sp \&\fBSide effects\fR: none .ie n .IP "$val = $mage\->\fBobjects()\fR" 4 .el .IP "\f(CW$val\fR = \f(CW$mage\fR\->\fBobjects()\fR" 4 .IX Item "$val = $mage->objects()" .PD 0 .ie n .IP "$inval = $mage\->objects($inval)" 4 .el .IP "\f(CW$inval\fR = \f(CW$mage\fR\->objects($inval)" 4 .IX Item "$inval = $mage->objects($inval)" .PD This is the unified setter/getter method for the objects slot. .Sp If \f(CW$inval\fR is specified, the setter method is invoked, with no parameters, the getter method is invoked. .Sp Input parameters: the optional \f(CW$inval\fR will invoke the setter method. .Sp Return value: for both setter and getter the current value of the objects slot .Sp Side effects: none .Sp Exceptions: none .ie n .IP "$val = $mage\->\fBtagname()\fR" 4 .el .IP "\f(CW$val\fR = \f(CW$mage\fR\->\fBtagname()\fR" 4 .IX Item "$val = $mage->tagname()" .PD 0 .ie n .IP "$inval = $mage\->tagname($inval)" 4 .el .IP "\f(CW$inval\fR = \f(CW$mage\fR\->tagname($inval)" 4 .IX Item "$inval = $mage->tagname($inval)" .PD This is the unified setter/getter method for the tagname slot. .Sp If \f(CW$inval\fR is specified, the setter method is invoked, with no parameters, the getter method is invoked. .Sp Input parameters: the optional \f(CW$inval\fR will invoke the setter method. .Sp Return value: for both setter and getter the current value of the tagname slot .Sp Side effects: none .Sp Exceptions: none .ie n .IP "$val = $mage\->\fBidentifier()\fR" 4 .el .IP "\f(CW$val\fR = \f(CW$mage\fR\->\fBidentifier()\fR" 4 .IX Item "$val = $mage->identifier()" .PD 0 .ie n .IP "$inval = $mage\->identifier($inval)" 4 .el .IP "\f(CW$inval\fR = \f(CW$mage\fR\->identifier($inval)" 4 .IX Item "$inval = $mage->identifier($inval)" .PD This is the unified setter/getter method for the identifier slot. .Sp If \f(CW$inval\fR is specified, the setter method is invoked, with no parameters, the getter method is invoked. .Sp Input parameters: the optional \f(CW$inval\fR will invoke the setter method. .Sp Return value: for both setter and getter the current value of the identifier slot .Sp Side effects: none .Sp Exceptions: none .ie n .IP "$val = $mage\->\fBregistered_objects()\fR" 4 .el .IP "\f(CW$val\fR = \f(CW$mage\fR\->\fBregistered_objects()\fR" 4 .IX Item "$val = $mage->registered_objects()" .PD 0 .ie n .IP "$inval = $mage\->registered_objects($inval)" 4 .el .IP "\f(CW$inval\fR = \f(CW$mage\fR\->registered_objects($inval)" 4 .IX Item "$inval = $mage->registered_objects($inval)" .PD This is the unified setter/getter method for the registered_objects slot. .Sp If \f(CW$inval\fR is specified, the setter method is invoked, with no parameters, the getter method is invoked. .Sp Input parameters: the optional \f(CW$inval\fR will invoke the setter method. .Sp Return value: for both setter and getter the current value of the registered_objects slot .Sp Side effects: none .Sp Exceptions: none .ie n .IP "$val = $mage\->\fBidentifiers()\fR" 4 .el .IP "\f(CW$val\fR = \f(CW$mage\fR\->\fBidentifiers()\fR" 4 .IX Item "$val = $mage->identifiers()" .PD 0 .ie n .IP "$inval = $mage\->identifiers($inval)" 4 .el .IP "\f(CW$inval\fR = \f(CW$mage\fR\->identifiers($inval)" 4 .IX Item "$inval = $mage->identifiers($inval)" .PD This is the unified setter/getter method for the identifiers slot. .Sp If \f(CW$inval\fR is specified, the setter method is invoked, with no parameters, the getter method is invoked. .Sp Input parameters: the optional \f(CW$inval\fR will invoke the setter method. .Sp Return value: for both setter and getter the current value of the identifiers slot .Sp Side effects: none .Sp Exceptions: none .ie n .IP "$val = $mage\->\fBpackages()\fR" 4 .el .IP "\f(CW$val\fR = \f(CW$mage\fR\->\fBpackages()\fR" 4 .IX Item "$val = $mage->packages()" .PD 0 .ie n .IP "$inval = $mage\->packages($inval)" 4 .el .IP "\f(CW$inval\fR = \f(CW$mage\fR\->packages($inval)" 4 .IX Item "$inval = $mage->packages($inval)" .PD This is the unified setter/getter method for the packages slot. .Sp If \f(CW$inval\fR is specified, the setter method is invoked, with no parameters, the getter method is invoked. .Sp Input parameters: the optional \f(CW$inval\fR will invoke the setter method. .Sp Return value: for both setter and getter the current value of the packages slot .Sp Side effects: none .Sp Exceptions: none .ie n .IP "$mage\->add_objects(@list)" 4 .el .IP "\f(CW$mage\fR\->add_objects(@list)" 4 .IX Item "$mage->add_objects(@list)" The objects in \f(CW@list\fR are added to the \s-1MAGE\s0 object. This method will recursively descend that association hierarcy of each object and place all Identifiable objects in their appropriate lists for writing as MAGE-ML. .ie n .IP "$pkg_obj = $mage\->\fBgetHigherLevelAnalysis_package()\fR" 4 .el .IP "\f(CW$pkg_obj\fR = \f(CW$mage\fR\->\fBgetHigherLevelAnalysis_package()\fR" 4 .IX Item "$pkg_obj = $mage->getHigherLevelAnalysis_package()" This method manages the handling of the singleton class object for the \&\f(CW\*(C`Bio::MAGE::HigherLevelAnalysis\*(C'\fR class. When called it will return the object, creating one if it has not already been created. .Sp This is useful when retrieving data from parsed MAGE-ML file. .ie n .IP "$pkg_obj = $mage\->\fBgetBioEvent_package()\fR" 4 .el .IP "\f(CW$pkg_obj\fR = \f(CW$mage\fR\->\fBgetBioEvent_package()\fR" 4 .IX Item "$pkg_obj = $mage->getBioEvent_package()" This method manages the handling of the singleton class object for the \&\f(CW\*(C`Bio::MAGE::BioEvent\*(C'\fR class. When called it will return the object, creating one if it has not already been created. .Sp This is useful when retrieving data from parsed MAGE-ML file. .ie n .IP "$pkg_obj = $mage\->\fBgetBioMaterial_package()\fR" 4 .el .IP "\f(CW$pkg_obj\fR = \f(CW$mage\fR\->\fBgetBioMaterial_package()\fR" 4 .IX Item "$pkg_obj = $mage->getBioMaterial_package()" This method manages the handling of the singleton class object for the \&\f(CW\*(C`Bio::MAGE::BioMaterial\*(C'\fR class. When called it will return the object, creating one if it has not already been created. .Sp This is useful when retrieving data from parsed MAGE-ML file. .ie n .IP "$pkg_obj = $mage\->\fBgetBioSequence_package()\fR" 4 .el .IP "\f(CW$pkg_obj\fR = \f(CW$mage\fR\->\fBgetBioSequence_package()\fR" 4 .IX Item "$pkg_obj = $mage->getBioSequence_package()" This method manages the handling of the singleton class object for the \&\f(CW\*(C`Bio::MAGE::BioSequence\*(C'\fR class. When called it will return the object, creating one if it has not already been created. .Sp This is useful when retrieving data from parsed MAGE-ML file. .ie n .IP "$pkg_obj = $mage\->\fBgetAuditAndSecurity_package()\fR" 4 .el .IP "\f(CW$pkg_obj\fR = \f(CW$mage\fR\->\fBgetAuditAndSecurity_package()\fR" 4 .IX Item "$pkg_obj = $mage->getAuditAndSecurity_package()" This method manages the handling of the singleton class object for the \&\f(CW\*(C`Bio::MAGE::AuditAndSecurity\*(C'\fR class. When called it will return the object, creating one if it has not already been created. .Sp This is useful when retrieving data from parsed MAGE-ML file. .ie n .IP "$pkg_obj = $mage\->\fBgetBioAssayData_package()\fR" 4 .el .IP "\f(CW$pkg_obj\fR = \f(CW$mage\fR\->\fBgetBioAssayData_package()\fR" 4 .IX Item "$pkg_obj = $mage->getBioAssayData_package()" This method manages the handling of the singleton class object for the \&\f(CW\*(C`Bio::MAGE::BioAssayData\*(C'\fR class. When called it will return the object, creating one if it has not already been created. .Sp This is useful when retrieving data from parsed MAGE-ML file. .ie n .IP "$pkg_obj = $mage\->\fBgetBQS_package()\fR" 4 .el .IP "\f(CW$pkg_obj\fR = \f(CW$mage\fR\->\fBgetBQS_package()\fR" 4 .IX Item "$pkg_obj = $mage->getBQS_package()" This method manages the handling of the singleton class object for the \&\f(CW\*(C`Bio::MAGE::BQS\*(C'\fR class. When called it will return the object, creating one if it has not already been created. .Sp This is useful when retrieving data from parsed MAGE-ML file. .ie n .IP "$pkg_obj = $mage\->\fBgetArray_package()\fR" 4 .el .IP "\f(CW$pkg_obj\fR = \f(CW$mage\fR\->\fBgetArray_package()\fR" 4 .IX Item "$pkg_obj = $mage->getArray_package()" This method manages the handling of the singleton class object for the \&\f(CW\*(C`Bio::MAGE::Array\*(C'\fR class. When called it will return the object, creating one if it has not already been created. .Sp This is useful when retrieving data from parsed MAGE-ML file. .ie n .IP "$pkg_obj = $mage\->\fBgetQuantitationType_package()\fR" 4 .el .IP "\f(CW$pkg_obj\fR = \f(CW$mage\fR\->\fBgetQuantitationType_package()\fR" 4 .IX Item "$pkg_obj = $mage->getQuantitationType_package()" This method manages the handling of the singleton class object for the \&\f(CW\*(C`Bio::MAGE::QuantitationType\*(C'\fR class. When called it will return the object, creating one if it has not already been created. .Sp This is useful when retrieving data from parsed MAGE-ML file. .ie n .IP "$pkg_obj = $mage\->\fBgetExperiment_package()\fR" 4 .el .IP "\f(CW$pkg_obj\fR = \f(CW$mage\fR\->\fBgetExperiment_package()\fR" 4 .IX Item "$pkg_obj = $mage->getExperiment_package()" This method manages the handling of the singleton class object for the \&\f(CW\*(C`Bio::MAGE::Experiment\*(C'\fR class. When called it will return the object, creating one if it has not already been created. .Sp This is useful when retrieving data from parsed MAGE-ML file. .ie n .IP "$pkg_obj = $mage\->\fBgetBioAssay_package()\fR" 4 .el .IP "\f(CW$pkg_obj\fR = \f(CW$mage\fR\->\fBgetBioAssay_package()\fR" 4 .IX Item "$pkg_obj = $mage->getBioAssay_package()" This method manages the handling of the singleton class object for the \&\f(CW\*(C`Bio::MAGE::BioAssay\*(C'\fR class. When called it will return the object, creating one if it has not already been created. .Sp This is useful when retrieving data from parsed MAGE-ML file. .ie n .IP "$pkg_obj = $mage\->\fBgetDesignElement_package()\fR" 4 .el .IP "\f(CW$pkg_obj\fR = \f(CW$mage\fR\->\fBgetDesignElement_package()\fR" 4 .IX Item "$pkg_obj = $mage->getDesignElement_package()" This method manages the handling of the singleton class object for the \&\f(CW\*(C`Bio::MAGE::DesignElement\*(C'\fR class. When called it will return the object, creating one if it has not already been created. .Sp This is useful when retrieving data from parsed MAGE-ML file. .ie n .IP "$pkg_obj = $mage\->\fBgetProtocol_package()\fR" 4 .el .IP "\f(CW$pkg_obj\fR = \f(CW$mage\fR\->\fBgetProtocol_package()\fR" 4 .IX Item "$pkg_obj = $mage->getProtocol_package()" This method manages the handling of the singleton class object for the \&\f(CW\*(C`Bio::MAGE::Protocol\*(C'\fR class. When called it will return the object, creating one if it has not already been created. .Sp This is useful when retrieving data from parsed MAGE-ML file. .ie n .IP "$pkg_obj = $mage\->\fBgetDescription_package()\fR" 4 .el .IP "\f(CW$pkg_obj\fR = \f(CW$mage\fR\->\fBgetDescription_package()\fR" 4 .IX Item "$pkg_obj = $mage->getDescription_package()" This method manages the handling of the singleton class object for the \&\f(CW\*(C`Bio::MAGE::Description\*(C'\fR class. When called it will return the object, creating one if it has not already been created. .Sp This is useful when retrieving data from parsed MAGE-ML file. .ie n .IP "$pkg_obj = $mage\->\fBgetArrayDesign_package()\fR" 4 .el .IP "\f(CW$pkg_obj\fR = \f(CW$mage\fR\->\fBgetArrayDesign_package()\fR" 4 .IX Item "$pkg_obj = $mage->getArrayDesign_package()" This method manages the handling of the singleton class object for the \&\f(CW\*(C`Bio::MAGE::ArrayDesign\*(C'\fR class. When called it will return the object, creating one if it has not already been created. .Sp This is useful when retrieving data from parsed MAGE-ML file. .ie n .IP "$pkg_obj = $mage\->\fBgetMeasurement_package()\fR" 4 .el .IP "\f(CW$pkg_obj\fR = \f(CW$mage\fR\->\fBgetMeasurement_package()\fR" 4 .IX Item "$pkg_obj = $mage->getMeasurement_package()" This method manages the handling of the singleton class object for the \&\f(CW\*(C`Bio::MAGE::Measurement\*(C'\fR class. When called it will return the object, creating one if it has not already been created. .Sp This is useful when retrieving data from parsed MAGE-ML file. .ie n .IP "$mage\->obj2xml($writer)" 4 .el .IP "\f(CW$mage\fR\->obj2xml($writer)" 4 .IX Item "$mage->obj2xml($writer)" Write out this object, and all sub-objects, as \s-1XML\s0 using the supplied \&\f(CW$writer\fR to actually do the \s-1XML\s0 formatting. .Sp Input parameters: \f(CW$writer\fR must be an \s-1XML\s0 writer, e.g. an instance of Bio::MAGE::XML::Writer. It must have methods: \fBwrite_start_tag()\fR and \&\fBwrite_end_tag()\fR. .Sp Return value: none .Sp Side effects: all writing is delegated to the \f(CW$writer\fR \- it's \&\fBwrite_start_tag()\fR and \fBwrite_end_tag()\fR methods are invoked with the appropriate data, and all package sub-objects of the \f(CW\*(C`Bio::MAGE\*(C'\fR instance will have their \fBobj2xml()\fR methods invoked in turn. By allowing the \f(CW$writer\fR to do the actual formatting of the output \s-1XML,\s0 it enables the user to precisely control the format. .Sp Exceptions: will call \f(CW\*(C`croak()\*(C'\fR if no identifier has been set for the \&\f(CW\*(C`Bio::MAGE\*(C'\fR instance. .ie n .IP "$mage\->register($obj)" 4 .el .IP "\f(CW$mage\fR\->register($obj)" 4 .IX Item "$mage->register($obj)" Store an object for later writing as \s-1XML.\s0 .Sp Input parameters: object to be added to the list of registered objects. .Sp Return value: none .Sp Side effects: if \f(CW$obj\fR needs to be stored by this class, a reference will be stored in the correct \s-1XML\s0 list for this class. .Sp Exceptions: \fBdie()\fR will be called if the object does not have it's identifier set, or if the object has incorrectly set an association of list cardinality to a single object. .SH "SLOTS, ATTRIBUTES, AND ASSOCIATIONS" .IX Header "SLOTS, ATTRIBUTES, AND ASSOCIATIONS" In the Perl implementation of MAGE-OM classes, there are three types of class data members: \f(CW\*(C`slots\*(C'\fR, \f(CW\*(C`attributes\*(C'\fR, and \&\f(CW\*(C`associations\*(C'\fR. .SS "\s-1SLOTS\s0" .IX Subsection "SLOTS" This \s-1API\s0 uses the term \f(CW\*(C`slot\*(C'\fR to indicate a data member of the class that was not present in the \s-1UML\s0 model and is used for mainly internal purposes \- use only if you understand the inner workings of the \&\s-1API.\s0 Most often slots are used by generic methods such as those in the \&\s-1XML\s0 writing and reading classes. .PP Slots are implemented using unified getter/setter methods: .ie n .IP "$var = $obj\->\fBslot_name()\fR;" 4 .el .IP "\f(CW$var\fR = \f(CW$obj\fR\->\fBslot_name()\fR;" 4 .IX Item "$var = $obj->slot_name();" Retrieves the current value of the slot. .ie n .IP "$new_var = $obj\->slot_name($new_var);" 4 .el .IP "\f(CW$new_var\fR = \f(CW$obj\fR\->slot_name($new_var);" 4 .IX Item "$new_var = $obj->slot_name($new_var);" Store \f(CW$new_var\fR in the slot \- the return value is also \f(CW$new_var\fR. .ie n .IP "@names = $obj\->\fBget_slot_names()\fR" 4 .el .IP "\f(CW@names\fR = \f(CW$obj\fR\->\fBget_slot_names()\fR" 4 .IX Item "@names = $obj->get_slot_names()" Returns the list of all slots in the class. .PP \&\fB\s-1DATA CHECKING\s0\fR: No data type checking is made for these methods. .SS "\s-1ATTRIBUTES AND ASSOCIATIONS\s0" .IX Subsection "ATTRIBUTES AND ASSOCIATIONS" The terms \f(CW\*(C`attribute\*(C'\fR and \f(CW\*(C`association\*(C'\fR indicate data members of the class that were specified directly from the \s-1UML\s0 model. .PP In the Perl implementation of MAGE-OM classes, association and attribute accessors are implemented using three separate methods: .IP "get*" 4 .IX Item "get*" Retrieves the current value. .Sp \&\fB\s-1NOTE\s0\fR: For associations, if the association has list cardinality, an array reference is returned. .Sp \&\fB\s-1DATA CHECKING\s0\fR: Ensure that no argument is provided. .IP "set*" 4 .IX Item "set*" Sets the current value, \fBreplacing\fR any existing value. .Sp \&\fB\s-1NOTE\s0\fR: For associations, if the association has list cardinality, the argument must be an array reference. Because of this, you probably should be using the add* methods. .Sp \&\fB\s-1DATA CHECKING\s0\fR: For attributes, ensure that a single value is provided as the argument. For associations, if the association has list cardinality, ensure that the argument is a reference to an array of instances of the correct MAGE-OM class, otherwise ensure that there is a single argument of the correct MAGE-OM class. .IP "add*" 4 .IX Item "add*" \&\fB\s-1NOTE\s0\fR: Only present in associations with list cardinality. .Sp Appends a list of objects to any values that may already be stored in the association. .Sp \&\fB\s-1DATA CHECKING\s0\fR: Ensure that all arguments are of the correct MAGE-OM class. .SS "\s-1GENERIC METHODS\s0" .IX Subsection "GENERIC METHODS" The unified base class of all MAGE-OM classes, \f(CW\*(C`Bio::MAGE::Base\*(C'\fR, provides a set of generic methods that will operate on slots, attributes, and associations: .ie n .IP "$val = $obj\->get_slot($name)" 4 .el .IP "\f(CW$val\fR = \f(CW$obj\fR\->get_slot($name)" 4 .IX Item "$val = $obj->get_slot($name)" .PD 0 .ie n .IP "\e@list_ref = $obj\->get_slots(@name_list);" 4 .el .IP "\e@list_ref = \f(CW$obj\fR\->get_slots(@name_list);" 4 .IX Item "@list_ref = $obj->get_slots(@name_list);" .ie n .IP "$val = $obj\->set_slot($name,$val)" 4 .el .IP "\f(CW$val\fR = \f(CW$obj\fR\->set_slot($name,$val)" 4 .IX Item "$val = $obj->set_slot($name,$val)" .ie n .IP "$obj\->set_slots(%parameters)" 4 .el .IP "\f(CW$obj\fR\->set_slots(%parameters)" 4 .IX Item "$obj->set_slots(%parameters)" .ie n .IP "$obj\->set_slots(\e@name_list, \e@value_list)" 4 .el .IP "\f(CW$obj\fR\->set_slots(\e@name_list, \e@value_list)" 4 .IX Item "$obj->set_slots(@name_list, @value_list)" .PD See elsewhere in this page for a detailed description of these methods. .SH "BUGS" .IX Header "BUGS" Please send bug reports to the project mailing list: (mged-mage 'at' lists 'dot' sf 'dot' net) .SH "AUTHOR" .IX Header "AUTHOR" Jason E. Stewart (jasons 'at' cpan 'dot' org) .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBperl\fR\|(1).