Open Preprint Systems  3.3.0
DOIPubIdPlugin Class Reference
Inheritance diagram for DOIPubIdPlugin:
PubIdPlugin PKPPubIdPlugin LazyLoadPlugin Plugin

Public Member Functions

 _doiURLEncode ($pubId)
 
 addPublicationFormFields ($hookName, $form)
 
 addPublishFormNotice ($hookName, $form)
 
 constructPubId ($pubIdPrefix, $pubIdSuffix, $contextId)
 
 getAssignFormFieldName ()
 
 getCitationData ($hookname, $args)
 
 getDAOFieldNames ()
 
 getDescription ()
 
 getDisplayName ()
 
 getFormFieldNames ()
 
 getLinkActions ($pubObject)
 
 getNotUniqueErrorMsg ()
 
 getPrefixFieldName ()
 
 getPubIdAssignFile ()
 
 getPubIdDisplayType ()
 
 getPubIdFullName ()
 
 getPubIdMetadataFile ()
 
 getPubIdType ()
 
 getResolvingURL ($contextId, $pubId)
 
 getSuffixFieldName ()
 
 getSuffixPatternsFieldNames ()
 
 instantiateSettingsForm ($contextId)
 
 isObjectTypeEnabled ($pubObjectType, $contextId)
 
 modifyObjectProperties ($hookName, $args)
 
 modifyObjectPropertyValues ($hookName, $args)
 
 register ($category, $path, $mainContextId=null)
 
 validatePubId ($pubId)
 
 validatePublicationDoi ($hookName, $args)
 
- Public Member Functions inherited from PubIdPlugin
 getPubId ($pubObject)
 
 manage ($args, $request)
 
 versionPubId ($pubObject)
 
- Public Member Functions inherited from PKPPubIdPlugin
 addJavaScript ($request, $templateMgr)
 
 addToSchema ($hookName, $params)
 
 canBeAssigned ($pubObject)
 
 checkDuplicate ($pubId, $pubObjectType, $excludeId, $contextId)
 
 getActions ($request, $actionArgs)
 
 getAdditionalFieldNames ($hookName, $params)
 
 getContext ($contextId)
 
 getDAOs ()
 
 getFileDAODelegates ()
 
 getPubObjectType ($pubObject)
 
 getPubObjectTypes ()
 
 setStoredPubId (&$pubObject, $pubId)
 
 verifyData ($fieldName, $fieldValue, $pubObject, $contextId, &$errorMsg)
 
- Public Member Functions inherited from LazyLoadPlugin
 getCanDisable ()
 
 getCanEnable ()
 
 getCurrentContextId ()
 
 getEnabled ($contextId=null)
 
 getName ()
 
 setEnabled ($enabled)
 
- Public Member Functions inherited from Plugin
 __construct ()
 
 _overridePluginTemplates ($hookName, $args)
 
 addLocaleData ($locale=null)
 
 getCategory ()
 
 getContextSpecificPluginSettingsFile ()
 
 getCurrentVersion ()
 
 getDirName ()
 
 getEnabled ()
 
 getHideManagement ()
 
 getInstallControlledVocabFiles ()
 
 getInstallDataFile ()
 
 getInstallEmailTemplateDataFile ()
 
 getInstallEmailTemplatesFile ()
 
 getInstallFilterConfigFiles ()
 
 getInstallMigration ()
 
 getInstallSchemaFile ()
 
 getInstallSitePluginSettingsFile ()
 
 getLocaleFilename ($locale)
 
 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)
 

Additional Inherited Members

- Data Fields inherited from Plugin
 $pluginCategory
 
 $pluginPath
 
 $request
 
- Protected Member Functions inherited from Plugin
 _registerTemplateResource ($inCore=false)
 

Detailed Description

DOI plugin class.

Definition at line 18 of file DOIPubIdPlugin.inc.php.

Member Function Documentation

◆ _doiURLEncode()

DOIPubIdPlugin::_doiURLEncode (   $pubId)

Encode DOI according to ANSI/NISO Z39.84-2005, Appendix E.

Parameters
$pubIdstring
Returns
string

Definition at line 245 of file DOIPubIdPlugin.inc.php.

◆ addPublicationFormFields()

DOIPubIdPlugin::addPublicationFormFields (   $hookName,
  $form 
)

Add DOI fields to the publication identifiers form

Parameters
$hookNamestring Form::config::before
$formFormComponent The form object

Definition at line 343 of file DOIPubIdPlugin.inc.php.

References Plugin\getSetting(), PKPString\regexp_replace(), and PKPString\strtolower().

◆ addPublishFormNotice()

DOIPubIdPlugin::addPublishFormNotice (   $hookName,
  $form 
)

Show DOI during final publish step

Parameters
$hookNamestring Form::config::before
$formFormComponent The form object

Definition at line 399 of file DOIPubIdPlugin.inc.php.

References PKPServices\get(), and Plugin\getSetting().

◆ constructPubId()

DOIPubIdPlugin::constructPubId (   $pubIdPrefix,
  $pubIdSuffix,
  $contextId 
)

Construct the public identifier from its prefix and suffix.

Parameters
$pubIdPrefixstring
$pubIdSuffixstring
$contextIdinteger
Returns
string

Reimplemented from PKPPubIdPlugin.

Definition at line 65 of file DOIPubIdPlugin.inc.php.

◆ getAssignFormFieldName()

DOIPubIdPlugin::getAssignFormFieldName ( )

Get the assign option form field name.

Returns
string

Reimplemented from PKPPubIdPlugin.

Definition at line 129 of file DOIPubIdPlugin.inc.php.

◆ getCitationData()

DOIPubIdPlugin::getCitationData (   $hookname,
  $args 
)

Add DOI to citation data used by the CitationStyleLanguage plugin

See also
CitationStyleLanguagePlugin::getCitation()
Parameters
$hooknamestring
$argsarray
Returns
false

Definition at line 223 of file DOIPubIdPlugin.inc.php.

References PubIdPlugin\getPubId().

◆ getDAOFieldNames()

DOIPubIdPlugin::getDAOFieldNames ( )

Get additional field names to be considered for storage.

Returns
array

Reimplemented from PKPPubIdPlugin.

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

◆ getDescription()

DOIPubIdPlugin::getDescription ( )

Get a description of this plugin.

Returns
string

Reimplemented from Plugin.

Definition at line 54 of file DOIPubIdPlugin.inc.php.

◆ getDisplayName()

DOIPubIdPlugin::getDisplayName ( )

Get the display name for this plugin.

Returns
string

Reimplemented from Plugin.

Definition at line 47 of file DOIPubIdPlugin.inc.php.

◆ getFormFieldNames()

DOIPubIdPlugin::getFormFieldNames ( )

Get the additional form field names, for metadata, e.g. suffix field name.

Returns
array

Reimplemented from PKPPubIdPlugin.

Definition at line 122 of file DOIPubIdPlugin.inc.php.

◆ getLinkActions()

DOIPubIdPlugin::getLinkActions (   $pubObject)

Get the link actions used in the pub id forms, e.g. clear pub id.

Returns
array

Reimplemented from PKPPubIdPlugin.

Definition at line 150 of file DOIPubIdPlugin.inc.php.

References Plugin\$request, and PKPApplication\get().

◆ getNotUniqueErrorMsg()

DOIPubIdPlugin::getNotUniqueErrorMsg ( )

Is this object type enabled in plugin settings

Parameters
$pubObjectTypeobject
$contextIdinteger
Returns
boolean

Reimplemented from PKPPubIdPlugin.

Definition at line 201 of file DOIPubIdPlugin.inc.php.

Referenced by validatePublicationDoi().

◆ getPrefixFieldName()

DOIPubIdPlugin::getPrefixFieldName ( )

Get the the prefix form field name.

Returns
string

Reimplemented from PKPPubIdPlugin.

Definition at line 136 of file DOIPubIdPlugin.inc.php.

◆ getPubIdAssignFile()

DOIPubIdPlugin::getPubIdAssignFile ( )

Get the file (path + filename) for the pub id assignment to be included into other pages.

Returns
string

Reimplemented from PKPPubIdPlugin.

Definition at line 107 of file DOIPubIdPlugin.inc.php.

References Plugin\getTemplateResource().

◆ getPubIdDisplayType()

DOIPubIdPlugin::getPubIdDisplayType ( )

Public identifier type that will be displayed to the reader.

Returns
string

Reimplemented from PKPPubIdPlugin.

Definition at line 79 of file DOIPubIdPlugin.inc.php.

◆ getPubIdFullName()

DOIPubIdPlugin::getPubIdFullName ( )

Full name of the public identifier.

Returns
string

Reimplemented from PKPPubIdPlugin.

Definition at line 86 of file DOIPubIdPlugin.inc.php.

◆ getPubIdMetadataFile()

DOIPubIdPlugin::getPubIdMetadataFile ( )

Get the file (path + filename) to be included into the object's identifiers tab, e.g. for suffix editing.

Returns
string

Reimplemented from PKPPubIdPlugin.

Definition at line 100 of file DOIPubIdPlugin.inc.php.

References Plugin\getTemplateResource().

◆ getPubIdType()

DOIPubIdPlugin::getPubIdType ( )

Public identifier type, see http://dtd.nlm.nih.gov/publishing/tag-library/n-4zh0.html

Returns
string

Reimplemented from PKPPubIdPlugin.

Definition at line 72 of file DOIPubIdPlugin.inc.php.

◆ getResolvingURL()

DOIPubIdPlugin::getResolvingURL (   $contextId,
  $pubId 
)

Get the whole resolving URL.

Parameters
$contextIdinteger
$pubIdstring
Returns
string resolving URL

Reimplemented from PKPPubIdPlugin.

Definition at line 93 of file DOIPubIdPlugin.inc.php.

◆ getSuffixFieldName()

DOIPubIdPlugin::getSuffixFieldName ( )

Get the the suffix form field name.

Returns
string

Reimplemented from PKPPubIdPlugin.

Definition at line 143 of file DOIPubIdPlugin.inc.php.

◆ getSuffixPatternsFieldNames()

DOIPubIdPlugin::getSuffixPatternsFieldNames ( )

Get the suffix patterns form field names for all objects.

Returns
array (pub object type => suffix pattern field name)

Reimplemented from PKPPubIdPlugin.

Definition at line 177 of file DOIPubIdPlugin.inc.php.

◆ instantiateSettingsForm()

DOIPubIdPlugin::instantiateSettingsForm (   $contextId)

Get the settings form.

Parameters
$contextIdinteger
Returns
object Settings form

Reimplemented from PKPPubIdPlugin.

Definition at line 114 of file DOIPubIdPlugin.inc.php.

◆ isObjectTypeEnabled()

DOIPubIdPlugin::isObjectTypeEnabled (   $pubObjectType,
  $contextId 
)

Is this object type enabled in plugin settings

Parameters
$pubObjectTypeobject
$contextIdinteger
Returns
boolean

Reimplemented from PKPPubIdPlugin.

Definition at line 194 of file DOIPubIdPlugin.inc.php.

References Plugin\getSetting().

◆ modifyObjectProperties()

DOIPubIdPlugin::modifyObjectProperties (   $hookName,
  $args 
)

Add DOI to submission or galley properties

Parameters
$hookNamestring <Object>::getProperties::summaryProperties or <Object>::getProperties::fullProperties
$argsarray [ @option $props array Existing properties @option $object Submission|Galley @option $args array Request args ]
Returns
array

Definition at line 302 of file DOIPubIdPlugin.inc.php.

◆ modifyObjectPropertyValues()

DOIPubIdPlugin::modifyObjectPropertyValues (   $hookName,
  $args 
)

Add DOI submission or galley values

Parameters
$hookNamestring <Object>::getProperties::values
$argsarray [ @option $values array Key/value store of property values @option $object Submission|Galley @option $props array Requested properties @option $args array Request args ]
Returns
array

Definition at line 321 of file DOIPubIdPlugin.inc.php.

References PubIdPlugin\getPubId().

◆ register()

DOIPubIdPlugin::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 PKPPubIdPlugin.

Definition at line 23 of file DOIPubIdPlugin.inc.php.

References Plugin\getEnabled(), Config\getVar(), and HookRegistry\register().

◆ validatePubId()

DOIPubIdPlugin::validatePubId (   $pubId)

Check whether the given pubId is valid.

Parameters
$pubIdstring
Returns
boolean

Reimplemented from PKPPubIdPlugin.

Definition at line 208 of file DOIPubIdPlugin.inc.php.

◆ validatePublicationDoi()

DOIPubIdPlugin::validatePublicationDoi (   $hookName,
  $args 
)

Validate a publication's DOI against the plugin's settings

Parameters
$hookNamestring
$argsarray

Definition at line 258 of file DOIPubIdPlugin.inc.php.

References PKPPubIdPlugin\checkDuplicate(), PKPServices\get(), getNotUniqueErrorMsg(), and Plugin\getSetting().


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