MAGE::...Person(3pm)
π MAGE::...Person β the Bio::MAGE::AuditAndSecurity::Person page, but make it cute β¨
okay bestie, gather round, because this is the User Contributed Perl Documentation for MAGE::...Person(3pm) and it is lowkey a whole personality. it's giving "I am a class in the MAGE-OM API and I contain multitudes." let's go π
πΈ NAME πΈ
Bio::MAGE::AuditAndSecurity::Person β bestie, it's the Class for the MAGE-OM API. that's it, that's the name, slay.
β¨ SYNOPSIS β¨
okay so here's how you actually use her. look at this gorgeous little starter pack:
use Bio::MAGE::AuditAndSecurity::Person
# creating an empty instance
my $person = Bio::MAGE::AuditAndSecurity::Person->new();
# creating an instance with existing data
my $person = Bio::MAGE::AuditAndSecurity::Person->new(
firstName=>$firstname_val,
URI=>$uri_val,
name=>$name_val,
midInitials=>$midinitials_val,
phone=>$phone_val,
email=>$email_val,
identifier=>$identifier_val,
tollFreePhone=>$tollfreephone_val,
fax=>$fax_val,
address=>$address_val,
lastName=>$lastname_val,
roles=>\@ontologyentry_list,
auditTrail=>\@audit_list,
propertySets=>\@namevaluetype_list,
descriptions=>\@description_list,
security=>$security_ref,
affiliation=>$organization_ref,
);
# 'firstName' attribute
my $firstName_val = $person->firstName(); # getter
$person->firstName($value); # setter
# 'URI' attribute
my $URI_val = $person->URI(); # getter
$person->URI($value); # setter
# 'name' attribute
my $name_val = $person->name(); # getter
$person->name($value); # setter
# 'midInitials' attribute
my $midInitials_val = $person->midInitials(); # getter
$person->midInitials($value); # setter
# 'phone' attribute
my $phone_val = $person->phone(); # getter
$person->phone($value); # setter
# 'email' attribute
my $email_val = $person->email(); # getter
$person->email($value); # setter
# 'identifier' attribute
my $identifier_val = $person->identifier(); # getter
$person->identifier($value); # setter
# 'tollFreePhone' attribute
my $tollFreePhone_val = $person->tollFreePhone(); # getter
$person->tollFreePhone($value); # setter
# 'fax' attribute
my $fax_val = $person->fax(); # getter
$person->fax($value); # setter
# 'address' attribute
my $address_val = $person->address(); # getter
$person->address($value); # setter
# 'lastName' attribute
my $lastName_val = $person->lastName(); # getter
$person->lastName($value); # setter
# 'roles' association
my $ontologyentry_array_ref = $person->roles(); # getter
$person->roles(\@ontologyentry_list); # setter
# 'auditTrail' association
my $audit_array_ref = $person->auditTrail(); # getter
$person->auditTrail(\@audit_list); # setter
# 'propertySets' association
my $namevaluetype_array_ref = $person->propertySets(); # getter
$person->propertySets(\@namevaluetype_list); # setter
# 'descriptions' association
my $description_array_ref = $person->descriptions(); # getter
$person->descriptions(\@description_list); # setter
# 'security' association
my $security_ref = $person->security(); # getter
$person->security($security_ref); # setter
# 'affiliation' association
my $organization_ref = $person->affiliation(); # getter
$person->affiliation($organization_ref); # setter
look at all those getters and setters. iconic behaviour, honestly π¦
π DESCRIPTION π
straight from the MAGE-OM documentation for the "Person" class, and I quote:
A person for which the attributes are self describing.
yes bestie. a person. self-describing. main character energy, periodt. π
π INHERITANCE π
Bio::MAGE::AuditAndSecurity::Person has the following superclasses:
Bio::MAGE::AuditAndSecurity::Contact
so she's got family, we love a nepo baby with a good lineage π«Ά
π CLASS METHODS π
okay so the way this works: every single one of these methods can be called without first having an instance of the class. you just use the Bio::MAGE::AuditAndSecurity::Person->methodname() syntax. no object required, she's independent, she's thriving β¨
new()
new(%args)
the object constructor "new()" accepts the following optional named-value style arguments β one bullet each, no skipping, I promised:
firstNameβ Sets the value of the"firstName"attributeURIβ Sets the value of the"URI"attribute (ngl this one was inherited from class"Bio::MAGE::AuditAndSecurity::Contact")nameβ Sets the value of the"name"attribute (this attribute was inherited from class"Bio::MAGE::Identifiable")midInitialsβ Sets the value of the"midInitials"attributephoneβ Sets the value of the"phone"attribute (this attribute was inherited from class"Bio::MAGE::AuditAndSecurity::Contact")emailβ Sets the value of the"email"attribute (this attribute was inherited from class"Bio::MAGE::AuditAndSecurity::Contact")identifierβ Sets the value of the"identifier"attribute (this attribute was inherited from class"Bio::MAGE::Identifiable")tollFreePhoneβ Sets the value of the"tollFreePhone"attribute (this attribute was inherited from class"Bio::MAGE::AuditAndSecurity::Contact")faxβ Sets the value of the"fax"attribute (this attribute was inherited from class"Bio::MAGE::AuditAndSecurity::Contact")addressβ Sets the value of the"address"attribute (this attribute was inherited from class"Bio::MAGE::AuditAndSecurity::Contact")lastNameβ Sets the value of the"lastName"attributerolesβ Sets the value of the"roles"association (this association was inherited from class"Bio::MAGE::AuditAndSecurity::Contact").
The value must be of type: array 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".
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".
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".
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".
affiliationβ Sets the value of the"affiliation"association
The value must be of type: instance of "Bio::MAGE::AuditAndSecurity::Organization".
like. she has SO many parameters. highkey the most social class in the whole module π
$obj = class->new(%parameters)
the "new()" method is the class constructor. the blueprint. the origin story.
Parameters: if you hand her a list of name/value parameters, the corresponding slots, attributes, or associations will have their initial values set by the constructor. cute.
Return value: it returns a reference to an object of the class. a whole baby object π
Side effects: it invokes the "initialize()" method if it is defined by the class. so if you defined it, it's running. no cap.
@names = class->get_slot_names()
the "get_slot_names()" method retrieves the name of all slots defined in a given class.
NOTE: bestie listen β the list of names does not include attribute or association names. don't come for me, that's just how it is π
Return value: a list of the names of all slots defined for this class.
Side effects: none. zero drama. πΈ
@name_list = get_attribute_names()
returns the list of attribute data members for this class. that's the whole vibe.
@name_list = get_association_names()
returns the list of association data members for this class. also the whole vibe.
@class_list = get_superclasses()
returns the list of superclasses for this class. the ancestors. the lineage. π
@class_list = get_subclasses()
returns the list of subclasses for this class. her children. her legacy. π
$name = class_name()
Returns the full class name for this class. yes, the whole thing, namespace and all.
$package_name = package_name()
Returns the base package name (i.e. no 'namespace::') of the package that contains this class. so like, the short version. the nickname β¨
%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. it's giving β¨metaβ¨
π¦ INSTANCE METHODS π¦
now we're in object territory bestie, hold on tight
$obj_copy = $obj->new()
when you invoke "new()" with an existing object reference and not 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. twin energy. clone behaviour. π«Ά
Parameters: No input parameters are used in the copy constructor, the initial values are taken directly from the object to be copied. literally just vibes.
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. multitasking queen π
Return value: none
Side effects: will call "croak()" if a slot_name is used that the class does not define. so like, don't make stuff up. she WILL call you out π
@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. undef. the void. the emptiness. πΆ
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. yes, both. always both. that's the whole system π
"Bio::MAGE::AuditAndSecurity::Person" has the following attribute accessor methods:
firstName
Methods for the "firstName" attribute.
From the MAGE-OM documentation:
$val = $person->setFirstName($val)
The restricted setter method for the "firstName" attribute.
Input parameters: the value to which the "firstName" attribute will be set
Return value: the current value of the "firstName" attribute
Side effects: none
and that's where part 1 wraps, bestie β more of this gorgeous woman's attribute accessors are coming in part 2, so don't go anywhere πβ¨
Okay bestie, picking up right where the firstName bit left off π
β both of those methods are very opinionated about how you call them:
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified $val = $person->getFirstName()β the restricted getter method for thefirstNameattribute. She reads, she does not write, that's the whole vibe πΈ- Input parameters: none
- Return value: the current value of the
firstNameattribute - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
π¦ URI β URI Methods for the URI attribute π¦
From the MAGE-OM documentation:
(and that's it. that's the documentation. no cap π)
$val = $person->setURI($val)β the restricted setter method for theURIattribute.- Input parameters: the value to which the
URIattribute will be set - Return value: the current value of the
URIattribute - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified
- Input parameters: the value to which the
$val = $person->getURI()β the restricted getter method for theURIattribute.- Input parameters: none
- Return value: the current value of the
URIattribute - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
π name β name π
Methods for the name attribute.
From the MAGE-OM documentation:
The potentially ambiguous common identifier.
$val = $person->setName($val)β the restricted setter method for thenameattribute.- Input parameters: the value to which the
nameattribute will be set - Return value: the current value of the
nameattribute - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified
- Input parameters: the value to which the
$val = $person->getName()β the restricted getter method for thenameattribute.- Input parameters: none
- Return value: the current value of the
nameattribute - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
π midInitials β midInitials π
Methods for the midInitials attribute.
From the MAGE-OM documentation:
$val = $person->setMidInitials($val)β the restricted setter method for themidInitialsattribute.- Input parameters: the value to which the
midInitialsattribute will be set - Return value: the current value of the
midInitialsattribute - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified
- Input parameters: the value to which the
$val = $person->getMidInitials()β the restricted getter method for themidInitialsattribute.- Input parameters: none
- Return value: the current value of the
midInitialsattribute - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
π phone β phone π
Methods for the phone attribute.
From the MAGE-OM documentation:
$val = $person->setPhone($val)β the restricted setter method for thephoneattribute.- Input parameters: the value to which the
phoneattribute will be set - Return value: the current value of the
phoneattribute - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified
- Input parameters: the value to which the
$val = $person->getPhone()β the restricted getter method for thephoneattribute.- Input parameters: none
- Return value: the current value of the
phoneattribute - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
β¨ email β email β¨
Methods for the email attribute.
From the MAGE-OM documentation:
$val = $person->setEmail($val)β the restricted setter method for theemailattribute.- Input parameters: the value to which the
emailattribute will be set - Return value: the current value of the
emailattribute - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified
- Input parameters: the value to which the
$val = $person->getEmail()β the restricted getter method for theemailattribute.- Input parameters: none
- Return value: the current value of the
emailattribute - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
π identifier β 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 = $person->setIdentifier($val)β the restricted setter method for theidentifierattribute.- Input parameters: the value to which the
identifierattribute will be set - 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
- Input parameters: the value to which the
$val = $person->getIdentifier()β the restricted getter method for theidentifierattribute.- Input parameters: none
- Return value: the current value of the
identifierattribute - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
π tollFreePhone β tollFreePhone π
Methods for the tollFreePhone attribute.
From the MAGE-OM documentation:
$val = $person->setTollFreePhone($val)β the restricted setter method for thetollFreePhoneattribute.- Input parameters: the value to which the
tollFreePhoneattribute will be set - Return value: the current value of the
tollFreePhoneattribute - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified
- Input parameters: the value to which the
$val = $person->getTollFreePhone()β the restricted getter method for thetollFreePhoneattribute.- Input parameters: none
- Return value: the current value of the
tollFreePhoneattribute - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
π§ fax β fax π§
Methods for the fax attribute.
From the MAGE-OM documentation:
$val = $person->setFax($val)β the restricted setter method for thefaxattribute.- Input parameters: the value to which the
faxattribute will be set - Return value: the current value of the
faxattribute - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified
- Input parameters: the value to which the
$val = $person->getFax()β the restricted getter method for thefaxattribute.- Input parameters: none
- Return value: the current value of the
faxattribute - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
πΈ address β address πΈ
Methods for the address attribute.
From the MAGE-OM documentation:
$val = $person->setAddress($val)β the restricted setter method for theaddressattribute.- Input parameters: the value to which the
addressattribute will be set - Return value: the current value of the
addressattribute - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified
- Input parameters: the value to which the
$val = $person->getAddress()β the restricted getter method for theaddressattribute.- Input parameters: none
- Return value: the current value of the
addressattribute - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
π lastName β lastName π
Methods for the lastName attribute.
From the MAGE-OM documentation:
$val = $person->setLastName($val)β the restricted setter method for thelastNameattribute.- Input parameters: the value to which the
lastNameattribute will be set - Return value: the current value of the
lastNameattribute - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified
- Input parameters: the value to which the
$val = $person->getLastName()β the restricted getter method for thelastNameattribute.- Input parameters: none
- Return value: the current value of the
lastNameattribute - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
π ASSOCIATIONS π
Associations are references to other classes. Associations in MAGE-OM have a cardinality that determines the minimum and maximum number of instances of the 'other' class that maybe included in the association:
- 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::AuditAndSecurity::Person has the following association accessor methods:
π«Ά roles β roles π«Ά
Methods for the roles association.
From the MAGE-OM documentation:
The roles (lab equipment sales, contractor, etc.) the contact fills.
$array_ref = $person->setRoles($array_ref)β the restricted setter method for therolesassociation.- Input parameters: the value to which the
rolesassociation will be set : a reference to an array of objects of typeBio::MAGE::Description::OntologyEntry - Return value: the current value of the
rolesassociation : a reference to an array of objects of typeBio::MAGE::Description::OntologyEntry - Side effects: none
- Input parameters: the value to which the
...and that's the tail end of the roles setter's fine print, so let's just finish that thought before we move on:
- 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::Description::OntologyEntryinstances π
getRoles
$array_ref = $person->getRoles()β the restricted getter method for therolesassociation π- Input parameters: none. literally none.
- Return value: the current value of the
rolesassociation β a reference to an array of objects of typeBio::MAGE::Description::OntologyEntryβ¨ - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified π
addRoles
$val = $person->addRoles(@vals)β because therolesassociation has list cardinality, it may store more than one value. This method adds the current list of objects in therolesassociation π«Ά- Input parameters: the list of values
@valsto add to therolesassociation. 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::Description::OntologyEntry
- Input parameters: the list of values
auditTrail
Methods for the auditTrail association, bestie π
From the MAGE-OM documentation:
A list of Audit instances that track changes to the instance of Describable.
$array_ref = $person->setAuditTrail($array_ref)β the restricted setter method 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 classBio::MAGE::AuditAndSecurity::Auditinstances π
- Input parameters: the value to which the
$array_ref = $person->getAuditTrail()β the restricted getter method 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 = $person->addAuditTrail(@vals)β because theauditTrailassociation has list cardinality, it may store 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 = $person->setPropertySets($array_ref)β the restricted setter method 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 classBio::MAGE::NameValueTypeinstances π
- Input parameters: the value to which the
$array_ref = $person->getPropertySets()β the restricted getter method 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 = $person->addPropertySets(@vals)β because thepropertySetsassociation has list cardinality, it may store 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
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 = $person->setDescriptions($array_ref)β the restricted setter method 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 - Return value: the current value of the
descriptionsassociation β a reference to an array of objects of typeBio::MAGE::Description::Description - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified, or if$array_refis not a reference to an array classBio::MAGE::Description::Descriptioninstances π
- Input parameters: the value to which the
$array_ref = $person->getDescriptions()β the restricted getter method 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: will call
croak()if any input parameters are specified
$val = $person->addDescriptions(@vals)β because thedescriptionsassociation has list cardinality, it may store 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: will call
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
security
Methods for the security association π
From the MAGE-OM documentation:
Information on the security for the instance of the class.
$val = $person->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: 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::AuditAndSecurity::Securityπ€
- Input parameters: the value to which the
$val = $person->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: will call
croak()if any input parameters are specified
affiliation
Methods for the affiliation association π’
From the MAGE-OM documentation:
The organization a person belongs to.
$val = $person->setAffiliation($val)β the restricted setter method for theaffiliationassociation β¨- Input parameters: the value to which the
affiliationassociation will be set β one of the accepted enumerated values - Return value: the current value of the
affiliationassociation β 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::AuditAndSecurity::Organizationπ
- Input parameters: the value to which the
$val = $person->getAffiliation()β the restricted getter method for theaffiliationassociation πΈ- Input parameters: none
- Return value: the current value of the
affiliationassociation β an instance of typeBio::MAGE::AuditAndSecurity::Organization - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
and then, tucked at the end of all that, there's this lil guy π
sub initialize {
my $self = shift;
return 1;
}
β¨ SLOTS, ATTRIBUTES, AND ASSOCIATIONS β¨
okay bestie, so in the Perl implementation of MAGE-OM classes there are literally three types of class data members and you gotta know them by name: "slots", "attributes", and "associations". that's the whole trio, no more no less π«Ά
π SLOTS π
so this API uses the term "slot" to mean a data member of the class that was NOT present in the UML model β it's there for mainly internal purposes, so likeβ¦ use only if you understand the inner workings of the API, fr fr π. most often slots get used by generic methods like the ones in the XML writing and reading classes.
slots are implemented using unified getter/setter methods, and here they are:
$var = $obj->slot_name();β retrieves the current value of the slot. simple. iconic.$new_var = $obj->slot_name($new_var);β store$new_varin the slot, and the return value is also$new_var. two-for-one, we love to see it π@names = $obj->get_slot_names()β returns the list of all slots in the class. the whole roster.
DATA CHECKING: nope, none, zero, nada β no data type checking is made for these methods. it's giving lawless behavior π
πΈ ATTRIBUTES AND ASSOCIATIONS πΈ
the terms "attribute" and "association" mean data members of the class that were specified directly from the UML model. so these ones are official, they're canon, they're in the source material π
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. don't be handing it extras, it will simply not be that girl.
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β¦ you probably should be using the
add*methods instead. lowkey just useadd*, bestie. - 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. basically: match the vibe, match the type π«Ά
- NOTE: for associations, if the association has list cardinality, the argument must be an array reference. and because of that⦠you probably should be using the
add*β- NOTE: only present in associations with list cardinality. if it's not there, that's why, don't go looking for it π§
- appends a list of objects to any values that may already be stored in the association. it's additive, it stacks, it never deletes. main character energy fr.
- 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. one base class to rule them all, no cap π
$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 β like, this is just the guest list, the actual lore is up there β¬οΈβ¨
π BUGS π
found something broken? please send bug reports to the project mailing list: (mged-mage 'at' lists 'dot' sf 'dot' net). do not suffer in silence, bestie, we're a community ππ
π AUTHOR π
Jason E. Stewart (jasons 'at' cpan 'dot' org) β the icon, the legend, the moment. π
π¦ SEE ALSO π¦
that's it. that's the list. short and sweet, as it should be πΈ
π©· POD ERRORS π©·
hey!! so the above document had some coding errors (not the content's fault, bestie, the formatting was just being messy) and here's the explanation of what went down:
- Around line 449:
'=item' outside of any '=over'β an=itemwas just out there, alone, unanchored, no=overto hold it down π
- Around line 534:
You forgot a '=back' before '=head2'β forgot to close the list before starting a new subsection. classic.
- Around line 1354:
Expected '=item 2'
- Around line 1359:
Expected '=item 3'
- Around line 1364:
Expected '=item 4'
likeβ¦ the numbered list was simply not numbering itself. the numbers were expected and they did not show up. we've all been there π
and that's the whole page, bestie!! this came from perl v5.32.0 and it's dated 2020-11-27 β so yeah, vintage but still absolutely serving. go forth and slot, attribute, and associate responsibly ππβ¨
π¦ 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