MAGE::...reLIMS(3pm)

πŸ’– MAGE::...reLIMS(3pm) πŸ’–

okay so bestie, quick vibe check: this page is from User Contributed Perl Documentation, and the manual is literally called MAGE::...reLIMS(3pm). grab a strawberry πŸ“ and sit down, we're getting into MAGE-OM together. no cap.


✨ NAME ✨

Bio::MAGE::Array::ManufactureLIMS β€” it's a Class for the MAGE-OM API. that's it, that's the whole identity. πŸ’…

πŸ¦‹ SYNOPSIS πŸ¦‹

here's the receipts, verbatim, do not touch:

use Bio::MAGE::Array::ManufactureLIMS

# creating an empty instance
my $manufacturelims = Bio::MAGE::Array::ManufactureLIMS->new();

# creating an instance with existing data
my $manufacturelims = Bio::MAGE::Array::ManufactureLIMS->new(
      quality=>$quality_val,
      bioMaterial=>$biomaterial_ref,
      auditTrail=>\@audit_list,
      propertySets=>\@namevaluetype_list,
      feature=>$feature_ref,
      identifierLIMS=>$databaseentry_ref,
      descriptions=>\@description_list,
      security=>$security_ref,
);

# 'quality' attribute
my $quality_val = $manufacturelims->quality(); # getter
$manufacturelims->quality($value); # setter

# 'bioMaterial' association
my $biomaterial_ref = $manufacturelims->bioMaterial(); # getter
$manufacturelims->bioMaterial($biomaterial_ref); # setter

# 'auditTrail' association
my $audit_array_ref = $manufacturelims->auditTrail(); # getter
$manufacturelims->auditTrail(\@audit_list); # setter

# 'propertySets' association
my $namevaluetype_array_ref = $manufacturelims->propertySets(); # getter
$manufacturelims->propertySets(\@namevaluetype_list); # setter

# 'feature' association
my $feature_ref = $manufacturelims->feature(); # getter
$manufacturelims->feature($feature_ref); # setter

# 'identifierLIMS' association
my $databaseentry_ref = $manufacturelims->identifierLIMS(); # getter
$manufacturelims->identifierLIMS($databaseentry_ref); # setter

# 'descriptions' association
my $description_array_ref = $manufacturelims->descriptions(); # getter
$manufacturelims->descriptions(\@description_list); # setter

# 'security' association
my $security_ref = $manufacturelims->security(); # getter
$manufacturelims->security($security_ref); # setter

🌈 DESCRIPTION 🌈

so the MAGE-OM documentation for the "ManufactureLIMS" class says, and I quote:

Information on the physical production of arrays within the laboratory.

that's the whole point of this class. it's the lab-production lore. πŸ”₯

πŸ‘‘ INHERITANCE πŸ‘‘

Bio::MAGE::Array::ManufactureLIMS has these superclasses, i.e. its ancestors, its bloodline, its main-character lineage:

  • Bio::MAGE::Describable

and it has these subclasses β€” the little ones that inherit from it:

  • Bio::MAGE::Array::ManufactureLIMSBiomaterial

πŸŽ€ CLASS METHODS πŸŽ€

every single method below can be called without making an instance first β€” you just do Bio::MAGE::Array::ManufactureLIMS->methodname(). no object required, class-level energy only. ✨

πŸ’– new()

πŸ’– new(%args)

the object constructor new() takes these optional named-value style arguments:

  • quality β€” sets the value of the quality attribute
  • bioMaterial β€” sets the value of the bioMaterial association
    • the value must be of type: instance of Bio::MAGE::BioMaterial::BioMaterial.
  • auditTrail β€” sets the value of the auditTrail association (fun fact: 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 one was inherited from class Bio::MAGE::Extendable)
    • the value must be of type: array of Bio::MAGE::NameValueType.
  • feature β€” sets the value of the feature association
    • the value must be of type: instance of Bio::MAGE::DesignElement::Feature.
  • identifierLIMS β€” sets the value of the identifierLIMS association
    • the value must be of type: instance of Bio::MAGE::Description::DatabaseEntry.
  • descriptions β€” sets the value of the descriptions association (again, 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 (yep, inherited from class Bio::MAGE::Describable)
    • the value must be of type: instance of Bio::MAGE::AuditAndSecurity::Security.

🌟 $obj = class->new(%parameters)

the new() method is the class constructor. the moment. the icon.

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 the class defines one.

🌟 @names = class->get_slot_names()

get_slot_names() is how you get the name of all slots defined in a given class.

NOTE: the list of names does not include attribute or association names. keep that in mind bestie, don't come for 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.

🌟 @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 as a hash β€” the keys are the association names, and the values are Association objects that carry the meta-information for each association. it's giving very structured. πŸ’…


🧚 INSTANCE METHODS 🧚

🌸 $obj_copy = $obj->new()

when you invoke new() on an existing object reference instead of on a class name, it acts as a copy constructor β€” the new object's initial values get set to be exactly those of the existing object. it's a clone situation. 😭

Parameters: no input parameters are used in the copy constructor β€” the initial values are taken directly from the object being copied.

Return value: it returns a reference to an object of the class.

Side effects: it invokes the initialize() method if the class defines one.

🌸 $obj->set_slots(%parameters)

🌸 $obj->set_slots(\@name_list, \@value_list)

set_slots() sets a whole bunch of slots at the same time, and it has two different invocation methods. the first one takes a named parameter list, and the second takes two array references. pick your fighter. πŸ”₯

Return value: none.

Side effects: it will call croak() if a slot_name is used that the class does not define. so like, don't make things up.

🌸 @obj_list = $obj->get_slots(@name_list)

get_slots() grabs the values of a number of slots all at once.

Return value: a list of instance objects.

Side effects: none.

🌸 $val = $obj->set_slot($name,$val)

set_slot() 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)

get_slot() 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, one attribute, iconic.

"Bio::MAGE::Array::ManufactureLIMS" has the following attribute accessor methods:

πŸ“ quality

methods for the quality attribute.

from the MAGE-OM documentation:

A brief description of the quality of the array manufacture process.

$val = $manufacturelims->setQuality($val)

the restricted setter method for the quality attribute.

  • Input parameters: the value to which the quality attribute will be set
  • Return value: the current value of the quality attribute
  • Side effects: none
  • Exceptions: it will call croak() if no input parameters are specified, or if too many input parameters are specified

$val = $manufacturelims->getQuality()

the restricted getter method for the quality attribute.

  • Input parameters: none
  • Return value: the current value of the quality attribute
  • Side effects: none
  • Exceptions: it will call croak() if any input parameters are specified

πŸ¦„ ASSOCIATIONS πŸ¦„

associations are references to other classes. associations in MAGE-OM have a cardinality that determines the minimum and maximum number of instances of the 'other' class that maybe included in the association:

  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.
  3. 1..N β€” there must be one or more items in the association, i.e. this is a mandatory data field, with list cardinality.
  4. 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::ManufactureLIMS has the following association accessor methods:

πŸ’œ bioMaterial

methods for the bioMaterial association.

from the MAGE-OM documentation:

The BioMaterial used for the feature.

$val = $manufacturelims->setBioMaterial($val)

the restricted setter method for the bioMaterial association.

  • Input parameters: the value to which the bioMaterial association will be set : one of the accepted enumerated values.
  • Return value: the current value of the bioMaterial association : one of the accepted enumerated values.
  • Side effects: none
  • Exceptions: it will call croak() if no input parameters are specified, or if too many input parameters are specified, or if $val is not an instance of class Bio::MAGE::BioMaterial::BioMaterial

$val = $manufacturelims->getBioMaterial()

the restricted getter method for the bioMaterial association.

  • Input parameters: none
  • Return value: the current value of the bioMaterial association : an instance of type Bio::MAGE::BioMaterial::BioMaterial.
  • Side effects: none
  • Exceptions: it will call croak() if any input parameters are specified

...and bestie, this page is long so it keeps going β€” more parts incoming, don't go anywhere πŸ’–

🌸 auditTrail 🌸

bestie, these are the methods for the auditTrail association, okurrr?

Straight from the MAGE-OM documentation:

A list of Audit instances that track changes to the instance of Describable.

$array_ref = $manufacturelims->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

$array_ref = $manufacturelims->getAuditTrail()

The restricted getter for the auditTrail association. ✨

  • Input parameters: none
  • 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

$val = $manufacturelims->addAuditTrail(@vals)

Because the auditTrail association has list cardinality, it may store more than one value. This method adds the current list of objects in the auditTrail association. 🫢

  • Input parameters: the list of values @vals to add to the auditTrail 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::Audit

πŸŽ€ propertySets πŸŽ€

Methods for the propertySets association, no cap.

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 = $manufacturelims->setPropertySets($array_ref)

The restricted setter for the propertySets association.

  • 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

$array_ref = $manufacturelims->getPropertySets()

The restricted getter for the propertySets association.

  • 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

$val = $manufacturelims->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 @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

πŸ¦‹ feature πŸ¦‹

Methods for the feature association. it's giving very specific, bestie.

From the MAGE-OM documentation:

The feature whose LIMS information is being described.

$val = $manufacturelims->setFeature($val)

The restricted setter for the feature association.

  • Input parameters: the value to which the feature association will be set : one of the accepted enumerated values.
  • Return value: the current value of the feature association : one of the accepted enumerated values.
  • Side effects: none
  • Exceptions: will call croak() if no input parameters are specified, or if too many input parameters are specified, or if $val is not an instance of class Bio::MAGE::DesignElement::Feature

$val = $manufacturelims->getFeature()

The restricted getter for the feature association.

  • Input parameters: none
  • Return value: the current value of the feature association : an instance of type Bio::MAGE::DesignElement::Feature.
  • Side effects: none
  • Exceptions: will call croak() if any input parameters are specified

πŸ’œ identifierLIMS πŸ’œ

Methods for the identifierLIMS association, periodt.

From the MAGE-OM documentation:

Association to a LIMS data source for further information on the manufacturing process.

$val = $manufacturelims->setIdentifierLIMS($val)

The restricted setter for the identifierLIMS association.

  • Input parameters: the value to which the identifierLIMS association will be set : one of the accepted enumerated values.
  • Return value: the current value of the identifierLIMS association : one of the accepted enumerated values.
  • Side effects: none
  • Exceptions: will call croak() if no input parameters are specified, or if too many input parameters are specified, or if $val is not an instance of class Bio::MAGE::Description::DatabaseEntry

$val = $manufacturelims->getIdentifierLIMS()

The restricted getter for the identifierLIMS association.

  • Input parameters: none
  • Return value: the current value of the identifierLIMS association : an instance of type Bio::MAGE::Description::DatabaseEntry.
  • Side effects: none
  • Exceptions: will call croak() if any input parameters are specified

🌈 descriptions 🌈

Methods for the descriptions association. lowkey essential ngl.

From the MAGE-OM documentation:

Free hand text descriptions. Makes available the associations of Description to an instance of Describable.

$array_ref = $manufacturelims->setDescriptions($array_ref)

The restricted setter for the descriptions association.

  • 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

$array_ref = $manufacturelims->getDescriptions()

The restricted getter for the descriptions association.

  • 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

$val = $manufacturelims->addDescriptions(@vals)

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. 🌸

  • 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. main character energy fr fr.

From the MAGE-OM documentation:

Information on the security for the instance of the class.

$val = $manufacturelims->setSecurity($val)

The restricted setter for the security association.

  • Input parameters: the value to which the security association will be set : one of the accepted enumerated values.
  • Return value: the current value of the security association : one of the accepted enumerated values.
  • Side effects: none
  • Exceptions: will call croak() if no input parameters are specified, or if too many input parameters are specified, or if $val is not an instance of class Bio::MAGE::AuditAndSecurity::Security

$val = $manufacturelims->getSecurity()

The restricted getter for the security association.

  • Input parameters: none
  • 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

and then there's this lil guy, just vibing at the end of the methods β€” literally all it does is return 1, 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 three flavors of class data members, and you gotta know which one you're touching: slots, attributes, and associations. bestie they are NOT the same thing and the vibes differ. let's go πŸ¦‹


✨ SLOTS ✨

so this API uses the word "slot" for a data member that was not present in the UML model and exists mostly for internal purposes. translation: use only if you understand the inner workings of the API πŸ‘€ like, do not just roll up and start poking slots unless you know what you're doing, fr fr. most of the time slots get used by generic methods β€” the ones in the XML writing and reading classes are the classic example.

slots are implemented with unified getter/setter methods, like so:

$var = $obj->slot_name();

Retrieves the current value of the slot. simple. iconic.

$new_var = $obj->slot_name($new_var);

Stores $new_var in the slot β€” and the return value is also $new_var. cute lil echo back at you πŸ’–

@names = $obj->get_slot_names()

Returns the list of all slots in the class. the whole roster. the full lineup.

DATA CHECKING: no data type checking is made for these methods. none. zero. nada. it's giving "trust fall" 😭 so be careful bestie.

πŸŽ€ 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 ones with paperwork ✨

in the Perl implementation of MAGE-OM classes, association and attribute accessors come in three separate methods:

🌸 get*

Retrieves the current value.

NOTE: for associations, if the association has list cardinality, an array reference is returned. so expect a ref, not a plain list, bestie.
DATA CHECKING: ensure that no argument is provided. hand it nothing. empty hands. πŸ™ˆ

🌸 set*

Sets the current value, replacing any existing value. bye to whatever was there before, no hesitation πŸ’…

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 instead. like genuinely, just use add*.
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. that's a lot of words but it's basically "give it the right shape and the right class or it's over" 😀

🌸 add*

NOTE: only present in associations with list cardinality. if you don't see it, that's why, don't panic.

Appends a list of objects to any values that may already be stored in the association. so it's additive, not destructive. we love a method that doesn't delete your stuff 🫢

DATA CHECKING: ensure that all arguments are of the correct MAGE-OM class. every single one. all of them.

🧚 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. (yes, "elsewhere in this page." they said what they said. go look πŸ‘‘)


πŸ’€ BUGS πŸ’€

Please send bug reports to the project mailing list: (mged-mage 'at' lists 'dot' sf 'dot' net)

like actually send them, don't just vibe about it in your head. the maintainers wanna know πŸ›


πŸ‘‘ AUTHOR πŸ‘‘

Jason E. Stewart (jasons 'at' cpan 'dot' org)

the author. the moment. the main character energy ✨


πŸ”₯ SEE ALSO πŸ”₯

that's it. that's the list. one entry. iconic minimalism πŸ’…


😭 POD ERRORS 😭

Hey! The above document had some coding errors, which are explained below:

  • Around line 415:
    • '=item' outside of any '=over'
  • Around line 500:
    • You forgot a '=back' before a '=head2'
  • Around line 600:
    • Expected '=item 2'
  • Around line 605:
    • Expected '=item 3'
  • Around line 610:
    • Expected '=item 4'

ngl the doc itself was fighting for its life a little bit but we still ate πŸ“ those are all real, character for character, so don't come for me.


aaaand that's the whole page bestie, we made it to the end together πŸŽ€ this was perl v5.32.0 from 2020-11-27 β€” a lil vintage, a lil retro, still slaying. mwah πŸ’–