CWIS Developer Documentation

- Home
- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
MetadataSchema Class Reference

Metadata schema (in effect a Factory class for MetadataField). More...

Inheritance diagram for MetadataSchema:
[legend]
Collaboration diagram for MetadataSchema:
[legend]

## Public Member Functions
| __construct ($SchemaId=self::SCHEMAID_DEFAULT)
| Object constructor, used to load an existing schema. More...
| Delete ()
| Destroy metadata schema. More...
| Id ()
| Get schema ID. More...
| Name ($NewValue=DB_NOVALUE)
| Get/set name of schema. More...
| AbbreviatedName ($NewValue=DB_NOVALUE)
| Get/set abbreviated name of schema. More...
| ResourceName ($NewValue=DB_NOVALUE)
| Get/set name of resources using this schema. More...
| ViewPage ($NewValue=DB_NOVALUE)
| Get/set name of page to go to for viewing resources using this schema. More...
| AuthoringPrivileges (PrivilegeSet $NewValue=NULL)
| Get/set privileges that allowing authoring resources with this schema. More...
| EditingPrivileges (PrivilegeSet $NewValue=NULL)
| Get/set privileges that allowing editing resources with this schema. More...
| ViewingPrivileges (PrivilegeSet $NewValue=NULL)
| Get/set privileges that allowing viewing resources with this schema. More...
| UserCanAuthor ($User)
| Determine if the given user can author resources using this schema. More...
| UserCanEdit ($User)
| Determine if the given user can edit resources using this schema. More...
| UserCanView ($User)
| Determine if the given user can view resources using this schema. More...
| GetViewPageIdParameter ()
| Get the resource ID GET parameter for the view page for the schema. More...
| PathMatchesViewPage ($Path)
| Determine if a path matches the view page path for the schema. More...
| AddField ($FieldName, $FieldType, $Optional=TRUE, $DefaultValue=NULL)
| Add new metadata field. More...
| AddFieldsFromXmlFile ($FileName, $Owner=NULL, $TestRun=FALSE)
| Add new metadata fields from XML file. More...
| NewFields ()
| Get new fields recently added (if any) via XML file. More...
| ErrorMessages ($Method=NULL)
| Get error messages (if any) from recent calls. More...
| AddFieldFromXml ($Xml)
| Add new metadata field based on supplied XML. More...
| DropField ($FieldId)
| Delete metadata field and all associated data. More...
| GetField ($FieldId)
| Retrieve metadata field. More...
| GetFieldByName ($FieldName, $IgnoreCase=FALSE)
| Retrieve metadata field by name. More...
| GetFieldIdByName ($FieldName, $IgnoreCase=FALSE)
| Retrieve metadata field ID by name. More...
| FieldExists ($Field)
| Check whether field with specified name exists. More...
| GetFields ($FieldTypes=NULL, $OrderType=NULL, $IncludeDisabledFields=FALSE, $IncludeTempFields=FALSE)
| Retrieve array of fields. More...
| GetFieldNames ($FieldTypes=NULL, $OrderType=NULL, $IncludeDisabledFields=FALSE, $IncludeTempFields=FALSE)
| Retrieve field names. More...
| GetFieldsAsOptionList ($OptionListName, $FieldTypes=NULL, $SelectedFieldId=NULL, $IncludeNullOption=TRUE, $AddEntries=NULL, $AllowMultiple=FALSE, $Disabled=FALSE)
| Retrieve fields of specified type as HTML option list with field names as labels and field IDs as value attributes. More...
| GetFieldTypes ()
| Retrieve array of field types. More...
| GetAllowedFieldTypes ()
| Retrieve array of field types that user can create. More...
| RemoveQualifierAssociations ($QualifierIdOrObject)
| Remove all metadata field associations for a given qualifier. More...
| QualifierIsInUse ($QualifierIdOrObject)
| Check whether qualifier is in use by any metadata field (in any schema). More...
| GetHighestFieldId ()
| Get highest field ID currently in use. More...
| StdNameToFieldMapping ($MappedName, $FieldId=NULL)
| Get/set mapping of standard field name to specific field. More...
| FieldToStdNameMapping ($FieldId)
| Get mapping of field ID to standard field name. More...
| GetFieldByMappedName ($MappedName)
| Get field by standard field name. More...
| GetFieldIdByMappedName ($MappedName)
| Get field ID by standard field name. More...
| GetOwnedFields ()
| Get fields that have an owner associated with them. More...
| GetDisplayOrder ()
| Get the display order for the schema. More...
| GetEditOrder ()
| Get the editing order for the schema. More...
Public Member Functions inherited from ItemFactory
| __construct ($ItemClassName, $ItemTableName, $ItemIdColumnName, $ItemNameColumnName=NULL, $OrderOpsAllowed=FALSE, $SqlCondition=NULL)
| Class constructor. More...
| GetItemClassName ()
| Get class name of items manipulated by factory. More...
| CleanOutStaleTempItems ($MinutesUntilStale=10080)
| Clear out (call the Delete() method) for any temp items more than specified number of minutes old. More...
| GetNextItemId ()
| Retrieve next available (non-temp) item ID. More...
| GetHighestItemId ($IgnoreSqlCondition=FALSE)
| Retrieve highest item ID in use. More...
| GetNextTempItemId ()
| Return next available temporary item ID. More...
| GetItemCount ($Condition=NULL, $IncludeTempItems=FALSE)
| Get count of items. More...
| GetItemIds ($Condition=NULL, $IncludeTempItems=FALSE, $SortField=NULL, $SortAscending=TRUE)
| Return array of item IDs. More...
| GetLatestModificationDate ($Condition=NULL)
| Get newest modification date (based on values in "DateLastModified" column in database table). More...
| GetItem ($ItemId)
| Retrieve item by item ID. More...
| ItemExists ($ItemId, $IgnoreSqlCondition=FALSE)
| Check that item exists with specified ID. More...
| GetItemByName ($Name, $IgnoreCase=FALSE)
| Retrieve item by name. More...
| GetItemIdByName ($Name, $IgnoreCase=FALSE)
| Retrieve item ID by name. More...
| GetItemNames ($SqlCondition=NULL)
| Retrieve item names. More...
| GetItems ($SqlCondition=NULL)
| Retrieve items. More...
| GetItemsAsOptionList ($OptionListName, $SelectedItemId=NULL, $SqlCondition=NULL, $DisplaySize=1, $SubmitOnChange=FALSE, $Disabled=FALSE)
| Retrieve items of specified type as HTML option list with item names as labels and item IDs as value attributes. More...
| NameIsInUse ($Name, $IgnoreCase=FALSE)
| Check whether item name is currently in use. More...
| SearchForItemNames ($SearchString, $NumberOfResults=100, $IncludeVariants=FALSE, $UseBooleanMode=TRUE, $Offset=0, $IdExclusions=array(), $NameExclusions=array())
| Retrieve items with names matching search string. More...
| GetCountForItemNames ($SearchString, $IncludeVariants=FALSE, $UseBooleanMode=TRUE, $IdExclusions=array(), $NameExclusions=array())
| Retrieve count of items with names matching search string. More...
| CachingEnabled ($NewValue=NULL)
| Enable/disable caching of item information. More...
| ClearCaches ()
| Clear item information caches. More...
| SetOrderOpsCondition ($Condition)
| Set SQL condition (added to WHERE clause) used to select items for ordering operations. More...
| InsertBefore ($TargetItem, $NewItem)
| Insert item into order before specified item. More...
| InsertAfter ($TargetItem, $NewItem)
| Insert item into order after specified item. More...
| Prepend ($Item)
| Add item to beginning of order. More...
| Append ($Item)
| Add item to end of order. More...
| GetItemIdsInOrder ()
| Retrieve list of item IDs in order. More...
| RemoveItemFromOrder ($ItemId)
| Remove item from existing order. More...

## Static Public Member Functions
static | GetConstantName ($Value, $Prefix=NULL)
| Get name (string) for constant. More...
static | Create ($Name, PrivilegeSet $AuthorPrivs=NULL, PrivilegeSet $EditPrivs=NULL, PrivilegeSet $ViewPrivs=NULL, $ViewPage="", $ResourceName=NULL)
| Create new metadata schema. More...
static | SchemaExistsWithId ($SchemaId)
| Check with schema exists with specified ID. More...
static | FieldExistsInAnySchema ($Field)
| Determine if a Field exists in any schema. More...
static | GetCanonicalFieldIdentifier ($Field, $SchemaId=NULL)
| Retrieve canonical identifier for field. More...
static | GetPrintableFieldName ($Field)
| Retrieve label for field. More...
static | GetStandardFieldNames ()
| Retrieve a list of all available standard fields names. More...
static | TranslateLegacySearchValues ($FieldId, $Values)
| Translate search values from a legacy URL string to their modern equivalents. More...
static | GetAllSchemaIds ()
| Get IDs for all existing metadata schemas. More...
static | GetAllSchemaNames ()
| Get names for all existing metadata schemas. More...
static | GetAllSchemas ()
| Get all existing metadata schemas. More...
static | FieldUsedInPrivileges ($FieldId)
| Determine if a specified field is used in either schema or field permissions. More...
static | GetSchemaIdForName ($Name)
| Get schema ID for specified name. More...
static | SetOwnerListRetrievalFunction ($Callback)
| Allow external dependencies, i.e., the current list of owners that are available, to be injected. More...
static | NormalizeOwnedFields ()
| Disable owned fields that have an owner that is unavailable and re-enable fields if an owner has returned and the field was flagged to be re-enabled. More...
static | ClearStaticCaches ()
| Clear internal caches. More...

## Public Attributes
const | MDFTYPE_TEXT = 1
const | MDFTYPE_PARAGRAPH = 2
const | MDFTYPE_NUMBER = 4
const | MDFTYPE_DATE = 8
const | MDFTYPE_TIMESTAMP = 16
const | MDFTYPE_FLAG = 32
const | MDFTYPE_TREE = 64
const | MDFTYPE_CONTROLLEDNAME = 128
const | MDFTYPE_OPTION = 256
const | MDFTYPE_USER = 512
const | MDFTYPE_IMAGE = 1024
const | MDFTYPE_FILE = 2048
const | MDFTYPE_URL = 4096
const | MDFTYPE_POINT = 8192
const | MDFTYPE_REFERENCE = 16384
const | MDFORDER_DISPLAY = 1
const | MDFORDER_EDITING = 2
const | MDFORDER_ALPHABETICAL = 3
const | MDFSTAT_OK = 1
const | MDFSTAT_ERROR = 2
const | MDFSTAT_DUPLICATENAME = 4
const | MDFSTAT_DUPLICATEDBCOLUMN = 8
const | MDFSTAT_FIELDDOESNOTEXIST = 16
const | MDFSTAT_ILLEGALNAME = 32
const | MDFSTAT_DUPLICATELABEL = 64
const | MDFSTAT_ILLEGALLABEL = 128
const | SCHEMAID_DEFAULT = 0
const | SCHEMAID_RESOURCES = 0
const | SCHEMAID_USER = 1
const | SCHEMAID_USERS = 1
const | RESOURCENAME_DEFAULT = "Resource"
const | RESOURCENAME_USER = "User"
const | ORDER_DISPLAY_NAME = "Display"
const | ORDER_EDIT_NAME = "Edit"

## Protected Member Functions
| UpdateFieldCompareOrders ()
| Update the field comparison ordering cache that is used for sorting fields. More...
| FieldCompareOrdersSet ()
| Determine whether the field comparison ordering caches are set. More...
| CompareFieldOrder ($FieldA, $FieldB)
| Field sorting callback. More...
| UpdateValue ($ColumnName, $NewValue=DB_NOVALUE)
| Convenience function to supply parameters to Database->UpdateValue(). More...

## Protected Attributes
| $FieldCompareDisplayOrder = array()
| The cache for metadata field display ordering. More...
| $FieldCompareEditOrder = array()
| The cache for metadata field edit ordering. More...
Protected Attributes inherited from ItemFactory
| $DB

## Static Protected Attributes
static | $OwnerListRetrievalFunction

## Detailed Description

Metadata schema (in effect a Factory class for MetadataField).

Definition at line 13 of file MetadataSchema.php.

## Constructor & Destructor Documentation

MetadataSchema::__construct | ( |  | $SchemaId = `self::SCHEMAID_DEFAULT` | ) |

Object constructor, used to load an existing schema.

(Use MetadataSchema::Create() to create a new schema.)

Parameters

  mixed | $SchemaId | ID of schema. Schema IDs are numerical, except for two special values SCHEMAID_DEFAULT and SCHEMAID_USER. (OPTIONAL, defaults to SCHEMAID_DEFAULT)

See also
  MetadataSchema::Create()

Exceptions

  InvalidArgumentException | If specified schema ID is invalid.
  Exception | If a standard field mapping is found that does not have a valid schema/field ID combination.

Definition at line 77 of file MetadataSchema.php.

References AuthoringPrivileges(), EditingPrivileges(), Id(), ViewingPrivileges(), and ViewPage().

## Member Function Documentation

MetadataSchema::AbbreviatedName | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set abbreviated name of schema.

The abbreviated name is one letter long, usually used by tag names.

Parameters

  string | $NewValue | New abbreviated name for schema. (OPTIONAL)

Returns
  string Current schema abbreviated name.

Definition at line 341 of file MetadataSchema.php.

References Name(), and UpdateValue().

MetadataSchema::AddField | ( |  | $FieldName,
|  |  | $FieldType,
|  |  | $Optional = `TRUE`,
|  |  | $DefaultValue = `NULL`
| ) |  |

Add new metadata field.

Parameters

  string | $FieldName | Name of new field.
  mixed | $FieldType | Type of new field.
  bool | $Optional | Whether setting a value for new field is optional when creating new records that use the field. (OPTIONAL, defaults to TRUE)
  mixed | $DefaultValue | Initial default value for field. (OPTIONAL)

Returns
  MetadataField object or NULL if field addition failed.

Definition at line 613 of file MetadataSchema.php.

References ItemFactory\ClearCaches(), MetadataField\Create(), and Id().

Referenced by AddFieldFromXml(), and AddFieldsFromXmlFile().

Here is the caller graph for this function:

MetadataSchema::AddFieldFromXml | ( |  | $Xml | ) |

Add new metadata field based on supplied XML.

The XML elements are method names from the MetadataField object, with the values being passed in as the parameter to that method. The FieldName and FieldType elements are required. Values for elements/methods that would normally be called with constants in PHP can be constant names.

Parameters

  string | $Xml | Block of XML containing field description.

Returns
  New MetadataField object or NULL if addition failed.

Definition at line 999 of file MetadataSchema.php.

References AddField(), and ErrorMessages().

MetadataSchema::AddFieldsFromXmlFile | ( |  | $FileName,
|  |  | $Owner = `NULL`,
|  |  | $TestRun = `FALSE`
| ) |  |

Add new metadata fields from XML file.

NewFields() can be used to determine how many (or whether) new fields were added, and ErrorMsgs() can be used to determine what errors were * encountered.

Parameters

  string | $FileName | Name of XML file.
  string | $Owner | Owner to set for new fields. (OPTIONAL, supply NULL to not set an owner)
  bool | $TestRun | If TRUE, any new fields created are removed before the method returns. (OPTIONAL, defaults to FALSE)

Returns
  bool TRUE if no errors were encountered in loading or parsing the XML file or adding fields, otherwise FALSE.

See also
  MetadataSchema::NewFields()
  MetadataSchema::ErrorMessages()

Definition at line 653 of file MetadataSchema.php.

References AddField(), ErrorMessages(), GetFieldIdByName(), ItemFactory\NameIsInUse(), NewFields(), and StdNameToFieldMapping().

MetadataSchema::AuthoringPrivileges | ( | PrivilegeSet | $NewValue = `NULL` | ) |

Get/set privileges that allowing authoring resources with this schema.

Parameters

  object | $NewValue | New PrivilegeSet value. (OPTIONAL)

Returns
  object PrivilegeSet that allows authoring.

Definition at line 381 of file MetadataSchema.php.

References UpdateValue().

Referenced by __construct(), and UserCanAuthor().

Here is the caller graph for this function:

static MetadataSchema::ClearStaticCaches | ( |  | ) |
| static

Clear internal caches.

Definition at line 2063 of file MetadataSchema.php.

Referenced by MetadataField\Create(), MetadataField\Drop(), MetadataField\Duplicate(), and MetadataField\IsTempItem().

Here is the caller graph for this function:

MetadataSchema::CompareFieldOrder | ( |  | $FieldA,
|  |  | $FieldB
| ) |  |
| protected

Field sorting callback.

Parameters

  MetadataField | $FieldA | First comparision field.
  MetadataFIeld | $FieldB | Second comparison field.

Returns
  bool -1, 0, or 1, depending on the order desired

See also
  usort()

Definition at line 2036 of file MetadataSchema.php.

References $FieldCompareDisplayOrder, and $FieldCompareEditOrder.

static MetadataSchema::Create | ( |  | $Name,
|  | PrivilegeSet | $AuthorPrivs = `NULL`,
|  | PrivilegeSet | $EditPrivs = `NULL`,
|  | PrivilegeSet | $ViewPrivs = `NULL`,
|  |  | $ViewPage = `""`,
|  |  | $ResourceName = `NULL`
| ) |  |
| static

Create new metadata schema.

Parameters

  string | $Name | Schema name.
  object | $AuthorPrivs | PrivilegeSet required for authoring. (OPTIONAL, defaults to all users)
  object | $EditPrivs | PrivilegeSet required for editing. (OPTIONAL, defaults to all users)
  object | $ViewPrivs | PrivilegeSet required for viewing. (OPTIONAL, defaults to all users)
  string | $ViewPage | The page used to view the full record for a resource. If "$ID" shows up in the parameter, it will be replaced by the resource ID when viewing the resource. (OPTIONAL)
  string | $ResourceName | User-readable name for resources for which the schema will be used. (OPTIONAL, defaults to singular version of schema name)

Returns
  object MetadataSchema object.

Definition at line 195 of file MetadataSchema.php.

References ItemFactory\$DB, MetadataFieldOrder\Create(), and StdLib\Singularize().

MetadataSchema::Delete | ( |  | ) |

Destroy metadata schema.

Schema may no longer be used after this method is called.

Definition at line 263 of file MetadataSchema.php.

References DropField(), GetFields(), MetadataFieldOrder\GetOrdersForSchema(), Id(), and StdNameToFieldMapping().

MetadataSchema::DropField | ( |  | $FieldId | ) |

Delete metadata field and all associated data.

Parameters

  int | $FieldId | ID or name of field to be deleted.

Returns
  TRUE if delete succeeded, otherwise FALSE.

Definition at line 1101 of file MetadataSchema.php.

References GetField(), Id(), and Name().

Referenced by Delete().

Here is the caller graph for this function:

MetadataSchema::EditingPrivileges | ( | PrivilegeSet | $NewValue = `NULL` | ) |

Get/set privileges that allowing editing resources with this schema.

Parameters

  object | $NewValue | New PrivilegeSet value. (OPTIONAL)

Returns
  object PrivilegeSet that allows editing.

Definition at line 400 of file MetadataSchema.php.

References UpdateValue().

Referenced by __construct(), and UserCanEdit().

Here is the caller graph for this function:

MetadataSchema::ErrorMessages | ( |  | $Method = `NULL` | ) |

Get error messages (if any) from recent calls.

If no method name is specified, then an array is returned with method names for the index and arrays of error messages for the values.

Parameters

  string | $Method | Name of method. (OPTIONAL)

Returns
  array Array of arrays of error message strings.

See also
  MetadataSchema::AddField()
  MetadataSchema::AddFieldsFromXmlFile()

Definition at line 972 of file MetadataSchema.php.

Referenced by AddFieldFromXml(), and AddFieldsFromXmlFile().

Here is the caller graph for this function:

MetadataSchema::FieldCompareOrdersSet | ( |  | ) |
| protected

Determine whether the field comparison ordering caches are set.

Returns
  bool TRUE if the caches are set or FALSE otherwise

Definition at line 2024 of file MetadataSchema.php.

References $FieldCompareEditOrder.

Referenced by GetFields().

Here is the caller graph for this function:

MetadataSchema::FieldExists | ( |  | $Field | ) |

Check whether field with specified name exists.

Parameters

  mixed | $Field | Name or ID of field.

Returns
  TRUE if field with specified name exists, otherwise FALSE.

Definition at line 1196 of file MetadataSchema.php.

References ItemFactory\ItemExists(), and ItemFactory\NameIsInUse().

Referenced by StdNameToFieldMapping().

Here is the caller graph for this function:

static MetadataSchema::FieldExistsInAnySchema | ( |  | $Field | ) |
| static

Determine if a Field exists in any schema.

Parameters

  mixed | $Field | Field name or FieldId to check

Returns
  TRUE for fields that exist.

Definition at line 1522 of file MetadataSchema.php.

Referenced by FormUI_Base\__construct(), PrivilegeSet\FieldsWithUserComparisons(), and SPTSearchEngine\SearchFieldsForComparisonMatches().

Here is the caller graph for this function:

MetadataSchema::FieldToStdNameMapping | ( |  | $FieldId | ) |

Get mapping of field ID to standard field name.

Parameters

  int | $FieldId | Field ID.

Returns
  Standard field name to which specified field is mapped, or NULL if field is not currently mapped.

Definition at line 1465 of file MetadataSchema.php.

References Id().

static MetadataSchema::FieldUsedInPrivileges | ( |  | $FieldId | ) |
| static

Determine if a specified field is used in either schema or field permissions.

Parameters

  int | $FieldId | FieldId to check.

Returns
  bool TRUE if field is used.

Definition at line 1850 of file MetadataSchema.php.

MetadataSchema::GetAllowedFieldTypes | ( |  | ) |

Retrieve array of field types that user can create.

Returns
  Array with enumerated types for the indexes and field names (strings) for the values.

Definition at line 1358 of file MetadataSchema.php.

References MetadataField\$FieldTypeDBAllowedEnums.

static MetadataSchema::GetAllSchemaIds | ( |  | ) |
| static

Get IDs for all existing metadata schemas.

Returns
  Returns an array of schema IDs.

Definition at line 1807 of file MetadataSchema.php.

Referenced by SPTSearchEngine\SearchFieldsForComparisonMatches().

Here is the caller graph for this function:

static MetadataSchema::GetAllSchemaNames | ( |  | ) |
| static

Get names for all existing metadata schemas.

Returns
  Returns an array of names, indexed by schema ID.

Definition at line 1816 of file MetadataSchema.php.

References ItemFactory\$DB.

static MetadataSchema::GetAllSchemas | ( |  | ) |
| static

Get all existing metadata schemas.

Returns
  Returns an array of MetadataSchema objects with the schema IDs for the index.

Definition at line 1828 of file MetadataSchema.php.

Referenced by SPTSearchEngine\__construct(), SearchParameterSetEditingUI\__construct(), PrivilegeEditingUI\__construct(), and PrivilegeEditingUI\GetPrivilegeSetFromForm().

Here is the caller graph for this function:

static MetadataSchema::GetCanonicalFieldIdentifier | ( |  | $Field,
|  |  | $SchemaId = `NULL`
| ) |  |
| static

Retrieve canonical identifier for field.

Names passed in are compared against field names, not field labels. This method should only be used in situations where there are no concerns about field information changing during invocation.

Parameters

  mixed | $Field | Field object, ID, or name.
  int | $SchemaId | ID of schema to limit fields to. (OPTIONAL)

Returns
  int Canonical field identifier.

Exceptions

  InvalidArgumentException | If illegal schema ID argument was supplied.
  InvalidArgumentException | If invalid numerical schema ID argument was supplied.
  Exception | If schema ID and numerical field ID were supplied, and field ID was not within the specified schema.
  Exception | If a field name is supplied that does not match any existing metadata field.
  InvalidArgumentException | If field argument supplied could not be interpreted.

Definition at line 1565 of file MetadataSchema.php.

References StdLib\GetBacktraceAsString(), and ApplicationFramework\LOGLVL_ERROR.

Referenced by FormUI_Base\__construct(), ItemListUI\__construct(), PrivilegeSet\AddCondition(), and ResourceFactory\GetMatchingResources().

Here is the caller graph for this function:

static MetadataSchema::GetConstantName | ( |  | $Value,
|  |  | $Prefix = `NULL`
| ) |  |
| static

Get name (string) for constant.

If there are multiple constants defined with the same value, the first constant found with a name that matches the prefix (if supplied) is returned.

Parameters

  enum | $Value | Constant value.
  string | $Prefix | Prefix to look for at beginning of name. Needed when there may be multiple constants with the same value. (OPTIONAL)

Returns
  string Constant name or NULL if no matching value found.

Definition at line 156 of file MetadataSchema.php.

MetadataSchema::GetDisplayOrder | ( |  | ) |

Get the display order for the schema.

Returns
  Returns a MetadataFieldOrder object.

Definition at line 2006 of file MetadataSchema.php.

References MetadataFieldOrder\GetOrderForSchema().

Referenced by UpdateFieldCompareOrders().

Here is the caller graph for this function:

MetadataSchema::GetEditOrder | ( |  | ) |

Get the editing order for the schema.

Returns
  Returns a MetadataFieldOrder object.

Definition at line 2015 of file MetadataSchema.php.

References MetadataFieldOrder\GetOrderForSchema().

Referenced by UpdateFieldCompareOrders().

Here is the caller graph for this function:

MetadataSchema::GetField | ( |  | $FieldId | ) |

Retrieve metadata field.

Parameters

  mixed | $FieldId | ID or name of field.

Returns
  object MetadataField object or NULL if no field found with specified name.

Definition at line 1134 of file MetadataSchema.php.

References GetFieldIdByName(), and Id().

Referenced by DropField(), GetFieldByMappedName(), GetFieldByName(), GetFields(), GetFieldsAsOptionList(), and GetOwnedFields().

Here is the caller graph for this function:

MetadataSchema::GetFieldByMappedName | ( |  | $MappedName | ) |

Get field by standard field name.

Parameters

  string | $MappedName | Standard field name.

Returns
  MetadataField to which standard field name is mapped or NULL if specified standard field name is not currently mapped or mapped field does not exist.

Definition at line 1478 of file MetadataSchema.php.

References GetField(), and StdNameToFieldMapping().

MetadataSchema::GetFieldByName | ( |  | $FieldName,
|  |  | $IgnoreCase = `FALSE`
| ) |  |

Retrieve metadata field by name.

This method is deprecated in favor of GetField(), which has been updated to accept a field ID or name.

Parameters

  string | $FieldName | Field name.
  bool | $IgnoreCase | If TRUE, case is ignore when matching field names.

Returns
  Requested MetadataField or NULL if no field found with specified name.

Deprecated:

See also
  MetadataSchema::GetField()

Definition at line 1173 of file MetadataSchema.php.

References GetField(), and GetFieldIdByName().

MetadataSchema::GetFieldIdByMappedName | ( |  | $MappedName | ) |

Get field ID by standard field name.

Parameters

  string | $MappedName | Standard field name.

Returns
  ID for MetadataField to which standard field name is mapped or NULL if specified standard field name is not currently mapped or mapped field does not exist.

Definition at line 1491 of file MetadataSchema.php.

References StdNameToFieldMapping().

MetadataSchema::GetFieldIdByName | ( |  | $FieldName,
|  |  | $IgnoreCase = `FALSE`
| ) |  |

Retrieve metadata field ID by name.

Parameters

  string | $FieldName | Field name.
  bool | $IgnoreCase | If TRUE, case is ignore when matching field names.

Returns
  ID of requested MetadataField or FALSE if no field found with specified name.

Definition at line 1186 of file MetadataSchema.php.

References ItemFactory\GetItemIdByName().

Referenced by AddFieldsFromXmlFile(), GetField(), and GetFieldByName().

Here is the caller graph for this function:

MetadataSchema::GetFieldNames | ( |  | $FieldTypes = `NULL`,
|  |  | $OrderType = `NULL`,
|  |  | $IncludeDisabledFields = `FALSE`,
|  |  | $IncludeTempFields = `FALSE`
| ) |  |

Retrieve field names.

Parameters

  int | $FieldTypes | MetadataField types (MDFTYPE_ values) to retrieve, ORed together, or NULL to return all types of fields. (OPTIONAL, defaults to NULL)
  int | $OrderType | Order in which to return fields (MDFORDER_ value). (OPTIONAL, defaults to NULL which indicates no particular order)
  bool | $IncludeDisabledFields | TRUE to include disabled fields. (OPTIONAL, defaults to FALSE)
  bool | $IncludeTempFields | TRUE to include temporary fields (in the process of being created/edited). (OPTIONAL, defaults to FALSE)

Returns
  Array of field names, with field IDs for array index.

Definition at line 1276 of file MetadataSchema.php.

References GetFields().

Referenced by GetFieldsAsOptionList().

Here is the caller graph for this function:

MetadataSchema::GetFields | ( |  | $FieldTypes = `NULL`,
|  |  | $OrderType = `NULL`,
|  |  | $IncludeDisabledFields = `FALSE`,
|  |  | $IncludeTempFields = `FALSE`
| ) |  |

Retrieve array of fields.

Parameters

  int | $FieldTypes | MetadataField types (MDFTYPE_ values) to retrieve, ORed together, or NULL to return all types of fields. (OPTIONAL, defaults to NULL)
  int | $OrderType | Order in which to return fields (MDFORDER_ value). (OPTIONAL, defaults to NULL which indicates no particular order)
  bool | $IncludeDisabledFields | TRUE to include disabled fields. (OPTIONAL, defaults to FALSE)
  bool | $IncludeTempFields | TRUE to include temporary fields (in the process of being created/edited). (OPTIONAL, defaults to FALSE)

Returns
  Array of MetadataField objects, with field IDs for array index.

Definition at line 1216 of file MetadataSchema.php.

References MetadataField\$FieldTypePHPEnums, FieldCompareOrdersSet(), GetField(), Id(), and UpdateFieldCompareOrders().

Referenced by MetadataFieldOrder\Create(), Delete(), GetFieldNames(), HumanMetadataField\LoadUserFieldList(), and UpdateFieldCompareOrders().

Here is the caller graph for this function:

MetadataSchema::GetFieldsAsOptionList | ( |  | $OptionListName,
|  |  | $FieldTypes = `NULL`,
|  |  | $SelectedFieldId = `NULL`,
|  |  | $IncludeNullOption = `TRUE`,
|  |  | $AddEntries = `NULL`,
|  |  | $AllowMultiple = `FALSE`,
|  |  | $Disabled = `FALSE`
| ) |  |

Retrieve fields of specified type as HTML option list with field names as labels and field IDs as value attributes.

The first element on the list will have a label of "--" and an ID of -1 to indicate no field selected.

Parameters

  string | $OptionListName | Value of option list "name" and "id" attributes.
  int | $FieldTypes | Types of fields to return. (OPTIONAL - use NULL for all types)
  int | $SelectedFieldId | ID or array of IDs of the currently-selected field(s). (OPTIONAL)
  bool | $IncludeNullOption | Whether to include "no selection" (-1) option. (OPTIONAL - defaults to TRUE)
  array | $AddEntries | An array of additional entries to include at the end of the option list, with option list values for the indexes and option list labels for the values. (OPTIONAL)
  bool | $AllowMultiple | TRUE to allow multiple field selections
  bool | $Disabled | If TRUE, field will not be editable.

Returns
  HTML for option list.

Definition at line 1309 of file MetadataSchema.php.

References GetField(), and GetFieldNames().

MetadataSchema::GetFieldTypes | ( |  | ) |

Retrieve array of field types.

Returns
  Array with enumerated types for the indexes and field names (strings) for the values.

Definition at line 1348 of file MetadataSchema.php.

References MetadataField\$FieldTypeDBEnums.

MetadataSchema::GetHighestFieldId | ( |  | ) |

Get highest field ID currently in use.

Returns
  MetadataField ID value.

Definition at line 1409 of file MetadataSchema.php.

References ItemFactory\GetHighestItemId().

MetadataSchema::GetOwnedFields | ( |  | ) |

Get fields that have an owner associated with them.

Returns
  Array of fields that have an owner associated with them.

Definition at line 1500 of file MetadataSchema.php.

References GetField(), and Id().

static MetadataSchema::GetPrintableFieldName | ( |  | $Field | ) |
| static

Retrieve label for field.

If no label is available for the field, the field name is returned instead. Handling of the $Field argument is the same as GetCanonicalFieldIdentifier(). This method should only be used in situations where a static method is needed and there are no concerns about field information changing during invocation.

Parameters

  mixed | $Field | Field object, ID, or name.

Returns
  string Human-readable field name.

Exceptions

  InvalidArgumentException | If field argument supplied could not be interpreted.
  Exception | If a field name is supplied that does not match any existing metadata field.

See also
  MetadataSchema::GetCanonicalFieldIdentifier()

Definition at line 1688 of file MetadataSchema.php.

Referenced by ItemListUI\Display().

Here is the caller graph for this function:

static MetadataSchema::GetSchemaIdForName | ( |  | $Name | ) |
| static

Get schema ID for specified name.

Parameters

  string | $Name | Schema name.

Returns
  int Schema ID or NULL if no schema found with specified name.

Definition at line 1894 of file MetadataSchema.php.

References ItemFactory\$DB.

static MetadataSchema::GetStandardFieldNames | ( |  | ) |
| static

Retrieve a list of all available standard fields names.

Returns
  array of field names.

Definition at line 1711 of file MetadataSchema.php.

References ItemFactory\$DB.

MetadataSchema::GetViewPageIdParameter | ( |  | ) |

Get the resource ID GET parameter for the view page for the schema.

Returns
  Returns the resource ID GET parameter for the view page for the schema.

Definition at line 521 of file MetadataSchema.php.

References ViewPage().

MetadataSchema::Id | ( |  | ) |

Get schema ID.

Schema IDs are numerical, with two special values SCHEMAID_DEFAULT and SCHEMAID_USER.

Returns
  Current schema ID.

Definition at line 318 of file MetadataSchema.php.

Referenced by __construct(), AddField(), MetadataFieldOrder\Create(), Delete(), DropField(), FieldToStdNameMapping(), GetField(), GetFields(), MetadataFieldOrder\GetOrderForSchema(), MetadataFieldOrder\GetOrdersForSchema(), GetOwnedFields(), StdNameToFieldMapping(), and UpdateValue().

Here is the caller graph for this function:

MetadataSchema::Name | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set name of schema.

Parameters

  string | $NewValue | New name for schema. (OPTIONAL)

Returns
  string Current schema name.

Definition at line 329 of file MetadataSchema.php.

References UpdateValue().

Referenced by AbbreviatedName(), and DropField().

Here is the caller graph for this function:

MetadataSchema::NewFields | ( |  | ) |

Get new fields recently added (if any) via XML file.

Returns
  array Array of fields recently added (MetadataField objects).

See also
  MetadataSchema::AddFieldsFromXmlFile()

Definition at line 958 of file MetadataSchema.php.

Referenced by AddFieldsFromXmlFile().

Here is the caller graph for this function:

static MetadataSchema::NormalizeOwnedFields | ( |  | ) |
| static

Disable owned fields that have an owner that is unavailable and re-enable fields if an owner has returned and the field was flagged to be re-enabled.

Definition at line 1920 of file MetadataSchema.php.

MetadataSchema::PathMatchesViewPage | ( |  | $Path | ) |

Determine if a path matches the view page path for the schema.

For the two to match, the path GET parameters must contain at least the GET parameters in the view page's GET parameters, and all of the required GET parameters must match the ones in the view page, unless the parameter is a variable in the view page path. The path's GET parameters may contain more parameters.

Parameters

  string | $Path | Path to match against, e.g., index.php?P=FullRecord&ID=123.

Returns
  Returns TRUE if the path matches the view page path for the schema.

Definition at line 553 of file MetadataSchema.php.

References ViewPage().

MetadataSchema::QualifierIsInUse | ( |  | $QualifierIdOrObject | ) |

Check whether qualifier is in use by any metadata field (in any schema).

Parameters

  Qualifier | $QualifierIdOrObject | Qualifier ID or Qualifier object.

Returns
  TRUE if qualifier is in use, otherwise FALSE.

Definition at line 1383 of file MetadataSchema.php.

MetadataSchema::RemoveQualifierAssociations | ( |  | $QualifierIdOrObject | ) |

Remove all metadata field associations for a given qualifier.

Parameters

  Qualifier | $QualifierIdOrObject | Qualifier object or ID.

Definition at line 1367 of file MetadataSchema.php.

MetadataSchema::ResourceName | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set name of resources using this schema.

Parameters

  string | $NewValue | New resource name for schema. (OPTIONAL)

Returns
  Returns the current resource name.

Definition at line 356 of file MetadataSchema.php.

References UpdateValue().

static MetadataSchema::SchemaExistsWithId | ( |  | $SchemaId | ) |
| static

Check with schema exists with specified ID.

Parameters

  int | $SchemaId | ID to check.

Returns
  bool TRUE if schema exists with specified ID, otherwise FALSE.

Definition at line 304 of file MetadataSchema.php.

References ItemFactory\$DB.

static MetadataSchema::SetOwnerListRetrievalFunction | ( |  | $Callback | ) |
| static

Allow external dependencies, i.e., the current list of owners that are available, to be injected.

Parameters

  callback | $Callback | Retrieval callback.

Definition at line 1907 of file MetadataSchema.php.

MetadataSchema::StdNameToFieldMapping | ( |  | $MappedName,
|  |  | $FieldId = `NULL`
| ) |  |

Get/set mapping of standard field name to specific field.

Parameters

  string | $MappedName | Standard field name.
  int | $FieldId | ID of field to map to, or NULL to clear mapping. (OPTIONAL)

Returns
  ID of field to which standard field name is mapped or NULL if specified standard field name is not currently mapped.

Exceptions

  InvalidArgumentException | If field ID is invalid for this schema.

Definition at line 1422 of file MetadataSchema.php.

References FieldExists(), StdLib\GetMyCaller(), and Id().

Referenced by AddFieldsFromXmlFile(), Delete(), GetFieldByMappedName(), and GetFieldIdByMappedName().

Here is the caller graph for this function:

static MetadataSchema::TranslateLegacySearchValues | ( |  | $FieldId,
|  |  | $Values
| ) |  |
| static

Translate search values from a legacy URL string to their modern equivalents.

Parameters

  int | $FieldId | FieldId to use for translation
  mixed | $Values | Values to translate

Returns
  array of translated values

Definition at line 1725 of file MetadataSchema.php.

MetadataSchema::UpdateFieldCompareOrders | ( |  | ) |
| protected

Update the field comparison ordering cache that is used for sorting fields.

Definition at line 1985 of file MetadataSchema.php.

References GetDisplayOrder(), GetEditOrder(), and GetFields().

Referenced by GetFields().

Here is the caller graph for this function:

MetadataSchema::UpdateValue | ( |  | $ColumnName,
|  |  | $NewValue = `DB_NOVALUE`
| ) |  |
| protected

Convenience function to supply parameters to Database->UpdateValue().

Parameters

  string | $ColumnName | Name of database column.
  string | $NewValue | New value for field. (OPTIONAL)

Returns
  string Return value from Database::UpdateValue().

See also
  Database::UpdateValue()

Definition at line 2318 of file MetadataSchema.php.

References Id().

Referenced by AbbreviatedName(), AuthoringPrivileges(), EditingPrivileges(), Name(), ResourceName(), ViewingPrivileges(), and ViewPage().

Here is the caller graph for this function:

MetadataSchema::UserCanAuthor | ( |  | $User | ) |

Determine if the given user can author resources using this schema.

The result of this method can be modified via the EVENT_RESOURCE_AUTHOR_PERMISSION_CHECK event.

Parameters

  User | $User | User to check.

Returns
  bool TRUE if the user can author resources and FALSE otherwise

Definition at line 440 of file MetadataSchema.php.

References AuthoringPrivileges().

MetadataSchema::UserCanEdit | ( |  | $User | ) |

Determine if the given user can edit resources using this schema.

The result of this method can be modified via the EVENT_RESOURCE_EDIT_PERMISSION_CHECK event.

Parameters

  User | $User | User to check.

Returns
  bool TRUE if the user can edit resources and FALSE otherwise

Definition at line 467 of file MetadataSchema.php.

References EditingPrivileges().

MetadataSchema::UserCanView | ( |  | $User | ) |

Determine if the given user can view resources using this schema.

The result of this method can be modified via the EVENT_RESOURCE_VIEW_PERMISSION_CHECK event.

Parameters

  User | $User | User to check.

Returns
  bool TRUE if the user can view resources and FALSE otherwise

Definition at line 495 of file MetadataSchema.php.

References ViewingPrivileges().

MetadataSchema::ViewingPrivileges | ( | PrivilegeSet | $NewValue = `NULL` | ) |

Get/set privileges that allowing viewing resources with this schema.

Parameters

  object | $NewValue | New PrivilegeSet value. (OPTIONAL)

Returns
  object PrivilegeSet that allows viewing.

Definition at line 419 of file MetadataSchema.php.

References UpdateValue().

Referenced by __construct(), and UserCanView().

Here is the caller graph for this function:

MetadataSchema::ViewPage | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set name of page to go to for viewing resources using this schema.

Parameters

  string | $NewValue | New name for schema. (OPTIONAL)

Returns
  string Current schema name.

Definition at line 371 of file MetadataSchema.php.

References UpdateValue().

Referenced by __construct(), GetViewPageIdParameter(), and PathMatchesViewPage().

Here is the caller graph for this function:

## Member Data Documentation

MetadataSchema::$FieldCompareDisplayOrder = array()
| protected

The cache for metadata field display ordering.

Definition at line 2092 of file MetadataSchema.php.

Referenced by CompareFieldOrder().

MetadataSchema::$FieldCompareEditOrder = array()
| protected

The cache for metadata field edit ordering.

Definition at line 2097 of file MetadataSchema.php.

Referenced by CompareFieldOrder(), and FieldCompareOrdersSet().

MetadataSchema::$OwnerListRetrievalFunction
| staticprotected

Definition at line 2087 of file MetadataSchema.php.

const MetadataSchema::MDFORDER_ALPHABETICAL = 3

Definition at line 40 of file MetadataSchema.php.

Referenced by SearchParameterSetEditingUI\__construct().

const MetadataSchema::MDFORDER_DISPLAY = 1

Definition at line 38 of file MetadataSchema.php.

const MetadataSchema::MDFORDER_EDITING = 2

Definition at line 39 of file MetadataSchema.php.

const MetadataSchema::MDFSTAT_DUPLICATEDBCOLUMN = 8

Definition at line 46 of file MetadataSchema.php.

Referenced by HumanMetadataField\Status().

const MetadataSchema::MDFSTAT_DUPLICATELABEL = 64

Definition at line 49 of file MetadataSchema.php.

Referenced by HumanMetadataField\Status().

const MetadataSchema::MDFSTAT_DUPLICATENAME = 4

Definition at line 45 of file MetadataSchema.php.

Referenced by MetadataField\Name(), and HumanMetadataField\Status().

const MetadataSchema::MDFSTAT_ERROR = 2

Definition at line 44 of file MetadataSchema.php.

Referenced by HumanMetadataField\Status().

const MetadataSchema::MDFSTAT_FIELDDOESNOTEXIST = 16

Definition at line 47 of file MetadataSchema.php.

Referenced by HumanMetadataField\Status().

const MetadataSchema::MDFSTAT_ILLEGALLABEL = 128

Definition at line 50 of file MetadataSchema.php.

Referenced by MetadataField\Label(), and HumanMetadataField\Status().

const MetadataSchema::MDFSTAT_ILLEGALNAME = 32

Definition at line 48 of file MetadataSchema.php.

Referenced by MetadataField\IsTempItem(), MetadataField\Name(), and HumanMetadataField\Status().

const MetadataSchema::MDFSTAT_OK = 1

Definition at line 43 of file MetadataSchema.php.

Referenced by SearchFacetUI\__construct(), MetadataField\__construct(), SPTSearchEngine\GetResultFacets(), MetadataField\Name(), and HumanMetadataField\Status().

const MetadataSchema::MDFTYPE_CONTROLLEDNAME = 128

Definition at line 28 of file MetadataSchema.php.

Referenced by SPTSearchEngine\__construct(), SPTRecommender\__construct(), FieldEditingUI\__construct(), SearchFacetUI\__construct(), FormUI_Base\__construct(), Resource\Clear(), ResourceFactory\ClearVisibleResourceCount(), FormUI_Base\ConvertItemIdsToNames(), FieldEditingUI\DisplayAsRows(), MetadataField\Drop(), Resource\FieldIsSet(), Resource\Get(), MetadataField\GetAllowedConversionTypes(), MetadataField\GetCountOfPossibleValues(), MetadataField\GetFactory(), MetadataField\GetIdForValue(), MetadataField\GetPossibleValues(), Resource\GetQualifierByField(), MetadataField\GetValueForId(), SearchParameterSetEditingUI\GetValuesFromFormData(), FieldEditingUI\GetValuesFromFormData(), ResourceFactory\ImportResourcesFromXmlFile(), MetadataField\IsControlledVocabularyField(), MetadataField\LoadVocabulary(), SPTSearchEngine\SearchFieldForPhrases(), SPTSearchEngine\SearchFieldsForComparisonMatches(), Resource\Set(), ControlledName_Test\setUpBeforeClass(), Resource_Test\setUpBeforeClass(), Resource_Test\testGetSetClear(), UserEditingUI\UpdateUserFields(), and MetadataField\ValueUseCount().

const MetadataSchema::MDFTYPE_DATE = 8

Definition at line 24 of file MetadataSchema.php.

Referenced by SPTSearchEngine\__construct(), SPTRecommender\__construct(), FieldEditingUI\__construct(), FieldEditingUI\ApplyChangesToResource(), Resource\Clear(), FieldEditingUI\DisplayAsRows(), MetadataField\Drop(), Resource\FieldIsSet(), Resource\Get(), MetadataField\GetAllowedConversionTypes(), ResourceFactory\GetMatchingResources(), PrivilegeEditingUI\GetPrivilegeSetFromForm(), ResourceFactory\GetResourceIdsSortedBy(), SearchParameterSetEditingUI\GetValuesFromFormData(), FieldEditingUI\GetValuesFromFormData(), ResourceFactory\ImportResourcesFromXmlFile(), SPTSearchEngine\SearchFieldForPhrases(), SPTSearchEngine\SearchFieldsForComparisonMatches(), Resource\Set(), Resource_Test\setUpBeforeClass(), Resource_Test\testGetSetClear(), and UserEditingUI\UpdateUserFields().

const MetadataSchema::MDFTYPE_FILE = 2048

Definition at line 32 of file MetadataSchema.php.

Referenced by SPTSearchEngine\__construct(), SPTRecommender\__construct(), Resource\Clear(), MetadataField\Drop(), Resource\FieldIsSet(), Resource\Get(), MetadataField\GetAllowedConversionTypes(), ResourceFactory\ImportResourcesFromXmlFile(), SPTSearchEngine\SearchFieldForPhrases(), Resource\Set(), UserEditingUI\UpdateUserFields(), UserEditingUI\UploadFiles(), and MetadataField\ValueUseCount().

const MetadataSchema::MDFTYPE_FLAG = 32

Definition at line 26 of file MetadataSchema.php.

Referenced by SPTSearchEngine\__construct(), SPTRecommender\__construct(), PrivilegeEditingUI\__construct(), FieldEditingUI\__construct(), FieldEditingUI\ApplyChangesToResource(), Resource\Clear(), Resource\Create(), HumanMetadataField\DefaultValue(), SavedSearch\Delete(), FieldEditingUI\DisplayAsRows(), MetadataField\Drop(), Resource\FieldIsSet(), Resource\Get(), MetadataField\GetAllowedConversionTypes(), MetadataField\GetCountOfPossibleValues(), ResourceFactory\GetMatchingResources(), MetadataField\GetPossibleValues(), PrivilegeEditingUI\GetPrivilegeSetFromForm(), SearchParameterSetEditingUI\GetValuesFromFormData(), FieldEditingUI\GetValuesFromFormData(), ResourceFactory\ImportResourcesFromXmlFile(), SearchParameterSetEditingUI\MaxValueLabelLength(), SPTSearchEngine\SearchFieldForPhrases(), SPTSearchEngine\SearchFieldsForComparisonMatches(), Resource\Set(), Resource_Test\setUpBeforeClass(), Resource_Test\testGetSetClear(), UserEditingUI\UpdateUserFields(), and MetadataField\ValueUseCount().

const MetadataSchema::MDFTYPE_IMAGE = 1024

Definition at line 31 of file MetadataSchema.php.

Referenced by SPTSearchEngine\__construct(), SPTRecommender\__construct(), Resource\Clear(), MetadataField\Drop(), Resource\FieldIsSet(), Resource\Get(), MetadataField\GetAllowedConversionTypes(), ResourceFactory\ImportResourcesFromXmlFile(), SPTSearchEngine\SearchFieldForPhrases(), Resource\Set(), UserEditingUI\UpdateUserFields(), UserEditingUI\UploadImages(), and MetadataField\ValueUseCount().

const MetadataSchema::MDFTYPE_NUMBER = 4

Definition at line 23 of file MetadataSchema.php.

Referenced by SPTSearchEngine\__construct(), SPTRecommender\__construct(), PrivilegeEditingUI\__construct(), FieldEditingUI\__construct(), FieldEditingUI\ApplyChangesToResource(), Resource\Clear(), Resource\Create(), SavedSearch\Delete(), FieldEditingUI\DisplayAsRows(), MetadataField\Drop(), Resource\FieldIsSet(), Resource\Get(), MetadataField\GetAllowedConversionTypes(), ResourceFactory\GetMatchingResources(), PrivilegeEditingUI\GetPrivilegeSetFromForm(), ResourceFactory\GetResourceIdsSortedBy(), SearchParameterSetEditingUI\GetValuesFromFormData(), FieldEditingUI\GetValuesFromFormData(), ResourceFactory\ImportResourcesFromXmlFile(), SPTSearchEngine\SearchFieldForPhrases(), SPTSearchEngine\SearchFieldsForComparisonMatches(), Resource\Set(), Resource_Test\setUpBeforeClass(), Resource_Test\testGetSetClear(), UnitTest(), UserEditingUI\UpdateUserFields(), and MetadataField\ValueUseCount().

const MetadataSchema::MDFTYPE_OPTION = 256

Definition at line 29 of file MetadataSchema.php.

Referenced by SPTSearchEngine\__construct(), SPTRecommender\__construct(), PrivilegeEditingUI\__construct(), FieldEditingUI\__construct(), SearchFacetUI\__construct(), Resource\Clear(), ResourceFactory\ClearVisibleResourceCount(), Resource\Create(), HumanMetadataField\DefaultValue(), MetadataField\DefaultValue(), SavedSearch\Delete(), FieldEditingUI\DisplayAsRows(), PrivilegeEditingUI\DisplaySet(), MetadataField\Drop(), Resource\FieldIsSet(), Resource\Get(), MetadataField\GetAllowedConversionTypes(), MetadataField\GetCountOfPossibleValues(), MetadataField\GetFactory(), MetadataField\GetIdForValue(), MetadataField\GetPossibleValues(), PrivilegeEditingUI\GetPrivilegeSetFromForm(), Resource\GetQualifierByField(), MetadataField\GetValueForId(), SearchParameterSetEditingUI\GetValuesFromFormData(), FieldEditingUI\GetValuesFromFormData(), ResourceFactory\ImportResourcesFromXmlFile(), MetadataField\IsControlledVocabularyField(), MetadataField\LoadVocabulary(), SearchParameterSetEditingUI\MaxValueLabelLength(), SPTSearchEngine\SearchFieldForPhrases(), SPTSearchEngine\SearchFieldsForComparisonMatches(), Resource\Set(), Resource_Test\setUpBeforeClass(), Resource_Test\testGetSetClear(), UserEditingUI\UpdateUserFields(), and MetadataField\ValueUseCount().

const MetadataSchema::MDFTYPE_PARAGRAPH = 2

Definition at line 22 of file MetadataSchema.php.

Referenced by SPTSearchEngine\__construct(), SPTRecommender\__construct(), FieldEditingUI\__construct(), FieldEditingUI\ApplyChangesToResource(), Resource\Clear(), FieldEditingUI\DisplayAsRows(), MetadataField\Drop(), Resource\FieldIsSet(), Resource\Get(), MetadataField\GetAllowedConversionTypes(), ResourceFactory\GetMatchingResources(), ResourceFactory\GetResourceIdsSortedBy(), SearchParameterSetEditingUI\GetValuesFromFormData(), FieldEditingUI\GetValuesFromFormData(), ResourceFactory\ImportResourcesFromXmlFile(), SPTSearchEngine\SearchFieldForPhrases(), SPTSearchEngine\SearchFieldsForComparisonMatches(), Resource\Set(), Resource_Test\setUpBeforeClass(), Resource_Test\testGetSetClear(), UnitTest(), UserEditingUI\UpdateUserFields(), and MetadataField\ValueUseCount().

const MetadataSchema::MDFTYPE_POINT = 8192

Definition at line 34 of file MetadataSchema.php.

Referenced by SPTSearchEngine\__construct(), Resource\Clear(), Resource\Create(), HumanMetadataField\DefaultValue(), MetadataField\DefaultValue(), MetadataField\Drop(), Resource\FieldIsSet(), Resource\Get(), ResourceFactory\GetMatchingResources(), ResourceFactory\ImportResourcesFromXmlFile(), MetadataField\PointDecimalDigits(), MetadataField\PointPrecision(), Resource\Set(), Resource_Test\testGetSetClear(), UserEditingUI\UpdateUserFields(), and MetadataField\ValueUseCount().

const MetadataSchema::MDFTYPE_REFERENCE = 16384

Definition at line 35 of file MetadataSchema.php.

Referenced by SPTSearchEngine\__construct(), FieldEditingUI\__construct(), FormUI_Base\__construct(), Resource\Clear(), FormUI_Base\ConvertItemIdsToNames(), FieldEditingUI\DisplayAsRows(), FormUI\DisplayFormField(), MetadataField\Drop(), Resource\FieldIsSet(), Resource\Get(), MetadataField\GetAllowedConversionTypes(), SPTSearchEngine\GetFieldContent(), FieldEditingUI\GetValuesFromFormData(), ResourceFactory\ImportResourcesFromXmlFile(), QuickSearchHelper\SearchField(), SPTSearchEngine\SearchFieldForPhrases(), SPTSearchEngine\SearchFieldsForComparisonMatches(), Resource\Set(), Resource_Test\setUpBeforeClass(), Resource_Test\testGetSetClear(), and UserEditingUI\UpdateUserFields().

const MetadataSchema::MDFTYPE_TEXT = 1

Definition at line 21 of file MetadataSchema.php.

Referenced by SPTSearchEngine\__construct(), SPTRecommender\__construct(), FieldEditingUI\__construct(), FieldEditingUI\ApplyChangesToResource(), Resource\Clear(), Resource\Create(), FieldEditingUI\DisplayAsRows(), MetadataField\Drop(), Resource\FieldIsSet(), Resource\Get(), MetadataField\GetAllowedConversionTypes(), ResourceFactory\GetMatchingResources(), ResourceFactory\GetResourceIdsSortedBy(), SearchParameterSetEditingUI\GetValuesFromFormData(), FieldEditingUI\GetValuesFromFormData(), ResourceFactory\ImportResourcesFromXmlFile(), SPTSearchEngine\SearchFieldForPhrases(), SPTSearchEngine\SearchFieldsForComparisonMatches(), Resource\Set(), Resource_Test\setUpBeforeClass(), Resource_Test\testGetSetClear(), UserEditingUI\UpdateUserFields(), and MetadataField\ValueUseCount().

const MetadataSchema::MDFTYPE_TIMESTAMP = 16

Definition at line 25 of file MetadataSchema.php.

Referenced by SPTSearchEngine\__construct(), SPTRecommender\__construct(), PrivilegeEditingUI\__construct(), FieldEditingUI\__construct(), FieldEditingUI\ApplyChangesToResource(), Resource\Clear(), CWUserFactory\CreateNewUser(), FieldEditingUI\DisplayAsRows(), MetadataField\Drop(), Resource\FieldIsSet(), Resource\Get(), MetadataField\GetAllowedConversionTypes(), ResourceFactory\GetMatchingResources(), PrivilegeEditingUI\GetPrivilegeSetFromForm(), ResourceFactory\GetResourceIdsSortedBy(), SearchParameterSetEditingUI\GetValuesFromFormData(), FieldEditingUI\GetValuesFromFormData(), ResourceFactory\ImportResourcesFromXmlFile(), SPTSearchEngine\SearchFieldForPhrases(), SPTSearchEngine\SearchFieldsForComparisonMatches(), Resource\Set(), Resource_Test\setUpBeforeClass(), Resource_Test\testGetSetClear(), Resource\UpdateAutoupdateFields(), UserEditingUI\UpdateUserFields(), and MetadataField\ValueUseCount().

const MetadataSchema::MDFTYPE_TREE = 64

Definition at line 27 of file MetadataSchema.php.

Referenced by SPTSearchEngine\__construct(), SPTRecommender\__construct(), FieldEditingUI\__construct(), SearchFacetUI\__construct(), FormUI_Base\__construct(), Resource\Clear(), FormUI_Base\ConvertItemIdsToNames(), FieldEditingUI\DisplayAsRows(), MetadataField\Drop(), Resource\FieldIsSet(), Resource\Get(), MetadataField\GetAllowedConversionTypes(), MetadataField\GetCountOfPossibleValues(), MetadataField\GetFactory(), SearchFacetUI\GetFieldsOpenByDefault(), MetadataField\GetIdForValue(), MetadataField\GetPossibleValues(), Resource\GetQualifierByField(), MetadataField\GetValueForId(), SearchParameterSetEditingUI\GetValuesFromFormData(), FieldEditingUI\GetValuesFromFormData(), ResourceFactory\ImportResourcesFromXmlFile(), MetadataField\IsControlledVocabularyField(), MetadataField\LoadVocabulary(), SPTSearchEngine\SearchFieldForPhrases(), SPTSearchEngine\SearchFieldsForComparisonMatches(), Resource\Set(), Classification_Test\setUpBeforeClass(), Resource_Test\setUpBeforeClass(), Resource_Test\testGetSetClear(), UserEditingUI\UpdateUserFields(), and MetadataField\ValueUseCount().

const MetadataSchema::MDFTYPE_URL = 4096

Definition at line 33 of file MetadataSchema.php.

Referenced by SPTSearchEngine\__construct(), SPTRecommender\__construct(), FieldEditingUI\__construct(), FieldEditingUI\ApplyChangesToResource(), Resource\Clear(), FieldEditingUI\DisplayAsRows(), MetadataField\Drop(), Resource\FieldIsSet(), Resource\Get(), MetadataField\GetAllowedConversionTypes(), ResourceFactory\GetMatchingResources(), ResourceFactory\GetResourceIdsSortedBy(), SearchParameterSetEditingUI\GetValuesFromFormData(), FieldEditingUI\GetValuesFromFormData(), ResourceFactory\ImportResourcesFromXmlFile(), SPTSearchEngine\SearchFieldForPhrases(), SPTSearchEngine\SearchFieldsForComparisonMatches(), Resource\Set(), Resource_Test\setUpBeforeClass(), Resource_Test\testGetSetClear(), UserEditingUI\UpdateUserFields(), and MetadataField\ValueUseCount().

const MetadataSchema::MDFTYPE_USER = 512

Definition at line 30 of file MetadataSchema.php.

Referenced by SPTSearchEngine\__construct(), SPTRecommender\__construct(), PrivilegeEditingUI\__construct(), FormUI_Base\__construct(), Resource\Clear(), FormUI_Base\ConvertItemIdsToNames(), SavedSearch\Delete(), MetadataField\Drop(), Resource\FieldIsSet(), PrivilegeSet\FieldsWithUserComparisons(), Resource\Get(), MetadataField\GetAllowedConversionTypes(), MetadataField\GetCountOfPossibleValues(), ResourceFactory\GetMatchingResources(), MetadataField\GetPossibleValues(), PrivilegeEditingUI\GetPrivilegeSetFromForm(), SearchParameterSetEditingUI\GetValuesFromFormData(), ResourceFactory\ImportResourcesFromXmlFile(), HumanMetadataField\LoadUserFieldList(), QuickSearchHelper\SearchField(), SPTSearchEngine\SearchFieldForPhrases(), SPTSearchEngine\SearchFieldsForComparisonMatches(), Resource\Set(), Resource_Test\setUpBeforeClass(), Resource_Test\testGetSetClear(), Resource\UpdateAutoupdateFields(), UserEditingUI\UpdateUserFields(), and MetadataField\ValueUseCount().

const MetadataSchema::ORDER_DISPLAY_NAME = "Display"

Definition at line 63 of file MetadataSchema.php.

const MetadataSchema::ORDER_EDIT_NAME = "Edit"

Definition at line 64 of file MetadataSchema.php.

const MetadataSchema::RESOURCENAME_DEFAULT = "Resource"

Definition at line 59 of file MetadataSchema.php.

const MetadataSchema::RESOURCENAME_USER = "User"

Definition at line 60 of file MetadataSchema.php.

const MetadataSchema::SCHEMAID_DEFAULT = 0

Definition at line 53 of file MetadataSchema.php.

Referenced by Resource\Create(), FormUI\DisplayFormField(), FormUI\DisplayFormTable(), MetadataField\Drop(), SPTSearchEngine\GroupedSearch(), SearchParameterSetEditingUI\MaxValueLabelLength(), ControlledName_Test\setUpBeforeClass(), Resource_Test\setUpBeforeClass(), Classification_Test\setUpBeforeClass(), ControlledName_Test\tearDownAfterClass(), Classification_Test\tearDownAfterClass(), and Resource_Test\testGetSetClear().

const MetadataSchema::SCHEMAID_RESOURCES = 0

Definition at line 54 of file MetadataSchema.php.

const MetadataSchema::SCHEMAID_USER = 1

Definition at line 55 of file MetadataSchema.php.

Referenced by CWUserFactory\__construct(), CWUserFactory\CreateNewUser(), CWUser\GetCustomUserFields(), CWUser\GetDefaultUserFields(), UserEditingUI\UpdateUserFields(), UserEditingUI\UploadFiles(), and UserEditingUI\UploadImages().

const MetadataSchema::SCHEMAID_USERS = 1

Definition at line 56 of file MetadataSchema.php.

The documentation for this class was generated from the following file:

- objects/MetadataSchema.php