MAGE::...ioAssay(3pm)
πΈ NAME πΈ
Bio::MAGE::BioAssay::DerivedBioAssay β a class for the MAGE-OM API, bestie. This is the MAGE::...ioAssay(3pm) page, straight outta User Contributed Perl Documentation. π
β¨ SYNOPSIS β¨
use Bio::MAGE::BioAssay::DerivedBioAssay
# creating an empty instance
my $derivedbioassay = Bio::MAGE::BioAssay::DerivedBioAssay->new();
# creating an instance with existing data
my $derivedbioassay = Bio::MAGE::BioAssay::DerivedBioAssay->new(
name=>$name_val,
identifier=>$identifier_val,
channels=>\@channel_list,
auditTrail=>\@audit_list,
propertySets=>\@namevaluetype_list,
bioAssayFactorValues=>\@factorvalue_list,
descriptions=>\@description_list,
security=>$security_ref,
derivedBioAssayMap=>\@bioassaymap_list,
type=>$ontologyentry_ref,
derivedBioAssayData=>\@derivedbioassaydata_list,
);
# 'name' attribute
my $name_val = $derivedbioassay->name(); # getter
$derivedbioassay->name($value); # setter
# 'identifier' attribute
my $identifier_val = $derivedbioassay->identifier(); # getter
$derivedbioassay->identifier($value); # setter
# 'channels' association
my $channel_array_ref = $derivedbioassay->channels(); # getter
$derivedbioassay->channels(\@channel_list); # setter
# 'auditTrail' association
my $audit_array_ref = $derivedbioassay->auditTrail(); # getter
$derivedbioassay->auditTrail(\@audit_list); # setter
# 'propertySets' association
my $namevaluetype_array_ref = $derivedbioassay->propertySets(); # getter
$derivedbioassay->propertySets(\@namevaluetype_list); # setter
# 'bioAssayFactorValues' association
my $factorvalue_array_ref = $derivedbioassay->bioAssayFactorValues(); # getter
$derivedbioassay->bioAssayFactorValues(\@factorvalue_list); # setter
# 'descriptions' association
my $description_array_ref = $derivedbioassay->descriptions(); # getter
$derivedbioassay->descriptions(\@description_list); # setter
# 'security' association
my $security_ref = $derivedbioassay->security(); # getter
$derivedbioassay->security($security_ref); # setter
# 'derivedBioAssayMap' association
my $bioassaymap_array_ref = $derivedbioassay->derivedBioAssayMap(); # getter
$derivedbioassay->derivedBioAssayMap(\@bioassaymap_list); # setter
# 'type' association
my $ontologyentry_ref = $derivedbioassay->type(); # getter
$derivedbioassay->type($ontologyentry_ref); # setter
# 'derivedBioAssayData' association
my $derivedbioassaydata_array_ref = $derivedbioassay->derivedBioAssayData(); # getter
$derivedbioassay->derivedBioAssayData(\@derivedbioassaydata_list); # setter
π DESCRIPTION π
okay so, quoting the MAGE-OM documentation for the "DerivedBioAssay" class, fr fr:
A BioAssay that is created by the Transformation BioEvent from one or more MeasuredBioAssays or DerivedBioAssays.
periodt. that's the whole vibe. π§¬
π¦ INHERITANCE π¦
Bio::MAGE::BioAssay::DerivedBioAssay has these superclasses, and it's giving very "borrowed the whole wardrobe" energy:
Bio::MAGE::BioAssay::BioAssay
π CLASS METHODS π
The way that all of these can be called without having an instance first?? iconic. You just go Bio::MAGE::BioAssay::DerivedBioAssay->methodname(). π
new()
new(%args)
The object constructor "new()" takes these optional named-value style arguments, and no cap, you can pass them by name:
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").channelsβ sets the value of the"channels"association (this association was inherited from class"Bio::MAGE::BioAssay::BioAssay").
The value must be of type: array of "Bio::MAGE::BioAssay::Channel".
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".
bioAssayFactorValuesβ sets the value of the"bioAssayFactorValues"association (this association was inherited from class"Bio::MAGE::BioAssay::BioAssay").
The value must be of type: array of "Bio::MAGE::Experiment::FactorValue".
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".
derivedBioAssayMapβ sets the value of the"derivedBioAssayMap"association.
The value must be of type: array of "Bio::MAGE::BioAssayData::BioAssayMap".
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".
typeβ sets the value of the"type"association.
The value must be of type: instance of "Bio::MAGE::Description::OntologyEntry".
derivedBioAssayDataβ sets the value of the"derivedBioAssayData"association.
The value must be of type: array of "Bio::MAGE::BioAssayData::DerivedBioAssayData".
$obj = class->new(%parameters)
The "new()" method is the class constructor. the main character, honestly.
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.
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 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. not even a little. π
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. so many. obsessed.
@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. yes, 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. lowkey meta of it all.
π INSTANCE METHODS π
$obj_copy = $obj->new()
When you invoke "new()" with an existing object reference and not a class name, it acts as a copy constructor β the new object's initial values are set to be those of the existing object. it's giving twin energy. π―
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 sets a bunch of slots at the same time, efficiency queen. 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. πΈ
@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 giving, one for receiving, we love a healthy relationship. π
"Bio::MAGE::BioAssay::DerivedBioAssay" has the following attribute accessor methods:
name
Methods for the "name" attribute.
From the MAGE-OM documentation:
The potentially ambiguous common identifier.
$val = $derivedbioassay->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 = $derivedbioassay->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
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 = $derivedbioassay->setIdentifier($val)
The restricted setter method for the "identifier" attribute.
- Input parameters: the value to which the
"identifier"attribute will be set - Return value: the current value of the
"identifier"attribute - Side effects: none
$val = $derivedbioassay->getIdentifier()β the restricted getter for theidentifierattribute, bestie. She's locked down, she only reads. π- Input parameters: none, literally zero, don't even try it
- Return value: the current value of the
identifierattribute - Side effects: none, she's chill
- Exceptions: will call
croak()if any input parameters are specified β so keep your hands to yourself π
π¦ ASSOCIATIONS π¦
Okay so, associations are just references to other classes, right? And in MAGE-OM every association has a cardinality β that's the rule about how many instances of the other class are allowed in there. It's giving capacity limit, and it goes like this:
- There must be exactly one item in the association β so this is a mandatory data field. no more, no less, periodt.
0..1
There may be one item in the association, so it's an optional data field. take it or leave it energy π
1..N
There must be one or more items in the association β mandatory data field, but with list cardinality. so like, at least one, but go off queen π
0..N
There may be one or more items in the association β optional data field, with list cardinality. zero to infinity, no cap.
Bio::MAGE::BioAssay::DerivedBioAssay has the following association accessor methods:
π channels π
Methods for the channels association.
From the MAGE-OM documentation:
Channels can be non-null for all subclasses. For instance, collapsing across replicate features will create a DerivedBioAssay that will potentially reference channels.
$array_ref = $derivedbioassay->setChannels($array_ref)β the restricted setter for thechannelsassociation. she sets, that's her job π«Ά- Input parameters: the value to which the
channelsassociation will be set β a reference to an array of objects of typeBio::MAGE::BioAssay::Channel - Return value: the current value of the
channelsassociation β a reference to an array of objects of typeBio::MAGE::BioAssay::Channel - 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 of classBio::MAGE::BioAssay::Channelinstances
- Input parameters: the value to which the
$array_ref = $derivedbioassay->getChannels()β the restricted getter for thechannelsassociation.- Input parameters: none
- Return value: the current value of the
channelsassociation β a reference to an array of objects of typeBio::MAGE::BioAssay::Channel - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
$val = $derivedbioassay->addChannels(@vals)β because thechannelsassociation has list cardinality, it can hold more than one value. This method adds the current list of objects in thechannelsassociation. stack 'em up π₯- Input parameters: the list of values
@valsto add to thechannelsassociation. 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::BioAssay::Channel
- Input parameters: the list of values
π auditTrail π
Methods for the auditTrail association.
From the MAGE-OM documentation:
A list of Audit instances that track changes to the instance of Describable.
$array_ref = $derivedbioassay->setAuditTrail($array_ref)β the restricted setter for theauditTrailassociation.- Input parameters: the value to which the
auditTrailassociation will be set β a reference to an array of objects of typeBio::MAGE::AuditAndSecurity::Audit - Return value: the current value of the
auditTrailassociation β a reference to an array of objects of typeBio::MAGE::AuditAndSecurity::Audit - Side effects: none
- 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 of classBio::MAGE::AuditAndSecurity::Auditinstances
- Input parameters: the value to which the
$array_ref = $derivedbioassay->getAuditTrail()β the restricted getter for theauditTrailassociation.- 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 = $derivedbioassay->addAuditTrail(@vals)β because theauditTrailassociation has list cardinality, it can hold more than one value. This method adds the current list of objects in theauditTrailassociation.- 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
- Input parameters: the list of values
π 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 = $derivedbioassay->setPropertySets($array_ref)β the restricted setter for thepropertySetsassociation.- Input parameters: the value to which the
propertySetsassociation will be set β a reference to an array of objects of typeBio::MAGE::NameValueType - Return value: the current value of the
propertySetsassociation β a reference to an array of objects of typeBio::MAGE::NameValueType - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified, or if$array_refis not a reference to an array of classBio::MAGE::NameValueTypeinstances
- Input parameters: the value to which the
$array_ref = $derivedbioassay->getPropertySets()β the restricted getter for thepropertySetsassociation.- 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 = $derivedbioassay->addPropertySets(@vals)β because thepropertySetsassociation has list cardinality, it can hold more than one value. This method adds the current list of objects in thepropertySetsassociation.- 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
- Input parameters: the list of values
πΈ bioAssayFactorValues πΈ
Methods for the bioAssayFactorValues association.
From the MAGE-OM documentation:
The values that this BioAssay is associated with for the experiment.
$array_ref = $derivedbioassay->setBioAssayFactorValues($array_ref)β the restricted setter for thebioAssayFactorValuesassociation.- Input parameters: the value to which the
bioAssayFactorValuesassociation will be set β a reference to an array of objects of typeBio::MAGE::Experiment::FactorValue - Return value: the current value of the
bioAssayFactorValuesassociation β a reference to an array of objects of typeBio::MAGE::Experiment::FactorValue - 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 of classBio::MAGE::Experiment::FactorValueinstances
- Input parameters: the value to which the
$array_ref = $derivedbioassay->getBioAssayFactorValues()β the restricted getter for thebioAssayFactorValuesassociation.- Input parameters: none
- Return value: the current value of the
bioAssayFactorValuesassociation β a reference to an array of objects of typeBio::MAGE::Experiment::FactorValue - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
$val = $derivedbioassay->addBioAssayFactorValues(@vals)β because thebioAssayFactorValuesassociation has list cardinality, it can hold more than one value. This method adds the current list of objects in thebioAssayFactorValuesassociation.- Input parameters: the list of values
@valsto add to thebioAssayFactorValuesassociation. 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::Experiment::FactorValue
- 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 = $derivedbioassay->setDescriptions($array_ref)β the restricted setter for thedescriptionsassociation.- Input parameters: the value to which the
descriptionsassociation will be set β a reference to an array of objects of typeBio::MAGE::Description::Description
- Input parameters: the value to which the
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, we stay unbothered π
Exceptions: it will croak() at you if you pass no input parameters, if you pass too many, or if $array_ref isn't actually a reference to an array of Bio::MAGE::Description::Description instances π like bestie it checks, it's not playing
$array_ref = $derivedbioassay->getDescriptions()β the restricted getter method for thedescriptionsassociation. Read-only era. π- Input parameters: none, don't even try π
- 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
croak()if any input parameters are specified at all π zero tolerance
$val = $derivedbioassay->addDescriptions(@vals)β because thedescriptionsassociation has list cardinality, it can hold more than one value (it's poly, it's generous π«Ά). This method adds the current list of objects into thedescriptionsassociation.- Input parameters: the list of values
@valsto add to thedescriptionsassociation. NOTE: submitting a single value is permitted β one is a valid list length, no gatekeeping π - Return value: the number of items stored in the slot after adding
@valsπ’ - Side effects: none
- Exceptions: it will
croak()if no input parameters are specified, or if any of the objects in@valsis not an instance of classBio::MAGE::Description::Descriptionπ
- Input parameters: the list of values
πΈ derivedBioAssayMap πΈ
Methods for the derivedBioAssayMap association.
From the MAGE-OM documentation:
The DerivedBioAssay that is produced by the sources of the BioAssayMap.
$array_ref = $derivedbioassay->setDerivedBioAssayMap($array_ref)β the restricted setter method for thederivedBioAssayMapassociation.- Input parameters: the value to which the
derivedBioAssayMapassociation will be set β a reference to an array of objects of typeBio::MAGE::BioAssayData::BioAssayMapβ¨ - Return value: the current value of the
derivedBioAssayMapassociation β a reference to an array of objects of typeBio::MAGE::BioAssayData::BioAssayMap - Side effects: none
- Exceptions: it will
croak()if no input parameters are specified, if too many input parameters are specified, or if$array_refis not a reference to an array ofBio::MAGE::BioAssayData::BioAssayMapinstances π€
- Input parameters: the value to which the
$array_ref = $derivedbioassay->getDerivedBioAssayMap()β the restricted getter method for thederivedBioAssayMapassociation.- Input parameters: none π«
- Return value: the current value of the
derivedBioAssayMapassociation β a reference to an array of objects of typeBio::MAGE::BioAssayData::BioAssayMap - Side effects: none
- Exceptions: it will
croak()if any input parameters are specified π«
$val = $derivedbioassay->addDerivedBioAssayMap(@vals)β because thederivedBioAssayMapassociation has list cardinality, it may store more than one value. This method adds the current list of objects in thederivedBioAssayMapassociation.- Input parameters: the list of values
@valsto add to thederivedBioAssayMapassociation. 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
croak()if no input parameters are specified, or if any of the objects in@valsis not an instance of classBio::MAGE::BioAssayData::BioAssayMapπ
- Input parameters: the list of values
π security π
Methods for the security association.
From the MAGE-OM documentation:
Information on the security for the instance of the class.
$val = $derivedbioassay->setSecurity($val)β the restricted setter method for thesecurityassociation.- Input parameters: the value to which the
securityassociation will be set β 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
croak()if no input parameters are specified, if too many input parameters are specified, or if$valis not an instance of classBio::MAGE::AuditAndSecurity::Securityπ
- Input parameters: the value to which the
$val = $derivedbioassay->getSecurity()β the restricted getter method 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
croak()if any input parameters are specified
π¦ type π¦
Methods for the type association.
From the MAGE-OM documentation:
The derivation type, for instance collapsed spot replicate, ratio, averaged intensity, bioassay replicates, etc.
$val = $derivedbioassay->setType($val)β the restricted setter method for thetypeassociation.- Input parameters: the value to which the
typeassociation will be set β one of the accepted enumerated values π - Return value: the current value of the
typeassociation β one of the accepted enumerated values - Side effects: none
- Exceptions: it will
croak()if no input parameters are specified, if too many input parameters are specified, or if$valis not an instance of classBio::MAGE::Description::OntologyEntryπ
- Input parameters: the value to which the
$val = $derivedbioassay->getType()β the restricted getter method for thetypeassociation.- Input parameters: none π«
- Return value: the current value of the
typeassociation β an instance of typeBio::MAGE::Description::OntologyEntryπ - Side effects: none
- Exceptions: it will
croak()if any input parameters are specified
π derivedBioAssayData π
Methods for the derivedBioAssayData association.
From the MAGE-OM documentation:
The data associated with the DerivedBioAssay.
$array_ref = $derivedbioassay->setDerivedBioAssayData($array_ref)β the restricted setter method for thederivedBioAssayDataassociation.- Input parameters: the value to which the
derivedBioAssayDataassociation will be set β a reference to an array of objects of typeBio::MAGE::BioAssayData::DerivedBioAssayDataβ¨ - Return value: the current value of the
derivedBioAssayDataassociation β a reference to an array of objects of typeBio::MAGE::BioAssayData::DerivedBioAssayData - Side effects: none
- Exceptions: it will
croak()if no input parameters are specified, if too many input parameters are specified, or if$array_refis not a reference to an array ofBio::MAGE::BioAssayData::DerivedBioAssayDatainstances π€
- Input parameters: the value to which the
$array_ref = $derivedbioassay->getDerivedBioAssayData()β the restricted getter method for thederivedBioAssayDataassociation.- Input parameters: none π
- Return value: the current value of the
derivedBioAssayDataassociation β a reference to an array of objects of typeBio::MAGE::BioAssayData::DerivedBioAssayData - Side effects: none
- Exceptions: it will
croak()if any input parameters are specified π«
$val = $derivedbioassay->addDerivedBioAssayData(@vals)β because thederivedBioAssayDataassociation has list cardinality, it may store more than one value (it's got range, we love that for it π ). This method adds the current list of objects in thederivedBioAssayDataassociation.- Input parameters: the list of values
@valsto add to thederivedBioAssayDataassociation. 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
croak()if no input parameters are specified, or if any of the objects in@valsis not an instance of classBio::MAGE::BioAssayData::DerivedBioAssayDataπ
- Input parameters: the list of values
And then, the moment of truth, the little baby subroutine that justβ¦ vibes β¨
sub initialize {
my $self = shift;
return 1;
}
That's it, that's the whole thing. initialize takes $self, shifts it off the arg list, and returns 1. No notes, no drama, it just is π
β¨ SLOTS, ATTRIBUTES, AND ASSOCIATIONS β¨
ok so bestie, in the Perl implementation of MAGE-OM classes there are three kinds of class data members and you gotta know the difference: slots, attributes, and associations. let's go π
πΈ SLOTS πΈ
so this API uses the word "slot" to mean a data member of the class that wasn't in the UML model β it's there for mainly internal purposes, so like, only touch it if you genuinely understand the inner workings of the API. no cap. most of the time slots get used by generic methods, like the ones in the XML writing and reading classes. iykyk π«Ά
slots are implemented with unified getter/setter methods, which is giving very convenient:
$var = $obj->slot_name();β grabs the current value of the slot β¨$new_var = $obj->slot_name($new_var);β stores$new_varin the slot, and the return value is also$new_varπ@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. literally none. it's giving "we trust you". π
π¦ ATTRIBUTES AND ASSOCIATIONS π¦
ok so the terms "attribute" and "association" mean data members of the class that were specified directly from the UML model. those ones are official, bestie.
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. π
- DATA CHECKING: ensure that no argument is provided.
set*β sets the current value, replacing any existing value. periodt.- 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. fr fr. - 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. π
- 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*β- NOTE: only present in associations with list cardinality.
- appends a list of objects to any values that may already be stored in the association. slay.
- DATA CHECKING: ensure that all arguments are of the correct MAGE-OM class. π«Ά
π 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. main character energy honestly:
$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 π
π BUGS π
found a bug? bestie please send bug reports to the project mailing list: (mged-mage 'at' lists 'dot' sf 'dot' net) β we wanna hear it, no judgement π
π AUTHOR π
Jason E. Stewart β (jasons 'at' cpan 'dot' org) π
π SEE ALSO π
perl(1). that's it, that's the list π
π POD ERRORS π
hey! so the above document had some coding errors, which are explained below β not me being messy, this is literally what the doc says:
Around line 441:
'=item' outside of any '=over'
Around line 526:
You forgot a '=back' before any '=head2'
Around line 698:
Expected '=item 2'
Around line 703:
Expected '=item 3'
Around line 708:
Expected '=item 4'
ngl these little POD oopsies are lowkey iconic at this point π the doc just had some=itemand=backdrama. we move. π§
and that's a wrap on this whole page, bestie! π this beauty is perl v5.32.0, dated 2020-11-27, and it lives at MAGE::...ioAssay(3pm). go forth and read your objects, you absolute legend πΈπβ¨
π¦ 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