Open Journal Systems  3.3.0
PubObjectsExportPlugin Class Reference
Inheritance diagram for PubObjectsExportPlugin:
ImportExportPlugin Plugin DOAJExportPlugin DOIPubIdExportPlugin CrossRefExportPlugin DataciteExportPlugin MedraExportPlugin

Public Member Functions

 _instantiateExportDeployment ($context)
 
 _instantiateSettingsForm ($context)
 
 _sendNotification ($user, $message, $notificationType, $param=null)
 
 addToSchema ($hookName, $params)
 
 callbackParseCronTab ($hookName, $args)
 
 depositXML ($objects, $context, $filename)
 
 display ($args, $request)
 
 executeCLI ($scriptName, &$args)
 
 executeCLICommand ($scriptName, $command, $context, $outputFile, $objects, $filter, $objectsFileNamePart)
 
 executeExportAction ($request, $objects, $filter, $tab, $objectsFileNamePart, $noValidation=null)
 
 exportXML ($objects, $filter, $context, $noValidation=null)
 
 getAdditionalFieldNames ($hookName, $args)
 
 getArticleGalleys ($galleyIds)
 
 getCache ()
 
 getDepositStatusSettingName ()
 
 getDepositSuccessNotificationMessageKey ()
 
 getExportActionNames ()
 
 getExportActions ($context)
 
 getExportDeploymentClassName ()
 
 getIssueFilter ()
 
 getPublishedIssues ($issueIds, $context)
 
 getPublishedSubmissions ($submissionIds, $context)
 
 getRepresentationFilter ()
 
 getStatusActions ($pubObject)
 
 getStatusMessage ($request)
 
 getStatusNames ()
 
 getSubmissionFilter ()
 
 getUnregisteredArticles ($context)
 
 isTestMode ($context)
 
 manage ($args, $request)
 
 markRegistered ($context, $objects)
 
 register ($category, $path, $mainContextId=null)
 
 usage ($scriptName)
 
- Public Member Functions inherited from ImportExportPlugin
 displayXMLValidationErrors ($errors, $xml)
 
 getActions ($request, $actionArgs)
 
 getExportFileName ($basePath, $objectsFileNamePart, $context, $extension='.xml')
 
 getExportPath ()
 
 getPluginSettingsPrefix ()
 
 isAllowedMethod ($url)
 
 isRelativePath ($url)
 
 pluginUrl ($params, $smarty)
 
- Public Member Functions inherited from Plugin
 __construct ()
 
 _overridePluginTemplates ($hookName, $args)
 
 addLocaleData ($locale=null)
 
 getCanDisable ()
 
 getCanEnable ()
 
 getCategory ()
 
 getContextSpecificPluginSettingsFile ()
 
 getCurrentVersion ()
 
 getDescription ()
 
 getDirName ()
 
 getDisplayName ()
 
 getEnabled ()
 
 getHideManagement ()
 
 getInstallControlledVocabFiles ()
 
 getInstallDataFile ()
 
 getInstallEmailTemplateDataFile ()
 
 getInstallEmailTemplatesFile ()
 
 getInstallFilterConfigFiles ()
 
 getInstallMigration ()
 
 getInstallSchemaFile ()
 
 getInstallSitePluginSettingsFile ()
 
 getLocaleFilename ($locale)
 
 getName ()
 
 getPluginPath ()
 
getRequest ()
 
 getSeq ()
 
 getSetting ($contextId, $name)
 
 getTemplatePath ($inCore=false)
 
 getTemplateResource ($template=null, $inCore=false)
 
 import ($class)
 
 installContextSpecificSettings ($hookName, $args)
 
 installControlledVocabs ($hookName, $args)
 
 installData ($hookName, $args)
 
 installEmailTemplateData ($hookName, $args)
 
 installEmailTemplates ($hookName, $args)
 
 installFilters ($hookName, $args)
 
 installLocale ($hookName, $args)
 
 installSiteSettings ($hookName, $args)
 
 isSitePlugin ()
 
 smartyPluginUrl ($params, $smarty)
 
 updateSchema ($hookName, $args)
 
 updateSetting ($contextId, $name, $value, $type=null)
 

Data Fields

 $_cache
 
- Data Fields inherited from ImportExportPlugin
 $_request
 
- Data Fields inherited from Plugin
 $pluginCategory
 
 $pluginPath
 
 $request
 

Protected Member Functions

 _getDAOs ()
 
 _getObjectAdditionalSettings ()
 
 updateObject ($object)
 
- Protected Member Functions inherited from Plugin
 _registerTemplateResource ($inCore=false)
 

Detailed Description

Basis class for XML metadata export plugins.

Definition at line 33 of file PubObjectsExportPlugin.inc.php.

Member Function Documentation

◆ _getDAOs()

PubObjectsExportPlugin::_getDAOs ( )
protected

Get the DAOs for objects that need to be augmented with additional settings.

Returns
array

Definition at line 755 of file PubObjectsExportPlugin.inc.php.

References DAORegistry\getDAO(), and Application\getRepresentationDAO().

Referenced by register().

◆ _getObjectAdditionalSettings()

PubObjectsExportPlugin::_getObjectAdditionalSettings ( )
protected

Get a list of additional setting names that should be stored with the objects.

Returns
array

Reimplemented in CrossRefExportPlugin, and DOIPubIdExportPlugin.

Definition at line 475 of file PubObjectsExportPlugin.inc.php.

Referenced by addToSchema(), and getAdditionalFieldNames().

◆ _instantiateExportDeployment()

PubObjectsExportPlugin::_instantiateExportDeployment (   $context)

Instantiate the export deployment.

Parameters
$contextContext
Returns
PKPImportExportDeployment

Definition at line 732 of file PubObjectsExportPlugin.inc.php.

Referenced by DOAJExportPlugin\exportJSON(), and exportXML().

◆ _instantiateSettingsForm()

PubObjectsExportPlugin::_instantiateSettingsForm (   $context)

Instantiate the settings form.

Parameters
$contextContext
Returns
CrossRefSettingsForm

Definition at line 744 of file PubObjectsExportPlugin.inc.php.

Referenced by display(), and manage().

◆ _sendNotification()

PubObjectsExportPlugin::_sendNotification (   $user,
  $message,
  $notificationType,
  $param = null 
)

Add a notification.

Parameters
$userUser
$messagestring An i18n key.
$notificationTypeinteger One of the NOTIFICATION_TYPE_* constants.
$paramstring An additional parameter for the message.

Definition at line 709 of file PubObjectsExportPlugin.inc.php.

Referenced by DataciteExportPlugin\executeExportAction(), DOAJExportPlugin\executeExportAction(), executeExportAction(), and CrossRefExportPlugin\executeExportAction().

◆ addToSchema()

PubObjectsExportPlugin::addToSchema (   $hookName,
  $params 
)

Add properties for this type of public identifier to the entity's list for storage in the database. This is used for SchemaDAO-backed entities only.

See also
PKPPubIdPlugin::getAdditionalFieldNames()
Parameters
$hookNamestring Schema::get::publication
$paramsarray

Definition at line 458 of file PubObjectsExportPlugin.inc.php.

References _getObjectAdditionalSettings().

◆ callbackParseCronTab()

PubObjectsExportPlugin::callbackParseCronTab (   $hookName,
  $args 
)

Definition at line 482 of file PubObjectsExportPlugin.inc.php.

◆ depositXML()

PubObjectsExportPlugin::depositXML (   $objects,
  $context,
  $filename 
)
abstract

Deposit XML document. This must be implemented in the subclasses, if the action is supported.

Parameters
$objectsmixed Array of or single published submission, issue or galley
$contextContext
$filenameExport XML filename
Returns
boolean Whether the XML document has been registered

Reimplemented in DOAJExportPlugin, CrossRefExportPlugin, MedraExportPlugin, and DataciteExportPlugin.

Referenced by executeExportAction().

◆ display()

◆ executeCLI()

PubObjectsExportPlugin::executeCLI (   $scriptName,
$args 
)

Reimplemented from ImportExportPlugin.

Definition at line 543 of file PubObjectsExportPlugin.inc.php.

References DAORegistry\getDAO(), and AppLocale\requireComponents().

◆ executeCLICommand()

PubObjectsExportPlugin::executeCLICommand (   $scriptName,
  $command,
  $context,
  $outputFile,
  $objects,
  $filter,
  $objectsFileNamePart 
)

Execute the CLI command

Parameters
$scriptNameThe name of the command-line script (displayed as usage info)
$commandstring (export or register)
$contextContext
$outputFilestring Path to the file where the exported XML should be saved
$objectsarray Objects to be exported or registered
$filterstring Filter to use
$objectsFileNamePartstring Export file name part for this kind of objects

Reimplemented in CrossRefExportPlugin, and DataciteExportPlugin.

Definition at line 626 of file PubObjectsExportPlugin.inc.php.

◆ executeExportAction()

PubObjectsExportPlugin::executeExportAction (   $request,
  $objects,
  $filter,
  $tab,
  $objectsFileNamePart,
  $noValidation = null 
)

Execute export action.

Parameters
$requestRequest
$objectsarray Array of objects to be exported
$filterstring Filter to use
$tabstring Tab to return to
$objectsFileNamePartstring Export file name part for this kind of objects
$noValidationboolean If set to true no XML validation will be done

Reimplemented in CrossRefExportPlugin, DOAJExportPlugin, and DataciteExportPlugin.

Definition at line 187 of file PubObjectsExportPlugin.inc.php.

References Plugin\$request, _sendNotification(), depositXML(), exportXML(), ImportExportPlugin\getExportFileName(), ImportExportPlugin\getExportPath(), Plugin\getName(), and markRegistered().

Referenced by display().

◆ exportXML()

PubObjectsExportPlugin::exportXML (   $objects,
  $filter,
  $context,
  $noValidation = null 
)

Get the XML for selected objects.

Parameters
$objectsmixed Array of or single published submission, issue or galley
$filterstring
$contextContext
Returns
string XML document.
Parameters
$noValidationboolean If set to true no XML validation will be done

Definition at line 385 of file PubObjectsExportPlugin.inc.php.

References _instantiateExportDeployment(), ImportExportPlugin\displayXMLValidationErrors(), and DAORegistry\getDAO().

Referenced by DataciteExportPlugin\executeCLICommand(), CrossRefExportPlugin\executeCLICommand(), DataciteExportPlugin\executeExportAction(), executeExportAction(), and CrossRefExportPlugin\executeExportAction().

◆ getAdditionalFieldNames()

PubObjectsExportPlugin::getAdditionalFieldNames (   $hookName,
  $args 
)

Add properties for this type of public identifier to the entity's list for storage in the database. This is used for non-SchemaDAO-backed entities only.

See also
PubObjectsExportPlugin::addToSchema()
Parameters
$hookNamestring
$paramsarray

Definition at line 439 of file PubObjectsExportPlugin.inc.php.

References _getObjectAdditionalSettings().

◆ getArticleGalleys()

PubObjectsExportPlugin::getArticleGalleys (   $galleyIds)

Get article galleys from gallley IDs.

Parameters
$galleyIdsarray
Returns
array

Reimplemented in DOIPubIdExportPlugin.

Definition at line 692 of file PubObjectsExportPlugin.inc.php.

References DAORegistry\getDAO().

Referenced by display().

◆ getCache()

PubObjectsExportPlugin::getCache ( )

Get the plugin cache

Returns
PubObjectCache

Definition at line 44 of file PubObjectsExportPlugin.inc.php.

References $_cache.

Referenced by DataciteExportPlugin\_getObjectUrl(), and DOIPubIdExportPlugin\getUnregisteredIssues().

◆ getDepositStatusSettingName()

◆ getDepositSuccessNotificationMessageKey()

PubObjectsExportPlugin::getDepositSuccessNotificationMessageKey ( )

Get the locale key used in the notification for the successful deposit.

Reimplemented in CrossRefExportPlugin.

Definition at line 275 of file PubObjectsExportPlugin.inc.php.

◆ getExportActionNames()

PubObjectsExportPlugin::getExportActionNames ( )

Get action names.

Returns
array (string action => string text)

Reimplemented in CrossRefExportPlugin.

Definition at line 363 of file PubObjectsExportPlugin.inc.php.

Referenced by display().

◆ getExportActions()

PubObjectsExportPlugin::getExportActions (   $context)

Get actions.

Parameters
$contextContext
Returns
array

Reimplemented in DOAJExportPlugin.

Definition at line 351 of file PubObjectsExportPlugin.inc.php.

References Plugin\getSetting().

Referenced by display().

◆ getExportDeploymentClassName()

PubObjectsExportPlugin::getExportDeploymentClassName ( )
abstract

Return the name of the plugin's deployment class.

Returns
string

Reimplemented in CrossRefExportPlugin, DataciteExportPlugin, DOAJExportPlugin, and MedraExportPlugin.

◆ getIssueFilter()

PubObjectsExportPlugin::getIssueFilter ( )

Get the issue filter.

Returns
string|null

Reimplemented in DataciteExportPlugin, and MedraExportPlugin.

Definition at line 311 of file PubObjectsExportPlugin.inc.php.

Referenced by display().

◆ getPublishedIssues()

PubObjectsExportPlugin::getPublishedIssues (   $issueIds,
  $context 
)

Get published issues from issue IDs.

Parameters
$issueIdsarray
$contextContext
Returns
array

Reimplemented in DOIPubIdExportPlugin.

Definition at line 677 of file PubObjectsExportPlugin.inc.php.

References DAORegistry\getDAO().

Referenced by display().

◆ getPublishedSubmissions()

PubObjectsExportPlugin::getPublishedSubmissions (   $submissionIds,
  $context 
)

Get published submissions from submission IDs.

Parameters
$submissionIdsarray
$contextContext
Returns
array

Reimplemented in DOIPubIdExportPlugin.

Definition at line 662 of file PubObjectsExportPlugin.inc.php.

References PKPServices\get().

Referenced by display().

◆ getRepresentationFilter()

PubObjectsExportPlugin::getRepresentationFilter ( )

Get the representation filter.

Returns
string|null

Reimplemented in DataciteExportPlugin, and MedraExportPlugin.

Definition at line 319 of file PubObjectsExportPlugin.inc.php.

Referenced by display().

◆ getStatusActions()

PubObjectsExportPlugin::getStatusActions (   $pubObject)

Get status actions for the display to the user, i.e. links to a web site with more information about the status.

Parameters
$pubObject
Returns
array (string status => link)

Reimplemented in CrossRefExportPlugin.

Definition at line 342 of file PubObjectsExportPlugin.inc.php.

◆ getStatusMessage()

PubObjectsExportPlugin::getStatusMessage (   $request)

Get detailed message of the object status i.e. failure messages. Parameters needed have to be in the request object.

Parameters
$requestPKPRequest
Returns
string Preformatted text that will be displayed in a div element in the modal

Reimplemented in CrossRefExportPlugin.

Definition at line 295 of file PubObjectsExportPlugin.inc.php.

Referenced by manage().

◆ getStatusNames()

PubObjectsExportPlugin::getStatusNames ( )

Get status names for the filter search option.

Returns
array (string status => string text)

Reimplemented in CrossRefExportPlugin.

Definition at line 327 of file PubObjectsExportPlugin.inc.php.

◆ getSubmissionFilter()

PubObjectsExportPlugin::getSubmissionFilter ( )

Get the submission filter.

Returns
string|null

Reimplemented in DOAJExportPlugin, CrossRefExportPlugin, DataciteExportPlugin, and MedraExportPlugin.

Definition at line 303 of file PubObjectsExportPlugin.inc.php.

Referenced by display().

◆ getUnregisteredArticles()

PubObjectsExportPlugin::getUnregisteredArticles (   $context)

Retrieve all unregistered articles.

Parameters
$contextContext
Returns
array

Reimplemented in DOIPubIdExportPlugin.

Definition at line 493 of file PubObjectsExportPlugin.inc.php.

References DAORegistry\getDAO().

◆ isTestMode()

◆ manage()

PubObjectsExportPlugin::manage (   $args,
  $request 
)

Perform a management function.

Parameters
$argsarray
$requestPKPRequest
Returns
JSONMessage A JSON-encoded response

Reimplemented from Plugin.

Definition at line 76 of file PubObjectsExportPlugin.inc.php.

References Plugin\$request, _instantiateSettingsForm(), PKPTemplateManager\getManager(), and getStatusMessage().

◆ markRegistered()

PubObjectsExportPlugin::markRegistered (   $context,
  $objects 
)

Mark selected submissions or issues as registered.

Parameters
$contextContext
$objectsarray Array of published submissions, issues or galleys

Reimplemented in CrossRefExportPlugin, and DOIPubIdExportPlugin.

Definition at line 410 of file PubObjectsExportPlugin.inc.php.

References getDepositStatusSettingName(), and updateObject().

Referenced by executeExportAction().

◆ register()

PubObjectsExportPlugin::register (   $category,
  $path,
  $mainContextId = null 
)

Load and initialize the plug-in and register plugin hooks.

For backwards compatibility this method will be called whenever the plug-in's category is being loaded. If, however, registerOn() returns an array then this method will only be called when the plug-in is enabled and an entry in the result set of registerOn() matches the current request operation. An empty array matches all request operations.

Parameters
$categoryString Name of category plugin was registered to
$pathString The path the plugin was found in
$mainContextIdinteger To identify if the plugin is enabled we need a context. This context is usually taken from the request but sometimes there is no context in the request (e.g. when executing CLI commands). Then the main context can be given as an explicit ID.
Returns
boolean True iff plugin registered successfully; if false, the plugin will not be executed.

Reimplemented from Plugin.

Definition at line 56 of file PubObjectsExportPlugin.inc.php.

References _getDAOs(), Plugin\addLocaleData(), HookRegistry\register(), AppLocale\requireComponents(), and strtolower_codesafe().

◆ updateObject()

PubObjectsExportPlugin::updateObject (   $object)
protected

Update the given object.

Parameters
$objectIssue|Submission|ArticleGalley

Definition at line 421 of file PubObjectsExportPlugin.inc.php.

Referenced by DOAJExportPlugin\depositXML(), CrossRefExportPlugin\depositXML(), markRegistered(), and DOIPubIdExportPlugin\saveRegisteredDoi().

◆ usage()

PubObjectsExportPlugin::usage (   $scriptName)

Field Documentation

◆ $_cache

PubObjectCache PubObjectsExportPlugin::$_cache

Definition at line 38 of file PubObjectsExportPlugin.inc.php.

Referenced by getCache().


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