|
Open Journal Systems
3.3.0
|
Public Member Functions | |
| __construct ($deposit, $task=null) | |
| _cleanFileList ($xml, &$fileList) | |
| generateAtomDocument () | |
| generatePackage () | |
| getAtomDocumentPath () | |
| getDepositDir () | |
| getPackageFilePath () | |
| importExportErrorHandler ($depositId, $message) | |
| packageDeposit () | |
| transferDeposit () | |
| updateDepositStatus () | |
Data Fields | |
| $_deposit | |
| $_task | |
Protected Member Functions | |
| _generateElement ($dom, $elementName, $content, $namespace=null) | |
| _logMessage ($message) | |
Represent a PLN deposit package.
Definition at line 17 of file DepositPackage.inc.php.
| DepositPackage::__construct | ( | $deposit, | |
$task = null |
|||
| ) |
Constructor.
| $deposit | Deposit |
| $task | ScheduledTask |
Definition at line 40 of file DepositPackage.inc.php.
| DepositPackage::_cleanFileList | ( | $xml, | |
| & | $fileList | ||
| ) |
Read a list of file paths from the specified native XML string and clean up the XML's pathnames.
| $xml | string |
| $fileList | array Reference to array to receive file list |
Definition at line 415 of file DepositPackage.inc.php.
Referenced by generatePackage().
|
protected |
Create a DOMElement in the $dom, and set the element name, namespace, and content. Any invalid UTF-8 characters will be dropped. The content will be placed inside a CDATA section.
| DOMDocument | $dom | |
| string | $elementName | |
| string | $content | |
| string | $namespace |
Definition at line 96 of file DepositPackage.inc.php.
Referenced by generateAtomDocument().
|
protected |
Send a message to a log. If the deposit package is aware of a a scheduled task, the message will be sent to the task's log. Otherwise it will be sent to error_log().
| $message | string Locale-specific message to be logged |
Definition at line 52 of file DepositPackage.inc.php.
Referenced by generateAtomDocument(), generatePackage(), transferDeposit(), and updateDepositStatus().
| DepositPackage::generateAtomDocument | ( | ) |
Create an atom document for this deposit.
Definition at line 115 of file DepositPackage.inc.php.
References $application, _generateElement(), _logMessage(), PKPApplication\getApplication(), getAtomDocumentPath(), DAORegistry\getDAO(), getPackageFilePath(), PluginRegistry\getPlugin(), and PKPApplication\getRequest().
| DepositPackage::generatePackage | ( | ) |
Create a package containing the serialized deposit objects. If the bagit library fails to load, null will be returned.
Definition at line 253 of file DepositPackage.inc.php.
References $application, _cleanFileList(), _logMessage(), PKPApplication\getApplication(), DAORegistry\getDAO(), getDepositDir(), getPackageFilePath(), PluginRegistry\getPlugin(), importExportErrorHandler(), and PluginRegistry\loadCategory().
Referenced by packageDeposit().
| DepositPackage::getAtomDocumentPath | ( | ) |
Get the filename used to store the deposit's atom document.
Definition at line 73 of file DepositPackage.inc.php.
References getDepositDir().
Referenced by generateAtomDocument(), and transferDeposit().
| DepositPackage::getDepositDir | ( | ) |
Get the directory used to store deposit data.
Definition at line 64 of file DepositPackage.inc.php.
Referenced by generatePackage(), getAtomDocumentPath(), getPackageFilePath(), and updateDepositStatus().
| DepositPackage::getPackageFilePath | ( | ) |
Get the filename used to store the deposit's bag.
Definition at line 81 of file DepositPackage.inc.php.
References getDepositDir().
Referenced by generateAtomDocument(), and generatePackage().
| DepositPackage::importExportErrorHandler | ( | $depositId, | |
| $message | |||
| ) |
Handle an error during the import/export process.
| $depositId | int Deposit ID |
| $message | string Error message |
Definition at line 671 of file DepositPackage.inc.php.
References DAORegistry\getDAO().
Referenced by generatePackage().
| DepositPackage::packageDeposit | ( | ) |
Package a deposit for transfer to and retrieval by the PLN.
Definition at line 523 of file DepositPackage.inc.php.
References generatePackage(), and DAORegistry\getDAO().
| DepositPackage::transferDeposit | ( | ) |
Transfer the atom document to the PLN.
Definition at line 432 of file DepositPackage.inc.php.
References _logMessage(), getAtomDocumentPath(), DAORegistry\getDAO(), and PluginRegistry\getPlugin().
| DepositPackage::updateDepositStatus | ( | ) |
Update the deposit's status by checking with the PLN.
Definition at line 582 of file DepositPackage.inc.php.
References _logMessage(), DAORegistry\getDAO(), getDepositDir(), and PluginRegistry\getPlugin().
| Deposit DepositPackage::$_deposit |
Definition at line 23 of file DepositPackage.inc.php.
| ScheduledTask DepositPackage::$_task |
If the DepositPackage object was created as part of a scheduled task run, then save the task so error messages can be logged there.
Definition at line 33 of file DepositPackage.inc.php.