Public Member Functions | |
getProjects () | |
INSERT BRIEF DESCRIPTION HERE. | |
getProjectsForResource ($cserdId) | |
Get an array of SDRProjects (collections) bound to a resource. | |
init () | |
Initialize the SDRService and create the database interface. | |
Static Public Member Functions | |
static | addMetadataEditor ($prm, $projectName='CSERD', $cserdId=null, $versionId=null) |
Get the xml for an xform that conatins all the fields associated with the given project. If a value is passed in for CSERD id, the form will be prefilled with metadata from the existing resource. | |
static | approve ($version, $agent, $state=SDRVersion::STATE_LIVE) |
Make this metadata version the approved version for its resource Id. | |
static | buildMetadataForm ($cserdId=null, $projectName, $versionId=null) |
Get the xml for an xform that conatins all the fields associated with the given project. If a value is passed in for CSERD id, the form will be prefilled with metadata from the existing resource. | |
static | buildMetadataFormObject ($cserdId=null, $projectName, $versionId=null) |
Get the XForms object for an xform that conatins all the fields associated with the given project. If a value is passed in for CSERD id, the form will be prefilled with metadata from the existing resource. | |
static | cserdIdExists ($id) |
Check to see whether a resource with a given ID exists in SDR. | |
static | fieldsForProject ($project) |
INSERT BRIEF DESCRIPTION HERE. | |
static | findResourcesByIdentifier ($identifier, $limit=null) |
INSERT BRIEF DESCRIPTION HERE. | |
static | getCserdIdForURL ($url) |
Get the resource id (CSERD id) of an item given its URL. | |
static | getDBI () |
Get the DBI2 (database interface) object for SDR. | |
static | getLastModifiedVersion ($identifier) |
Get the last SDRVersion for a cserdId. | |
static | getMetadata ($identifier, $versionId=null) |
Get metadata for a given CSERD Id. | |
static | getResource ($identifier) |
Get an SDRResource object based on a cserdId. | |
static | getURLForCserdId ($id) |
Get the URL of an item given its resource id (CSERD id). | |
static | getVersion ($identifier, $state=SDRVersion::STATE_LIVE) |
Get the live (or dev) SDRVersion for a cserdId. | |
static | identifierToCserdId ($cserdId) |
Convert identifier (either URL or ID) to a resource Id. Return null if not found. | |
static | identifierToURL ($cserdId) |
Convert identifier (either URL or ID) to a URL. Return null if not found. | |
static | reject ($version, $agent) |
Reject this metadata version (move it to a rejected state). | |
static | submit ($cserdId, $metadata, $agent, $comment, $projectName=null) |
Submit a new metadata version for a cserdId (id or URL). If the cserdId does not exist, create that resource now. | |
static | updateReleaseFlag ($cserdId, $value, $agent) |
Update the release flag for a resource. | |
static | URLExists ($url) |
Check to see whether a resource with a given URL exists in SDR. | |
static | valuesForField ($field) |
INSERT BRIEF DESCRIPTION HERE. | |
static | versionsForResource ($cserdId) |
INSERT BRIEF DESCRIPTION HERE. |
static SDRService::addMetadataEditor | ( | $ | prm, | |
$ | projectName = 'CSERD' , |
|||
$ | cserdId = null , |
|||
$ | versionId = null | |||
) | [static] |
Get the xml for an xform that conatins all the fields associated with the given project. If a value is passed in for CSERD id, the form will be prefilled with metadata from the existing resource.
$prm | [PageRender2]: The instance of PageRender where this editor will be displayed. | |
$cserdId | [int]: The id for this item if it already exists. | |
$projectName | [string]: The name of the project the form you want to build is for (different fields for different projects). |
Build the xform
static SDRService::approve | ( | $ | version, | |
$ | agent, | |||
$ | state = SDRVersion::STATE_LIVE | |||
) | [static] |
Make this metadata version the approved version for its resource Id.
$version | [SDRVersion]: The version to approve | |
$agent | [SDRAgent]: The agent performing this action. | |
$state | [string]: The state this version should become. |
static SDRService::buildMetadataForm | ( | $ | cserdId = null , |
|
$ | projectName, | |||
$ | versionId = null | |||
) | [static] |
Get the xml for an xform that conatins all the fields associated with the given project. If a value is passed in for CSERD id, the form will be prefilled with metadata from the existing resource.
$cserdId | [int]: The id for this item if it already exists. | |
$projectName | [string]: The name of the project the form you want to build is for (different fields for different projects). |
static SDRService::buildMetadataFormObject | ( | $ | cserdId = null , |
|
$ | projectName, | |||
$ | versionId = null | |||
) | [static] |
Get the XForms object for an xform that conatins all the fields associated with the given project. If a value is passed in for CSERD id, the form will be prefilled with metadata from the existing resource.
$cserdId | [int]: The id for this item if it already exists. | |
$projectName | [string]: The name of the project the form you want to build is for (different fields for different projects). |
static SDRService::cserdIdExists | ( | $ | id | ) | [static] |
static SDRService::fieldsForProject | ( | $ | project | ) | [static] |
INSERT BRIEF DESCRIPTION HERE.
INSERT FULL DESCRIPTION HERE
$project | [TYPE]: DESCRIPTION |
static SDRService::findResourcesByIdentifier | ( | $ | identifier, | |
$ | limit = null | |||
) | [static] |
INSERT BRIEF DESCRIPTION HERE.
INSERT FULL DESCRIPTION HERE
$identifier | [TYPE]: DESCRIPTION | |
$limit | [TYPE]: DESCRIPTION |
static SDRService::getCserdIdForURL | ( | $ | url | ) | [static] |
Get the resource id (CSERD id) of an item given its URL.
$url | [string]: The URL of the item |
static SDRService::getLastModifiedVersion | ( | $ | identifier | ) | [static] |
Get the last SDRVersion for a cserdId.
$identifier | [mixed]: Catalog ID number or URL |
static SDRService::getMetadata | ( | $ | identifier, | |
$ | versionId = null | |||
) | [static] |
Get metadata for a given CSERD Id.
$identifier | [mixed]: Catalog ID number or URL |
SDRService::getProjects | ( | ) |
INSERT BRIEF DESCRIPTION HERE.
INSERT FULL DESCRIPTION HERE
SDRService::getProjectsForResource | ( | $ | cserdId | ) |
Get an array of SDRProjects (collections) bound to a resource.
$cserdId | [mixed]: id number or URL for a resource |
static SDRService::getResource | ( | $ | identifier | ) | [static] |
Get an SDRResource object based on a cserdId.
$identifier | [mixed]: Catalog ID number or URL |
static SDRService::getURLForCserdId | ( | $ | id | ) | [static] |
Get the URL of an item given its resource id (CSERD id).
$id | [int]: The resource id of the item |
static SDRService::getVersion | ( | $ | identifier, | |
$ | state = SDRVersion::STATE_LIVE | |||
) | [static] |
Get the live (or dev) SDRVersion for a cserdId.
$identifier | [mixed]: Catalog ID number or URL | |
$state | [mixed]: String or array containing possible states |
static SDRService::identifierToCserdId | ( | $ | cserdId | ) | [static] |
Convert identifier (either URL or ID) to a resource Id. Return null if not found.
$cserdId | [mixed]: The URL or ID of the item |
static SDRService::reject | ( | $ | version, | |
$ | agent | |||
) | [static] |
Reject this metadata version (move it to a rejected state).
$version | [SDRVersion]: The version to reject | |
$agent | [SDRAgent]: The agent performing this action. |
static SDRService::submit | ( | $ | cserdId, | |
$ | metadata, | |||
$ | agent, | |||
$ | comment, | |||
$ | projectName = null | |||
) | [static] |
Submit a new metadata version for a cserdId (id or URL). If the cserdId does not exist, create that resource now.
$cserdId | [mixed]: Catalog ID number or URL | |
$metadata | [SDRMetadataObj]: The metadata record | |
$agent | [SDRAgent]: The agent performing this action. | |
$comment | [string]: A comment about why this metadata was submitted. | |
$project | [string]: project to submit to (will become the primary project for new items) |
static SDRService::updateReleaseFlag | ( | $ | cserdId, | |
$ | value, | |||
$ | agent | |||
) | [static] |
Update the release flag for a resource.
$cserdId | [mixed]: Catalog ID number or URL | |
$value | [mixed]: 1/true (for release) or 0/false (for not released) | |
$agent | [SDRAgent]: The agent performing the action |
static SDRService::URLExists | ( | $ | url | ) | [static] |
Check to see whether a resource with a given URL exists in SDR.
$url | [string]: The URL in question |
static SDRService::valuesForField | ( | $ | field | ) | [static] |
INSERT BRIEF DESCRIPTION HERE.
INSERT FULL DESCRIPTION HERE
$field | [TYPE]: DESCRIPTION |
static SDRService::versionsForResource | ( | $ | cserdId | ) | [static] |
INSERT BRIEF DESCRIPTION HERE.
INSERT FULL DESCRIPTION HERE
$cserdId | [TYPE]: DESCRIPTION |