Open Journal Systems  3.3.0
URNPubIdPlugin Class Reference
Inheritance diagram for URNPubIdPlugin:
PubIdPlugin PKPPubIdPlugin LazyLoadPlugin Plugin

Public Member Functions

 _calculateCheckNo ($urn)
 
 addJavaScript ($request, $templateMgr)
 
 addPublicationFormFields ($hookName, $form)
 
 addPublishFormNotice ($hookName, $form)
 
 constructPubId ($pubIdPrefix, $pubIdSuffix, $contextId)
 
 getAssignFormFieldName ()
 
 getDAOFieldNames ()
 
 getDescription ()
 
 getDisplayName ()
 
 getFormFieldNames ()
 
 getLinkActions ($pubObject)
 
 getNotUniqueErrorMsg ()
 
 getPrefixFieldName ()
 
 getPubIdAssignFile ()
 
 getPubIdDisplayType ()
 
 getPubIdFullName ()
 
 getPubIdMetadataFile ()
 
 getPubIdType ()
 
 getResolvingURL ($contextId, $pubId)
 
 getSuffixFieldName ()
 
 getSuffixPatternsFieldNames ()
 
 instantiateSettingsForm ($contextId)
 
 isObjectTypeEnabled ($pubObjectType, $contextId)
 
 loadUrnFieldComponent ($hookName, $args)
 
 modifyObjectProperties ($hookName, $args)
 
 modifyObjectPropertyValues ($hookName, $args)
 
 register ($category, $path, $mainContextId=null)
 
 validatePublicationUrn ($hookName, $args)
 
- Public Member Functions inherited from PubIdPlugin
 checkDuplicate ($pubId, $pubObjectType, $excludeId, $contextId)
 
 clearIssueObjectsPubIds ($issue)
 
 getDAOs ()
 
 getPubId ($pubObject)
 
 getPubObjectTypes ()
 
 manage ($args, $request)
 
- Public Member Functions inherited from PKPPubIdPlugin
 addToSchema ($hookName, $params)
 
 canBeAssigned ($pubObject)
 
 getActions ($request, $actionArgs)
 
 getAdditionalFieldNames ($hookName, $params)
 
 getContext ($contextId)
 
 getFileDAODelegates ()
 
 getPubObjectType ($pubObject)
 
 setStoredPubId (&$pubObject, $pubId)
 
 validatePubId ($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

URN plugin class.

Definition at line 19 of file URNPubIdPlugin.inc.php.

Member Function Documentation

◆ _calculateCheckNo()

URNPubIdPlugin::_calculateCheckNo (   $urn)

Get the last, check number. Algorithm (s. http://www.persistent-identifier.de/?link=316): every URN character is replaced with a number according to the conversion table, every number is multiplied by it's position/index (beginning with 1), the numbers' sum is calculated, the sum is divided by the last number, the last number of the quotient before the decimal point is the check number.

Definition at line 537 of file URNPubIdPlugin.inc.php.

References strtolower_codesafe().

Referenced by constructPubId().

◆ addJavaScript()

URNPubIdPlugin::addJavaScript (   $request,
  $templateMgr 
)

Add JavaScript files to be loaded in the metadata file.

Parameters
$requestPKPRequest
$templateMgrPKPTemplateManager

Reimplemented from PKPPubIdPlugin.

Definition at line 119 of file URNPubIdPlugin.inc.php.

References Plugin\$request.

Referenced by addPublicationFormFields().

◆ addPublicationFormFields()

URNPubIdPlugin::addPublicationFormFields (   $hookName,
  $form 
)

Add URN fields to the publication identifiers form

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

Definition at line 345 of file URNPubIdPlugin.inc.php.

References addJavaScript(), PKPServices\get(), PKPApplication\get(), PKPTemplateManager\getManager(), Plugin\getRequest(), and Plugin\getSetting().

◆ addPublishFormNotice()

URNPubIdPlugin::addPublishFormNotice (   $hookName,
  $form 
)

Show URN during final publish step

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

Definition at line 419 of file URNPubIdPlugin.inc.php.

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

◆ constructPubId()

URNPubIdPlugin::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 69 of file URNPubIdPlugin.inc.php.

References _calculateCheckNo(), Plugin\getSetting(), and getSuffixFieldName().

◆ getAssignFormFieldName()

URNPubIdPlugin::getAssignFormFieldName ( )

Get the assign option form field name.

Returns
string

Reimplemented from PKPPubIdPlugin.

Definition at line 155 of file URNPubIdPlugin.inc.php.

◆ getDAOFieldNames()

URNPubIdPlugin::getDAOFieldNames ( )

Get additional field names to be considered for storage.

Returns
array

Reimplemented from PKPPubIdPlugin.

Definition at line 231 of file URNPubIdPlugin.inc.php.

◆ getDescription()

URNPubIdPlugin::getDescription ( )

Get a description of this plugin.

Returns
string

Reimplemented from Plugin.

Definition at line 58 of file URNPubIdPlugin.inc.php.

◆ getDisplayName()

URNPubIdPlugin::getDisplayName ( )

Get the display name for this plugin.

Returns
string

Reimplemented from Plugin.

Definition at line 51 of file URNPubIdPlugin.inc.php.

◆ getFormFieldNames()

URNPubIdPlugin::getFormFieldNames ( )

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

Returns
array

Reimplemented from PKPPubIdPlugin.

Definition at line 148 of file URNPubIdPlugin.inc.php.

◆ getLinkActions()

URNPubIdPlugin::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 176 of file URNPubIdPlugin.inc.php.

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

◆ getNotUniqueErrorMsg()

URNPubIdPlugin::getNotUniqueErrorMsg ( )

Is this object type enabled in plugin settings

Parameters
$pubObjectTypeobject
$contextIdinteger
Returns
boolean

Reimplemented from PKPPubIdPlugin.

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

Referenced by validatePublicationUrn().

◆ getPrefixFieldName()

URNPubIdPlugin::getPrefixFieldName ( )

Get the the prefix form field name.

Returns
string

Reimplemented from PKPPubIdPlugin.

Definition at line 162 of file URNPubIdPlugin.inc.php.

◆ getPubIdAssignFile()

URNPubIdPlugin::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 133 of file URNPubIdPlugin.inc.php.

References Plugin\getTemplateResource().

◆ getPubIdDisplayType()

URNPubIdPlugin::getPubIdDisplayType ( )

Public identifier type that will be displayed to the reader.

Returns
string

Reimplemented from PKPPubIdPlugin.

Definition at line 90 of file URNPubIdPlugin.inc.php.

◆ getPubIdFullName()

URNPubIdPlugin::getPubIdFullName ( )

Full name of the public identifier.

Returns
string

Reimplemented from PKPPubIdPlugin.

Definition at line 97 of file URNPubIdPlugin.inc.php.

◆ getPubIdMetadataFile()

URNPubIdPlugin::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 112 of file URNPubIdPlugin.inc.php.

References Plugin\getTemplateResource().

◆ getPubIdType()

URNPubIdPlugin::getPubIdType ( )

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

Returns
string

Reimplemented from PKPPubIdPlugin.

Definition at line 83 of file URNPubIdPlugin.inc.php.

◆ getResolvingURL()

URNPubIdPlugin::getResolvingURL (   $contextId,
  $pubId 
)

Get the whole resolving URL.

Parameters
$contextIdinteger
$pubIdstring
Returns
string resolving URL

Reimplemented from PKPPubIdPlugin.

Definition at line 104 of file URNPubIdPlugin.inc.php.

References Plugin\getSetting().

◆ getSuffixFieldName()

URNPubIdPlugin::getSuffixFieldName ( )

Get the the suffix form field name.

Returns
string

Reimplemented from PKPPubIdPlugin.

Definition at line 169 of file URNPubIdPlugin.inc.php.

Referenced by constructPubId().

◆ getSuffixPatternsFieldNames()

URNPubIdPlugin::getSuffixPatternsFieldNames ( )

Reimplemented from PKPPubIdPlugin.

Definition at line 220 of file URNPubIdPlugin.inc.php.

◆ instantiateSettingsForm()

URNPubIdPlugin::instantiateSettingsForm (   $contextId)

Get the settings form.

Parameters
$contextIdinteger
Returns
object Settings form

Reimplemented from PKPPubIdPlugin.

Definition at line 140 of file URNPubIdPlugin.inc.php.

◆ isObjectTypeEnabled()

URNPubIdPlugin::isObjectTypeEnabled (   $pubObjectType,
  $contextId 
)

Is this object type enabled in plugin settings

Parameters
$pubObjectTypeobject
$contextIdinteger
Returns
boolean

Reimplemented from PKPPubIdPlugin.

Definition at line 238 of file URNPubIdPlugin.inc.php.

References Plugin\getSetting().

◆ loadUrnFieldComponent()

URNPubIdPlugin::loadUrnFieldComponent (   $hookName,
  $args 
)

Load the FieldUrn Vue.js component into Vue.js

Parameters
string$hookName
array$args

Definition at line 488 of file URNPubIdPlugin.inc.php.

References PKPApplication\get(), Plugin\getPluginPath(), and Plugin\getRequest().

◆ modifyObjectProperties()

URNPubIdPlugin::modifyObjectProperties (   $hookName,
  $args 
)

Add URN to submission, issue or galley properties

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

Definition at line 262 of file URNPubIdPlugin.inc.php.

◆ modifyObjectPropertyValues()

URNPubIdPlugin::modifyObjectPropertyValues (   $hookName,
  $args 
)

Add URN submission, issue or galley values

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

Definition at line 281 of file URNPubIdPlugin.inc.php.

References PubIdPlugin\getPubId().

◆ register()

URNPubIdPlugin::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 24 of file URNPubIdPlugin.inc.php.

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

◆ validatePublicationUrn()

URNPubIdPlugin::validatePublicationUrn (   $hookName,
  $args 
)

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

Parameters
$hookNamestring
$argsarray

Definition at line 308 of file URNPubIdPlugin.inc.php.

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


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