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 the name attribute (this attribute was inherited from class Bio::MAGE::Identifiable).
  • identifier β€” sets the value of the identifier attribute (this attribute was inherited from class Bio::MAGE::Identifiable).
  • tolerance β€” sets the value of the tolerance attribute.
  • manufacturingDate β€” sets the value of the manufacturingDate attribute.
  • arrayManufacturers β€” sets the value of the arrayManufacturers association.

The value must be of type: array of Bio::MAGE::AuditAndSecurity::Contact.

  • featureLIMSs β€” sets the value of the featureLIMSs association.

The value must be of type: array of Bio::MAGE::Array::ManufactureLIMS.

  • arrays β€” sets the value of the arrays association.

The value must be of type: array of Bio::MAGE::Array::Array.

  • auditTrail β€” sets the value of the auditTrail association (this association was inherited from class Bio::MAGE::Describable).

The value must be of type: array of Bio::MAGE::AuditAndSecurity::Audit.

  • propertySets β€” 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.

  • qualityControlStatistics β€” sets the value of the qualityControlStatistics association.

The value must be of type: array of Bio::MAGE::NameValueType.

  • protocolApplications β€” sets the value of the protocolApplications association.

The value must be of type: array of Bio::MAGE::Protocol::ProtocolApplication.

  • descriptions β€” sets the value of the descriptions association (this association was inherited from class Bio::MAGE::Describable).

The value must be of type: array of Bio::MAGE::Description::Description.

  • security β€” sets the value of the security association (this association was inherited from class Bio::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 undef if 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 name attribute will be set.
  • Return value: the current value of the name attribute.
  • 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 name attribute.
  • 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 the identifier attribute πŸ’–
    • Input parameters: the value you're setting the identifier attribute to.
    • Return value: whatever the identifier attribute 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.
  • $val = $arraymanufacture->getIdentifier() β€” the restricted getter for the identifier attribute ✨
    • Input parameters: none.
    • Return value: the current value of the identifier attribute.
    • 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 the tolerance attribute.
    • Input parameters: the value to which the tolerance attribute will be set.
    • Return value: the current value of the tolerance attribute.
    • Side effects: none.
    • Exceptions: will call croak() if no input parameters are specified, or if too many input parameters are specified.
  • $val = $arraymanufacture->getTolerance() β€” the restricted getter for the tolerance attribute.
    • Input parameters: none.
    • Return value: the current value of the tolerance attribute.
    • 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 the manufacturingDate attribute.
    • Input parameters: the value to which the manufacturingDate attribute will be set.
    • Return value: the current value of the manufacturingDate attribute.
    • Side effects: none.
    • Exceptions: will call croak() if no input parameters are specified, or if too many input parameters are specified.
  • $val = $arraymanufacture->getManufacturingDate() β€” the restricted getter for the manufacturingDate attribute.
    • Input parameters: none.
    • Return value: the current value of the manufacturingDate attribute.
    • 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:

  1. There must be exactly one item in the association, i.e. this is a mandatory data field.
  2. 0..1

There may be one item in the association, i.e. this is an optional data field.

  1. 1..N

There must be one or more items in the association, i.e. this is a mandatory data field, with list cardinality.

  1. 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 the arrayManufacturers association.
    • Input parameters: the value to which the arrayManufacturers association will be set : a reference to an array of objects of type Bio::MAGE::AuditAndSecurity::Contact
    • Return value: the current value of the arrayManufacturers association : a reference to an array of objects of type Bio::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_ref is not a reference to an array class Bio::MAGE::AuditAndSecurity::Contact instances.
  • $array_ref = $arraymanufacture->getArrayManufacturers() β€” the restricted getter for the arrayManufacturers association.
    • Input parameters: none.
    • Return value: the current value of the arrayManufacturers association : a reference to an array of objects of type Bio::MAGE::AuditAndSecurity::Contact
    • Side effects: none.
    • Exceptions: will call croak() if any input parameters are specified.
  • $val = $arraymanufacture->addArrayManufacturers(@vals) β€” because the arrayManufacturers association has list cardinality, it may store more than one value. This method adds the current list of objects in the arrayManufacturers association. Obsessed with a collection that can just keep growing 🫢
    • Input parameters: the list of values @vals to add to the arrayManufacturers association. 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 @vals is not an instance of class Bio::MAGE::AuditAndSecurity::Contact.

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 the featureLIMSs association.
    • Input parameters: the value to which the featureLIMSs association will be set : a reference to an array of objects of type Bio::MAGE::Array::ManufactureLIMS
    • Return value: the current value of the featureLIMSs association : a reference to an array of objects of type Bio::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_ref is not a reference to an array class Bio::MAGE::Array::ManufactureLIMS instances.
  • $array_ref = $arraymanufacture->getFeatureLIMSs() β€” the restricted getter for the featureLIMSs association.
    • Input parameters: none.
    • Return value: the current value of the featureLIMSs association : a reference to an array of objects of type Bio::MAGE::Array::ManufactureLIMS
    • Side effects: none.
    • Exceptions: will call croak() if any input parameters are specified.
  • $val = $arraymanufacture->addFeatureLIMSs(@vals) β€” because the featureLIMSs association has list cardinality, it may store more than one value. This method adds the current list of objects in the featureLIMSs association.
    • Input parameters: the list of values @vals to add to the featureLIMSs association. 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 @vals is not an instance of class Bio::MAGE::Array::ManufactureLIMS.

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 the arrays association.
    • Input parameters: the value to which the arrays association will be set : a reference to an array of objects of type Bio::MAGE::Array::Array
    • Return value: the current value of the arrays association : a reference to an array of objects of type Bio::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_ref is not a reference to an array class Bio::MAGE::Array::Array instances.
  • $array_ref = $arraymanufacture->getArrays() β€” the restricted getter for the arrays association.
    • Input parameters: none.
    • Return value: the current value of the arrays association : a reference to an array of objects of type Bio::MAGE::Array::Array
    • Side effects: none.
    • Exceptions: will call croak() if any input parameters are specified.
  • $val = $arraymanufacture->addArrays(@vals) β€” because the arrays association has list cardinality, it may store more than one value. This method adds the current list of objects in the arrays association.
    • Input parameters: the list of values @vals to add to the arrays association. 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 @vals is not an instance of class Bio::MAGE::Array::Array.

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 the auditTrail association.
    • Input parameters: the value to which the auditTrail association will be set : a reference to an array of objects of type Bio::MAGE::AuditAndSecurity::Audit
    • Return value: the current value of the auditTrail association : a reference to an array of objects of type Bio::MAGE::AuditAndSecurity::Audit
    • Side effects: none.
  • Exceptions: will call croak() if no input parameters are specified, or if too many input parameters are specified, or if $array_ref is not a reference to an array class Bio::MAGE::AuditAndSecurity::Audit instances

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 auditTrail association : a reference to an array of objects of type Bio::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 @vals to add to the auditTrail association. 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 @vals is not an instance of class Bio::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 propertySets association will be set : a reference to an array of objects of type Bio::MAGE::NameValueType
  • Return value: the current value of the propertySets association : a reference to an array of objects of type Bio::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_ref is not a reference to an array class Bio::MAGE::NameValueType instances

getPropertySets β€” the restricted getter for the propertySets association πŸ’œ

$array_ref = $arraymanufacture->getPropertySets()
  • Input parameters: none
  • Return value: the current value of the propertySets association : a reference to an array of objects of type Bio::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 @vals to add to the propertySets association. 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 @vals is not an instance of class Bio::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 qualityControlStatistics association will be set : a reference to an array of objects of type Bio::MAGE::NameValueType
  • Return value: the current value of the qualityControlStatistics association : a reference to an array of objects of type Bio::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_ref is not a reference to an array class Bio::MAGE::NameValueType instances

getQualityControlStatistics β€” the restricted getter for the qualityControlStatistics association πŸŽ€

$array_ref = $arraymanufacture->getQualityControlStatistics()
  • Input parameters: none
  • Return value: the current value of the qualityControlStatistics association : a reference to an array of objects of type Bio::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 @vals to add to the qualityControlStatistics association. 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 @vals is not an instance of class Bio::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 protocolApplications association will be set : a reference to an array of objects of type Bio::MAGE::Protocol::ProtocolApplication
  • Return value: the current value of the protocolApplications association : a reference to an array of objects of type Bio::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_ref is not a reference to an array class Bio::MAGE::Protocol::ProtocolApplication instances

getProtocolApplications β€” the restricted getter for the protocolApplications association πŸ’–

$array_ref = $arraymanufacture->getProtocolApplications()
  • Input parameters: none
  • Return value: the current value of the protocolApplications association : a reference to an array of objects of type Bio::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 @vals to add to the protocolApplications association. 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 @vals is not an instance of class Bio::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 descriptions association will be set : a reference to an array of objects of type Bio::MAGE::Description::Description
  • Return value: the current value of the descriptions association : a reference to an array of objects of type Bio::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_ref is not a reference to an array class Bio::MAGE::Description::Description instances

getDescriptions β€” the restricted getter for the descriptions association ✨

$array_ref = $arraymanufacture->getDescriptions()
  • Input parameters: none
  • Return value: the current value of the descriptions association : a reference to an array of objects of type Bio::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 @vals to add to the descriptions association. 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 @vals is not an instance of class Bio::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 the security association.

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_var in 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 πŸŽ€πŸ’–βœ¨