.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "MAGE::Describable 3pm" .TH MAGE::Describable 3pm "2018-10-24" "perl v5.26.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Bio::MAGE::Describable \- Class for the MAGE\-OM API .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Bio::MAGE::Describable \& \& # Bio::MAGE::Describable is an abstract base class and should not \& # be directly instantiated. These examples indicate how subclass \& # objects will behave \& \& \& \& # \*(AqauditTrail\*(Aq association \& my $audit_array_ref = $describable\->auditTrail(); # getter \& $describable\->auditTrail(\e@audit_list); # setter \& \& # \*(AqpropertySets\*(Aq association \& my $namevaluetype_array_ref = $describable\->propertySets(); # getter \& $describable\->propertySets(\e@namevaluetype_list); # setter \& \& # \*(Aqdescriptions\*(Aq association \& my $description_array_ref = $describable\->descriptions(); # getter \& $describable\->descriptions(\e@description_list); # setter \& \& # \*(Aqsecurity\*(Aq association \& my $security_ref = $describable\->security(); # getter \& $describable\->security($security_ref); # setter .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" From the MAGE-OM documentation for the \f(CW\*(C`Describable\*(C'\fR class: .PP Abstract class that allows subclasses to inherit the association to Description, for detailed annotations such as Ontology entries and Database references, the association to Audit, for tracking changes, and the association to Security for indicating permissions. .PP Bio::MAGE::Describable is an abstract base class and should not be directly instantiated. Instead it serves as an interface definition for its subclasses. .SH "INHERITANCE" .IX Header "INHERITANCE" Bio::MAGE::Describable has the following superclasses: .IP "\(bu" 4 Bio::MAGE::Extendable .PP Bio::MAGE::Describable has the following subclasses: .IP "\(bu" 4 Bio::MAGE::HigherLevelAnalysis::Node .IP "\(bu" 4 Bio::MAGE::HigherLevelAnalysis::NodeContents .IP "\(bu" 4 Bio::MAGE::Description::Description .IP "\(bu" 4 Bio::MAGE::AuditAndSecurity::Audit .IP "\(bu" 4 Bio::MAGE::Identifiable .IP "\(bu" 4 Bio::MAGE::Array::Fiducial .IP "\(bu" 4 Bio::MAGE::BQS::BibliographicReference .IP "\(bu" 4 Bio::MAGE::Experiment::ExperimentDesign .IP "\(bu" 4 Bio::MAGE::Array::ManufactureLIMS .IP "\(bu" 4 Bio::MAGE::BioSequence::SeqFeature .IP "\(bu" 4 Bio::MAGE::Protocol::ParameterizableApplication .SH "CLASS METHODS" .IX Header "CLASS METHODS" The following methods can all be called without first having an instance of the class via the Bio::MAGE::Describable\->\fImethodname()\fR syntax. .IP "\fInew()\fR" 4 .IX Item "new()" .PD 0 .IP "new(%args)" 4 .IX Item "new(%args)" .PD Bio::MAGE::Describable is an abstract base class and should not be directly instantiated using the \f(CW\*(C`new()\*(C'\fR constructor. It is listed here to indicate what arguments will be accepted for its subclasses. .Sp The object constructor \f(CW\*(C`new()\*(C'\fR accepts the following optional named-value style arguments: .RS 4 .IP "\(bu" 4 auditTrail .Sp Sets the value of the \f(CW\*(C`auditTrail\*(C'\fR association .Sp The value must be of type: array of \f(CW\*(C`Bio::MAGE::AuditAndSecurity::Audit\*(C'\fR. .IP "\(bu" 4 propertySets .Sp Sets the value of the \f(CW\*(C`propertySets\*(C'\fR association (this association was inherited from class \f(CW\*(C`Bio::MAGE::Extendable\*(C'\fR). .Sp The value must be of type: array of \f(CW\*(C`Bio::MAGE::NameValueType\*(C'\fR. .IP "\(bu" 4 descriptions .Sp Sets the value of the \f(CW\*(C`descriptions\*(C'\fR association .Sp The value must be of type: array of \f(CW\*(C`Bio::MAGE::Description::Description\*(C'\fR. .IP "\(bu" 4 security .Sp Sets the value of the \f(CW\*(C`security\*(C'\fR association .Sp The value must be of type: instance of \f(CW\*(C`Bio::MAGE::AuditAndSecurity::Security\*(C'\fR. .RE .RS 4 .RE .ie n .IP "$obj = class\->new(%parameters)" 4 .el .IP "\f(CW$obj\fR = class\->new(%parameters)" 4 .IX Item "$obj = class->new(%parameters)" The \f(CW\*(C`new()\*(C'\fR method is the class constructor. .Sp \&\fBParameters\fR: if given a list of name/value parameters the corresponding slots, attributes, or associations will have their initial values set by the constructor. .Sp \&\fBReturn value\fR: It returns a reference to an object of the class. .Sp \&\fBSide effects\fR: It invokes the \f(CW\*(C`initialize()\*(C'\fR method if it is defined by the class. .ie n .IP "@names = class\->\fIget_slot_names()\fR" 4 .el .IP "\f(CW@names\fR = class\->\fIget_slot_names()\fR" 4 .IX Item "@names = class->get_slot_names()" The \f(CW\*(C`get_slot_names()\*(C'\fR method is used to retrieve the name of all slots defined in a given class. .Sp \&\fB\s-1NOTE\s0\fR: the list of names does not include attribute or association names. .Sp \&\fBReturn value\fR: A list of the names of all slots defined for this class. .Sp \&\fBSide effects\fR: none .ie n .IP "@name_list = \fIget_attribute_names()\fR" 4 .el .IP "\f(CW@name_list\fR = \fIget_attribute_names()\fR" 4 .IX Item "@name_list = get_attribute_names()" returns the list of attribute data members for this class. .ie n .IP "@name_list = \fIget_association_names()\fR" 4 .el .IP "\f(CW@name_list\fR = \fIget_association_names()\fR" 4 .IX Item "@name_list = get_association_names()" returns the list of association data members for this class. .ie n .IP "@class_list = \fIget_superclasses()\fR" 4 .el .IP "\f(CW@class_list\fR = \fIget_superclasses()\fR" 4 .IX Item "@class_list = get_superclasses()" returns the list of superclasses for this class. .ie n .IP "@class_list = \fIget_subclasses()\fR" 4 .el .IP "\f(CW@class_list\fR = \fIget_subclasses()\fR" 4 .IX Item "@class_list = get_subclasses()" returns the list of subclasses for this class. .ie n .IP "$name = \fIclass_name()\fR" 4 .el .IP "\f(CW$name\fR = \fIclass_name()\fR" 4 .IX Item "$name = class_name()" Returns the full class name for this class. .ie n .IP "$package_name = \fIpackage_name()\fR" 4 .el .IP "\f(CW$package_name\fR = \fIpackage_name()\fR" 4 .IX Item "$package_name = package_name()" Returns the base package name (i.e. no 'namespace::') of the package that contains this class. .ie n .IP "%assns = \fIassociations()\fR" 4 .el .IP "\f(CW%assns\fR = \fIassociations()\fR" 4 .IX Item "%assns = associations()" returns the association meta-information in a hash where the keys are the association names and the values are \f(CW\*(C`Association\*(C'\fR objects that provide the meta-information for the association. .SH "INSTANCE METHODS" .IX Header "INSTANCE METHODS" .ie n .IP "$obj_copy = $obj\->\fInew()\fR" 4 .el .IP "\f(CW$obj_copy\fR = \f(CW$obj\fR\->\fInew()\fR" 4 .IX Item "$obj_copy = $obj->new()" When invoked with an existing object reference and not a class name, the \f(CW\*(C`new()\*(C'\fR method acts as a copy constructor \- with the new object's initial values set to be those of the existing object. .Sp \&\fBParameters\fR: No input parameters are used in the copy constructor, the initial values are taken directly from the object to be copied. .Sp \&\fBReturn value\fR: It returns a reference to an object of the class. .Sp \&\fBSide effects\fR: It invokes the \f(CW\*(C`initialize()\*(C'\fR method if it is defined by the class. .ie n .IP "$obj\->set_slots(%parameters)" 4 .el .IP "\f(CW$obj\fR\->set_slots(%parameters)" 4 .IX Item "$obj->set_slots(%parameters)" .PD 0 .ie n .IP "$obj\->set_slots(\e@name_list, \e@value_list)" 4 .el .IP "\f(CW$obj\fR\->set_slots(\e@name_list, \e@value_list)" 4 .IX Item "$obj->set_slots(@name_list, @value_list)" .PD The \f(CW\*(C`set_slots()\*(C'\fR 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. .Sp \&\fBReturn value\fR: none .Sp \&\fBSide effects\fR: will call \f(CW\*(C`croak()\*(C'\fR if a slot_name is used that the class does not define. .ie n .IP "@obj_list = $obj\->get_slots(@name_list)" 4 .el .IP "\f(CW@obj_list\fR = \f(CW$obj\fR\->get_slots(@name_list)" 4 .IX Item "@obj_list = $obj->get_slots(@name_list)" The \f(CW\*(C`get_slots()\*(C'\fR method is used to get the values of a number of slots at the same time. .Sp \&\fBReturn value\fR: a list of instance objects .Sp \&\fBSide effects\fR: none .ie n .IP "$val = $obj\->set_slot($name,$val)" 4 .el .IP "\f(CW$val\fR = \f(CW$obj\fR\->set_slot($name,$val)" 4 .IX Item "$val = $obj->set_slot($name,$val)" The \f(CW\*(C`set_slot()\*(C'\fR method sets the slot \f(CW$name\fR to the value \f(CW$val\fR .Sp \&\fBReturn value\fR: the new value of the slot, i.e. \f(CW$val\fR .Sp \&\fBSide effects\fR: none .ie n .IP "$val = $obj\->get_slot($name)" 4 .el .IP "\f(CW$val\fR = \f(CW$obj\fR\->get_slot($name)" 4 .IX Item "$val = $obj->get_slot($name)" The \f(CW\*(C`get_slot()\*(C'\fR method is used to get the values of a number of slots at the same time. .Sp \&\fBReturn value\fR: a single slot value, or undef if the slot has not been initialized. .Sp \&\fBSide effects\fR: none .SS "\s-1ATTRIBUTES\s0" .IX Subsection "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. .PP \&\f(CW\*(C`Bio::MAGE::Describable\*(C'\fR has the following attribute accessor methods: .SS "\s-1ASSOCIATIONS\s0" .IX Subsection "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: .IP "1." 4 There \fBmust\fR be exactly one item in the association, i.e. this is a mandatory data field. .IP "2." 4 0..1 .Sp There \fBmay\fR be one item in the association, i.e. this is an optional data field. .IP "3." 4 1..N .Sp There \fBmust\fR be one or more items in the association, i.e. this is a mandatory data field, with list cardinality. .IP "4." 4 0..N .Sp There \fBmay\fR be one or more items in the association, i.e. this is an optional data field, with list cardinality. .PP Bio::MAGE::Describable has the following association accessor methods: .IP "auditTrail" 4 .IX Item "auditTrail" Methods for the \f(CW\*(C`auditTrail\*(C'\fR association. .Sp From the MAGE-OM documentation: .Sp A list of Audit instances that track changes to the instance of Describable. .RS 4 .ie n .IP "$array_ref = $describable\->setAuditTrail($array_ref)" 4 .el .IP "\f(CW$array_ref\fR = \f(CW$describable\fR\->setAuditTrail($array_ref)" 4 .IX Item "$array_ref = $describable->setAuditTrail($array_ref)" The restricted setter method for the \f(CW\*(C`auditTrail\*(C'\fR association. .Sp Input parameters: the value to which the \f(CW\*(C`auditTrail\*(C'\fR association will be set : a reference to an array of objects of type \f(CW\*(C`Bio::MAGE::AuditAndSecurity::Audit\*(C'\fR .Sp Return value: the current value of the \f(CW\*(C`auditTrail\*(C'\fR association : a reference to an array of objects of type \f(CW\*(C`Bio::MAGE::AuditAndSecurity::Audit\*(C'\fR .Sp Side effects: none .Sp Exceptions: will call \f(CW\*(C`croak()\*(C'\fR if no input parameters are specified, or if too many input parameters are specified, or if \f(CW$array_ref\fR is not a reference to an array class \f(CW\*(C`Bio::MAGE::AuditAndSecurity::Audit\*(C'\fR instances .ie n .IP "$array_ref = $describable\->\fIgetAuditTrail()\fR" 4 .el .IP "\f(CW$array_ref\fR = \f(CW$describable\fR\->\fIgetAuditTrail()\fR" 4 .IX Item "$array_ref = $describable->getAuditTrail()" The restricted getter method for the \f(CW\*(C`auditTrail\*(C'\fR association. .Sp Input parameters: none .Sp Return value: the current value of the \f(CW\*(C`auditTrail\*(C'\fR association : a reference to an array of objects of type \f(CW\*(C`Bio::MAGE::AuditAndSecurity::Audit\*(C'\fR .Sp Side effects: none .Sp Exceptions: will call \f(CW\*(C`croak()\*(C'\fR if any input parameters are specified .ie n .IP "$val = $describable\->addAuditTrail(@vals)" 4 .el .IP "\f(CW$val\fR = \f(CW$describable\fR\->addAuditTrail(@vals)" 4 .IX Item "$val = $describable->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. .Sp Input parameters: the list of values \f(CW@vals\fR to add to the auditTrail association. \fB\s-1NOTE\s0\fR: submitting a single value is permitted. .Sp Return value: the number of items stored in the slot \fBafter\fR adding \f(CW@vals\fR .Sp Side effects: none .Sp Exceptions: will call \f(CW\*(C`croak()\*(C'\fR if no input parameters are specified, or if any of the objects in \f(CW@vals\fR is not an instance of class \f(CW\*(C`Bio::MAGE::AuditAndSecurity::Audit\*(C'\fR .RE .RS 4 .RE .IP "propertySets" 4 .IX Item "propertySets" Methods for the \f(CW\*(C`propertySets\*(C'\fR association. .Sp From the MAGE-OM documentation: .Sp 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. .RS 4 .ie n .IP "$array_ref = $describable\->setPropertySets($array_ref)" 4 .el .IP "\f(CW$array_ref\fR = \f(CW$describable\fR\->setPropertySets($array_ref)" 4 .IX Item "$array_ref = $describable->setPropertySets($array_ref)" The restricted setter method for the \f(CW\*(C`propertySets\*(C'\fR association. .Sp Input parameters: the value to which the \f(CW\*(C`propertySets\*(C'\fR association will be set : a reference to an array of objects of type \f(CW\*(C`Bio::MAGE::NameValueType\*(C'\fR .Sp Return value: the current value of the \f(CW\*(C`propertySets\*(C'\fR association : a reference to an array of objects of type \f(CW\*(C`Bio::MAGE::NameValueType\*(C'\fR .Sp Side effects: none .Sp Exceptions: will call \f(CW\*(C`croak()\*(C'\fR if no input parameters are specified, or if too many input parameters are specified, or if \f(CW$array_ref\fR is not a reference to an array class \f(CW\*(C`Bio::MAGE::NameValueType\*(C'\fR instances .ie n .IP "$array_ref = $describable\->\fIgetPropertySets()\fR" 4 .el .IP "\f(CW$array_ref\fR = \f(CW$describable\fR\->\fIgetPropertySets()\fR" 4 .IX Item "$array_ref = $describable->getPropertySets()" The restricted getter method for the \f(CW\*(C`propertySets\*(C'\fR association. .Sp Input parameters: none .Sp Return value: the current value of the \f(CW\*(C`propertySets\*(C'\fR association : a reference to an array of objects of type \f(CW\*(C`Bio::MAGE::NameValueType\*(C'\fR .Sp Side effects: none .Sp Exceptions: will call \f(CW\*(C`croak()\*(C'\fR if any input parameters are specified .ie n .IP "$val = $describable\->addPropertySets(@vals)" 4 .el .IP "\f(CW$val\fR = \f(CW$describable\fR\->addPropertySets(@vals)" 4 .IX Item "$val = $describable->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. .Sp Input parameters: the list of values \f(CW@vals\fR to add to the propertySets association. \fB\s-1NOTE\s0\fR: submitting a single value is permitted. .Sp Return value: the number of items stored in the slot \fBafter\fR adding \f(CW@vals\fR .Sp Side effects: none .Sp Exceptions: will call \f(CW\*(C`croak()\*(C'\fR if no input parameters are specified, or if any of the objects in \f(CW@vals\fR is not an instance of class \f(CW\*(C`Bio::MAGE::NameValueType\*(C'\fR .RE .RS 4 .RE .IP "descriptions" 4 .IX Item "descriptions" Methods for the \f(CW\*(C`descriptions\*(C'\fR association. .Sp From the MAGE-OM documentation: .Sp Free hand text descriptions. Makes available the associations of Description to an instance of Describable. .RS 4 .ie n .IP "$array_ref = $describable\->setDescriptions($array_ref)" 4 .el .IP "\f(CW$array_ref\fR = \f(CW$describable\fR\->setDescriptions($array_ref)" 4 .IX Item "$array_ref = $describable->setDescriptions($array_ref)" The restricted setter method for the \f(CW\*(C`descriptions\*(C'\fR association. .Sp Input parameters: the value to which the \f(CW\*(C`descriptions\*(C'\fR association will be set : a reference to an array of objects of type \f(CW\*(C`Bio::MAGE::Description::Description\*(C'\fR .Sp Return value: the current value of the \f(CW\*(C`descriptions\*(C'\fR association : a reference to an array of objects of type \f(CW\*(C`Bio::MAGE::Description::Description\*(C'\fR .Sp Side effects: none .Sp Exceptions: will call \f(CW\*(C`croak()\*(C'\fR if no input parameters are specified, or if too many input parameters are specified, or if \f(CW$array_ref\fR is not a reference to an array class \f(CW\*(C`Bio::MAGE::Description::Description\*(C'\fR instances .ie n .IP "$array_ref = $describable\->\fIgetDescriptions()\fR" 4 .el .IP "\f(CW$array_ref\fR = \f(CW$describable\fR\->\fIgetDescriptions()\fR" 4 .IX Item "$array_ref = $describable->getDescriptions()" The restricted getter method for the \f(CW\*(C`descriptions\*(C'\fR association. .Sp Input parameters: none .Sp Return value: the current value of the \f(CW\*(C`descriptions\*(C'\fR association : a reference to an array of objects of type \f(CW\*(C`Bio::MAGE::Description::Description\*(C'\fR .Sp Side effects: none .Sp Exceptions: will call \f(CW\*(C`croak()\*(C'\fR if any input parameters are specified .ie n .IP "$val = $describable\->addDescriptions(@vals)" 4 .el .IP "\f(CW$val\fR = \f(CW$describable\fR\->addDescriptions(@vals)" 4 .IX Item "$val = $describable->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. .Sp Input parameters: the list of values \f(CW@vals\fR to add to the descriptions association. \fB\s-1NOTE\s0\fR: submitting a single value is permitted. .Sp Return value: the number of items stored in the slot \fBafter\fR adding \f(CW@vals\fR .Sp Side effects: none .Sp Exceptions: will call \f(CW\*(C`croak()\*(C'\fR if no input parameters are specified, or if any of the objects in \f(CW@vals\fR is not an instance of class \f(CW\*(C`Bio::MAGE::Description::Description\*(C'\fR .RE .RS 4 .RE .IP "security" 4 .IX Item "security" Methods for the \f(CW\*(C`security\*(C'\fR association. .Sp From the MAGE-OM documentation: .Sp Information on the security for the instance of the class. .RS 4 .ie n .IP "$val = $describable\->setSecurity($val)" 4 .el .IP "\f(CW$val\fR = \f(CW$describable\fR\->setSecurity($val)" 4 .IX Item "$val = $describable->setSecurity($val)" The restricted setter method for the \f(CW\*(C`security\*(C'\fR association. .Sp Input parameters: the value to which the \f(CW\*(C`security\*(C'\fR association will be set : one of the accepted enumerated values. .Sp Return value: the current value of the \f(CW\*(C`security\*(C'\fR association : one of the accepted enumerated values. .Sp Side effects: none .Sp Exceptions: will call \f(CW\*(C`croak()\*(C'\fR if no input parameters are specified, or if too many input parameters are specified, or if \f(CW$val\fR is not an instance of class \f(CW\*(C`Bio::MAGE::AuditAndSecurity::Security\*(C'\fR .ie n .IP "$val = $describable\->\fIgetSecurity()\fR" 4 .el .IP "\f(CW$val\fR = \f(CW$describable\fR\->\fIgetSecurity()\fR" 4 .IX Item "$val = $describable->getSecurity()" The restricted getter method for the \f(CW\*(C`security\*(C'\fR association. .Sp Input parameters: none .Sp Return value: the current value of the \f(CW\*(C`security\*(C'\fR association : an instance of type \f(CW\*(C`Bio::MAGE::AuditAndSecurity::Security\*(C'\fR. .Sp Side effects: none .Sp Exceptions: will call \f(CW\*(C`croak()\*(C'\fR if any input parameters are specified .RE .RS 4 .Sp sub initialize { .Sp .Vb 1 \& carp _\|_PACKAGE_\|_ . "::initialize: abstract base classes should not be instantiated"; .Ve .Sp } .RE .SH "SLOTS, ATTRIBUTES, AND ASSOCIATIONS" .IX Header "SLOTS, ATTRIBUTES, AND ASSOCIATIONS" In the Perl implementation of MAGE-OM classes, there are three types of class data members: \f(CW\*(C`slots\*(C'\fR, \f(CW\*(C`attributes\*(C'\fR, and \&\f(CW\*(C`associations\*(C'\fR. .SS "\s-1SLOTS\s0" .IX Subsection "SLOTS" This \s-1API\s0 uses the term \f(CW\*(C`slot\*(C'\fR to indicate a data member of the class that was not present in the \s-1UML\s0 model and is used for mainly internal purposes \- use only if you understand the inner workings of the \&\s-1API.\s0 Most often slots are used by generic methods such as those in the \&\s-1XML\s0 writing and reading classes. .PP Slots are implemented using unified getter/setter methods: .ie n .IP "$var = $obj\->\fIslot_name()\fR;" 4 .el .IP "\f(CW$var\fR = \f(CW$obj\fR\->\fIslot_name()\fR;" 4 .IX Item "$var = $obj->slot_name();" Retrieves the current value of the slot. .ie n .IP "$new_var = $obj\->slot_name($new_var);" 4 .el .IP "\f(CW$new_var\fR = \f(CW$obj\fR\->slot_name($new_var);" 4 .IX Item "$new_var = $obj->slot_name($new_var);" Store \f(CW$new_var\fR in the slot \- the return value is also \f(CW$new_var\fR. .ie n .IP "@names = $obj\->\fIget_slot_names()\fR" 4 .el .IP "\f(CW@names\fR = \f(CW$obj\fR\->\fIget_slot_names()\fR" 4 .IX Item "@names = $obj->get_slot_names()" Returns the list of all slots in the class. .PP \&\fB\s-1DATA CHECKING\s0\fR: No data type checking is made for these methods. .SS "\s-1ATTRIBUTES AND ASSOCIATIONS\s0" .IX Subsection "ATTRIBUTES AND ASSOCIATIONS" The terms \f(CW\*(C`attribute\*(C'\fR and \f(CW\*(C`association\*(C'\fR indicate data members of the class that were specified directly from the \s-1UML\s0 model. .PP In the Perl implementation of MAGE-OM classes, association and attribute accessors are implemented using three separate methods: .IP "get*" 4 .IX Item "get*" Retrieves the current value. .Sp \&\fB\s-1NOTE\s0\fR: For associations, if the association has list cardinality, an array reference is returned. .Sp \&\fB\s-1DATA CHECKING\s0\fR: Ensure that no argument is provided. .IP "set*" 4 .IX Item "set*" Sets the current value, \fBreplacing\fR any existing value. .Sp \&\fB\s-1NOTE\s0\fR: 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. .Sp \&\fB\s-1DATA CHECKING\s0\fR: 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. .IP "add*" 4 .IX Item "add*" \&\fB\s-1NOTE\s0\fR: Only present in associations with list cardinality. .Sp Appends a list of objects to any values that may already be stored in the association. .Sp \&\fB\s-1DATA CHECKING\s0\fR: Ensure that all arguments are of the correct MAGE-OM class. .SS "\s-1GENERIC METHODS\s0" .IX Subsection "GENERIC METHODS" The unified base class of all MAGE-OM classes, \f(CW\*(C`Bio::MAGE::Base\*(C'\fR, provides a set of generic methods that will operate on slots, attributes, and associations: .ie n .IP "$val = $obj\->get_slot($name)" 4 .el .IP "\f(CW$val\fR = \f(CW$obj\fR\->get_slot($name)" 4 .IX Item "$val = $obj->get_slot($name)" .PD 0 .ie n .IP "\e@list_ref = $obj\->get_slots(@name_list);" 4 .el .IP "\e@list_ref = \f(CW$obj\fR\->get_slots(@name_list);" 4 .IX Item "@list_ref = $obj->get_slots(@name_list);" .ie n .IP "$val = $obj\->set_slot($name,$val)" 4 .el .IP "\f(CW$val\fR = \f(CW$obj\fR\->set_slot($name,$val)" 4 .IX Item "$val = $obj->set_slot($name,$val)" .ie n .IP "$obj\->set_slots(%parameters)" 4 .el .IP "\f(CW$obj\fR\->set_slots(%parameters)" 4 .IX Item "$obj->set_slots(%parameters)" .ie n .IP "$obj\->set_slots(\e@name_list, \e@value_list)" 4 .el .IP "\f(CW$obj\fR\->set_slots(\e@name_list, \e@value_list)" 4 .IX Item "$obj->set_slots(@name_list, @value_list)" .PD See elsewhere in this page for a detailed description of these methods. .SH "BUGS" .IX Header "BUGS" Please send bug reports to the project mailing list: (mged-mage 'at' lists 'dot' sf 'dot' net) .SH "AUTHOR" .IX Header "AUTHOR" Jason E. Stewart (jasons 'at' cpan 'dot' org) .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIperl\fR\|(1). .SH "POD ERRORS" .IX Header "POD ERRORS" Hey! \fBThe above document had some coding errors, which are explained below:\fR .IP "Around line 400:" 4 .IX Item "Around line 400:" \&'=item' outside of any '=over' .IP "Around line 485:" 4 .IX Item "Around line 485:" You forgot a '=back' before '=head2' .IP "Around line 513:" 4 .IX Item "Around line 513:" Expected '=item 2' .IP "Around line 518:" 4 .IX Item "Around line 518:" Expected '=item 3' .IP "Around line 523:" 4 .IX Item "Around line 523:" Expected '=item 4'