MAGE::...facture(3pm)
π NAME π
Bio::MAGE::Array::ArrayManufacture β the class for the MAGE-OM API. Yep, that's the whole vibe: it's a Perl class, it lives in the MAGE-OM API, and it's here to help you describe how arrays get made. π§¬β¨
This page comes from the User Contributed Perl Documentation, and in your terminal it shows up as MAGE::...facture(3pm) (the name got a lil truncated, she's shy). Bestie, this is part 1 of 4, so buckle up, we're going on a journey. π¦
β¨ SYNOPSIS β¨
Okay so first things first, you gotta pull her in:
use Bio::MAGE::Array::ArrayManufacture
# creating an empty instance
my $arraymanufacture = Bio::MAGE::Array::ArrayManufacture->new();
# creating an instance with existing data
my $arraymanufacture = Bio::MAGE::Array::ArrayManufacture->new(
name=>$name_val,
identifier=>$identifier_val,
tolerance=>$tolerance_val,
manufacturingDate=>$manufacturingdate_val,
arrayManufacturers=>\@contact_list,
featureLIMSs=>\@manufacturelims_list,
arrays=>\@array_list,
auditTrail=>\@audit_list,
propertySets=>\@namevaluetype_list,
qualityControlStatistics=>\@namevaluetype_list,
protocolApplications=>\@protocolapplication_list,
descriptions=>\@description_list,
security=>$security_ref,
);
# 'name' attribute
my $name_val = $arraymanufacture->name(); # getter
$arraymanufacture->name($value); # setter
# 'identifier' attribute
my $identifier_val = $arraymanufacture->identifier(); # getter
$arraymanufacture->identifier($value); # setter
# 'tolerance' attribute
my $tolerance_val = $arraymanufacture->tolerance(); # getter
$arraymanufacture->tolerance($value); # setter
# 'manufacturingDate' attribute
my $manufacturingDate_val = $arraymanufacture->manufacturingDate(); # getter
$arraymanufacture->manufacturingDate($value); # setter
# 'arrayManufacturers' association
my $contact_array_ref = $arraymanufacture->arrayManufacturers(); # getter
$arraymanufacture->arrayManufacturers(\@contact_list); # setter
# 'featureLIMSs' association
my $manufacturelims_array_ref = $arraymanufacture->featureLIMSs(); # getter
$arraymanufacture->featureLIMSs(\@manufacturelims_list); # setter
# 'arrays' association
my $array_array_ref = $arraymanufacture->arrays(); # getter
$arraymanufacture->arrays(\@array_list); # setter
# 'auditTrail' association
my $audit_array_ref = $arraymanufacture->auditTrail(); # getter
$arraymanufacture->auditTrail(\@audit_list); # setter
# 'propertySets' association
my $namevaluetype_array_ref = $arraymanufacture->propertySets(); # getter
$arraymanufacture->propertySets(\@namevaluetype_list); # setter
# 'qualityControlStatistics' association
my $namevaluetype_array_ref = $arraymanufacture->qualityControlStatistics(); # getter
$arraymanufacture->qualityControlStatistics(\@namevaluetype_list); # setter
# 'protocolApplications' association
my $protocolapplication_array_ref = $arraymanufacture->protocolApplications(); # getter
$arraymanufacture->protocolApplications(\@protocolapplication_list); # setter
# 'descriptions' association
my $description_array_ref = $arraymanufacture->descriptions(); # getter
$arraymanufacture->descriptions(\@description_list); # setter
# 'security' association
my $security_ref = $arraymanufacture->security(); # getter
$arraymanufacture->security($security_ref); # setter
Look at all those getters and setters, she's SERVING. π₯ Every attribute gets the cute little ->attr() for getting and ->attr($value) for setting, and every association does the exact same thing with array refs (or an object ref, in security's case).
πΈ DESCRIPTION πΈ
Straight from the MAGE-OM documentation for the ArrayManufacture class:
Describes the process by which arrays are produced.
That's it. That's the whole job. She describes the process by which arrays are produced. Main character energy, honestly. π
π¦ INHERITANCE π¦
Bio::MAGE::Array::ArrayManufacture has the following superclasses:
Bio::MAGE::Identifiable
So she's got a whole family tree behind her and she's carrying all their baggage (affectionately). π
β¨ CLASS METHODS β¨
Okay bestie, here's the tea: the following methods can all be called without first having an instance of the class, via the Bio::MAGE::Array::ArrayManufacture->methodname() syntax. Class methods, no object required. Slay. π
π new()
π new(%args)
The object constructor new() accepts the following optional named-value style arguments:
nameβ sets the value of thenameattribute (this attribute was inherited from classBio::MAGE::Identifiable).identifierβ sets the value of theidentifierattribute (this attribute was inherited from classBio::MAGE::Identifiable).toleranceβ sets the value of thetoleranceattribute.manufacturingDateβ sets the value of themanufacturingDateattribute.arrayManufacturersβ sets the value of thearrayManufacturersassociation.
The value must be of type: array of Bio::MAGE::AuditAndSecurity::Contact.
featureLIMSsβ sets the value of thefeatureLIMSsassociation.
The value must be of type: array of Bio::MAGE::Array::ManufactureLIMS.
arraysβ sets the value of thearraysassociation.
The value must be of type: array of Bio::MAGE::Array::Array.
auditTrailβ sets the value of theauditTrailassociation (this association was inherited from classBio::MAGE::Describable).
The value must be of type: array of Bio::MAGE::AuditAndSecurity::Audit.
propertySetsβ sets the value of thepropertySetsassociation (this association was inherited from classBio::MAGE::Extendable).
The value must be of type: array of Bio::MAGE::NameValueType.
qualityControlStatisticsβ sets the value of thequalityControlStatisticsassociation.
The value must be of type: array of Bio::MAGE::NameValueType.
protocolApplicationsβ sets the value of theprotocolApplicationsassociation.
The value must be of type: array of Bio::MAGE::Protocol::ProtocolApplication.
descriptionsβ sets the value of thedescriptionsassociation (this association was inherited from classBio::MAGE::Describable).
The value must be of type: array of Bio::MAGE::Description::Description.
securityβ sets the value of thesecurityassociation (this association was inherited from classBio::MAGE::Describable).
The value must be of type: instance of Bio::MAGE::AuditAndSecurity::Security.
Not me counting them all so you don't have to β every single one is right there, types and inheritance notes and all. π
π $obj = class->new(%parameters)
The new() method is the class constructor.
- Parameters: if given a list of name/value parameters the corresponding slots, attributes, or associations will have their initial values set by the constructor.
- 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.
π @names = class->get_slot_names()
The get_slot_names() method is 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.
- 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. π
π @class_list = get_subclasses()
Returns the list of subclasses for this class. π§
π $name = class_name()
Returns the full class name for this class. Literally just the name. No cap. β¨
π $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 π
π«Ά $obj_copy = $obj->new()
When invoked with an existing object reference and not a class name, the new() method acts as a copy constructor β with the new object's initial values set to be 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: 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 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.
- Return value: none.
- Side effects: will call
croak()if a slot_name is used that the class does not define.
Okay so that last bit is the important one β feed her a slot name she doesn't know and she WILL croak(). She's not being rude, she's just being honest. π
π«Ά @obj_list = $obj->get_slots(@name_list)
The get_slots() method is used to get the values of a number of slots 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
undefif the slot has not been initialized. - Side effects: none.
πΈ ATTRIBUTES πΈ
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 per attribute, no shortcuts, that's the system. π
Bio::MAGE::Array::ArrayManufacture has the following attribute accessor methods:
π name
Methods for the name attribute.
From the MAGE-OM documentation:
The potentially ambiguous common identifier.
π $val = $arraymanufacture->setName($val)
The restricted setter method for the name attribute.
- Input parameters: the value to which the
nameattribute will be set. - Return value: the current value of the
nameattribute. - Side effects: none.
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified.
π $val = $arraymanufacture->getName()
The restricted getter method for the name attribute.
- Input parameters: none.
- Return value: the current value of the
nameattribute. - Side effects: none.
- Exceptions: will call
croak()if any input parameters are specified.
Notice how she says restricted β she is very strict about how many args you hand her. Zero or one, bestie, pick one. π
π identifier
Methods for the identifier attribute.
From the MAGE-OM documentation:
An identifier is an unambiguous string that is unique within the scope (i.e. a document, a set of related documents, or a repository) of its use.
$val = $arraymanufacture->setIdentifier($val)β the restricted setter for theidentifierattribute π- Input parameters: the value you're setting the
identifierattribute to. - Return value: whatever the
identifierattribute is holding right now. - Side effects: none, we're chill.
- Exceptions: it will call
croak()if you pass no input parameters, or if you pass too many input parameters. Pick a number bestie.
- Input parameters: the value you're setting the
$val = $arraymanufacture->getIdentifier()β the restricted getter for theidentifierattribute β¨- Input parameters: none.
- Return value: the current value of the
identifierattribute. - Side effects: none.
- Exceptions: will call
croak()if you pass it any input parameters at all. It's giving "hands off, I already know what you want".
tolerance π
Methods for the tolerance attribute.
From the MAGE-OM documentation:
The allowable error of a feature printed to its intended position.
$val = $arraymanufacture->setTolerance($val)β the restricted setter for thetoleranceattribute.- Input parameters: the value to which the
toleranceattribute will be set. - Return value: the current value of the
toleranceattribute. - Side effects: none.
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified.
- Input parameters: the value to which the
$val = $arraymanufacture->getTolerance()β the restricted getter for thetoleranceattribute.- Input parameters: none.
- Return value: the current value of the
toleranceattribute. - Side effects: none.
- Exceptions: will call
croak()if any input parameters are specified.
manufacturingDate πΈ
Methods for the manufacturingDate attribute.
From the MAGE-OM documentation:
The date the arrays were manufactured
$val = $arraymanufacture->setManufacturingDate($val)β the restricted setter for themanufacturingDateattribute.- Input parameters: the value to which the
manufacturingDateattribute will be set. - Return value: the current value of the
manufacturingDateattribute. - Side effects: none.
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified.
- Input parameters: the value to which the
$val = $arraymanufacture->getManufacturingDate()β the restricted getter for themanufacturingDateattribute.- Input parameters: none.
- Return value: the current value of the
manufacturingDateattribute. - Side effects: none.
- Exceptions: will call
croak()if any input parameters are specified.
ASSOCIATIONS π¦
Okay so associations are references to other classes. Every association in MAGE-OM has a cardinality, and that cardinality is literally just the rule for how many instances of the other class can be in the association. Minimum and maximum, that's it. Here's the whole tea:
- There must be exactly one item in the association, i.e. this is a mandatory data field.
0..1
There may be one item in the association, i.e. this is an optional data field.
1..N
There must be one or more items in the association, i.e. this is a mandatory data field, with list cardinality.
0..N
There may be one or more items in the association, i.e. this is an optional data field, with list cardinality.
Bio::MAGE::Array::ArrayManufacture has the following association accessor methods:
arrayManufacturers π
Methods for the arrayManufacturers association.
From the MAGE-OM documentation:
The person or organization to contact for information concerning the ArrayManufacture.
$array_ref = $arraymanufacture->setArrayManufacturers($array_ref)β the restricted setter for thearrayManufacturersassociation.- Input parameters: the value to which the
arrayManufacturersassociation will be set : a reference to an array of objects of typeBio::MAGE::AuditAndSecurity::Contact - Return value: the current value of the
arrayManufacturersassociation : a reference to an array of objects of typeBio::MAGE::AuditAndSecurity::Contact - Side effects: none.
- Exceptions: will call
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 classBio::MAGE::AuditAndSecurity::Contactinstances.
- Input parameters: the value to which the
$array_ref = $arraymanufacture->getArrayManufacturers()β the restricted getter for thearrayManufacturersassociation.- Input parameters: none.
- Return value: the current value of the
arrayManufacturersassociation : a reference to an array of objects of typeBio::MAGE::AuditAndSecurity::Contact - Side effects: none.
- Exceptions: will call
croak()if any input parameters are specified.
$val = $arraymanufacture->addArrayManufacturers(@vals)β because thearrayManufacturersassociation has list cardinality, it may store more than one value. This method adds the current list of objects in thearrayManufacturersassociation. Obsessed with a collection that can just keep growing π«Ά- Input parameters: the list of values
@valsto add to thearrayManufacturersassociation. NOTE: submitting a single value is permitted. - Return value: the number of items stored in the slot after adding
@vals - Side effects: none.
- Exceptions: will call
croak()if no input parameters are specified, or if any of the objects in@valsis not an instance of classBio::MAGE::AuditAndSecurity::Contact.
- Input parameters: the list of values
featureLIMSs π§
Methods for the featureLIMSs association.
From the MAGE-OM documentation:
Information on the manufacture of the features.
$array_ref = $arraymanufacture->setFeatureLIMSs($array_ref)β the restricted setter for thefeatureLIMSsassociation.- Input parameters: the value to which the
featureLIMSsassociation will be set : a reference to an array of objects of typeBio::MAGE::Array::ManufactureLIMS - Return value: the current value of the
featureLIMSsassociation : a reference to an array of objects of typeBio::MAGE::Array::ManufactureLIMS - Side effects: none.
- Exceptions: will call
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 classBio::MAGE::Array::ManufactureLIMSinstances.
- Input parameters: the value to which the
$array_ref = $arraymanufacture->getFeatureLIMSs()β the restricted getter for thefeatureLIMSsassociation.- Input parameters: none.
- Return value: the current value of the
featureLIMSsassociation : a reference to an array of objects of typeBio::MAGE::Array::ManufactureLIMS - Side effects: none.
- Exceptions: will call
croak()if any input parameters are specified.
$val = $arraymanufacture->addFeatureLIMSs(@vals)β because thefeatureLIMSsassociation has list cardinality, it may store more than one value. This method adds the current list of objects in thefeatureLIMSsassociation.- Input parameters: the list of values
@valsto add to thefeatureLIMSsassociation. NOTE: submitting a single value is permitted. - Return value: the number of items stored in the slot after adding
@vals - Side effects: none.
- Exceptions: will call
croak()if no input parameters are specified, or if any of the objects in@valsis not an instance of classBio::MAGE::Array::ManufactureLIMS.
- Input parameters: the list of values
arrays π
Methods for the arrays association.
From the MAGE-OM documentation:
Association between the manufactured array and the information on that manufacture.
$array_ref = $arraymanufacture->setArrays($array_ref)β the restricted setter for thearraysassociation.- Input parameters: the value to which the
arraysassociation will be set : a reference to an array of objects of typeBio::MAGE::Array::Array - Return value: the current value of the
arraysassociation : a reference to an array of objects of typeBio::MAGE::Array::Array - Side effects: none.
- Exceptions: will call
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 classBio::MAGE::Array::Arrayinstances.
- Input parameters: the value to which the
$array_ref = $arraymanufacture->getArrays()β the restricted getter for thearraysassociation.- Input parameters: none.
- Return value: the current value of the
arraysassociation : a reference to an array of objects of typeBio::MAGE::Array::Array - Side effects: none.
- Exceptions: will call
croak()if any input parameters are specified.
$val = $arraymanufacture->addArrays(@vals)β because thearraysassociation has list cardinality, it may store more than one value. This method adds the current list of objects in thearraysassociation.- Input parameters: the list of values
@valsto add to thearraysassociation. NOTE: submitting a single value is permitted. - Return value: the number of items stored in the slot after adding
@vals - Side effects: none.
- Exceptions: will call
croak()if no input parameters are specified, or if any of the objects in@valsis not an instance of classBio::MAGE::Array::Array.
- Input parameters: the list of values
auditTrail β
Methods for the auditTrail association.
From the MAGE-OM documentation:
A list of Audit instances that track changes to the instance of Describable.
$array_ref = $arraymanufacture->setAuditTrail($array_ref)β the restricted setter for theauditTrailassociation.- Input parameters: the value to which the
auditTrailassociation will be set : a reference to an array of objects of typeBio::MAGE::AuditAndSecurity::Audit - Return value: the current value of the
auditTrailassociation : a reference to an array of objects of typeBio::MAGE::AuditAndSecurity::Audit - Side effects: none.
- Input parameters: the value to which the
- Exceptions: will call
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 classBio::MAGE::AuditAndSecurity::Auditinstances
getAuditTrail β the restricted getter for the auditTrail association π
$array_ref = $arraymanufacture->getAuditTrail()
- Input parameters: none (literally zero, bestie, don't even try)
- Return value: the current value of the
auditTrailassociation : a reference to an array of objects of typeBio::MAGE::AuditAndSecurity::Audit - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
addAuditTrail β so the auditTrail association has list cardinality, meaning it can hold more than one value at a time (she's versatile π
). This method adds the current list of objects in the auditTrail association.
$val = $arraymanufacture->addAuditTrail(@vals)
- Input parameters: the list of values
@valsto add to theauditTrailassociation. NOTE: submitting a single value is permitted. (yes queen, one is enough, no judgement π«Ά) - Return value: the number of items stored in the slot after adding
@vals - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if any of the objects in@valsis not an instance of classBio::MAGE::AuditAndSecurity::Audit
β¨ propertySets β¨
Methods for the propertySets association.
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.
setPropertySets β the restricted setter for the propertySets association.
$array_ref = $arraymanufacture->setPropertySets($array_ref)
- 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: will call
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 classBio::MAGE::NameValueTypeinstances
getPropertySets β the restricted getter for the propertySets association π
$array_ref = $arraymanufacture->getPropertySets()
- 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: will call
croak()if any input parameters are specified
addPropertySets β 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.
$val = $arraymanufacture->addPropertySets(@vals)
- 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: will call
croak()if no input parameters are specified, or if any of the objects in@valsis not an instance of classBio::MAGE::NameValueType
πΈ qualityControlStatistics πΈ
Methods for the qualityControlStatistics association.
From the MAGE-OM documentation:
Information on the quality of the ArrayManufacture.
setQualityControlStatistics β the restricted setter for the qualityControlStatistics association.
$array_ref =
$arraymanufacture->setQualityControlStatistics($array_ref)
- Input parameters: the value to which the
qualityControlStatisticsassociation will be set : a reference to an array of objects of typeBio::MAGE::NameValueType - Return value: the current value of the
qualityControlStatisticsassociation : a reference to an array of objects of typeBio::MAGE::NameValueType - Side effects: none
- Exceptions: will call
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 classBio::MAGE::NameValueTypeinstances
getQualityControlStatistics β the restricted getter for the qualityControlStatistics association π
$array_ref = $arraymanufacture->getQualityControlStatistics()
- Input parameters: none
- Return value: the current value of the
qualityControlStatisticsassociation : a reference to an array of objects of typeBio::MAGE::NameValueType - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
addQualityControlStatistics β because the qualityControlStatistics association has list cardinality, it may store more than one value. This method adds the current list of objects in the qualityControlStatistics association.
$val = $arraymanufacture->addQualityControlStatistics(@vals)
- Input parameters: the list of values
@valsto add to thequalityControlStatisticsassociation. NOTE: submitting a single value is permitted. - Return value: the number of items stored in the slot after adding
@vals - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if any of the objects in@valsis not an instance of classBio::MAGE::NameValueType
π¦ protocolApplications π¦
Methods for the protocolApplications association.
From the MAGE-OM documentation:
The protocols followed in the manufacturing of the arrays.
setProtocolApplications β the restricted setter for the protocolApplications association.
$array_ref = $arraymanufacture->setProtocolApplications($array_ref)
- Input parameters: the value to which the
protocolApplicationsassociation will be set : a reference to an array of objects of typeBio::MAGE::Protocol::ProtocolApplication - Return value: the current value of the
protocolApplicationsassociation : a reference to an array of objects of typeBio::MAGE::Protocol::ProtocolApplication - Side effects: none
- Exceptions: will call
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 classBio::MAGE::Protocol::ProtocolApplicationinstances
getProtocolApplications β the restricted getter for the protocolApplications association π
$array_ref = $arraymanufacture->getProtocolApplications()
- Input parameters: none
- Return value: the current value of the
protocolApplicationsassociation : a reference to an array of objects of typeBio::MAGE::Protocol::ProtocolApplication - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
addProtocolApplications β because the protocolApplications association has list cardinality, it may store more than one value. This method adds the current list of objects in the protocolApplications association.
$val = $arraymanufacture->addProtocolApplications(@vals)
- Input parameters: the list of values
@valsto add to theprotocolApplicationsassociation. NOTE: submitting a single value is permitted. - Return value: the number of items stored in the slot after adding
@vals - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if any of the objects in@valsis not an instance of classBio::MAGE::Protocol::ProtocolApplication
π descriptions π
Methods for the descriptions association.
From the MAGE-OM documentation:
Free hand text descriptions. Makes available the associations of Description to an instance of Describable.
setDescriptions β the restricted setter for the descriptions association.
$array_ref = $arraymanufacture->setDescriptions($array_ref)
- Input parameters: the value to which the
descriptionsassociation will be set : a reference to an array of objects of typeBio::MAGE::Description::Description - Return value: the current value of the
descriptionsassociation : a reference to an array of objects of typeBio::MAGE::Description::Description - Side effects: none
- Exceptions: will call
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 classBio::MAGE::Description::Descriptioninstances
getDescriptions β the restricted getter for the descriptions association β¨
$array_ref = $arraymanufacture->getDescriptions()
- Input parameters: none
- Return value: the current value of the
descriptionsassociation : a reference to an array of objects of typeBio::MAGE::Description::Description - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
addDescriptions β because the descriptions association has list cardinality, it may store more than one value. This method adds the current list of objects in the descriptions association.
$val = $arraymanufacture->addDescriptions(@vals)
- Input parameters: the list of values
@valsto add to thedescriptionsassociation. NOTE: submitting a single value is permitted. - Return value: the number of items stored in the slot after adding
@vals - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if any of the objects in@valsis not an instance of classBio::MAGE::Description::Description
π₯ security π₯
Methods for the security association.
From the MAGE-OM documentation:
Information on the security for the instance of the class.
setSecurity β the restricted setter for the security association.
$val = $arraymanufacture->setSecurity($val)
Input parameters: the value you want the security association to be set to β has to be one of the accepted enumerated values, no freestyling.
Return value: the current value of the security association β one of the accepted enumerated values.
Side effects: none. We stay unbothered. β¨
Exceptions: it will call croak() if you don't hand it any input parameters, or if you hand it too many, or if $val isn't an instance of class Bio::MAGE::AuditAndSecurity::Security. Like, it will genuinely yell at you.
$val = $arraymanufacture->getSecurity()β the restricted getter method for thesecurityassociation.
Input parameters: none. She takes nothing. π
Return value: the current value of the security association β an instance of type Bio::MAGE::AuditAndSecurity::Security.
Side effects: none.
Exceptions: will call croak() if any input parameters are specified. Even one. She has boundaries.
sub initialize {
my $self = shift;
return 1;
}
π SLOTS, ATTRIBUTES, AND ASSOCIATIONS π
okay so in the Perl implementation of MAGE-OM classes, there are three types of class data members and you need to know the difference: slots, attributes, and associations. Bestie, they are not the same thing. Let's go.
π«§ SLOTS π«§
This API uses the word slot for a data member of the class that wasn't in the UML model and is mostly there for internal purposes. So like β only touch these if you actually understand the inner workings of the API, fr fr. Most of the time slots get used by generic methods, like the ones hanging out in the XML writing and reading classes.
Slots are implemented with unified getter/setter methods, which is honestly so convenient of them:
$var = $obj->slot_name()β retrieves the current value of the slot.$new_var = $obj->slot_name($new_var)β stores$new_varin the slot, and the return value is also$new_var(yes, it gives you back what you gave it, iconic behaviour).@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. None. Zero. She does not check. Be careful. π
π ATTRIBUTES AND ASSOCIATIONS π
The terms attribute and association mean data members of the class that were specified directly from the UML model β so these are the official ones, the main characters.
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. Heads up.
DATA CHECKING: ensures that no argument is provided. That's it. Don't argue with it.
set*β sets the current value, replacing any existing value. Gone. Replaced. π«Ά
NOTE: for associations, if the association has list cardinality, the argument must be an array reference. And because of that... you probably should be using the add* methods instead. Just saying. π
DATA CHECKING: for attributes, it ensures that a single value is provided as the argument. For associations, if the association has list cardinality, it ensures the argument is a reference to an array of instances of the correct MAGE-OM class; otherwise it ensures there's a single argument of the correct MAGE-OM class.
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's giving "and also this one, and this one". β¨
DATA CHECKING: ensures that all arguments are of the correct MAGE-OM class. Every single one.
πΈ GENERIC METHODS πΈ
The unified base class of all MAGE-OM classes, Bio::MAGE::Base, hooks you up with a set of generic methods that will operate on slots, attributes, and associations. Equal opportunity methods:
$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 β the full tea is spilled over there. π
π BUGS π
Please send bug reports to the project mailing list: (mged-mage 'at' lists 'dot' sf 'dot' net)
We're not mad, we just want to know. π
π AUTHOR π
Jason E. Stewart (jasons 'at' cpan 'dot' org)
Legend behaviour, honestly.
π¦ SEE ALSO π¦
π POD ERRORS π
Hey! The above document had some coding errors, which are explained below:
- Around line 499:
'=item' outside of any '=over'
- Around line 584:
You forgot a '=back' before '=head2'
- Around line 900:
Expected '=item 2'
- Around line 905:
Expected '=item 3'
- Around line 910:
Expected '=item 4'
and that's the whole page bestie, we did it π this one shipped as perl v5.32.0, dated 2020-11-27 β a true vintage, no cap. go forth and manufacture responsibly ππβ¨
π¦ 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