MAGE::...yDesign(3pm)
π MAGE::...yDesign(3pm) β aka the Bio::MAGE::ArrayDesign page
Bestie. Come sit. This one comes from the User Contributed Perl Documentation shelf of your manual pages, and it's the full rundown on Bio::MAGE::ArrayDesign. She's long, she's thorough, and honestly? She ate. π
πΈ NAME πΈ
Bio::MAGE::ArrayDesign β a container module for the classes in the MAGE package: ArrayDesign. That's the whole job description and she does it flawlessly. π
β¨ SYNOPSIS β¨
use Bio::MAGE::ArrayDesign;
One line. No notes. Iconic. π
π¦ DESCRIPTION π¦
Okay so this is a package module, which lowkey means she's the friend holding the whole group chat together β she encapsulates a whole bunch of classes inside the Bio::MAGE hierarchy. And those classes? They belong to the ArrayDesign package of the MAGE-OM object model. That's the vibe, that's the assignment, periodt. π
π CLASSES π
The Bio::MAGE::ArrayDesign module contains the following Bio::MAGE classes, and yes, we're listing all of them because every single one matters:
ArrayDesignPhysicalArrayDesignZoneLayoutZoneGroupZoneReporterGroupFeatureGroupDesignElementGroupCompositeGroup
Nine classes. A whole little family. π«Ά
π₯ CLASS METHODS π₯
These are the ones you call on the class itself, not on an instance. Big main-character energy, no object required.
@class_list = Bio::MAGE::ArrayDesign::classes();β hands you back a list of non-fully qualified class names living in this package. And by non-fully qualified we mean they do not have'Bio::MAGE::'as a prefix. Just the short names, bestie. β¨$obj = class->new(%parameters)β the class constructor, the birth of an object, the moment of creation. π- Parameters: if you hand her a list of name/value parameters, the corresponding slots, attributes, or associations will have their initial values set by the constructor.
- Return value: a reference to an object of the class.
- Side effects: she invokes the
initialize()method if it's defined by the class.
@names = class->get_slot_names()β used to retrieve the name of all slots defined in a given class.
NOTE: the list of names does not include attribute or association names. Slots only. Don't @ me.
- Return value: a list of the names of all slots defined for this class.
- Side effects: none.
@name_list = get_attribute_names()β returns the list of attribute data members for this class. π@name_list = get_association_names()β returns the list of association data members for this class. π¦@class_list = get_superclasses()β returns the list of superclasses for this class. (Her ancestors. Her lineage. π)@class_list = get_subclasses()β returns the list of subclasses for this class.$name = class_name()β returns the full class name for this class.$package_name = package_name()β returns the base package name (i.e. no'namespace::') of the package that contains this class.%assns = associations()β returns the association meta-information in a hash where the keys are the association names and the values areAssociationobjects that provide the meta-information for the association. Meta on meta, we love to see it. π
π INSTANCE METHODS π
Now the ones you call on an actual object. This is where it gets juicy.
$obj_copy = $obj->new()β when you invokenew()with an existing object reference and not a class name, she acts as a copy constructor: the new object's initial values get set to those of the existing object. Clone era. π- Parameters: no input parameters are used in the copy constructor β the initial values are taken directly from the object to be copied.
- Return value: a reference to an object of the class.
- Side effects: she invokes the
initialize()method if it's defined by the class.
$obj->set_slots(%parameters)$obj->set_slots(\@name_list, \@value_list)β sets a bunch of slots all at the same time. She has two whole invocation methods, because she contains multitudes: the first takes a named parameter list, the second takes two array references. π₯- Return value: none.
- Side effects: will call
croak()if a slot_name is used that the class does not define. So don't try it. She will literally croak.
@obj_list = $obj->get_slots(@name_list)β gets the values of a number of slots at the same time. Grabby hands, but efficient. π«Ά- Return value: a list of instance objects.
- Side effects: none.
$val = $obj->set_slot($name,$val)β sets the slot $name to the value $val.- Return value: the new value of the slot, i.e. $val.
- Side effects: none.
$val = $obj->get_slot($name)β used to get the values of a number of slots at the same time.- Return value: a single slot value, or
undefif the slot has not been initialized. (Undef is her way of saying "idk her" π) - Side effects: none.
- Return value: a single slot value, or
π The unified setter/getter girlies π
Each of these next ones is the same beautiful pattern, just for a different slot. If $inval is specified, the setter method is invoked; with no parameters, the getter method is invoked. And for both setter and getter, you get back the current value of that slot. Side effects: none. Exceptions: none. Clean, no drama. β¨
$val = $arraydesign->xml_lists()$inval = $arraydesign->xml_lists($inval)β the unified setter/getter for thexml_listsslot.- Input parameters: the optional $inval will invoke the setter method.
- Return value: for both setter and getter, the current value of the
xml_listsslot. - Side effects: none.
- Exceptions: none.
$val = $arraydesign->tagname()$inval = $arraydesign->tagname($inval)β the unified setter/getter for thetagnameslot.- Input parameters: the optional $inval will invoke the setter method.
- Return value: for both setter and getter, the current value of the
tagnameslot. - Side effects: none.
- Exceptions: none.
$val = $arraydesign->reportergroup_list()$inval = $arraydesign->reportergroup_list($inval)β the unified setter/getter for thereportergroup_listslot.- Input parameters: the optional $inval will invoke the setter method.
- Return value: for both setter and getter, the current value of the
reportergroup_listslot. - Side effects: none.
- Exceptions: none.
$val = $arraydesign->compositegroup_list()$inval = $arraydesign->compositegroup_list($inval)β the unified setter/getter for thecompositegroup_listslot.- Input parameters: the optional $inval will invoke the setter method.
- Return value: for both setter and getter, the current value of the
compositegroup_listslot. - Side effects: none.
- Exceptions: none.
$val = $arraydesign->arraydesign_list()$inval = $arraydesign->arraydesign_list($inval)β the unified setter/getter for thearraydesign_listslot.- Input parameters: the optional $inval will invoke the setter method.
- Return value: for both setter and getter, the current value of the
arraydesign_listslot. - Side effects: none.
- Exceptions: none.
π The list-handling methods π
Okay these ones are the interface girlies β they handle the lists for their respective classes.
$array_ref = $arraydesign->getReporterGroup_list()β handles the list for theBio::MAGE::ArrayDesign::ReporterGroupclass. She returns a reference to an array of the class objects that have been associated with the package instance.- This is useful when retrieving data from a parsed MAGE-ML file. π
$arraydesign->addReporterGroup(@vals)β an interface for addingBio::MAGE::ArrayDesign::ReporterGroupobjects to thereportergroup_listlist. It's generally used by generic methods such as those in the XMLWriter.- Input parameters: the list of values
@valsto add to the owner association. NOTE: submitting a single value is permitted. (One is fine. She's flexible. π«Ά) - Return value: none.
- Side effects: none.
- Exceptions: will call
croak()if no input parameters are specified, or if any of the objects in@valsis not a subclass of classBio::MAGE::ArrayDesign::ReporterGroup. So bring the right type or don't bring anything. π
- Input parameters: the list of values
$array_ref = $arraydesign->getCompositeGroup_list()β handles the list for theBio::MAGE::ArrayDesign::CompositeGroupclass. Returns a reference to an array of the class objects that have been associated with the package instance.- This is useful when retrieving data from a parsed MAGE-ML file. β¨
$arraydesign->addCompositeGroup(@vals)β an interface for addingBio::MAGE::ArrayDesign::CompositeGroupobjects to thecompositegroup_listlist. Generally used by generic methods such as those in the XMLWriter.- Input parameters: the list of values
@valsto add to the owner association. NOTE: submitting a single value is permitted. - Return value: none.
- Side effects: none.
- Exceptions: will call
croak()if no input parameters are specified, or if any of the objects in@valsis not a subclass of classBio::MAGE::ArrayDesign::CompositeGroup.
- Input parameters: the list of values
$array_ref = $arraydesign->getArrayDesign_list()β handles the list for theBio::MAGE::ArrayDesign::ArrayDesignclass. Returns a reference to an array of the class objects that have been associated with the package instance.- This is useful when retrieving data from a parsed MAGE-ML file. π
$arraydesign->addArrayDesign(@vals)β an interface for addingBio::MAGE::ArrayDesign::ArrayDesignobjects to thearraydesign_listlist. Generally used by generic methods such as those in the XMLWriter.- Input parameters: the list of values
@valsto add to the owner association. NOTE: submitting a single value is permitted. - Return value: none.
- Side effects: none.
- Exceptions: will call
croak()if no input parameters are specified, or if any of the objects in@valsis not a subclass of classBio::MAGE::ArrayDesign::ArrayDesign.
- Input parameters: the list of values
π¦ XML era π¦
$arraydesign->obj2xml($writer)β writes out this object, and all sub-objects, as XML, using the supplied $writer to actually do the XML formatting. She's the author, the writer is the typesetter. π- Input parameters: $writer must be an XML writer, e.g. an instance of
Bio::MAGE::XML::Writer. It must have methods:write_start_tag(),write_end_tag(), andobj2xml(). - Return value: none.
- Side effects: all writing is delegated to the $writer β its
write_start_tag()andwrite_end_tag()methods are invoked with the appropriate data, and all class sub-objects of theBio::MAGE::ArrayDesigninstance will have theirobj2xml()methods invoked in turn. By allowing the $writer to do the actual formatting of the output XML, it enables the user to precisely control the format. (Customisation queen. π ) - Exceptions: will call
croak()if no identifier has been set for theBio::MAGE::ArrayDesigninstance. Set your identifier, bestie, or she will croak.
- Input parameters: $writer must be an XML writer, e.g. an instance of
$arraydesign->register($obj)β stores an object for later writing as XML. Little save-for-later moment. π«Ά- Input parameters: object to be added to the list of registered objects.
- Return value: none.
- Side effects: if $obj needs to be stored by this class, a reference will be stored in the correct XML list for this class.
- Exceptions: none.
π SLOTS, ATTRIBUTES, AND ASSOCIATIONS π
okay bestie so in the Perl implementation of MAGE-OM classes there are literally three flavours of class data members and we gotta know them by name: slots, attributes, and associations. yes they're cousins. no they're not the same. stay with me π
SLOTS β¨
so this API uses the word "slot" to mean a data member of the class that was not present in the UML model and is there for mostly internal purposes. translation: use only if you understand the inner workings of the API. like, fr fr, do not touch unless you know what you're doing π
most of the time slots get used by generic methods β the ones hanging out in the XML writing and reading classes and stuff like that. iykyk.
slots are implemented using unified getter/setter methods, which is giving main character energy:
$var = $obj->slot_name();
Retrieves the current value of the slot. π
$new_var = $obj->slot_name($new_var);
Store $new_var in the slot β and the return value is also $new_var. cute, it gives you back what you put in π«Ά
@names = $obj->get_slot_names()
Returns the list of all slots in the class. the whole roster πΈ
DATA CHECKING: No data type checking is made for these methods. like, zero. none. it will simply Not check for you π
ATTRIBUTES AND ASSOCIATIONS π
now the words "attribute" and "association" mean data members of the class that were specified directly from the UML model. these are the official ones β¨
in the Perl implementation of MAGE-OM classes, association and attribute accessors are implemented using three separate methods:
get*β Retrieves the current value.
NOTE: For associations, if the association has list cardinality, an array reference is returned.
DATA CHECKING: Ensure that no argument is provided. literally don't pass anything. it's a getter bestie, hands off π
set*β Sets the current value, replacing any existing value.
NOTE: 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. (not me warning you ahead of time π«Ά)
DATA CHECKING: 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. yes it's checking. yes it's judging you. respectfully π
add*β NOTE: Only present in associations with list cardinality.
Appends a list of objects to any values that may already be stored in the association. it stacks, it does not replace. slay β¨
DATA CHECKING: Ensure that all arguments are of the correct MAGE-OM class.
GENERIC METHODS π¦
the unified base class of all MAGE-OM classes, Bio::MAGE::Base, provides a whole set of generic methods that will operate on slots, attributes, and associations. one class, all the power π
$val = $obj->get_slot($name)
\@list_ref = $obj->get_slots(@name_list);
$val = $obj->set_slot($name,$val)
$obj->set_slots(%parameters)
$obj->set_slots(\@name_list, \@value_list)
See elsewhere in this page for a detailed description of these methods. go look, the lore is there πβ¨
π BUGS
found something broken? please send bug reports to the project mailing list: (mged-mage 'at' lists 'dot' sf 'dot' net) β they wanna hear it, fr fr π«Ά
π AUTHOR
Jason E. Stewart (jasons 'at' cpan 'dot' org) β the icon, the moment, the legend π
π SEE ALSO
and that's a wrap on this page bestie π it's from the User Contributed Perl Documentation, running on perl v5.32.0, dated 2020-11-27, and it's the manual page for MAGE::...yDesign(3pm). go forth and not touch the slots unless you truly understand the inner workings, mwah π
π
π¦ where this page comes from
- debian bookworm: libbio-mage-perl 20030502.3-6 Β· MIT
- debian trixie: libbio-mage-perl 20030502.3-6 Β· MIT
- ubuntu jammy: libbio-mage-perl 20030502.3-6 Β· MIT
- ubuntu noble: libbio-mage-perl 20030502.3-6 Β· MIT
- ubuntu resolute: libbio-mage-perl 20030502.3-6 Β· MIT
- ubuntu stonking: libbio-mage-perl 20030502.3-6 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms