|
CWIS Developer Documentation
|
Metadata type representing non-hierarchical controlled vocabulary values. More...


Public Member Functions | |
| Name ($NewValue=DB_NOVALUE) | |
| Get or set the controlled vocabulary term. More... | |
| VariantName ($NewValue=DB_NOVALUE) | |
| Get, set, or clear any variant terms for this controlled name . More... | |
| FieldId ($NewValue=DB_NOVALUE) | |
| Get or set the MetadataField associated with this term. More... | |
| QualifierId ($NewValue=DB_NOVALUE) | |
| Get or set the Qualifier associated with this term via ID. More... | |
| Qualifier ($NewValue=DB_NOVALUE) | |
| Get or set the Qualifier associated with this term via object. More... | |
| InUse () | |
| See if ControlledName is currently associated with any Resources. More... | |
| GetAssociatedResources () | |
| Get resourceIds associated with this ControlledName. More... | |
| RemapTo ($NewNameId) | |
| Change all currently associated Resources to be instead associated with another ControlledName. More... | |
| UpdateLastAssigned () | |
| Update the LastAssigned timestamp for this classification. More... | |
| Delete ($DeleteIfHasResources=FALSE) | |
| Remove ControlledName (and any accompanying associations from database. More... | |
Public Member Functions inherited from Item | |
| __construct ($Id) | |
| Constructor, used to load existing items. More... | |
| Destroy () | |
| Destroy item. More... | |
| Delete () | |
| Destroy item. More... | |
| Id () | |
| Get item ID. More... | |
| Name ($NewValue=DB_NOVALUE) | |
| Get/set name of item. More... | |
| DateCreated ($NewValue=DB_NOVALUE) | |
| Get/set when item was created. More... | |
| CreatedBy ($NewValue=DB_NOVALUE) | |
| Get/set ID of user who created the item. More... | |
| DateLastModified ($NewValue=DB_NOVALUE) | |
| Get/set when item was last modified. More... | |
| LastModifiedBy ($NewValue=DB_NOVALUE) | |
| Get/set ID of user who last modified the item. More... | |
Static Public Member Functions | |
| static | Create ($Term, $FieldId) |
| Create a new empty ControlledName if it's not already present. More... | |
| static | ControlledNameExists ($Term, $FieldId) |
| Check if there exists a controlledname with a ControlledName and FieldId same as given. More... | |
| static | SearchForControlledName ($ControlledName, $FieldId) |
| Check if the given controlled name already exists for a given field ID. More... | |
Static Public Member Functions inherited from Item | |
| static | GetCanonicalId ($Id) |
| Normalize item ID to canonical form. More... | |
| static | ItemExists ($Id) |
| Check whether an item exists with the specified ID. More... | |
Additional Inherited Members | |
Public Attributes inherited from Item | |
| const | NO_ITEM = -2123456789 |
| ID value used to indicate no item. More... | |
Protected Member Functions inherited from Item | |
| UpdateValue ($ColumnName, $NewValue=DB_NOVALUE) | |
| Convenience function to supply parameters to Database::UpdateValue(). More... | |
| UpdateDateValue ($ColumnName, $NewValue=DB_NOVALUE) | |
| Convenience function to supply parameters to Database::UpdateValue(), with preprocessing of new values to convert them into an SQL-compatible date format. More... | |
Static Protected Member Functions inherited from Item | |
| static | CreateWithValues ($Values) |
| Create a new item, using specified initial database values. More... | |
| static | SetDatabaseAccessValues ($ClassName) |
| Set the database access values (table name, ID column name, name column name) for specified class. More... | |
Protected Attributes inherited from Item | |
| $DB | |
| $Id | |
| $ItemIdColumnName | |
| $ItemNameColumnName | |
| $ItemTableName | |
| $ValueCache = array() | |
Static Protected Attributes inherited from Item | |
| static | $ItemIdColumnNames |
| static | $ItemNameColumnNames |
| static | $ItemTableNames |
Metadata type representing non-hierarchical controlled vocabulary values.
Hierarchical controlled vocabularies should use Classification.
Definition at line 14 of file ControlledName.php.
|
static |
Check if there exists a controlledname with a ControlledName and FieldId same as given.
This method is different from ItemExists(), which does check base on Id.
| string | $Term | ControlledName of the controlledname. |
| string | $FieldId | ID of the MetadataField. |
Definition at line 64 of file ControlledName.php.
References Item\$DB.
Referenced by ControlledName_Test\testControlledName().

|
static |
Create a new empty ControlledName if it's not already present.
Caller should set other parameters after it's created. If a controlledname with given name and field ID already exists, this will just return that controlledname.
| string | $Term | New controlled vocabulary term. |
| int | $FieldId | ID of MetadataField for new term. |
Definition at line 29 of file ControlledName.php.
References Item\$DB.
Referenced by MetadataField\Drop(), ResourceFactory\ImportResourcesFromXmlFile(), ControlledName_Test\testControlledName(), and Resource_Test\testGetSetClear().

| ControlledName::Delete | ( | $DeleteIfHasResources = FALSE | ) |
Remove ControlledName (and any accompanying associations from database.
This must be the last use of this object.
| bool | $DeleteIfHasResources | Remove ControlledName even if Resources are currently associated with it. (OPTIONAL, defaults to FALSE) |
Definition at line 305 of file ControlledName.php.
References Item\$DB, Item\Destroy(), Item\Id(), and InUse().
| ControlledName::FieldId | ( | $NewValue = DB_NOVALUE | ) |
Get or set the MetadataField associated with this term.
| int | $NewValue | ID of new MetadataField. (OPTIONAL) |
Definition at line 143 of file ControlledName.php.
References Item\UpdateValue().
| ControlledName::GetAssociatedResources | ( | ) |
Get resourceIds associated with this ControlledName.
Definition at line 239 of file ControlledName.php.
References Item\Id().
| ControlledName::InUse | ( | ) |
See if ControlledName is currently associated with any Resources.
Definition at line 229 of file ControlledName.php.
References Item\Id().
Referenced by Delete().

| ControlledName::Name | ( | $NewValue = DB_NOVALUE | ) |
Get or set the controlled vocabulary term.
| string | $NewValue | New value for term. (OPTIONAL) |
Definition at line 80 of file ControlledName.php.
References Item\UpdateValue().
| ControlledName::Qualifier | ( | $NewValue = DB_NOVALUE | ) |
Get or set the Qualifier associated with this term via object.
Definition at line 163 of file ControlledName.php.
References DB_NOVALUE, Item\ItemExists(), and QualifierId().
| ControlledName::QualifierId | ( | $NewValue = DB_NOVALUE | ) |
Get or set the Qualifier associated with this term via ID.
| int | $NewValue | ID of new Qualifier. (OPTIONAL) |
Definition at line 153 of file ControlledName.php.
References Item\UpdateValue().
Referenced by Qualifier().

| ControlledName::RemapTo | ( | $NewNameId | ) |
Change all currently associated Resources to be instead associated with another ControlledName.
| int | $NewNameId | ID of ControlledName to remap resources to. |
Definition at line 253 of file ControlledName.php.
References Item\Id().
|
static |
Check if the given controlled name already exists for a given field ID.
| string | $ControlledName | Name to search for. |
| int | $FieldId | ID of field to search. |
Definition at line 211 of file ControlledName.php.
Referenced by ControlledName_Test\testControlledName().

| ControlledName::UpdateLastAssigned | ( | ) |
Update the LastAssigned timestamp for this classification.
Definition at line 293 of file ControlledName.php.
References Item\Id().
| ControlledName::VariantName | ( | $NewValue = DB_NOVALUE | ) |
Get, set, or clear any variant terms for this controlled name .
| string | or bool $NewValue New value for variant terms. (OPTIONAL) Pass no argument to just retrieve current variant name. Pass FALSE to unset any variant name attached. |
Definition at line 94 of file ControlledName.php.
References DB_NOVALUE, and Item\Id().