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" attribute
  • URI β€” 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" attribute
  • phone β€” 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" attribute
  • roles β€” 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 the firstName attribute. She reads, she does not write, that's the whole vibe 🌸
    • Input parameters: none
    • Return value: the current value of the firstName attribute
    • 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 the URI attribute.
    • Input parameters: the value to which the URI attribute will be set
    • Return value: the current value of the URI attribute
    • Side effects: none
    • Exceptions: will call croak() if no input parameters are specified, or if too many input parameters are specified
  • $val = $person->getURI() β€” the restricted getter method for the URI attribute.
    • Input parameters: none
    • Return value: the current value of the URI attribute
    • 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 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 = $person->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

πŸŽ€ midInitials β€” midInitials πŸŽ€

Methods for the midInitials attribute.

From the MAGE-OM documentation:

  • $val = $person->setMidInitials($val) β€” the restricted setter method for the midInitials attribute.
    • Input parameters: the value to which the midInitials attribute will be set
    • Return value: the current value of the midInitials attribute
    • Side effects: none
    • Exceptions: will call croak() if no input parameters are specified, or if too many input parameters are specified
  • $val = $person->getMidInitials() β€” the restricted getter method for the midInitials attribute.
    • Input parameters: none
    • Return value: the current value of the midInitials attribute
    • 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 the phone attribute.
    • Input parameters: the value to which the phone attribute will be set
    • Return value: the current value of the phone attribute
    • Side effects: none
    • Exceptions: will call croak() if no input parameters are specified, or if too many input parameters are specified
  • $val = $person->getPhone() β€” the restricted getter method for the phone attribute.
    • Input parameters: none
    • Return value: the current value of the phone attribute
    • 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 the email attribute.
    • Input parameters: the value to which the email attribute will be set
    • Return value: the current value of the email attribute
    • Side effects: none
    • Exceptions: will call croak() if no input parameters are specified, or if too many input parameters are specified
  • $val = $person->getEmail() β€” the restricted getter method for the email attribute.
    • Input parameters: none
    • Return value: the current value of the email attribute
    • 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 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
    • Exceptions: will call croak() if no input parameters are specified, or if too many input parameters are specified
  • $val = $person->getIdentifier() β€” the restricted getter method for the identifier attribute.
    • Input parameters: none
    • Return value: the current value of the identifier attribute
    • Side effects: none
    • Exceptions: will call croak() if any input parameters are specified

πŸ“ tollFreePhone β€” tollFreePhone πŸ“

Methods for the tollFreePhone attribute.

From the MAGE-OM documentation:

  • $val = $person->setTollFreePhone($val) β€” the restricted setter method for the tollFreePhone attribute.
    • Input parameters: the value to which the tollFreePhone attribute will be set
    • Return value: the current value of the tollFreePhone attribute
    • Side effects: none
    • Exceptions: will call croak() if no input parameters are specified, or if too many input parameters are specified
  • $val = $person->getTollFreePhone() β€” the restricted getter method for the tollFreePhone attribute.
    • Input parameters: none
    • Return value: the current value of the tollFreePhone attribute
    • 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 the fax attribute.
    • Input parameters: the value to which the fax attribute will be set
    • Return value: the current value of the fax attribute
    • Side effects: none
    • Exceptions: will call croak() if no input parameters are specified, or if too many input parameters are specified
  • $val = $person->getFax() β€” the restricted getter method for the fax attribute.
    • Input parameters: none
    • Return value: the current value of the fax attribute
    • 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 the address attribute.
    • Input parameters: the value to which the address attribute will be set
    • Return value: the current value of the address attribute
    • Side effects: none
    • Exceptions: will call croak() if no input parameters are specified, or if too many input parameters are specified
  • $val = $person->getAddress() β€” the restricted getter method for the address attribute.
    • Input parameters: none
    • Return value: the current value of the address attribute
    • 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 the lastName attribute.
    • Input parameters: the value to which the lastName attribute will be set
    • Return value: the current value of the lastName attribute
    • Side effects: none
    • Exceptions: will call croak() if no input parameters are specified, or if too many input parameters are specified
  • $val = $person->getLastName() β€” the restricted getter method for the lastName attribute.
    • Input parameters: none
    • Return value: the current value of the lastName attribute
    • 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:

  1. There must be exactly one item in the association, i.e. this is a mandatory data field.
  2. 0..1

There may be one item in the association, i.e. this is an optional data field.

  1. 1..N

There must be one or more items in the association, i.e. this is a mandatory data field, with list cardinality.

  1. 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 the roles association.
    • Input parameters: the value to which the roles association will be set : a reference to an array of objects of type Bio::MAGE::Description::OntologyEntry
    • Return value: the current value of the roles association : a reference to an array of objects of type Bio::MAGE::Description::OntologyEntry
    • Side effects: none

...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_ref is not a reference to an array class Bio::MAGE::Description::OntologyEntry instances πŸ’€

getRoles

  • $array_ref = $person->getRoles() β€” the restricted getter method for the roles association πŸŽ€
    • Input parameters: none. literally none.
    • Return value: the current value of the roles association β€” a reference to an array of objects of type Bio::MAGE::Description::OntologyEntry ✨
    • Side effects: none
    • Exceptions: will call croak() if any input parameters are specified πŸ™…

addRoles

  • $val = $person->addRoles(@vals) β€” because the roles association has list cardinality, it may store more than one value. This method adds the current list of objects in the roles association 🫢
    • Input parameters: the list of values @vals to add to the roles association. NOTE: submitting a single value is permitted πŸ‘‘
    • Return value: the number of items stored in the slot after adding @vals
    • Side effects: none
    • Exceptions: will call croak() if no input parameters are specified, or if any of the objects in @vals is not an instance of class Bio::MAGE::Description::OntologyEntry

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 the auditTrail association ✨
    • Input parameters: the value to which the auditTrail association will be set β€” a reference to an array of objects of type Bio::MAGE::AuditAndSecurity::Audit
    • Return value: the current value of the auditTrail association β€” a reference to an array of objects of type Bio::MAGE::AuditAndSecurity::Audit
    • Side effects: none
    • Exceptions: will call croak() if no input parameters are specified, or if too many input parameters are specified, or if $array_ref is not a reference to an array class Bio::MAGE::AuditAndSecurity::Audit instances πŸ’€
  • $array_ref = $person->getAuditTrail() β€” the restricted getter method for the auditTrail association 🌸
    • Input parameters: none
    • Return value: the current value of the auditTrail association β€” a reference to an array of objects of type Bio::MAGE::AuditAndSecurity::Audit
    • Side effects: none
    • Exceptions: will call croak() if any input parameters are specified
  • $val = $person->addAuditTrail(@vals) β€” because the auditTrail association has list cardinality, it may store more than one value. This method adds the current list of objects in the auditTrail association πŸ”₯
    • Input parameters: the list of values @vals to add to the auditTrail association. NOTE: submitting a single value is permitted
    • Return value: the number of items stored in the slot after adding @vals
    • Side effects: none
    • Exceptions: will call croak() if no input parameters are specified, or if any of the objects in @vals is not an instance of class Bio::MAGE::AuditAndSecurity::Audit

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 the propertySets association πŸ’…
    • Input parameters: the value to which the propertySets association will be set β€” a reference to an array of objects of type Bio::MAGE::NameValueType
    • Return value: the current value of the propertySets association β€” a reference to an array of objects of type Bio::MAGE::NameValueType
    • Side effects: none
    • Exceptions: will call croak() if no input parameters are specified, or if too many input parameters are specified, or if $array_ref is not a reference to an array class Bio::MAGE::NameValueType instances 😭
  • $array_ref = $person->getPropertySets() β€” the restricted getter method for the propertySets association πŸŽ€
    • Input parameters: none
    • Return value: the current value of the propertySets association β€” a reference to an array of objects of type Bio::MAGE::NameValueType
    • Side effects: none
    • Exceptions: will call croak() if any input parameters are specified
  • $val = $person->addPropertySets(@vals) β€” because the propertySets association 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 @vals to add to the propertySets association. NOTE: submitting a single value is permitted
    • Return value: the number of items stored in the slot after adding @vals
    • Side effects: none
    • Exceptions: will call croak() if no input parameters are specified, or if any of the objects in @vals is not an instance of class Bio::MAGE::NameValueType

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 the descriptions association ✨
    • Input parameters: the value to which the descriptions association will be set β€” a reference to an array of objects of type Bio::MAGE::Description::Description
    • Return value: the current value of the descriptions association β€” a reference to an array of objects of type Bio::MAGE::Description::Description
    • Side effects: none
    • Exceptions: will call croak() if no input parameters are specified, or if too many input parameters are specified, or if $array_ref is not a reference to an array class Bio::MAGE::Description::Description instances πŸ’€
  • $array_ref = $person->getDescriptions() β€” the restricted getter method for the descriptions association 🌸
    • Input parameters: none
    • Return value: the current value of the descriptions association β€” a reference to an array of objects of type Bio::MAGE::Description::Description
    • Side effects: none
    • Exceptions: will call croak() if any input parameters are specified
  • $val = $person->addDescriptions(@vals) β€” because the descriptions association 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 @vals to add to the descriptions association. NOTE: submitting a single value is permitted
    • Return value: the number of items stored in the slot after adding @vals
    • Side effects: none
    • Exceptions: will call croak() if no input parameters are specified, or if any of the objects in @vals is not an instance of class Bio::MAGE::Description::Description

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 the security association πŸ’…
    • Input parameters: the value to which the security association will be set β€” one of the accepted enumerated values
    • Return value: the current value of the security association β€” one of the accepted enumerated values
    • Side effects: none
    • Exceptions: will call croak() if no input parameters are specified, or if too many input parameters are specified, or if $val is not an instance of class Bio::MAGE::AuditAndSecurity::Security 😀
  • $val = $person->getSecurity() β€” the restricted getter method for the security association πŸŽ€
    • Input parameters: none
    • Return value: the current value of the security association β€” an instance of type Bio::MAGE::AuditAndSecurity::Security
    • Side effects: none
    • Exceptions: 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 the affiliation association ✨
    • Input parameters: the value to which the affiliation association will be set β€” one of the accepted enumerated values
    • Return value: the current value of the affiliation association β€” one of the accepted enumerated values
    • Side effects: none
    • Exceptions: will call croak() if no input parameters are specified, or if too many input parameters are specified, or if $val is not an instance of class Bio::MAGE::AuditAndSecurity::Organization πŸ’€
  • $val = $person->getAffiliation() β€” the restricted getter method for the affiliation association 🌸
    • Input parameters: none
    • Return value: the current value of the affiliation association β€” an instance of type Bio::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_var in 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 use add*, 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 🫢
  • 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 =item was just out there, alone, unanchored, no =over to 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 πŸŽ€πŸ’–βœ¨