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::DerivedSignalBio::MAGE::QuantitationType::MeasuredSignalBio::MAGE::QuantitationType::RatioBio::MAGE::QuantitationType::ConfidenceIndicatorBio::MAGE::QuantitationType::PresentAbsentBio::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
undefif the slot has not been initialized. - Side effects: none.
π ATTRIBUTES π
Attributes are simple data types that belong to a single instance of a class. In the Perl implementation of the MAGE-OM classes, the interface to attributes is implemented using separate setter and getter methods for each attribute. 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
nameattribute to - Return value: whatever the
nameattribute 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
nameattribute - 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
isBackgroundto - Return value: the current value of the
isBackgroundattribute - 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
isBackgroundattribute - 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
identifierattribute to - Return value: the current value of the
identifierattribute - 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
identifierattribute - 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: π
- There must be exactly one item in the association, i.e. this is a mandatory data field.
0..1β There may be one item in the association, i.e. this is an optional data field.1..Nβ There must be one or more items in the association, i.e. this is a mandatory data field, with list cardinality.0..Nβ There may be one or more items in the association, i.e. this is an optional data field, with list cardinality.
Bio::MAGE::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
dataTypeassociation to β one of the accepted enumerated values - Return value: the current value of the
dataTypeassociation β 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$valis not an instance of classBio::MAGE::Description::OntologyEntryπ¨
$val = $standardquantitationtype->getDataType()
The restricted getter for the dataType association.
- Input parameters: none
- Return value: the current value of the
dataTypeassociation β an instance of typeBio::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
auditTrailassociation to β a reference to an array of objects of typeBio::MAGE::AuditAndSecurity::Audit - Return value: the current value of the
auditTrailassociation β a reference to an array of objects of typeBio::MAGE::AuditAndSecurity::Audit - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified, or if$array_refis not a reference to an array classBio::MAGE::AuditAndSecurity::Auditinstances π
$array_ref = $standardquantitationtype->getAuditTrail()
The restricted getter for the auditTrail association.
- Input parameters: none
- Return value: the current value of the
auditTrailassociation β a reference to an array of objects of typeBio::MAGE::AuditAndSecurity::Audit - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
$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
@valsto add to theauditTrailassociation. NOTE: submitting a single value is permitted. - Return value: the number of items stored in the slot after adding
@vals - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if any of the objects in@valsis not an instance of classBio::MAGE::AuditAndSecurity::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
channelassociation to β one of the accepted enumerated values - Return value: the current value of the
channelassociation β 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$valis not an instance of classBio::MAGE::BioAssay::Channelπ¨
$val = $standardquantitationtype->getChannel()
The restricted getter for the channel association.
- Input parameters: none
- Return value: the current value of the
channelassociation β an instance of typeBio::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
propertySetsassociation to β a reference to an array of objects of typeBio::MAGE::NameValueType - Return value: the current value of the
propertySetsassociation β a reference to an array of objects of typeBio::MAGE::NameValueType - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified, or if$array_refis not a reference to an array classBio::MAGE::NameValueTypeinstances π
$array_ref = $standardquantitationtype->getPropertySets()
The restricted getter for the propertySets association.
- Input parameters: none
- Return value: the current value of the
propertySetsassociation β a reference to an array of objects of typeBio::MAGE::NameValueType - Side effects: none
- Exceptions: 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
@valsto add to thepropertySetsassociation. NOTE: submitting a single value is permitted. - Return value: the number of items stored in the slot after adding
@vals - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if any of the objects in@valsis not an instance of classBio::MAGE::NameValueType
β 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 theconfidenceIndicatorsassociation.- Input parameters: the value you want the
confidenceIndicatorsassociation set to β a reference to an array of objects of typeBio::MAGE::QuantitationType::ConfidenceIndicator - Return value: the current value of the
confidenceIndicatorsassociation β a reference to an array of objects of typeBio::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_refisn't a reference to an array of classBio::MAGE::QuantitationType::ConfidenceIndicatorinstances
- Input parameters: the value you want the
$array_ref = $standardquantitationtype->getConfidenceIndicators()β the restricted getter for theconfidenceIndicatorsassociation.- Input parameters: none
- Return value: the current value of the
confidenceIndicatorsassociation β a reference to an array of objects of typeBio::MAGE::QuantitationType::ConfidenceIndicator - Side effects: none β¨
- Exceptions: it will call
croak()if you pass any input parameters at all
$val = $standardquantitationtype->addConfidenceIndicators(@vals)β because theconfidenceIndicatorsassociation has list cardinality, it can hold more than one value. This method adds the current list of objects in theconfidenceIndicatorsassociation.- Input parameters: the list of values
@valsto add to theconfidenceIndicatorsassociation. 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@valsisn't an instance of classBio::MAGE::QuantitationType::ConfidenceIndicator
- Input parameters: the list of values
π¦ 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 thedescriptionsassociation.- Input parameters: the value you want the
descriptionsassociation set to β a reference to an array of objects of typeBio::MAGE::Description::Description - Return value: the current value of the
descriptionsassociation β a reference to an array of objects of typeBio::MAGE::Description::Description - Side effects: none π
- Exceptions: it will call
croak()if you pass no input parameters, or too many input parameters, or if$array_refisn't a reference to an array of classBio::MAGE::Description::Descriptioninstances
- Input parameters: the value you want the
$array_ref = $standardquantitationtype->getDescriptions()β the restricted getter for thedescriptionsassociation.- Input parameters: none
- Return value: the current value of the
descriptionsassociation β a reference to an array of objects of typeBio::MAGE::Description::Description - Side effects: none πΈ
- Exceptions: it will call
croak()if you pass any input parameters
$val = $standardquantitationtype->addDescriptions(@vals)β because thedescriptionsassociation has list cardinality, it can hold more than one value. This method adds the current list of objects in thedescriptionsassociation.- Input parameters: the list of values
@valsto add to thedescriptionsassociation. NOTE: submitting a single value is permitted. π - Return value: the number of items stored in the slot after adding
@vals - Side effects: none
- Exceptions: it will call
croak()if you pass no input parameters, or if any of the objects in@valsisn't an instance of classBio::MAGE::Description::Description
- Input parameters: the list of values
π 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 thescaleassociation.- Input parameters: the value you want the
scaleassociation set to β one of the accepted enumerated values. - Return value: the current value of the
scaleassociation β 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$valisn't an instance of classBio::MAGE::Description::OntologyEntry
- Input parameters: the value you want the
$val = $standardquantitationtype->getScale()β the restricted getter for thescaleassociation.- Input parameters: none
- Return value: the current value of the
scaleassociation β an instance of typeBio::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 thesecurityassociation.- Input parameters: the value you want the
securityassociation set to β one of the accepted enumerated values. - Return value: the current value of the
securityassociation β 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$valisn't an instance of classBio::MAGE::AuditAndSecurity::Security
- Input parameters: the value you want the
$val = $standardquantitationtype->getSecurity()β the restricted getter for thesecurityassociation.- Input parameters: none
- Return value: the current value of the
securityassociation β an instance of typeBio::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 thequantitationTypeMapsassociation.- Input parameters: the value you want the
quantitationTypeMapsassociation set to β a reference to an array of objects of typeBio::MAGE::BioAssayData::QuantitationTypeMap - Return value: the current value of the
quantitationTypeMapsassociation β a reference to an array of objects of typeBio::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_refisn't a reference to an array of classBio::MAGE::BioAssayData::QuantitationTypeMapinstances
- Input parameters: the value you want the
$array_ref = $standardquantitationtype->getQuantitationTypeMaps()β the restricted getter for thequantitationTypeMapsassociation.- Input parameters: none
- Return value: the current value of the
quantitationTypeMapsassociation β a reference to an array of objects of typeBio::MAGE::BioAssayData::QuantitationTypeMap - Side effects: none β
- Exceptions: it will call
croak()if you pass any input parameters
$val = $standardquantitationtype->addQuantitationTypeMaps(@vals)β because thequantitationTypeMapsassociation has list cardinality, it can hold more than one value. This method adds the current list of objects in thequantitationTypeMapsassociation.- Input parameters: the list of values
@valsto add to thequantitationTypeMapsassociation. 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@valsisn't an instance of classBio::MAGE::BioAssayData::QuantitationTypeMap
- Input parameters: the list of values
π¨ 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 π
- 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*β 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 πΈπ¦π
π¦ where this page comes from
- debian bookworm: libbio-mage-perl 20030502.3-6 Β· MIT
- debian trixie: libbio-mage-perl 20030502.3-6 Β· MIT
- ubuntu jammy: libbio-mage-perl 20030502.3-6 Β· MIT
- ubuntu noble: libbio-mage-perl 20030502.3-6 Β· MIT
- ubuntu resolute: libbio-mage-perl 20030502.3-6 Β· MIT
- ubuntu stonking: libbio-mage-perl 20030502.3-6 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms