131 |
|
|
132 |
=head3 new |
=head3 new |
133 |
|
|
134 |
C<< my $attrDB = CustomAttributes->new(%options); >> |
my $attrDB = CustomAttributes->new(%options); |
135 |
|
|
136 |
Construct a new CustomAttributes object. The following options are |
Construct a new CustomAttributes object. The following options are |
137 |
supported. |
supported. |
174 |
|
|
175 |
=head3 StoreAttributeKey |
=head3 StoreAttributeKey |
176 |
|
|
177 |
C<< $attrDB->StoreAttributeKey($attributeName, $type, $notes, \@groups); >> |
$attrDB->StoreAttributeKey($attributeName, $type, $notes, \@groups); |
178 |
|
|
179 |
Create or update an attribute for the database. |
Create or update an attribute for the database. |
180 |
|
|
247 |
|
|
248 |
=head3 DeleteAttributeKey |
=head3 DeleteAttributeKey |
249 |
|
|
250 |
C<< my $stats = $attrDB->DeleteAttributeKey($attributeName); >> |
my $stats = $attrDB->DeleteAttributeKey($attributeName); |
251 |
|
|
252 |
Delete an attribute from the custom attributes database. |
Delete an attribute from the custom attributes database. |
253 |
|
|
279 |
|
|
280 |
=head3 NewName |
=head3 NewName |
281 |
|
|
282 |
C<< my $text = CustomAttributes::NewName(); >> |
my $text = CustomAttributes::NewName(); |
283 |
|
|
284 |
Return the string used to indicate the user wants to add a new attribute. |
Return the string used to indicate the user wants to add a new attribute. |
285 |
|
|
291 |
|
|
292 |
=head3 ControlForm |
=head3 ControlForm |
293 |
|
|
294 |
C<< my $formHtml = $attrDB->ControlForm($cgi, $name, \%keys); >> |
my $formHtml = $attrDB->ControlForm($cgi, $name, \%keys); |
295 |
|
|
296 |
Return a form that can be used to control the creation and modification of |
Return a form that can be used to control the creation and modification of |
297 |
attributes. Only a subset of the attribute keys will be displayed, as |
attributes. Only a subset of the attribute keys will be displayed, as |
385 |
|
|
386 |
=head3 LoadAttributesFrom |
=head3 LoadAttributesFrom |
387 |
|
|
388 |
C<< my $stats = $attrDB->LoadAttributesFrom($fileName, %options); >> |
my $stats = $attrDB->LoadAttributesFrom($fileName, %options); |
389 |
s |
s |
390 |
Load attributes from the specified tab-delimited file. Each line of the file must |
Load attributes from the specified tab-delimited file. Each line of the file must |
391 |
contain an object ID in the first column, an attribute key name in the second |
contain an object ID in the first column, an attribute key name in the second |
568 |
|
|
569 |
=head3 BackupKeys |
=head3 BackupKeys |
570 |
|
|
571 |
C<< my $stats = $attrDB->BackupKeys($fileName, %options); >> |
my $stats = $attrDB->BackupKeys($fileName, %options); |
572 |
|
|
573 |
Backup the attribute key information from the attribute database. |
Backup the attribute key information from the attribute database. |
574 |
|
|
630 |
|
|
631 |
=head3 RestoreKeys |
=head3 RestoreKeys |
632 |
|
|
633 |
C<< my $stats = $attrDB->RestoreKeys($fileName, %options); >> |
my $stats = $attrDB->RestoreKeys($fileName, %options); |
634 |
|
|
635 |
Restore the attribute keys and groups from a backup file. |
Restore the attribute keys and groups from a backup file. |
636 |
|
|
702 |
|
|
703 |
=head3 ArchiveFileName |
=head3 ArchiveFileName |
704 |
|
|
705 |
C<< my $fileName = $ca->ArchiveFileName(); >> |
my $fileName = $ca->ArchiveFileName(); |
706 |
|
|
707 |
Compute a file name for archiving attribute input data. The file will be in the attribute log directory |
Compute a file name for archiving attribute input data. The file will be in the attribute log directory |
708 |
|
|
735 |
|
|
736 |
=head3 BackupAllAttributes |
=head3 BackupAllAttributes |
737 |
|
|
738 |
C<< my $stats = $attrDB->BackupAllAttributes($fileName, %options); >> |
my $stats = $attrDB->BackupAllAttributes($fileName, %options); |
739 |
|
|
740 |
Backup all of the attributes to a file. The attributes will be stored in a |
Backup all of the attributes to a file. The attributes will be stored in a |
741 |
tab-delimited file suitable for reloading via L</LoadAttributesFrom>. |
tab-delimited file suitable for reloading via L</LoadAttributesFrom>. |
802 |
|
|
803 |
=head3 FieldMenu |
=head3 FieldMenu |
804 |
|
|
805 |
C<< my $menuHtml = $attrDB->FieldMenu($cgi, $height, $name, $keys, %options); >> |
my $menuHtml = $attrDB->FieldMenu($cgi, $height, $name, $keys, %options); |
806 |
|
|
807 |
Return the HTML for a menu to select an attribute field. The menu will |
Return the HTML for a menu to select an attribute field. The menu will |
808 |
be a standard SELECT/OPTION thing which is called "popup menu" in the |
be a standard SELECT/OPTION thing which is called "popup menu" in the |
976 |
|
|
977 |
=head3 GetGroups |
=head3 GetGroups |
978 |
|
|
979 |
C<< my @groups = $attrDB->GetGroups(); >> |
my @groups = $attrDB->GetGroups(); |
980 |
|
|
981 |
Return a list of the available groups. |
Return a list of the available groups. |
982 |
|
|
993 |
|
|
994 |
=head3 GetAttributeData |
=head3 GetAttributeData |
995 |
|
|
996 |
C<< my %keys = $attrDB->GetAttributeData($type, @list); >> |
my %keys = $attrDB->GetAttributeData($type, @list); |
997 |
|
|
998 |
Return attribute data for the selected attributes. The attribute |
Return attribute data for the selected attributes. The attribute |
999 |
data is a hash mapping each attribute key name to a n-tuple containing the |
data is a hash mapping each attribute key name to a n-tuple containing the |
1062 |
|
|
1063 |
=head3 LogOperation |
=head3 LogOperation |
1064 |
|
|
1065 |
C<< $ca->LogOperation($action, $target, $description); >> |
$ca->LogOperation($action, $target, $description); |
1066 |
|
|
1067 |
Write an operation description to the attribute activity log (C<$FIG_Config::var/attributes.log>). |
Write an operation description to the attribute activity log (C<$FIG_Config::var/attributes.log>). |
1068 |
|
|
1103 |
|
|
1104 |
=head3 _KeywordString |
=head3 _KeywordString |
1105 |
|
|
1106 |
C<< my $keywordString = $ca->_KeywordString($key, $value); >> |
my $keywordString = $ca->_KeywordString($key, $value); |
1107 |
|
|
1108 |
Compute the keyword string for a specified key/value pair. This consists of the |
Compute the keyword string for a specified key/value pair. This consists of the |
1109 |
key name and value converted to lower case with underscores translated to spaces. |
key name and value converted to lower case with underscores translated to spaces. |
1148 |
|
|
1149 |
=head3 _QueryResults |
=head3 _QueryResults |
1150 |
|
|
1151 |
C<< my @attributeList = $attrDB->_QueryResults($query, @values); >> |
my @attributeList = $attrDB->_QueryResults($query, @values); |
1152 |
|
|
1153 |
Match the results of a B<HasValueFor> query against value criteria and return |
Match the results of a B<HasValueFor> query against value criteria and return |
1154 |
the results. This is an internal method that splits the values coming back |
the results. This is an internal method that splits the values coming back |
1261 |
|
|
1262 |
=head3 GetAttributes |
=head3 GetAttributes |
1263 |
|
|
1264 |
C<< my @attributeList = $attrDB->GetAttributes($objectID, $key, @values); >> |
my @attributeList = $attrDB->GetAttributes($objectID, $key, @values); |
1265 |
|
|
1266 |
In the database, attribute values are sectioned into pieces using a splitter |
In the database, attribute values are sectioned into pieces using a splitter |
1267 |
value specified in the constructor (L</new>). This is not a requirement of |
value specified in the constructor (L</new>). This is not a requirement of |
1480 |
|
|
1481 |
=head3 AddAttribute |
=head3 AddAttribute |
1482 |
|
|
1483 |
C<< $attrDB->AddAttribute($objectID, $key, @values); >> |
$attrDB->AddAttribute($objectID, $key, @values); |
1484 |
|
|
1485 |
Add an attribute key/value pair to an object. This method cannot add a new key, merely |
Add an attribute key/value pair to an object. This method cannot add a new key, merely |
1486 |
add a value to an existing key. Use L</StoreAttributeKey> to create a new key. |
add a value to an existing key. Use L</StoreAttributeKey> to create a new key. |
1534 |
|
|
1535 |
=head3 DeleteAttribute |
=head3 DeleteAttribute |
1536 |
|
|
1537 |
C<< $attrDB->DeleteAttribute($objectID, $key, @values); >> |
$attrDB->DeleteAttribute($objectID, $key, @values); |
1538 |
|
|
1539 |
Delete the specified attribute key/value combination from the database. |
Delete the specified attribute key/value combination from the database. |
1540 |
|
|
1584 |
|
|
1585 |
=head3 DeleteMatchingAttributes |
=head3 DeleteMatchingAttributes |
1586 |
|
|
1587 |
C<< my @deleted = $attrDB->DeleteMatchingAttributes($objectID, $key, @values); >> |
my @deleted = $attrDB->DeleteMatchingAttributes($objectID, $key, @values); |
1588 |
|
|
1589 |
Delete all attributes that match the specified criteria. This is equivalent to |
Delete all attributes that match the specified criteria. This is equivalent to |
1590 |
calling L</GetAttributes> and then invoking L</DeleteAttribute> for each |
calling L</GetAttributes> and then invoking L</DeleteAttribute> for each |
1644 |
|
|
1645 |
=head3 ChangeAttribute |
=head3 ChangeAttribute |
1646 |
|
|
1647 |
C<< $attrDB->ChangeAttribute($objectID, $key, \@oldValues, \@newValues); >> |
$attrDB->ChangeAttribute($objectID, $key, \@oldValues, \@newValues); |
1648 |
|
|
1649 |
Change the value of an attribute key/value pair for an object. |
Change the value of an attribute key/value pair for an object. |
1650 |
|
|
1696 |
|
|
1697 |
=head3 EraseAttribute |
=head3 EraseAttribute |
1698 |
|
|
1699 |
C<< $attrDB->EraseAttribute($key); >> |
$attrDB->EraseAttribute($key); |
1700 |
|
|
1701 |
Erase all values for the specified attribute key. This does not remove the |
Erase all values for the specified attribute key. This does not remove the |
1702 |
key from the database; it merely removes all the values. |
key from the database; it merely removes all the values. |
1725 |
|
|
1726 |
=head3 GetAttributeKeys |
=head3 GetAttributeKeys |
1727 |
|
|
1728 |
C<< my @keyList = $attrDB->GetAttributeKeys($groupName); >> |
my @keyList = $attrDB->GetAttributeKeys($groupName); |
1729 |
|
|
1730 |
Return a list of the attribute keys for a particular group. |
Return a list of the attribute keys for a particular group. |
1731 |
|
|
1755 |
|
|
1756 |
=head3 QueryAttributes |
=head3 QueryAttributes |
1757 |
|
|
1758 |
C<< my @attributeData = $ca->QueryAttributes($filter, $filterParms); >> |
my @attributeData = $ca->QueryAttributes($filter, $filterParms); |
1759 |
|
|
1760 |
Return the attribute data based on an SQL filter clause. In the filter clause, |
Return the attribute data based on an SQL filter clause. In the filter clause, |
1761 |
the name C<$object> should be used for the object ID, C<$key> should be used for |
the name C<$object> should be used for the object ID, C<$key> should be used for |
1824 |
|
|
1825 |
=head3 ParseID |
=head3 ParseID |
1826 |
|
|
1827 |
C<< my ($type, $id) = CustomAttributes::ParseID($idValue); >> |
my ($type, $id) = CustomAttributes::ParseID($idValue); |
1828 |
|
|
1829 |
Determine the type and object ID corresponding to an ID value from the attribute database. |
Determine the type and object ID corresponding to an ID value from the attribute database. |
1830 |
Most ID values consist of a type name and an ID, separated by a colon (e.g. C<Family:aclame|cluster10>); |
Most ID values consist of a type name and an ID, separated by a colon (e.g. C<Family:aclame|cluster10>); |
1881 |
|
|
1882 |
=head3 FormID |
=head3 FormID |
1883 |
|
|
1884 |
C<< my $idValue = CustomAttributes::FormID($type, $id); >> |
my $idValue = CustomAttributes::FormID($type, $id); |
1885 |
|
|
1886 |
Convert an object type and ID pair into an object ID string for the attribute system. Subsystems, |
Convert an object type and ID pair into an object ID string for the attribute system. Subsystems, |
1887 |
genomes, and features are stored in the database without type information, but all other object IDs |
genomes, and features are stored in the database without type information, but all other object IDs |
1922 |
|
|
1923 |
=head3 GetTargetObject |
=head3 GetTargetObject |
1924 |
|
|
1925 |
C<< my $object = CustomAttributes::GetTargetObject($erdb, $idValue); >> |
my $object = CustomAttributes::GetTargetObject($erdb, $idValue); |
1926 |
|
|
1927 |
Return the database object corresponding to the specified attribute object ID. The |
Return the database object corresponding to the specified attribute object ID. The |
1928 |
object type associated with the ID value must correspond to an entity name in the |
object type associated with the ID value must correspond to an entity name in the |
1961 |
|
|
1962 |
=head3 SplitKey |
=head3 SplitKey |
1963 |
|
|
1964 |
C<< my ($realKey, $subKey) = $ca->SplitKey($key); >> |
my ($realKey, $subKey) = $ca->SplitKey($key); |
1965 |
|
|
1966 |
Split an external key (that is, one passed in by a caller) into the real key and the sub key. |
Split an external key (that is, one passed in by a caller) into the real key and the sub key. |
1967 |
The real and sub keys are separated by a splitter value (usually C<::>). If there is no splitter, |
The real and sub keys are separated by a splitter value (usually C<::>). If there is no splitter, |
1997 |
|
|
1998 |
=head3 JoinKey |
=head3 JoinKey |
1999 |
|
|
2000 |
C<< my $key = $ca->JoinKey($realKey, $subKey); >> |
my $key = $ca->JoinKey($realKey, $subKey); |
2001 |
|
|
2002 |
Join a real key and a subkey together to make an external key. The external key is the attribute key |
Join a real key and a subkey together to make an external key. The external key is the attribute key |
2003 |
used by the caller. The real key and the subkey are how the keys are represented in the database. The |
used by the caller. The real key and the subkey are how the keys are represented in the database. The |
2042 |
|
|
2043 |
=head3 AttributeTable |
=head3 AttributeTable |
2044 |
|
|
2045 |
C<< my $tableHtml = CustomAttributes::AttributeTable($cgi, @attrList); >> |
my $tableHtml = CustomAttributes::AttributeTable($cgi, @attrList); |
2046 |
|
|
2047 |
Format the attribute data into an HTML table. |
Format the attribute data into an HTML table. |
2048 |
|
|