Open Journal Systems  3.3.0
DataciteXmlFilter Class Reference
Inheritance diagram for DataciteXmlFilter:
NativeExportFilter NativeImportExportFilter PersistableFilter Filter DataObject

Public Member Functions

 __construct ($filterGroup)
 
 createAlternateIdentifiersNode ($doc, $issue, $article, $galley)
 
 createCreatorsNode ($doc, $issue, $publication, $galley, $galleyFile, $publisher, $objectLocalePrecedence)
 
 createDatesNode ($doc, $issue, $article, $publication, $galley, $galleyFile, $publicationDate)
 
 createDescriptionsNode ($doc, $issue, $article, $publication, $galley, $galleyFile, $objectLocalePrecedence)
 
 createRelatedIdentifiersNode ($doc, $issue, $article, $publication, $galley)
 
 createResourceTypeNode ($doc, $issue, $article, $galley, $galleyFile)
 
 createRootNode ($doc)
 
 createSizesNode ($doc, $issue, $article, $publication, $galley, $galleyFile)
 
 createTitlesNode ($doc, $issue, $publication, $galley, $galleyFile, $objectLocalePrecedence)
 
 getClassName ()
 
 getIssueInformation ($issue, $objectLocalePrecedence=null)
 
 getIssueToc ($issue, $objectLocalePrecedence)
 
 getObjectLocalePrecedence ($context, $article, $publication, $galley)
 
 getPrimaryTranslation ($localizedData, $localePrecedence)
 
 getTranslationsByPrecedence ($localizedData, $localePrecedence)
 
process (&$pubObject)
 
 translateLanguageToLocale ($language)
 
- Public Member Functions inherited from NativeExportFilter
 createLocalizedNodes ($doc, $parentNode, $name, $values)
 
 createOptionalNode ($doc, $parentNode, $name, $value)
 
 getNoValidation ()
 
 setNoValidation ($noValidation)
 
 setOpts ($opts)
 
 supports (&$input, &$output)
 
- Public Member Functions inherited from NativeImportExportFilter
 getDeployment ()
 
 setDeployment ($deployment)
 
- Public Member Functions inherited from PersistableFilter
 addSetting ($setting)
 
 getFilterGroup ()
 
 getInternalSettings ()
 
 getIsTemplate ()
 
 getLocalizedSettingNames ()
 
 getParentFilterId ()
 
 getSetting ($settingName)
 
 getSettingNames ()
 
getSettings ()
 
 hasSetting ($settingName)
 
 hasSettings ()
 
 setIsTemplate ($isTemplate)
 
 setParentFilterId ($parentFilterId)
 
- Public Member Functions inherited from Filter
 __construct ($inputType, $outputType)
 
 addError ($message)
 
 clearErrors ()
 
execute (&$input, $returnErrors=false)
 
 getDisplayName ()
 
 getErrors ()
 
getInputType ()
 
getLastInput ()
 
getLastOutput ()
 
getOutputType ()
 
getRuntimeEnvironment ()
 
 getSequence ()
 
 hasErrors ()
 
 isCompatibleWithRuntimeEnvironment ()
 
 setDisplayName ($displayName)
 
 setRuntimeEnvironment (&$runtimeEnvironment)
 
 setSequence ($seq)
 
 setTransformationType (&$inputType, &$outputType)
 
 supportsAsInput (&$input)
 
- Public Member Functions inherited from DataObject
 __construct ()
 
 addSupportedMetadataAdapter ($metadataAdapter)
 
 extractMetadata ($metadataSchema)
 
 getAdditionalMetadataFieldNames ()
 
getAllData ()
 
 getDAO ()
 
getData ($key, $locale=null)
 
 getHasLoadableAdapters ()
 
 getId ()
 
 getLocaleMetadataFieldNames ()
 
 getLocalizedData ($key, $preferredLocale=null)
 
 getMetadataFieldNames ($translated=true)
 
 getSetMetadataFieldNames ($translated=true)
 
 getSupportedExtractionAdapters ()
 
 getSupportedInjectionAdapters ()
 
 getSupportedMetadataSchemas ()
 
 hasData ($key, $locale=null)
 
 injectMetadata ($metadataDescription)
 
 removeSupportedMetadataAdapter ($metadataSchemaName)
 
 setAllData (&$data)
 
 setData ($key, $value, $locale=null)
 
 setHasLoadableAdapters ($hasLoadableAdapters)
 
 setId ($id)
 
 unsetData ($key, $locale=null)
 
 upcastTo ($targetObject)
 

Additional Inherited Members

- Static Public Member Functions inherited from PersistableFilter
static tempGroup ($inputType, $outputType)
 
- Static Public Member Functions inherited from Filter
static supportedRuntimeEnvironmentSettings ()
 
- Data Fields inherited from NativeExportFilter
 $_noValidation = null
 
 $opts = array()
 
- Data Fields inherited from NativeImportExportFilter
 $_deployment
 
- Data Fields inherited from PersistableFilter
 $_filterGroup
 
 $_settings = array()
 
- Data Fields inherited from Filter
 $_errors = array()
 
 $_input
 
 $_inputType
 
 $_output
 
 $_outputType
 
 $_runtimeEnvironment = false
 
- Data Fields inherited from DataObject
 $_data = array()
 
 $_extractionAdaptersLoaded = false
 
 $_hasLoadableAdapters = false
 
 $_injectionAdaptersLoaded = false
 
 $_metadataExtractionAdapters = array()
 
 $_metadataInjectionAdapters = array()
 

Detailed Description

Class that converts an Issue to a DataCite XML document.

Definition at line 50 of file DataciteXmlFilter.inc.php.

Constructor & Destructor Documentation

◆ __construct()

DataciteXmlFilter::__construct (   $filterGroup)

Constructor

Parameters
$filterGroupFilterGroup

Reimplemented from NativeExportFilter.

Definition at line 55 of file DataciteXmlFilter.inc.php.

References Filter\setDisplayName().

Member Function Documentation

◆ createAlternateIdentifiersNode()

DataciteXmlFilter::createAlternateIdentifiersNode (   $doc,
  $issue,
  $article,
  $galley 
)

Generate alternate identifiers node list.

Parameters
$docDOMDocument
$issueIssue
$articleSubmission
$galleyArticleGalley
Returns
DOMElement

Definition at line 451 of file DataciteXmlFilter.inc.php.

References NativeImportExportFilter\getDeployment().

Referenced by process().

◆ createCreatorsNode()

DataciteXmlFilter::createCreatorsNode (   $doc,
  $issue,
  $publication,
  $galley,
  $galleyFile,
  $publisher,
  $objectLocalePrecedence 
)

Create creators node.

Parameters
$docDOMDocument
$issueIssue
$publicationPublication
$galleyArticleGalley
$galleyFileSubmissionFile
$publisherstring
$objectLocalePrecedencearray
Returns
DOMElement

Definition at line 236 of file DataciteXmlFilter.inc.php.

References NativeImportExportFilter\getDeployment(), and getPrimaryTranslation().

Referenced by process().

◆ createDatesNode()

DataciteXmlFilter::createDatesNode (   $doc,
  $issue,
  $article,
  $publication,
  $galley,
  $galleyFile,
  $publicationDate 
)

Create a date node list.

Parameters
$docDOMDocument
$issueIssue
$articleSubmission
$publicationPublication
$galleyArticleGalley
$galleyFileSubmissionFile
$publicationDatestring
Returns
DOMElement

Definition at line 329 of file DataciteXmlFilter.inc.php.

References DAORegistry\getDAO(), and NativeImportExportFilter\getDeployment().

Referenced by process().

◆ createDescriptionsNode()

DataciteXmlFilter::createDescriptionsNode (   $doc,
  $issue,
  $article,
  $publication,
  $galley,
  $galleyFile,
  $objectLocalePrecedence 
)

Create descriptions node list.

Parameters
$docDOMDocument
$issueIssue
$articleSubmission
$publicationPublication
$galleyAlley
$galleyFileSubmissionFile
$objectLocalePrecedencearray
Returns
DOMElement|null Can be null if a size cannot be identified for the given object.

Definition at line 607 of file DataciteXmlFilter.inc.php.

References NativeImportExportFilter\getDeployment(), getIssueInformation(), getIssueToc(), getPrimaryTranslation(), and PKPString\html2text().

Referenced by process().

◆ createRelatedIdentifiersNode()

DataciteXmlFilter::createRelatedIdentifiersNode (   $doc,
  $issue,
  $article,
  $publication,
  $galley 
)

Generate related identifiers node list.

Parameters
$docDOMDocument
$issueIssue
$articleSubmission
$publicationPublication
$galleyArticleGalley
Returns
DOMElement|null

Definition at line 487 of file DataciteXmlFilter.inc.php.

References PKPServices\get(), and NativeImportExportFilter\getDeployment().

Referenced by process().

◆ createResourceTypeNode()

DataciteXmlFilter::createResourceTypeNode (   $doc,
  $issue,
  $article,
  $galley,
  $galleyFile 
)

Create a resource type node.

Parameters
$docDOMDocument
$issueIssue
$articleSubmission
$galleyArticleGalley
$galleyFileSubmissionFile
Returns
DOMElement

Definition at line 407 of file DataciteXmlFilter.inc.php.

References DAORegistry\getDAO(), and NativeImportExportFilter\getDeployment().

Referenced by process().

◆ createRootNode()

DataciteXmlFilter::createRootNode (   $doc)

Create and return the root node.

Parameters
$docDOMDocument
Returns
DOMElement

Definition at line 217 of file DataciteXmlFilter.inc.php.

References NativeImportExportFilter\getDeployment().

Referenced by process().

◆ createSizesNode()

DataciteXmlFilter::createSizesNode (   $doc,
  $issue,
  $article,
  $publication,
  $galley,
  $galleyFile 
)

Create a sizes node list.

Parameters
$docDOMDocument
$issueIssue
$articleSubmission
$publicationPublication
$galleyArticleGalley
$galleyFileSubmissionFile
Returns
DOMElement|null Can be null if a size cannot be identified for the given object.

Definition at line 555 of file DataciteXmlFilter.inc.php.

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

Referenced by process().

◆ createTitlesNode()

DataciteXmlFilter::createTitlesNode (   $doc,
  $issue,
  $publication,
  $galley,
  $galleyFile,
  $objectLocalePrecedence 
)

Create titles node.

Parameters
$docDOMDocument
$issueIssue
$publicationPublication
$galleyArticleGalley
$galleyFileSubmissionFile
$objectLocalePrecedencearray
Returns
DOMElement

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

References NativeImportExportFilter\getDeployment(), getIssueInformation(), getPrimaryTranslation(), getTranslationsByPrecedence(), and PKPString\html2text().

Referenced by process().

◆ getClassName()

DataciteXmlFilter::getClassName ( )

Return the fully qualified class name of the filter class. This information must be persisted when saving a filter so that the filter can later be reconstructed from the information in the database.

(This must be hard coded by sub-classes for PHP4 compatibility. PHP4 always returns class names lowercase which we cannot tolerate as we need this path to find the class on case sensitive file systems.)

Reimplemented from PersistableFilter.

Definition at line 66 of file DataciteXmlFilter.inc.php.

◆ getIssueInformation()

DataciteXmlFilter::getIssueInformation (   $issue,
  $objectLocalePrecedence = null 
)

Construct an issue title from the journal title and the issue identification.

Parameters
$issueIssue
$objectLocalePrecedencearray
Returns
array|string An array of localized issue titles or a string if a locale has been given.

Definition at line 768 of file DataciteXmlFilter.inc.php.

References NativeImportExportFilter\getDeployment(), and getPrimaryTranslation().

Referenced by createDescriptionsNode(), and createTitlesNode().

◆ getIssueToc()

DataciteXmlFilter::getIssueToc (   $issue,
  $objectLocalePrecedence 
)

Construct a table of content for an issue.

Parameters
$issueIssue
$objectLocalePrecedencearray
Returns
string

Definition at line 794 of file DataciteXmlFilter.inc.php.

References PKPServices\get(), and getPrimaryTranslation().

Referenced by createDescriptionsNode().

◆ getObjectLocalePrecedence()

DataciteXmlFilter::getObjectLocalePrecedence (   $context,
  $article,
  $publication,
  $galley 
)

Identify the locale precedence for this export.

Parameters
$contextContext
$articleSubmission
$publicationPublication
$galleyArticleGalley
Returns
array A list of valid PKP locales in descending order of priority.

Definition at line 657 of file DataciteXmlFilter.inc.php.

References PKPLocale\isLocaleValid().

Referenced by process().

◆ getPrimaryTranslation()

DataciteXmlFilter::getPrimaryTranslation (   $localizedData,
  $localePrecedence 
)

Identify the primary translation from an array of localized data.

Parameters
$localizedDataarray An array of localized data (key: locale, value: localized data).
$localePrecedencearray An array of locales by descending priority.
Returns
mixed|null The value of the primary locale or null if no primary translation could be found.

Definition at line 711 of file DataciteXmlFilter.inc.php.

Referenced by createCreatorsNode(), createDescriptionsNode(), createTitlesNode(), getIssueInformation(), getIssueToc(), and process().

◆ getTranslationsByPrecedence()

DataciteXmlFilter::getTranslationsByPrecedence (   $localizedData,
  $localePrecedence 
)

Re-order localized data by locale precedence.

Parameters
$localizedDataarray An array of localized data (key: locale, value: localized data).
$localePrecedencearray An array of locales by descending priority.
Returns
array Re-ordered localized data.

Definition at line 738 of file DataciteXmlFilter.inc.php.

Referenced by createTitlesNode().

◆ process()

◆ translateLanguageToLocale()

DataciteXmlFilter::translateLanguageToLocale (   $language)

Try to translate an ISO language code to an OJS locale.

Parameters
$languagestring 2- or 3-letter ISO language code
Returns
string|null An OJS locale or null if no matching locale could be found.

Definition at line 687 of file DataciteXmlFilter.inc.php.

References PKPLocale\get3LetterFrom2LetterIsoLanguage(), PKPLocale\getLocaleFrom3LetterIso(), and PKPLocale\isLocaleValid().


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