
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. | |
Private Member Functions | |
| addProjectToResource ($project, $cserdId) | |
| INSERT BRIEF DESCRIPTION HERE. | |
Static Private Member Functions | |
| static | getCSERDProject () |
| INSERT BRIEF DESCRIPTION HERE. | |
| static | newResource ($cserdId, $url, $projects) |
| INSERT BRIEF DESCRIPTION HERE. | |
| static | nextCserdId () |
| INSERT BRIEF DESCRIPTION HERE. | |
| static | resolveProjects ($projects=null) |
| INSERT BRIEF DESCRIPTION HERE. | |
| static | resolveResource ($cserdId, $url, $projects) |
| INSERT BRIEF DESCRIPTION HERE. | |
Definition at line 6 of file SDRService.php5.
| 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
Definition at line 862 of file SDRService.php5.
References SDRAgent::agentFromCSERDUser().
| SDRService::addProjectToResource | ( | $ | project, | |
| $ | cserdId | |||
| ) | [private] |
INSERT BRIEF DESCRIPTION HERE.
For internal use only.
INSERT FULL DESCRIPTION HERE
| $project | [TYPE]: DESCRIPTION | |
| $cserdId | [TYPE]: DESCRIPTION |
Definition at line 337 of file SDRService.php5.
| 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. |
For internal use only.
Definition at line 404 of file SDRService.php5.
References SDRVersion::getList(), and SDRServiceCache::updateResourceVersionCaches().
| 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). |
Definition at line 948 of file SDRService.php5.
| 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). |
Definition at line 972 of file SDRService.php5.
References getMetadata(), and SErrorManager::setError().
| static SDRService::cserdIdExists | ( | $ | id | ) | [static] |
Check to see whether a resource with a given ID exists in SDR.
| $id | [string]: The ResourceId (CSERD id) in question |
Definition at line 747 of file SDRService.php5.
Referenced by SDR::resourceIdExists().
| static SDRService::fieldsForProject | ( | $ | project | ) | [static] |
INSERT BRIEF DESCRIPTION HERE.
INSERT FULL DESCRIPTION HERE
| $project | [TYPE]: DESCRIPTION |
Definition at line 650 of file SDRService.php5.
| static SDRService::findResourcesByIdentifier | ( | $ | identifier, | |
| $ | limit = null | |||
| ) | [static] |
INSERT BRIEF DESCRIPTION HERE.
INSERT FULL DESCRIPTION HERE
| $identifier | [TYPE]: DESCRIPTION | |
| $limit | [TYPE]: DESCRIPTION |
Definition at line 788 of file SDRService.php5.
| static SDRService::getCserdIdForURL | ( | $ | url | ) | [static] |
Get the resource id (CSERD id) of an item given its URL.
| $url | [string]: The URL of the item |
Definition at line 709 of file SDRService.php5.
Referenced by TSDObject::getCWISID(), and SDR::getResourceIdForURL().
| static SDRService::getCSERDProject | ( | ) | [static, private] |
INSERT BRIEF DESCRIPTION HERE.
For internal use only.
INSERT FULL DESCRIPTION HERE
Definition at line 203 of file SDRService.php5.
References SDRProject::getList().
| static SDRService::getLastModifiedVersion | ( | $ | identifier | ) | [static] |
Get the last SDRVersion for a cserdId.
| $identifier | [mixed]: Catalog ID number or URL |
Definition at line 564 of file SDRService.php5.
References SDRVersion::getList().
| static SDRService::getMetadata | ( | $ | identifier, | |
| $ | versionId = null | |||
| ) | [static] |
Get metadata for a given CSERD Id.
| $identifier | [mixed]: Catalog ID number or URL |
For internal use only.
Definition at line 546 of file SDRService.php5.
Referenced by buildMetadataFormObject().
| SDRService::getProjects | ( | ) |
INSERT BRIEF DESCRIPTION HERE.
INSERT FULL DESCRIPTION HERE
Definition at line 384 of file SDRService.php5.
References SDRProject::getList().
| SDRService::getProjectsForResource | ( | $ | cserdId | ) |
Get an array of SDRProjects (collections) bound to a resource.
| $cserdId | [mixed]: id number or URL for a resource |
Definition at line 363 of file SDRService.php5.
References SDRResourceProject::getList().
| static SDRService::getResource | ( | $ | identifier | ) | [static] |
Get an SDRResource object based on a cserdId.
| $identifier | [mixed]: Catalog ID number or URL |
Definition at line 627 of file SDRService.php5.
References SObject::hasError().
Referenced by SDRServiceCache::updateResourceCache(), and SDRServiceCache::updateResourceCacheHelper().
| 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 |
Definition at line 726 of file SDRService.php5.
Referenced by SDR::getURLForResourceId(), and identifierToURL().
| 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 |
Definition at line 589 of file SDRService.php5.
References SDRVersion::getList().
Referenced by SDRServiceCache::updateResourceCache().
| 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 |
Definition at line 695 of file SDRService.php5.
| static SDRService::newResource | ( | $ | cserdId, | |
| $ | url, | |||
| $ | projects | |||
| ) | [static, private] |
INSERT BRIEF DESCRIPTION HERE.
For internal use only.
INSERT FULL DESCRIPTION HERE
| $cserdId | [TYPE]: DESCRIPTION | |
| $url | [TYPE]: DESCRIPTION | |
| $projects | [TYPE]: DESCRIPTION |
Definition at line 277 of file SDRService.php5.
| static SDRService::nextCserdId | ( | ) | [static, private] |
INSERT BRIEF DESCRIPTION HERE.
For internal use only.
INSERT FULL DESCRIPTION HERE
Definition at line 830 of file SDRService.php5.
| 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. |
For internal use only.
Definition at line 477 of file SDRService.php5.
References SDRServiceCache::updateResourceVersionCaches().
| static SDRService::resolveProjects | ( | $ | projects = null |
) | [static, private] |
INSERT BRIEF DESCRIPTION HERE.
For internal use only.
INSERT FULL DESCRIPTION HERE
| $projects | [TYPE]: DESCRIPTION |
Definition at line 160 of file SDRService.php5.
References SDRProject::getList().
| static SDRService::resolveResource | ( | $ | cserdId, | |
| $ | url, | |||
| $ | projects | |||
| ) | [static, private] |
INSERT BRIEF DESCRIPTION HERE.
For internal use only.
INSERT FULL DESCRIPTION HERE
| $cserdId | [TYPE]: DESCRIPTION | |
| $url | [TYPE]: DESCRIPTION | |
| $projects | [TYPE]: DESCRIPTION |
Definition at line 236 of file SDRService.php5.
| 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) |
For internal use only.
Definition at line 60 of file SDRService.php5.
References SDRVersion::createVersion(), SDRField::findOrAddField(), SDRProjectField::findOrAddProjectField(), SDRValue::findOrAddValue(), SDRProject::getList(), SDRServiceCache::updateResourceCacheHelper(), and SDRServiceCache::updateValueCache().
| 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 |
Definition at line 505 of file SDRService.php5.
References SDRServiceCache::updateResourceCacheHelper().
| static SDRService::URLExists | ( | $ | url | ) | [static] |
Check to see whether a resource with a given URL exists in SDR.
| $url | [string]: The URL in question |
Definition at line 769 of file SDRService.php5.
Referenced by SDR::URLExists().
| static SDRService::valuesForField | ( | $ | field | ) | [static] |
INSERT BRIEF DESCRIPTION HERE.
INSERT FULL DESCRIPTION HERE
| $field | [TYPE]: DESCRIPTION |
Definition at line 662 of file SDRService.php5.
| static SDRService::versionsForResource | ( | $ | cserdId | ) | [static] |
INSERT BRIEF DESCRIPTION HERE.
INSERT FULL DESCRIPTION HERE
| $cserdId | [TYPE]: DESCRIPTION |
Definition at line 674 of file SDRService.php5.
1.5.6