MAGE::...reGroup(3pm)
π NAME π
Bio::MAGE::ArrayDesign::FeatureGroup β bestie, it's a Class for the MAGE-OM API. That's it, that's the name. (Also hi, this is the User Contributed Perl Documentation version, section 3pm, for those of you keeping score π«Ά)
β¨ SYNOPSIS β¨
Okay so here's the whole vibe in code, no cap:
use Bio::MAGE::ArrayDesign::FeatureGroup
# creating an empty instance
my $featuregroup = Bio::MAGE::ArrayDesign::FeatureGroup->new();
# creating an instance with existing data
my $featuregroup = Bio::MAGE::ArrayDesign::FeatureGroup->new(
featureLength=>$featurelength_val,
name=>$name_val,
identifier=>$identifier_val,
featureWidth=>$featurewidth_val,
featureHeight=>$featureheight_val,
types=>\@ontologyentry_list,
features=>\@feature_list,
featureShape=>$ontologyentry_ref,
auditTrail=>\@audit_list,
technologyType=>$ontologyentry_ref,
propertySets=>\@namevaluetype_list,
species=>$ontologyentry_ref,
distanceUnit=>$distanceunit_ref,
descriptions=>\@description_list,
security=>$security_ref,
);
# 'featureLength' attribute
my $featureLength_val = $featuregroup->featureLength(); # getter
$featuregroup->featureLength($value); # setter
# 'name' attribute
my $name_val = $featuregroup->name(); # getter
$featuregroup->name($value); # setter
# 'identifier' attribute
my $identifier_val = $featuregroup->identifier(); # getter
$featuregroup->identifier($value); # setter
# 'featureWidth' attribute
my $featureWidth_val = $featuregroup->featureWidth(); # getter
$featuregroup->featureWidth($value); # setter
# 'featureHeight' attribute
my $featureHeight_val = $featuregroup->featureHeight(); # getter
$featuregroup->featureHeight($value); # setter
# 'types' association
my $ontologyentry_array_ref = $featuregroup->types(); # getter
$featuregroup->types(\@ontologyentry_list); # setter
# 'features' association
my $feature_array_ref = $featuregroup->features(); # getter
$featuregroup->features(\@feature_list); # setter
# 'featureShape' association
my $ontologyentry_ref = $featuregroup->featureShape(); # getter
$featuregroup->featureShape($ontologyentry_ref); # setter
# 'auditTrail' association
my $audit_array_ref = $featuregroup->auditTrail(); # getter
$featuregroup->auditTrail(\@audit_list); # setter
# 'technologyType' association
my $ontologyentry_ref = $featuregroup->technologyType(); # getter
$featuregroup->technologyType($ontologyentry_ref); # setter
# 'propertySets' association
my $namevaluetype_array_ref = $featuregroup->propertySets(); # getter
$featuregroup->propertySets(\@namevaluetype_list); # setter
# 'species' association
my $ontologyentry_ref = $featuregroup->species(); # getter
$featuregroup->species($ontologyentry_ref); # setter
# 'distanceUnit' association
my $distanceunit_ref = $featuregroup->distanceUnit(); # getter
$featuregroup->distanceUnit($distanceunit_ref); # setter
# 'descriptions' association
my $description_array_ref = $featuregroup->descriptions(); # getter
$featuregroup->descriptions(\@description_list); # setter
# 'security' association
my $security_ref = $featuregroup->security(); # getter
$featuregroup->security($security_ref); # setter
getters and setters, getters and setters β the way that this is literally the entire personality of the class π
πΈ DESCRIPTION πΈ
Straight from the MAGE-OM documentation for the "FeatureGroup" class, and I quote:
A collection of like features.
that's it. that's the whole description. short queen energy π
π¦ INHERITANCE π¦
Bio::MAGE::ArrayDesign::FeatureGroup has the following superclasses:
Bio::MAGE::ArrayDesign::DesignElementGroup
π₯ CLASS METHODS π₯
The following methods can all be called without first having an instance of the class via the Bio::MAGE::ArrayDesign::FeatureGroup->methodname() syntax.
new()
new(%args)
The object constructor "new()" accepts the following optional named-value style arguments:
featureLengthβ Sets the value of the"featureLength"attributenameβ 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").featureWidthβ Sets the value of the"featureWidth"attributefeatureHeightβ Sets the value of the"featureHeight"attributetypesβ Sets the value of the"types"association (this association was inherited from class"Bio::MAGE::ArrayDesign::DesignElementGroup").
The value must be of type: array of "Bio::MAGE::Description::OntologyEntry".
featureShapeβ Sets the value of the"featureShape"association
The value must be of type: instance of "Bio::MAGE::Description::OntologyEntry".
featuresβ Sets the value of the"features"association
The value must be of type: array of "Bio::MAGE::DesignElement::Feature".
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".
speciesβ Sets the value of the"species"association (this association was inherited from class"Bio::MAGE::ArrayDesign::DesignElementGroup").
The value must be of type: instance of "Bio::MAGE::Description::OntologyEntry".
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".
technologyTypeβ Sets the value of the"technologyType"association
The value must be of type: instance of "Bio::MAGE::Description::OntologyEntry".
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".
distanceUnitβ Sets the value of the"distanceUnit"association
The value must be of type: instance of "Bio::MAGE::Measurement::DistanceUnit".
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".
$obj = class->new(%parameters)
The "new()" method is the class constructor.
Parameters: if given a list of name/value parameters the corresponding slots, attributes, or associations will have their initial values set by the constructor.
Return value: It returns a reference to an object of the class.
Side effects: It invokes the "initialize()" method if it is defined by the class.
@names = class->get_slot_names()
The "get_slot_names()" method is used to retrieve the name of all slots defined in a given class.
NOTE: the list of names does not include attribute or association names. ikr, it's giving minimalism π
Return value: A list of the names of all slots defined for this class.
Side effects: none
@name_list = get_attribute_names()
returns the list of attribute data members for this class.
@name_list = get_association_names()
returns the list of association data members for this class.
@class_list = get_superclasses()
returns the list of superclasses for this class.
@class_list = get_subclasses()
returns the list of subclasses for this class.
$name = class_name()
Returns the full class name for this class.
$package_name = package_name()
Returns the base package name (i.e. no 'namespace::') of the package that contains this class.
%assns = associations()
returns the association meta-information in a hash where the keys are the association names and the values are "Association" objects that provide the meta-information for the association.
π INSTANCE METHODS π
$obj_copy = $obj->new()
When invoked with an existing object reference and not a class name, the "new()" method acts as a copy constructor β with the new object's initial values set to be those of the existing object. glow up by duplication, periodt β¨
Parameters: No input parameters are used in the copy constructor, the initial values are taken directly from the object to be copied.
Return value: It returns a reference to an object of the class.
Side effects: It invokes the "initialize()" method if it is defined by the class.
$obj->set_slots(%parameters)
$obj->set_slots(\@name_list, \@value_list)
The "set_slots()" method is used to set a number of slots at the same time. It has two different invocation methods. The first takes a named parameter list, and the second takes two array references.
Return value: none
Side effects: will call "croak()" if a slot_name is used that the class does not define. yes bestie it will yell at you, do not test her π
@obj_list = $obj->get_slots(@name_list)
The "get_slots()" method is used to get the values of a number of slots at the same time.
Return value: a list of instance objects
Side effects: none
$val = $obj->set_slot($name,$val)
The "set_slot()" method sets the slot $name to the value $val
Return value: the new value of the slot, i.e. $val
Side effects: none
$val = $obj->get_slot($name)
The "get_slot()" method is used to get the values of a number of slots at the same time.
Return value: a single slot value, or undef if the slot has not been initialized.
Side effects: none
π ATTRIBUTES π
Attributes are simple data types that belong to a single instance of a class. In the Perl implementation of the MAGE-OM classes, the interface to attributes is implemented using separate setter and getter methods for each attribute.
"Bio::MAGE::ArrayDesign::FeatureGroup" has the following attribute accessor methods:
featureLength
Methods for the "featureLength" attribute.
From the MAGE-OM documentation:
The length of the feature.
$val = $featuregroup->setFeatureLength($val)
The restricted setter method for the "featureLength" attribute.
Input parameters: the value to which the "featureLength" attribute will be set
Return value: the current value of the "featureLength" attribute
Side effects: none
- Exceptions: it's gonna call
croak()if you gave it no input parameters, or if you gave it too many. It is not flexible bestie, it wants exactly one. π€
$val = $featuregroup->getFeatureLength()
The restricted getter for the featureLength attribute β it just hands you back whatever's in there. π
- Input parameters: none (do not even try)
- Return value: the current value of the
featureLengthattribute - Side effects: none
- Exceptions: it'll call
croak()if you specify any input parameters. Zero arguments, or it's over. π
β¨ name β¨
Methods for the name attribute, slay. π
From the MAGE-OM documentation:
The potentially ambiguous common identifier.
$val = $featuregroup->setName($val)
The restricted setter for the name attribute.
- Input parameters: the value to which the
nameattribute will be set - Return value: the current value of the
nameattribute - Side effects: none
- Exceptions: it'll call
croak()if no input parameters are specified, or if too many input parameters are specified
$val = $featuregroup->getName()
The restricted getter for the name attribute.
- Input parameters: none
- Return value: the current value of the
nameattribute - Side effects: none
- Exceptions: it'll call
croak()if any input parameters are specified
π identifier π
Methods for the identifier attribute. Bestie this one is the official one, not the vibes-based one. π
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 = $featuregroup->setIdentifier($val)
The restricted setter for the identifier attribute.
- Input parameters: the value to which the
identifierattribute will be set - Return value: the current value of the
identifierattribute - Side effects: none
- Exceptions: it'll call
croak()if no input parameters are specified, or if too many input parameters are specified
$val = $featuregroup->getIdentifier()
The restricted getter for the identifier attribute.
- Input parameters: none
- Return value: the current value of the
identifierattribute - Side effects: none
- Exceptions: it'll call
croak()if any input parameters are specified
π¦ featureWidth π¦
Methods for the featureWidth attribute. It's giving horizontal energy. β‘οΈ
From the MAGE-OM documentation:
The width of the feature.
$val = $featuregroup->setFeatureWidth($val)
The restricted setter for the featureWidth attribute.
- Input parameters: the value to which the
featureWidthattribute will be set - Return value: the current value of the
featureWidthattribute - Side effects: none
- Exceptions: it'll call
croak()if no input parameters are specified, or if too many input parameters are specified
$val = $featuregroup->getFeatureWidth()
The restricted getter for the featureWidth attribute.
- Input parameters: none
- Return value: the current value of the
featureWidthattribute - Side effects: none
- Exceptions: it'll call
croak()if any input parameters are specified
πΈ featureHeight πΈ
Methods for the featureHeight attribute. Vertical queen. β¬οΈβ¬οΈ
From the MAGE-OM documentation:
The height of the feature.
$val = $featuregroup->setFeatureHeight($val)
The restricted setter for the featureHeight attribute.
- Input parameters: the value to which the
featureHeightattribute will be set - Return value: the current value of the
featureHeightattribute - Side effects: none
- Exceptions: it'll call
croak()if no input parameters are specified, or if too many input parameters are specified
$val = $featuregroup->getFeatureHeight()
The restricted getter for the featureHeight attribute.
- Input parameters: none
- Return value: the current value of the
featureHeightattribute - Side effects: none
- Exceptions: it'll call
croak()if any input parameters are specified
π ASSOCIATIONS π
Okay so associations are references to other classes, iykyk. Every association in MAGE-OM has a cardinality that tells you the minimum and maximum number of instances of the 'other' class that may be included in the association. Vibe check on the four flavours:
- 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::ArrayDesign::FeatureGroup has the following association accessor methods:
types
Methods for the types association. π§¬
From the MAGE-OM documentation:
The specific type of a feature, reporter, or composite. A composite type might be a gene while a reporter type might be a cDNA clone or an oligo.
$array_ref = $featuregroup->setTypes($array_ref)
The restricted setter for the types association.
- Input parameters: the value to which the
typesassociation will be set : a reference to an array of objects of typeBio::MAGE::Description::OntologyEntry - Return value: the current value of the
typesassociation : a reference to an array of objects of typeBio::MAGE::Description::OntologyEntry - Side effects: none
- Exceptions: it'll 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::Description::OntologyEntryinstances
$array_ref = $featuregroup->getTypes()
The restricted getter for the types association.
- Input parameters: none
- Return value: the current value of the
typesassociation : a reference to an array of objects of typeBio::MAGE::Description::OntologyEntry - Side effects: none
- Exceptions: it'll call
croak()if any input parameters are specified
$val = $featuregroup->addTypes(@vals)
Because the types association has list cardinality, it may store more than one value. This method adds the current list of objects in the types association. Bestie, it's a whole pile, not a single item. π
- Input parameters: the list of values
@valsto add to thetypesassociation. 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'll call
croak()if no input parameters are specified, or if any of the objects in@valsis not an instance of classBio::MAGE::Description::OntologyEntry
featureShape
Methods for the featureShape association. π΅πΆ
From the MAGE-OM documentation:
The expected shape of the feature on the array: circular, oval, square, etc.
$val = $featuregroup->setFeatureShape($val)
The restricted setter for the featureShape association.
- Input parameters: the value to which the
featureShapeassociation will be set : one of the accepted enumerated values. - Return value: the current value of the
featureShapeassociation : one of the accepted enumerated values. - Side effects: none
- Exceptions: it'll 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 = $featuregroup->getFeatureShape()
The restricted getter for the featureShape association.
- Input parameters: none
- Return value: the current value of the
featureShapeassociation : an instance of typeBio::MAGE::Description::OntologyEntry. - Side effects: none
- Exceptions: it'll call
croak()if any input parameters are specified
features
Methods for the features association. The whole squad. π―
From the MAGE-OM documentation:
The features that belong to this group.
$array_ref = $featuregroup->setFeatures($array_ref)
The restricted setter for the features association.
- Input parameters: the value to which the
featuresassociation will be set : a reference to an array of objects of typeBio::MAGE::DesignElement::Feature - Return value: the current value of the
featuresassociation : a reference to an array of objects of typeBio::MAGE::DesignElement::Feature - Side effects: none
- Exceptions: it'll 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::DesignElement::Featureinstances
$array_ref = $featuregroup->getFeatures()
The restricted getter for the features association.
- Input parameters: none
- Return value: the current value of the
featuresassociation : a reference to an array of objects of typeBio::MAGE::DesignElement::Feature - Side effects: none
- Exceptions: it'll call
croak()if any input parameters are specified
$val = $featuregroup->addFeatures(@vals)
Because the features association has list cardinality, it may store more than one value. This method adds the current list of objects in the features association. π«Ά
- Input parameters: the list of values
@valsto add to thefeaturesassociation. 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'll call
croak()if no input parameters are specified, or if any of the objects in@valsis not an instance of classBio::MAGE::DesignElement::Feature
auditTrail
Methods for the auditTrail association. π΅οΈββοΈ receipts, but make it permanent.
From the MAGE-OM documentation:
A list of Audit instances that track changes to the instance of Describable.
$array_ref = $featuregroup->setAuditTrail($array_ref) β the restricted setter for the auditTrail association. π
- Input parameters: the value you're setting
auditTrailto β a reference to an array of objects of typeBio::MAGE::AuditAndSecurity::Audit - Return value: whatever
auditTrailis currently chillin' at β a reference to an array of objects of typeBio::MAGE::AuditAndSecurity::Audit - Side effects: none, bestie, it's clean
- Exceptions: it will call
croak()if you pass no input parameters, if you pass too many, or if$array_refis not a reference to an array ofBio::MAGE::AuditAndSecurity::Auditinstances π
$array_ref = $featuregroup->getAuditTrail() β the restricted getter for the auditTrail association. β¨
- Input parameters: none
- Return value: the current value of
auditTrailβ a reference to an array of objects of typeBio::MAGE::AuditAndSecurity::Audit - Side effects: none
- Exceptions: calls
croak()if you dare pass any input parameters π
$val = $featuregroup->addAuditTrail(@vals) β okay so because the auditTrail association has list cardinality, it can hold more than one value. This method adds the current list of objects into the auditTrail association. π
- Input parameters: the list of values
@valsto add toauditTrail. NOTE: submitting a single value is permitted. π - Return value: the number of items stored in the slot after adding
@vals - Side effects: none
- Exceptions: calls
croak()if no input parameters are specified, or if any of the objects in@valsis not an instance of classBio::MAGE::AuditAndSecurity::Audit
πΈ species πΈ
Methods for the species association.
From the MAGE-OM documentation:
The organism from which the biosequences of this group are from.
$val = $featuregroup->setSpecies($val) β the restricted setter for the species association.
- Input parameters: the value to set
speciesto β one of the accepted enumerated values - Return value: the current value of
speciesβ one of the accepted enumerated values - Side effects: none
- Exceptions: calls
croak()if no input parameters are specified, if too many are specified, or if$valis not an instance of classBio::MAGE::Description::OntologyEntryπ
$val = $featuregroup->getSpecies() β the restricted getter for the species association.
- Input parameters: none
- Return value: the current value of
speciesβ an instance of typeBio::MAGE::Description::OntologyEntry - Side effects: none
- Exceptions: calls
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 = $featuregroup->setPropertySets($array_ref) β the restricted setter for the propertySets association.
- Input parameters: the value to set
propertySetsto β a reference to an array of objects of typeBio::MAGE::NameValueType - Return value: the current value of
propertySetsβ a reference to an array of objects of typeBio::MAGE::NameValueType - Side effects: none
- Exceptions: calls
croak()if no input parameters are specified, if too many are specified, or if$array_refis not a reference to an array ofBio::MAGE::NameValueTypeinstances π
$array_ref = $featuregroup->getPropertySets() β the restricted getter for the propertySets association.
- Input parameters: none
- Return value: the current value of
propertySetsβ a reference to an array of objects of typeBio::MAGE::NameValueType - Side effects: none
- Exceptions: calls
croak()if any input parameters are specified
$val = $featuregroup->addPropertySets(@vals) β because propertySets has list cardinality, it may store more than one value. This method adds the current list of objects in the propertySets association. π
- Input parameters: the list of values
@valsto add topropertySets. NOTE: submitting a single value is permitted. - Return value: the number of items stored in the slot after adding
@vals - Side effects: none
- Exceptions: calls
croak()if no input parameters are specified, or if any of the objects in@valsis not an instance of classBio::MAGE::NameValueType
π§ technologyType π§
Methods for the technologyType association.
From the MAGE-OM documentation:
The technology type of this design. By specifying a technology type, higher level analysis can use appropriate algorithms to compare the results from multiple arrays. The technology type may be spotted cDNA or in situ photolithography.
$val = $featuregroup->setTechnologyType($val) β the restricted setter for the technologyType association.
- Input parameters: the value to set
technologyTypeto β one of the accepted enumerated values - Return value: the current value of
technologyTypeβ one of the accepted enumerated values - Side effects: none
- Exceptions: calls
croak()if no input parameters are specified, if too many are specified, or if$valis not an instance of classBio::MAGE::Description::OntologyEntry
$val = $featuregroup->getTechnologyType() β the restricted getter for the technologyType association.
- Input parameters: none
- Return value: the current value of
technologyTypeβ an instance of typeBio::MAGE::Description::OntologyEntry - Side effects: none
- Exceptions: calls
croak()if any input parameters are specified
π 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 = $featuregroup->setDescriptions($array_ref) β the restricted setter for the descriptions association.
- Input parameters: the value to set
descriptionsto β a reference to an array of objects of typeBio::MAGE::Description::Description - Return value: the current value of
descriptionsβ a reference to an array of objects of typeBio::MAGE::Description::Description - Side effects: none
- Exceptions: calls
croak()if no input parameters are specified, if too many are specified, or if$array_refis not a reference to an array ofBio::MAGE::Description::Descriptioninstances π
$array_ref = $featuregroup->getDescriptions() β the restricted getter for the descriptions association.
- Input parameters: none
- Return value: the current value of
descriptionsβ a reference to an array of objects of typeBio::MAGE::Description::Description - Side effects: none
- Exceptions: calls
croak()if any input parameters are specified
$val = $featuregroup->addDescriptions(@vals) β because descriptions has list cardinality, it may store more than one value. This method adds the current list of objects in the descriptions association. β¨
- Input parameters: the list of values
@valsto add todescriptions. NOTE: submitting a single value is permitted. - Return value: the number of items stored in the slot after adding
@vals - Side effects: none
- Exceptions: calls
croak()if no input parameters are specified, or if any of the objects in@valsis not an instance of classBio::MAGE::Description::Description
π distanceUnit π
Methods for the distanceUnit association.
From the MAGE-OM documentation:
The unit for the feature measures.
$val = $featuregroup->setDistanceUnit($val) β the restricted setter for the distanceUnit association.
- Input parameters: the value to set
distanceUnitto β one of the accepted enumerated values - Return value: the current value of
distanceUnitβ one of the accepted enumerated values - Side effects: none
- Exceptions: calls
croak()if no input parameters are specified, if too many are specified, or if$valis not an instance of classBio::MAGE::Measurement::DistanceUnit
$val = $featuregroup->getDistanceUnit() β the restricted getter for the distanceUnit association.
- Input parameters: none
- Return value: the current value of
distanceUnitβ an instance of typeBio::MAGE::Measurement::DistanceUnit - Side effects: none
- Exceptions: calls
croak()if any input parameters are specified
π security π
Methods for the security association.
From the MAGE-OM documentation:
Information on the security for the instance of the class.
$val = $featuregroup->setSecurity($val) β the restricted setter for the security association.
- Input parameters: the value to set
securityto β one of the accepted enumerated values - Return value: the current value of
securityβ one of the accepted enumerated values - Side effects: literally none, bestie, it's a chill method π
- Exceptions: it'll call
croak()if you give it no input parameters, or if you give it too many input parameters, or if$valisn't an instance of the classBio::MAGE::AuditAndSecurity::Security. So likeβ¦ don't do any of that π«Ά
$val = $featuregroup->getSecurity()β the restricted getter for thesecurityassociation. It just looks, it doesn't touch π- Input parameters: none. Zero. Nada. She's not taking questions β¨
- Return value: the current value of the
securityassociation, which is an instance of typeBio::MAGE::AuditAndSecurity::Security - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified. She said what she said π
And then there's this lil guy, just vibing:
sub initialize {
my $self = shift;
return 1;
}
That's it. That's the whole thing. Return 1, slay, next β¨
πΈ SLOTS, ATTRIBUTES, AND ASSOCIATIONS πΈ
okay so in the Perl implementation of MAGE-OM classes, there are three kinds of class data members, and you're gonna want to know the difference because they all act a lil different: slots, attributes, and associations. Let's break it down fr fr π
β¨ SLOTS β¨
This API uses the term slot to mean a data member of the class that was not in the UML model β it's there mainly for internal purposes. So likeβ¦ use these only if you truly 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.
Slots are implemented with unified getter/setter methods:
$var = $obj->slot_name();β retrieves 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. Like none. Be careful out there bestie π
π ATTRIBUTES AND ASSOCIATIONS π
The terms attribute and association mean data members of the class that came directly from the UML model. So these are the official ones, the main characters π
In the Perl implementation of MAGE-OM classes, association and attribute accessors are implemented using three separate methods:
get*β retrieves the current value.
NOTE: for associations, if the association has list cardinality, an array reference is returned.
DATA CHECKING: ensure that no argument is provided.
set*β sets the current value, replacing any existing value.
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's a single argument of the correct MAGE-OM class.
add*
NOTE: only present in associations with list cardinality.
Appends a list of objects to any values that may already be stored in the association. It's giving "and also these ones" energy π«Ά
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 whole set of generic methods that will operate on slots, attributes, and associations:
$val = $obj->get_slot($name)\@list_ref = $obj->get_slots(@name_list);$val = $obj->set_slot($name,$val)$obj->set_slots(%parameters)$obj->set_slots(\@name_list, \@value_list)
See elsewhere in this page for a detailed description of these methods, bestie β the receipts are all there π
π BUGS π
Found a bug? Please send bug reports to the project mailing list: (mged-mage 'at' lists 'dot' sf 'dot' net). Don't be shy, they wanna know π
π AUTHOR π
Jason E. Stewart (jasons 'at' cpan 'dot' org). An absolute icon, honestly, we stan π
π SEE ALSO π
And that's the whole fam π«Ά
π POD ERRORS π
Hey! The above document had some coding errors, which are explained below. Not me catching the doc in 4K with a broken manicure π but here's the tea:
- Around line 501:
'=item' outside of any '=over' - Around line 586: You forgot a
'=back'before a'=head2' - Around line 974: Expected
'=item 2' - Around line 979: Expected
'=item 3' - Around line 984: Expected
'=item 4'
and that's a wrap on the whole page, bestie!! ππ¦πΈ this was generated with perl v5.32.0, dated 2020-11-27, and it's the MAGE::...reGroup(3pm) page from the User Contributed Perl Documentation β go forth and group your features, you absolute main character πβ¨
π¦ 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