PHP Class O4DOIXmlFilter, ojs

Inheritance: extends NativeExportFilter
Afficher le fichier Open project: pkp/ojs Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( $filterGroup ) Constructor
createExtentNode ( $doc, $file ) : DOMElement Create an extent node.
createHeadNode ( $doc ) : DOMElement Create and return the head node.
createIdentifierNode ( $doc, $workOrProduct, $idType, $id ) : DOMElement Create a work or product id node.
createJournalIssueNode ( $doc, $issue, $journalLocalePrecedence ) : DOMElement Create the journal issue node.
createOtherTextNode ( $doc, $locale, $description ) : DOMElement Create a description text node.
createPublisherNode ( $doc, $journalLocalePrecedence ) : DOMElement Create a publisher node.
createRelatedNode ( $doc, $workOrProduct, $relationCode, $ids ) : DOMElement Create a related work or product node.
createRootNode ( $doc, $rootNodeName ) : DOMElement Create and return the root node.
createSerialPublicationNode ( $doc, $journalLocalePrecedence, $epubFormat = null ) : DOMElement Generate O4DOI serial publication node.
createSerialVersionNode ( $doc, $issn, $productForm, $epubFormat = null ) : DOMElement Create a serial version node.
createSerialWorkNode ( $doc, $journalLocalePrecedence ) : DOMElement Generate O4DOI serial work node.
createTitleNode ( $doc, $locale, $localizedTitle, $titleType ) : DOMElement Create a title node.
getDOIStructuralType ( ) : string Get DOIStructuralType
getObjectLocalePrecedence ( $context, $article, $galley ) : array Identify the locale precedence for this export.
getPrimaryTranslation ( $localizedData, $localePrecedence ) : mixed | null Identify the primary translation from an array of localized data.
getRootNodeName ( ) : string Get root node name
getTranslationsByPrecedence ( $localizedData, $localePrecedence ) : array Re-order localized data by locale precedence.
isWork ( $context, $plugin ) : boolean Get whether the object exported is considered as work
translateLanguageToLocale ( $language ) : string | null Try to translate an ISO language code to an OJS locale.

Method Details

__construct() public méthode

Constructor
public __construct ( $filterGroup )
$filterGroup FilterGroup

createExtentNode() public méthode

Create an extent node.
public createExtentNode ( $doc, $file ) : DOMElement
$doc DOMDocument
$file PKPFile
Résultat DOMElement

createHeadNode() public méthode

Create and return the head node.
public createHeadNode ( $doc ) : DOMElement
$doc DOMDocument
Résultat DOMElement

createIdentifierNode() public méthode

Create a work or product id node.
public createIdentifierNode ( $doc, $workOrProduct, $idType, $id ) : DOMElement
$doc DOMDocument
$workOrProduct string "Work" or "Product"
$idType string One of the O4DOI_ID_TYPE_* constants
$id string The ID.
Résultat DOMElement

createJournalIssueNode() public méthode

Create the journal issue node.
public createJournalIssueNode ( $doc, $issue, $journalLocalePrecedence ) : DOMElement
$doc DOMDocument
$issue Issue
$journalLocalePrecedence array
Résultat DOMElement

createOtherTextNode() public méthode

Create a description text node.
public createOtherTextNode ( $doc, $locale, $description ) : DOMElement
$doc DOMDocument
$locale string
$description string
Résultat DOMElement

createPublisherNode() public méthode

Create a publisher node.
public createPublisherNode ( $doc, $journalLocalePrecedence ) : DOMElement
$doc DOMDocument
$journalLocalePrecedence array
Résultat DOMElement

createRelatedNode() public méthode

Create a related work or product node.
public createRelatedNode ( $doc, $workOrProduct, $relationCode, $ids ) : DOMElement
$doc DOMDocument
$workOrProduct string
$relationCode string One of the O4DOI_RELATION_* constants.
$ids array
Résultat DOMElement

createRootNode() public méthode

Create and return the root node.
public createRootNode ( $doc, $rootNodeName ) : DOMElement
$doc DOMDocument
$rootNodeName string
Résultat DOMElement

createSerialPublicationNode() public méthode

Generate O4DOI serial publication node.
public createSerialPublicationNode ( $doc, $journalLocalePrecedence, $epubFormat = null ) : DOMElement
$doc DOMDocument
$journalLocalePrecedence array
$epubFormat O4DOI_EPUB_FORMAT_*
Résultat DOMElement

createSerialVersionNode() public méthode

Create a serial version node.
public createSerialVersionNode ( $doc, $issn, $productForm, $epubFormat = null ) : DOMElement
$doc DOMDocument
$issn string
$productForm One of the O4DOI_PRODUCT_FORM_* constants
$epubFormat O4DOI_EPUB_FORMAT_*
Résultat DOMElement

createSerialWorkNode() public méthode

Generate O4DOI serial work node.
public createSerialWorkNode ( $doc, $journalLocalePrecedence ) : DOMElement
$doc DOMDocument
$journalLocalePrecedence array
Résultat DOMElement

createTitleNode() public méthode

Create a title node.
public createTitleNode ( $doc, $locale, $localizedTitle, $titleType ) : DOMElement
$doc DOMDocument
$locale string e.g. 'en_US'
$localizedTitle string
$titleType string One of the O4DOI_TITLE_TYPE_* constants.
Résultat DOMElement

getDOIStructuralType() public méthode

Get DOIStructuralType
public getDOIStructuralType ( ) : string
Résultat string

getObjectLocalePrecedence() public méthode

Identify the locale precedence for this export.
public getObjectLocalePrecedence ( $context, $article, $galley ) : array
$context Context
$article PublishedArticle
$galley ArticleGalley
Résultat array A list of valid PKP locales in descending order of priority.

getPrimaryTranslation() public méthode

Identify the primary translation from an array of localized data.
public getPrimaryTranslation ( $localizedData, $localePrecedence ) : mixed | null
$localizedData array An array of localized data (key: locale, value: localized data).
$localePrecedence array An array of locales by descending priority.
Résultat mixed | null The value of the primary locale or null if no primary translation could be found.

getRootNodeName() public méthode

Get root node name
public getRootNodeName ( ) : string
Résultat string

getTranslationsByPrecedence() public méthode

Re-order localized data by locale precedence.
public getTranslationsByPrecedence ( $localizedData, $localePrecedence ) : array
$localizedData array An array of localized data (key: locale, value: localized data).
$localePrecedence array An array of locales by descending priority.
Résultat array Re-ordered localized data.

isWork() public méthode

Get whether the object exported is considered as work
public isWork ( $context, $plugin ) : boolean
$context Context
$plugin DOIPubIdExportPlugin
Résultat boolean

translateLanguageToLocale() public méthode

Try to translate an ISO language code to an OJS locale.
public translateLanguageToLocale ( $language ) : string | null
$language string 2- or 3-letter ISO language code
Résultat string | null An OJS locale or null if no matching locale could be found.