MAGE::...onType(3pm)

πŸ’… MAGE::...onType(3pm) πŸ’…

User Contributed Perl Documentation β€” yes bestie, that's the manual name, we're doing the whole <pink>MAGE::...onType(3pm)</pink> moment and it's iconic.


✨ NAME ✨

Bio::MAGE::QuantitationType::StandardQuantitationType β€” the class for the MAGE-OM API. That's it, that's the whole flex. 🌸


πŸ¦‹ SYNOPSIS πŸ¦‹

okay so here's how you'd actually poke at this thing, but read the fine print first because this class is abstract and does NOT want to be instantiated directly, no cap:

use Bio::MAGE::QuantitationType::StandardQuantitationType

# Bio::MAGE::QuantitationType::StandardQuantitationType is an abstract base class and should not
# be directly instantiated. These examples indicate how subclass
# objects will behave

# 'name' attribute
my $name_val = $standardquantitationtype->name(); # getter
$standardquantitationtype->name($value); # setter

# 'isBackground' attribute
my $isBackground_val = $standardquantitationtype->isBackground(); # getter
$standardquantitationtype->isBackground($value); # setter

# 'identifier' attribute
my $identifier_val = $standardquantitationtype->identifier(); # getter
$standardquantitationtype->identifier($value); # setter

# 'dataType' association
my $ontologyentry_ref = $standardquantitationtype->dataType(); # getter
$standardquantitationtype->dataType($ontologyentry_ref); # setter

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

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

# 'channel' association
my $channel_ref = $standardquantitationtype->channel(); # getter
$standardquantitationtype->channel($channel_ref); # setter

# 'confidenceIndicators' association
my $confidenceindicator_array_ref = $standardquantitationtype->confidenceIndicators(); # getter
$standardquantitationtype->confidenceIndicators(\@confidenceindicator_list); # setter

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

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

# 'scale' association
my $ontologyentry_ref = $standardquantitationtype->scale(); # getter
$standardquantitationtype->scale($ontologyentry_ref); # setter

# 'quantitationTypeMaps' association
my $quantitationtypemap_array_ref = $standardquantitationtype->quantitationTypeMaps(); # getter
$standardquantitationtype->quantitationTypeMaps(\@quantitationtypemap_list); # setter

🌈 DESCRIPTION 🌈

Straight from the MAGE-OM documentation for the "StandardQuantitationType" class, and I'm quoting here so you know it's legit:

Superclass for the named quantitation type. Useful for mapping to those languages that can use a fly-weight for processing the subclasses.

Now the part that actually matters to your little Perl heart: Bio::MAGE::QuantitationType::StandardQuantitationType is an abstract base class and you should not directly instantiate it. Nope. Not even once. It's out here living its best life as an interface definition for its subclasses. It's giving blueprint energy, not build-it-yourself energy. 🫢


πŸ‘‘ INHERITANCE πŸ‘‘

Bio::MAGE::QuantitationType::StandardQuantitationType has the following superclasses, aka its ancestors, its lineage, its main-character origin story:

  • Bio::MAGE::QuantitationType::QuantitationType

And it has the following subclasses, aka its babies, the ones who carry on the family name:

  • Bio::MAGE::QuantitationType::DerivedSignal
  • Bio::MAGE::QuantitationType::MeasuredSignal
  • Bio::MAGE::QuantitationType::Ratio
  • Bio::MAGE::QuantitationType::ConfidenceIndicator
  • Bio::MAGE::QuantitationType::PresentAbsent
  • Bio::MAGE::QuantitationType::Failed

🧚 CLASS METHODS 🧚

okay so these are the ones you can call without an instance first β€” you hit the class directly, using the

Bio::MAGE::QuantitationType::StandardQuantitationType->methodname()

syntax. Class methods stay winning, periodt. πŸ’œ

new()

new(%args)

Bio::MAGE::QuantitationType::StandardQuantitationType is an abstract base class and should not be directly instantiated using the "new()" constructor. It's listed here purely so you know what arguments its subclasses will accept. It's a teaser, not a menu. πŸ™ˆ

The object constructor "new()" accepts the following optional named-value style arguments:

  • name β€” sets the value of the "name" attribute (and this attribute was inherited from class "Bio::MAGE::Identifiable").
  • isBackground β€” sets the value of the "isBackground" attribute (this attribute was inherited from class "Bio::MAGE::QuantitationType::QuantitationType").
  • identifier β€” sets the value of the "identifier" attribute (this attribute was inherited from class "Bio::MAGE::Identifiable").
  • dataType β€” sets the value of the "dataType" association (this association was inherited from class "Bio::MAGE::QuantitationType::QuantitationType"). The value must be of type: instance of "Bio::MAGE::Description::OntologyEntry".
  • 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".
  • channel β€” sets the value of the "channel" association (this association was inherited from class "Bio::MAGE::QuantitationType::QuantitationType"). The value must be of type: instance of "Bio::MAGE::BioAssay::Channel".
  • 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".
  • confidenceIndicators β€” sets the value of the "confidenceIndicators" association (this association was inherited from class "Bio::MAGE::QuantitationType::QuantitationType"). The value must be of type: array of "Bio::MAGE::QuantitationType::ConfidenceIndicator".
  • 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".
  • scale β€” sets the value of the "scale" association (this association was inherited from class "Bio::MAGE::QuantitationType::QuantitationType"). The value must be of type: instance of "Bio::MAGE::Description::OntologyEntry".
  • 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".
  • quantitationTypeMaps β€” sets the value of the "quantitationTypeMaps" association (this association was inherited from class "Bio::MAGE::QuantitationType::QuantitationType"). The value must be of type: array of "Bio::MAGE::BioAssayData::QuantitationTypeMap".

$obj = class->new(%parameters)

The "new()" method is the class constructor. The moment. The one.

  • Parameters: if you hand it a list of name/value parameters, the corresponding slots, attributes, or associations get their initial values set by the constructor. It's a little starter pack. πŸŽ€
  • Return value: it returns a reference to an object of the class.
  • Side effects: it invokes the "initialize()" method if it's defined by the class.

@names = class->get_slot_names()

The "get_slot_names()" method is how you retrieve the name of all slots defined in a given class.

NOTE: the list of names does not include attribute or association names. Just so you're not out here confused, bestie.
  • 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. The whole government name.

$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 you invoke this with an existing object reference instead of a class name, the "new()" method acts as a copy constructor β€” the new object's initial values get 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's defined by the class.

$obj->set_slots(%parameters)

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

The "set_slots()" method sets a whole bunch of slots at the same time. It has two different invocation methods β€” the first takes a named parameter list, and the second takes two array references. Pick your fighter. ✨

  • Return value: none.
  • Side effects: will call "croak()" if a slot_name is used that the class does not define. So don't be sneaky.

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

The "get_slots()" method gets 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. One for reading, one for writing, very demure, very mindful.

"Bio::MAGE::QuantitationType::StandardQuantitationType" has the following attribute accessor methods:

name

Methods for the "name" attribute.

From the MAGE-OM documentation:

The potentially ambiguous common identifier.

$val = $standardquantitationtype->setName($val)

The restricted setter for the name attribute. πŸ’…

  • Input parameters: the value you're setting the name attribute to
  • Return value: whatever the name attribute is currently holding
  • Side effects: none, bestie, we stay calm
  • Exceptions: will call croak() if you pass no input parameters at all, or if you pass too many 😭

$val = $standardquantitationtype->getName()

The restricted getter for the name attribute. ✨

  • Input parameters: none. Not one. Zero. 🚫
  • Return value: the current value of the name attribute
  • Side effects: none
  • Exceptions: will call croak() if you pass any input parameters

🌸 isBackground 🌸

Methods for the isBackground attribute.

From the MAGE-OM documentation:

Indicates whether the quantitation has been measured from the background or from the feature itself.

$val = $standardquantitationtype->setIsBackground($val)

The restricted setter for the isBackground attribute.

  • Input parameters: the value you're setting isBackground to
  • Return value: the current value of the isBackground attribute
  • Side effects: none
  • Exceptions: will call croak() if no input parameters are specified, or if too many input parameters are specified πŸ’€

$val = $standardquantitationtype->getIsBackground()

The restricted getter for the isBackground attribute.

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

πŸ¦‹ 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 = $standardquantitationtype->setIdentifier($val)

The restricted setter for the identifier attribute.

  • Input parameters: the value you're setting the identifier attribute to
  • Return value: the current value of the identifier attribute
  • Side effects: none
  • Exceptions: will call croak() if no input parameters are specified, or if too many input parameters are specified

$val = $standardquantitationtype->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 any input parameters are specified

🌈 ASSOCIATIONS 🌈

Okay so, associations are references to other classes. And in MAGE-OM, every association has a cardinality β€” which is basically the glow-up rulebook that decides the minimum and maximum number of instances of the 'other' class that can be in the association. Iconic. Let's break it down: πŸ‘‘

  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::QuantitationType::StandardQuantitationType has the following association accessor methods:


πŸ“ dataType πŸ“

Methods for the dataType association.

From the MAGE-OM documentation:

The specific type for the quantitations. From a controlled vocabulary of {float, int, boolean, etc.}

$val = $standardquantitationtype->setDataType($val)

The restricted setter for the dataType association.

  • Input parameters: the value you're setting the dataType association to β€” one of the accepted enumerated values
  • Return value: the current value of the dataType 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::OntologyEntry 🚨

$val = $standardquantitationtype->getDataType()

The restricted getter for the dataType association.

  • Input parameters: none
  • Return value: the current value of the dataType association β€” an instance of type Bio::MAGE::Description::OntologyEntry
  • Side effects: none
  • Exceptions: will call croak() if any input parameters are specified

πŸŽ€ 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 = $standardquantitationtype->setAuditTrail($array_ref)

The restricted setter for the auditTrail association.

  • Input parameters: the value you're setting the auditTrail association to β€” 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 = $standardquantitationtype->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 = $standardquantitationtype->addAuditTrail(@vals)

Because the auditTrail association has list cardinality, it can store more than one value β€” so 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

πŸ’œ channel πŸ’œ

Methods for the channel association.

From the MAGE-OM documentation:

The optional channel associated with the QuantitationType.

$val = $standardquantitationtype->setChannel($val)

The restricted setter for the channel association.

  • Input parameters: the value you're setting the channel association to β€” one of the accepted enumerated values
  • Return value: the current value of the channel 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::BioAssay::Channel 🚨

$val = $standardquantitationtype->getChannel()

The restricted getter for the channel association.

  • Input parameters: none
  • Return value: the current value of the channel association β€” an instance of type Bio::MAGE::BioAssay::Channel
  • Side effects: none
  • Exceptions: will call croak() if any input parameters are specified

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

$array_ref = $standardquantitationtype->setPropertySets($array_ref)

The restricted setter for the propertySets association.

  • Input parameters: the value you're setting the propertySets association to β€” 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 = $standardquantitationtype->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 = $standardquantitationtype->addPropertySets(@vals)

Because the propertySets association has list cardinality, it can store more than one value β€” so 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

⭐ confidenceIndicators ⭐

Methods for the confidenceIndicators association.

From the MAGE-OM documentation:

The association between a ConfidenceIndicator and the QuantitationType it's an indicator for. Like, it's the "which quant thing is this confidence actually about" link, bestie. πŸŽ€

  • $array_ref = $standardquantitationtype->setConfidenceIndicators($array_ref) β€” the restricted setter for the confidenceIndicators association.
    • Input parameters: the value you want the confidenceIndicators association set to β€” a reference to an array of objects of type Bio::MAGE::QuantitationType::ConfidenceIndicator
    • Return value: the current value of the confidenceIndicators association β€” a reference to an array of objects of type Bio::MAGE::QuantitationType::ConfidenceIndicator
    • Side effects: none πŸ’…
    • Exceptions: it will call croak() if you pass no input parameters, or too many input parameters, or if $array_ref isn't a reference to an array of class Bio::MAGE::QuantitationType::ConfidenceIndicator instances
  • $array_ref = $standardquantitationtype->getConfidenceIndicators() β€” the restricted getter for the confidenceIndicators association.
    • Input parameters: none
    • Return value: the current value of the confidenceIndicators association β€” a reference to an array of objects of type Bio::MAGE::QuantitationType::ConfidenceIndicator
    • Side effects: none ✨
    • Exceptions: it will call croak() if you pass any input parameters at all
  • $val = $standardquantitationtype->addConfidenceIndicators(@vals) β€” because the confidenceIndicators association has list cardinality, it can hold more than one value. This method adds the current list of objects in the confidenceIndicators association.
    • Input parameters: the list of values @vals to add to the confidenceIndicators 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: it will call croak() if you pass no input parameters, or if any of the objects in @vals isn't an instance of class Bio::MAGE::QuantitationType::ConfidenceIndicator

πŸ¦‹ 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.

  • $array_ref = $standardquantitationtype->setDescriptions($array_ref) β€” the restricted setter for the descriptions association.
    • Input parameters: the value you want the descriptions association set to β€” 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: it will call croak() if you pass no input parameters, or too many input parameters, or if $array_ref isn't a reference to an array of class Bio::MAGE::Description::Description instances
  • $array_ref = $standardquantitationtype->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: it will call croak() if you pass any input parameters
  • $val = $standardquantitationtype->addDescriptions(@vals) β€” because the descriptions association has list cardinality, it can hold 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: it will call croak() if you pass no input parameters, or if any of the objects in @vals isn't an instance of class Bio::MAGE::Description::Description

πŸ‘‘ scale πŸ‘‘

Methods for the scale association.

From the MAGE-OM documentation:

Indication of how to interpret the value. From a suggested vocabulary of {LINEAR | LN | LOG2 |LOG10 | FOLD_CHANGE | OTHER}

  • $val = $standardquantitationtype->setScale($val) β€” the restricted setter for the scale association.
    • Input parameters: the value you want the scale association set to β€” one of the accepted enumerated values.
    • Return value: the current value of the scale association β€” one of the accepted enumerated values.
    • Side effects: none
    • Exceptions: it will call croak() if you pass no input parameters, or too many input parameters, or if $val isn't an instance of class Bio::MAGE::Description::OntologyEntry
  • $val = $standardquantitationtype->getScale() β€” the restricted getter for the scale association.
    • Input parameters: none
    • Return value: the current value of the scale association β€” an instance of type Bio::MAGE::Description::OntologyEntry.
    • Side effects: none ✨
    • Exceptions: it will call croak() if you pass any input parameters

πŸ”’ security πŸ”’

Methods for the security association.

From the MAGE-OM documentation:

Information on the security for the instance of the class.

  • $val = $standardquantitationtype->setSecurity($val) β€” the restricted setter for the security association.
    • Input parameters: the value you want the security association set to β€” 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: it will call croak() if you pass no input parameters, or too many input parameters, or if $val isn't an instance of class Bio::MAGE::AuditAndSecurity::Security
  • $val = $standardquantitationtype->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: it will call croak() if you pass any input parameters

🌈 quantitationTypeMaps 🌈

Methods for the quantitationTypeMaps association.

From the MAGE-OM documentation:

The QuantitationType whose value will be produced from the values of the source QuantitationType according to the Protocol.

  • $array_ref = $standardquantitationtype->setQuantitationTypeMaps($array_ref) β€” the restricted setter for the quantitationTypeMaps association.
    • Input parameters: the value you want the quantitationTypeMaps association set to β€” a reference to an array of objects of type Bio::MAGE::BioAssayData::QuantitationTypeMap
    • Return value: the current value of the quantitationTypeMaps association β€” a reference to an array of objects of type Bio::MAGE::BioAssayData::QuantitationTypeMap
    • Side effects: none πŸ“
    • Exceptions: it will call croak() if you pass no input parameters, or too many input parameters, or if $array_ref isn't a reference to an array of class Bio::MAGE::BioAssayData::QuantitationTypeMap instances
  • $array_ref = $standardquantitationtype->getQuantitationTypeMaps() β€” the restricted getter for the quantitationTypeMaps association.
    • Input parameters: none
    • Return value: the current value of the quantitationTypeMaps association β€” a reference to an array of objects of type Bio::MAGE::BioAssayData::QuantitationTypeMap
    • Side effects: none ⭐
    • Exceptions: it will call croak() if you pass any input parameters
  • $val = $standardquantitationtype->addQuantitationTypeMaps(@vals) β€” because the quantitationTypeMaps association has list cardinality, it can hold more than one value. This method adds the current list of objects in the quantitationTypeMaps association.
    • Input parameters: the list of values @vals to add to the quantitationTypeMaps 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: it will call croak() if you pass no input parameters, or if any of the objects in @vals isn't an instance of class Bio::MAGE::BioAssayData::QuantitationTypeMap

🚨 okay so real talk: this next bit is giving abstract base class energy and it is NOT here to be instantiated. Do not try it. Do not pass go. 🚨
sub initialize {

  carp __PACKAGE__ . "::initialize: abstract base classes should not be instantiated";

}

✨ SLOTS, ATTRIBUTES, AND ASSOCIATIONS ✨

okay bestie so in the Perl implementation of MAGE-OM classes, a class can hold three different flavours of data member, and you're gonna need to know which is which: slots, attributes, and associations. let's go πŸ’–

🌸 SLOTS 🌸

so this API uses the word slot to mean a data member that was not in the UML model at all β€” it's there for mostly internal stuff. fr fr, only touch these if you genuinely understand the inner workings of the API, no cap. most of the time slots get used by the generic methods, like the ones hanging out in the XML writing and reading classes.

slots run on unified getter/setter methods, like this:

$var = $obj->slot_name();

that one retrieves the current value of the slot. classic getter behaviour πŸ’…

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

that one stores $new_var in the slot β€” and the return value is also $new_var, cute little boomerang πŸͺƒ

@names = $obj->get_slot_names()

and that one returns the list of all the slots in the class. obsessed.

DATA CHECKING: nope. no data type checking is made for these methods. it's giving chaos, it's giving "you're on your own", so be careful 🫢

πŸ¦‹ ATTRIBUTES AND ASSOCIATIONS πŸ¦‹

the words attribute and association mean data members that were specified directly from the UML model β€” so these ones are the real deal, not the internal secret ones.

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

  • get* β€” retrieves the current value.
    • NOTE: for associations, if the association has list cardinality, an array reference is returned. so heads up, you're getting a ref back, not a plain list.
    • DATA CHECKING: ensure that no argument is provided. don't be passing stuff in, bestie, it will not be received πŸ™ˆ
  • set* β€” sets the current value, replacing any existing value. out with the old, in with the new ✨
    • NOTE: for associations, if the association has list cardinality, the argument must be an array reference. and because of that whole situation, you probably should be using the add* methods instead. just saying πŸ‘€
    • DATA CHECKING: for attributes, ensure that a single value is provided as the argument. for associations, if the association has list cardinality, ensure the argument is a reference to an array of instances of the correct MAGE-OM class β€” otherwise, ensure there's a single argument of the correct MAGE-OM class. so many rules, but they're there for you πŸ’œ
  • add* β€” appends a list of objects to any values that may already be stored in the association.
    • NOTE: this one is only present in associations with list cardinality. if you don't see it, that's why, don't panic.
    • DATA CHECKING: ensure that all arguments are of the correct MAGE-OM class. all of them. every single one 🌈

πŸ’œ GENERIC METHODS πŸ’œ

the unified base class of all MAGE-OM classes, Bio::MAGE::Base, provides a whole set of generic methods that will operate on slots, attributes, and associations. so basically the base class is the main character and it's carrying the whole squad πŸ‘‘

$val = $obj->get_slot($name)
\@list_ref = $obj->get_slots(@name_list);
$val = $obj->set_slot($name,$val)
$obj->set_slots(%parameters)
$obj->set_slots(\@name_list, \@value_list)

see elsewhere in this page for a detailed description of these methods. iykyk, the details are already up there πŸŽ€


πŸ› BUGS πŸ›

found a bug? please send bug reports to the project mailing list: (mged-mage 'at' lists 'dot' sf 'dot' net). they want to hear from you, bestie πŸ’Œ

πŸ‘‘ AUTHOR πŸ‘‘

Jason E. Stewart (jasons 'at' cpan 'dot' org) β€” iconic, we stan 🫢

πŸ” SEE ALSO πŸ”

πŸ’€ POD ERRORS πŸ’€

hey! so the above document had some coding errors, and they're explained below. not me snitching on the docs but okay 😭

Around line 411:

  • '=item' outside of any '=over'

Around line 496:

  • You forgot a '=back' before a '=head2'

Around line 740:

  • Expected '=item 2'

Around line 745:

  • Expected '=item 3'

Around line 750:

  • Expected '=item 4'

and that's the whole page, bestie, you made it to the end πŸŽ‰ this was pulled straight from perl v5.32.0 and dated 2020-11-27, so if you're reading it in the future, just know it's a lil vintage but still ate πŸ’…βœ¨ go forth and slay those MAGE-OM objects πŸŒΈπŸ¦‹πŸ’–