MAGE::...eGroup(3pm)
π Bio::MAGE::ArrayDesign::ZoneGroup π
okay bestie, welcome to the Perl docs for Bio::MAGE::ArrayDesign::ZoneGroup β it's from the User Contributed Perl Documentation set, and it's giving very "I'm a class for the MAGE-OM API" energy. let's get into it π«Ά
β¨ NAME β¨
Bio::MAGE::ArrayDesign::ZoneGroup β a whole class for the MAGE-OM API. no cap, that's literally its entire job description.
πΈ SYNOPSIS πΈ
here's how you actually use this thing, fr fr:
use Bio::MAGE::ArrayDesign::ZoneGroup
# creating an empty instance
my $zonegroup = Bio::MAGE::ArrayDesign::ZoneGroup->new();
# creating an instance with existing data
my $zonegroup = Bio::MAGE::ArrayDesign::ZoneGroup->new(
zonesPerY=>$zonespery_val,
zonesPerX=>$zonesperx_val,
spacingsBetweenZonesX=>$spacingsbetweenzonesx_val,
spacingsBetweenZonesY=>$spacingsbetweenzonesy_val,
propertySets=>\@namevaluetype_list,
zoneLocations=>\@zone_list,
zoneLayout=>$zonelayout_ref,
distanceUnit=>$distanceunit_ref,
);
# 'zonesPerY' attribute
my $zonesPerY_val = $zonegroup->zonesPerY(); # getter
$zonegroup->zonesPerY($value); # setter
# 'zonesPerX' attribute
my $zonesPerX_val = $zonegroup->zonesPerX(); # getter
$zonegroup->zonesPerX($value); # setter
# 'spacingsBetweenZonesX' attribute
my $spacingsBetweenZonesX_val = $zonegroup->spacingsBetweenZonesX(); # getter
$zonegroup->spacingsBetweenZonesX($value); # setter
# 'spacingsBetweenZonesY' attribute
my $spacingsBetweenZonesY_val = $zonegroup->spacingsBetweenZonesY(); # getter
$zonegroup->spacingsBetweenZonesY($value); # setter
# 'propertySets' association
my $namevaluetype_array_ref = $zonegroup->propertySets(); # getter
$zonegroup->propertySets(\@namevaluetype_list); # setter
# 'zoneLocations' association
my $zone_array_ref = $zonegroup->zoneLocations(); # getter
$zonegroup->zoneLocations(\@zone_list); # setter
# 'zoneLayout' association
my $zonelayout_ref = $zonegroup->zoneLayout(); # getter
$zonegroup->zoneLayout($zonelayout_ref); # setter
# 'distanceUnit' association
my $distanceunit_ref = $zonegroup->distanceUnit(); # getter
$zonegroup->distanceUnit($distanceunit_ref); # setter
π¦ DESCRIPTION π¦
straight from the MAGE-OM documentation for the "ZoneGroup" class:
Specifies a repeating area on an array. This is useful for printing when the same pattern is repeated in a regular fashion.
so likeβ¦ imagine a pattern that just keeps showing up over and over on your array. that's the vibe. iconic repetitive queen behavior π
π INHERITANCE π
Bio::MAGE::ArrayDesign::ZoneGroup has the following superclasses β its ancestors, its lineage, its main character roots:
Bio::MAGE::Extendable
β CLASS METHODS β
okay so these ones are special: you can call ALL of them without even having an instance first. just go straight in with the Bio::MAGE::ArrayDesign::ZoneGroup->methodname() syntax. no object required, we're being efficient bestie β¨
new()
new(%args)
the object constructor "new()" takes these optional named-value style arguments:
zonesPerYβ sets the value of the"zonesPerY"attributezonesPerXβ sets the value of the"zonesPerX"attributespacingsBetweenZonesXβ sets the value of the"spacingsBetweenZonesX"attributespacingsBetweenZonesYβ sets the value of the"spacingsBetweenZonesY"attributepropertySetsβ sets the value of the"propertySets"association (this association was inherited from class"Bio::MAGE::Extendable").- the value must be of type: array of
"Bio::MAGE::NameValueType".
- the value must be of type: array of
zoneLocationsβ sets the value of the"zoneLocations"association- the value must be of type: array of
"Bio::MAGE::ArrayDesign::Zone".
- the value must be of type: array of
zoneLayoutβ sets the value of the"zoneLayout"association- the value must be of type: instance of
"Bio::MAGE::ArrayDesign::ZoneLayout".
- the value must be of type: instance of
distanceUnitβ sets the value of the"distanceUnit"association- the value must be of type: instance of
"Bio::MAGE::Measurement::DistanceUnit".
- the value must be of type: instance of
$obj = class->new(%parameters)
the "new()" method is the class constructor. the blueprint-maker. the origin story.
- Parameters: if you hand it a list of name/value parameters, the corresponding slots, attributes, or associations get their initial values set right there by the constructor.
- Return value: it hands you back a reference to an object of the class.
- Side effects: it invokes the
"initialize()"method if it's defined by the class.
@names = class->get_slot_names()
the "get_slot_names()" method pulls up the name of every single slot defined in a given class.
NOTE: this list of names does not include attribute or association names. don't get it twisted.
- Return value: a list of the names of all slots defined for this class.
- Side effects: none. zero. nada. clean. β¨
@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.
@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 are "Association" objects that provide the meta-information for the association.
π INSTANCE METHODS π
now we're in object territory, bestie. these ones need an actual instance.
$obj_copy = $obj->new()
when you invoke this on an existing object reference instead of a class name, "new()" acts as a copy constructor β the new object's initial values get set to be exactly those of the existing object. it's giving twin flames π
- Parameters: no input parameters are used in the copy constructor β the initial values are taken directly from the object to be copied.
- Return value: it returns a reference to an object of the class.
- Side effects: it invokes the
"initialize()"method if it is defined by the class.
$obj->set_slots(%parameters)
$obj->set_slots(\@name_list, \@value_list)
the "set_slots()" method sets a whole bunch of slots at the same time. it's got two different invocation methods, choose your fighter:
- the first one takes a named parameter list.
- the second one 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 like, don't make up slots. it will yell. π
@obj_list = $obj->get_slots(@name_list)
the "get_slots()" method gets the values of a number of slots all at the same time.
- Return value: a list of instance objects
- Side effects: none
$val = $obj->set_slot($name,$val)
the "set_slot()" method 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)
the "get_slot()" method is used to get the values of a number of slots at the same time.
- Return value: a single slot value, or undef if the slot has not been initialized.
- Side effects: none
π ATTRIBUTES π
okay so attributes are simple data types that belong to a single instance of a class. in the Perl implementation of the MAGE-OM classes, the interface to attributes is implemented using separate setter and getter methods for each attribute. two methods, one attribute, that's the arrangement π
"Bio::MAGE::ArrayDesign::ZoneGroup" has the following attribute accessor methods:
zonesPerY
methods for the "zonesPerY" attribute.
from the MAGE-OM documentation:
The number of zones on the y-axis.
$val = $zonegroup->setZonesPerY($val)
the restricted setter method for the "zonesPerY" attribute.
- Input parameters: the value to which the
"zonesPerY"attribute will be set - Return value: the current value of the
"zonesPerY"attribute - Side effects: none
- Exceptions: will call
"croak()"if no input parameters are specified, or if too many input parameters are specified
$val = $zonegroup->getZonesPerY()
the restricted getter method for the "zonesPerY" attribute.
- Input parameters: none
- Return value: the current value of the
"zonesPerY"attribute - Side effects: none
- Exceptions: will call
"croak()"if any input parameters are specified
zonesPerX
methods for the "zonesPerX" attribute.
from the MAGE-OM documentation:
The number of zones on the x-axis.
$val = $zonegroup->setZonesPerX($val)
the restricted setter method for the "zonesPerX" attribute.
- Input parameters: the value to which the
"zonesPerX"attribute will be set - Return value: the current value of the
"zonesPerX"attribute - Side effects: none
- Exceptions: will call
"croak()"if no input parameters are specified, or if too many input parameters are specified
$val = $zonegroup->getZonesPerX()
the restricted getter method for the "zonesPerX" attribute.
- Input parameters: none
- Return value: the current value of the
"zonesPerX"attribute - Side effects: none
- Exceptions: will call
"croak()"if any input parameters are specified
spacingsBetweenZonesX
methods for the "spacingsBetweenZonesX" attribute.
from the MAGE-OM documentation:
Spacing between zones, if applicable.
$val = $zonegroup->setSpacingsBetweenZonesX($val)
the restricted setter method for the "spacingsBetweenZonesX" attribute.
- Input parameters: the value to which the
"spacingsBetweenZonesX"attribute will be set - Return value: the current value of the
"spacingsBetweenZonesX"attribute - Side effects: none
- Exceptions: will call
"croak()"if no input parameters are specified, or if too many input parameters are specified
$val = $zonegroup->getSpacingsBetweenZonesX()
the restricted getter method for the "spacingsBetweenZonesX" attribute.
- Input parameters: none
- Return value: the current value of the
"spacingsBetweenZonesX"attribute - Side effects: none
- Exceptions: will call
"croak()"if any input parameters are specified
spacingsBetweenZonesY
methods for the "spacingsBetweenZonesY" attribute.
from the MAGE-OM documentation:
Spacing between zones, if applicable.
$val = $zonegroup->setSpacingsBetweenZonesY($val)
the restricted setter method for the "spacingsBetweenZonesY" attribute.
- Input parameters: the value to which the
"spacingsBetweenZonesY"attribute will be set - Return value: the current value of the
"spacingsBetweenZonesY"attribute - Side effects: none
- Exceptions: it will call
croak()if you pass in any input parameters. Any. At all. So hands off the args, bestie β this one wants zero. π«Ά
π ASSOCIATIONS π
Okay so associations are just references to other classes. And in MAGE-OM, every association comes with a cardinality, which is the thing that tells you the minimum and maximum number of instances of the other class that can show up in the association:
- There must be exactly one item in the association, i.e. this is a mandatory data field.
0..1There may be one item in the association, i.e. this is an optional data field.1..NThere must be one or more items in the association, i.e. this is a mandatory data field, with list cardinality.0..NThere may be one or more items in the association, i.e. this is an optional data field, with list cardinality.
Bio::MAGE::ArrayDesign::ZoneGroup has the following association accessor methods, and yes we're going through all of them:
π propertySets π
From the MAGE-OM documentation:
Allows specification of name/value pairs. Meant to primarily help in-house, pipeline processing of instances by providing a place for values that aren't part of the specification proper.
$array_ref = $zonegroup->setPropertySets($array_ref) β the restricted setter method for the propertySets association.
- Input parameters: the value to which the
propertySetsassociation will be set: a reference to an array of objects of typeBio::MAGE::NameValueType - Return value: the current value of the
propertySetsassociation: a reference to an array of objects of typeBio::MAGE::NameValueType - Side effects: none
- Exceptions: calls
croak()if no input parameters are specified, or if too many input parameters are specified, or if$array_refis not a reference to an array of classBio::MAGE::NameValueTypeinstances
$array_ref = $zonegroup->getPropertySets() β the restricted getter method for the propertySets association.
- Input parameters: none
- Return value: the current value of the
propertySetsassociation: a reference to an array of objects of typeBio::MAGE::NameValueType - Side effects: none
- Exceptions: calls
croak()if any input parameters are specified
$val = $zonegroup->addPropertySets(@vals) β because the propertySets association has list cardinality, it may store more than one value. This method adds the current list of objects in the propertySets association.
- Input parameters: the list of values
@valsto add to thepropertySetsassociation. NOTE: submitting a single value is permitted. β¨ - Return value: the number of items stored in the slot after adding
@vals - Side effects: none
- Exceptions: calls
croak()if no input parameters are specified, or if any of the objects in@valsis not an instance of classBio::MAGE::NameValueType
π¦ zoneLocations π¦
From the MAGE-OM documentation:
Describes the location of different zones within the array design.
$array_ref = $zonegroup->setZoneLocations($array_ref) β the restricted setter method for the zoneLocations association.
- Input parameters: the value to which the
zoneLocationsassociation will be set: a reference to an array of objects of typeBio::MAGE::ArrayDesign::Zone - Return value: the current value of the
zoneLocationsassociation: a reference to an array of objects of typeBio::MAGE::ArrayDesign::Zone - Side effects: none
- Exceptions: calls
croak()if no input parameters are specified, or if too many input parameters are specified, or if$array_refis not a reference to an array of classBio::MAGE::ArrayDesign::Zoneinstances
$array_ref = $zonegroup->getZoneLocations() β the restricted getter method for the zoneLocations association.
- Input parameters: none
- Return value: the current value of the
zoneLocationsassociation: a reference to an array of objects of typeBio::MAGE::ArrayDesign::Zone - Side effects: none
- Exceptions: calls
croak()if any input parameters are specified
$val = $zonegroup->addZoneLocations(@vals) β because the zoneLocations association has list cardinality, it may store more than one value. This method adds the current list of objects in the zoneLocations association.
- Input parameters: the list of values
@valsto add to thezoneLocationsassociation. NOTE: submitting a single value is permitted. β¨ - Return value: the number of items stored in the slot after adding
@vals - Side effects: none
- Exceptions: calls
croak()if no input parameters are specified, or if any of the objects in@valsis not an instance of classBio::MAGE::ArrayDesign::Zone
πΈ zoneLayout πΈ
From the MAGE-OM documentation:
Describes the rectangular layout of features in the array design.
$val = $zonegroup->setZoneLayout($val) β the restricted setter method for the zoneLayout association.
- Input parameters: the value to which the
zoneLayoutassociation will be set: one of the accepted enumerated values - Return value: the current value of the
zoneLayoutassociation: one of the accepted enumerated values - Side effects: none
- Exceptions: calls
croak()if no input parameters are specified, or if too many input parameters are specified, or if$valis not an instance of classBio::MAGE::ArrayDesign::ZoneLayout
$val = $zonegroup->getZoneLayout() β the restricted getter method for the zoneLayout association.
- Input parameters: none
- Return value: the current value of the
zoneLayoutassociation: an instance of typeBio::MAGE::ArrayDesign::ZoneLayout. - Side effects: none
- Exceptions: calls
croak()if any input parameters are specified
π distanceUnit π
From the MAGE-OM documentation:
Unit for the ZoneGroup attributes.
$val = $zonegroup->setDistanceUnit($val) β the restricted setter method for the distanceUnit association.
- Input parameters: the value to which the
distanceUnitassociation will be set: one of the accepted enumerated values - Return value: the current value of the
distanceUnitassociation: one of the accepted enumerated values - Side effects: none
- Exceptions: calls
croak()if no input parameters are specified, or if too many input parameters are specified, or if$valis not an instance of classBio::MAGE::Measurement::DistanceUnit
$val = $zonegroup->getDistanceUnit() β the restricted getter method for the distanceUnit association.
- Input parameters: none
- Return value: the current value of the
distanceUnitassociation: an instance of typeBio::MAGE::Measurement::DistanceUnit. - Side effects: none
- Exceptions: calls
croak()if any input parameters are specified
and then, out of absolutely nowhere, the page just drops this in. no heading, no nothing. iconic behaviour honestly:
sub initialize {
my $self = shift;
return 1;
}
β¨ SLOTS, ATTRIBUTES, AND ASSOCIATIONS β¨
okay so in the Perl implementation of MAGE-OM classes, there are literally three types of class data members: slots, attributes, and associations. π
πΈ SLOTS πΈ
This API uses the term slot to indicate a data member of the class that was not present in the UML model and is used for mainly internal purposes β use only if you understand the inner workings of the API. Most often slots are used by generic methods such as those in the XML writing and reading classes.
Slots are implemented using unified getter/setter methods:
$var = $obj->slot_name();β Retrieves the current value of the slot.$new_var = $obj->slot_name($new_var);β Store$new_varin the slot - the return value is also$new_var.@names = $obj->get_slot_names()β Returns the list of all slots in the class.
DATA CHECKING: No data type checking is made for these methods. periodt.
π¦ ATTRIBUTES AND ASSOCIATIONS π¦
The terms attribute and association indicate data members of the class that were specified directly from the UML model. no cap.
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.
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. - 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.
- 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*β NOTE: Only present in associations with list cardinality.- Appends a list of objects to any values that may already be stored in the association.
- 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 set of generic methods that will operate on slots, attributes, and associations:
$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. iykyk.
π BUGS π
Please send bug reports to the project mailing list: (mged-mage 'at' lists 'dot' sf 'dot' net)
π AUTHOR π
Jason E. Stewart (jasons 'at' cpan 'dot' org)
π SEE ALSO π
π¨ POD ERRORS π¨
Hey! The above document had some coding errors, which are explained below:
- Around line 392:
'=item' outside of any '=over' - Around line 477:
You forgot a '=back' before '=head2' - Around line 793:
Expected '=item 2' - Around line 798:
Expected '=item 3' - Around line 803:
Expected '=item 4'
This page is from perl v5.32.0, dated 2020-11-27, and it's for MAGE::...eGroup(3pm) β periodt. πβ¨
π¦ 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