Open Journal Systems  2.4.3
 All Classes Namespaces Functions Variables Groups Pages
O4DOIExportDom Class Reference
Inheritance diagram for O4DOIExportDom:
DOIExportDom

Public Member Functions

_contentItemElement (&$article, &$galley, $objectLocalePrecedence)
 
_contributorElement (&$author, $objectLocalePrecedence)
 
 _exportIssuesAsWork ()
 
_extentElement (&$file)
 
 _getDoi (&$object)
 
 _getObjectElementName ()
 
 _getObjectType ()
 
 _getSchema ()
 
 _getSchemaInfo ($infoType)
 
_headerElement ()
 
_idElement ($workOrProduct, $idType, $id)
 
 _isArticle ()
 
 _isWork ()
 
_journalIssueElement (&$issue, $journalLocalePrecedence)
 
_objectElement (&$object)
 
_otherTextElement ($locale, $description)
 
_publicationDateElement ($datePublished)
 
_publisherElement ($journalLocalePrecedence)
 
_relationElement ($workOrProduct, $relationCode, $ids)
 
_serialPublicationElement (&$issue, $journalLocalePrecedence)
 
_serialVersionElement ($issn, $productForm)
 
_serialWorkElement ($journalLocalePrecedence)
 
 _setSchemaInfo ($schema)
 
_subjectElement ($subjectSchemeId, $subjectHeadingOrCode, $subjectSchemeName=null)
 
_titleElement ($locale, $localizedTitle, $titleType)
 
generate (&$objects)
 
getCache ()
 
getJournal ()
 
 getNamespace ()
 
getRequest ()
 
 getRootElementName ()
 
 getXmlSchemaLocation ()
 
 O4DOIExportDom (&$request, &$plugin, $schema, &$journal, &$objectCache, $exportIssuesAs)
 
retrievePublicationObjects (&$object)
 
- Public Member Functions inherited from DOIExportDom
 _addError ($errorTranslationKey, $param=null)
 
createElementWithText ($name, $value, $attributes=array())
 
 DOIExportDom (&$request, &$plugin, &$journal, &$objectCache)
 
generate (&$objects)
 
getCache ()
 
getDoc ()
 
 getErrors ()
 
 getFileType ($articleFile)
 
getJournal ()
 
 getNamespace ()
 
 getObjectLocalePrecedence (&$article, &$galley)
 
 getPluginSetting ($settingName)
 
 getPrimaryTranslation ($localizedData, $localePrecedence)
 
 getProprietaryId (&$journal, $issue=null, $articleOrArticleFile=null, $articleFile=null)
 
 getPublisher ($localePrecedence)
 
getRequest ()
 
 getRootElementName ()
 
 getSubjectClass (&$article, $objectLocalePrecedence)
 
 getTestMode ()
 
 getTranslationsByPrecedence ($localizedData, $localePrecedence)
 
 getXmlSchemaLocation ()
 
retrieveArticlesByIssue (&$issue)
 
retrieveGalleysByArticle (&$article)
 
retrievePublicationObjects (&$object)
 
rootElement ()
 
 translateLanguageToLocale ($language)
 

Detailed Description

Onix for DOI (O4DOI) XML export format implementation.

Definition at line 87 of file O4DOIExportDom.inc.php.

Member Function Documentation

& O4DOIExportDom::_contentItemElement ( $article,
$galley,
  $objectLocalePrecedence 
)

Create a content item element.

Parameters
$articlePublishedArticle
$galleyArticleGalley|null This will only be set in case we're transmitting an article-as-manifestation.
$objectLocalePrecedencearray
Returns
XMLNode|DOMImplementation

Definition at line 939 of file O4DOIExportDom.inc.php.

References _contributorElement(), _extentElement(), _subjectElement(), _titleElement(), PKPLocale\get3LetterIsoFromLocale(), DOIExportDom\getDoc(), DOIExportDom\getPrimaryTranslation(), DOIExportDom\getSubjectClass(), and DOIExportDom\getTranslationsByPrecedence().

Referenced by _objectElement().

& O4DOIExportDom::_contributorElement ( $author,
  $objectLocalePrecedence 
)

Create a content item element.

Parameters
$authorAuthor
$objectLocalePrecedencearray
Returns
XMLNode|DOMImplementation

Definition at line 1017 of file O4DOIExportDom.inc.php.

References DOIExportDom\getDoc(), DOIExportDom\getPrimaryTranslation(), and String\html2text().

Referenced by _contentItemElement().

O4DOIExportDom::_exportIssuesAsWork ( )

Whether issues are exported as work.

Returns
boolean

Definition at line 188 of file O4DOIExportDom.inc.php.

Referenced by _journalIssueElement(), and _objectElement().

& O4DOIExportDom::_extentElement ( $file)

Create an extent element.

Parameters
$filePKPFile
Returns
XMLNode|DOMImplementation

Definition at line 903 of file O4DOIExportDom.inc.php.

References DOIExportDom\getDoc().

Referenced by _contentItemElement(), and _journalIssueElement().

O4DOIExportDom::_getDoi ( $object)

Retrieve the DOI of an object. The DOI will be patched if we are in test mode.

Parameters
$objectIssue|PublishedArticle|ArticleGalley
Returns
string

Definition at line 1142 of file O4DOIExportDom.inc.php.

References DOIExportDom\getTestMode(), and String\regexp_replace().

Referenced by _objectElement().

O4DOIExportDom::_getObjectElementName ( )

The DOM's payload element.

Returns
string

Definition at line 127 of file O4DOIExportDom.inc.php.

References _getSchemaInfo().

Referenced by _objectElement().

O4DOIExportDom::_getObjectType ( )

The OJS object type represented by this DOM

Returns
string

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

References _getSchemaInfo().

Referenced by _journalIssueElement(), and _objectElement().

O4DOIExportDom::_getSchema ( )

Get the schema that this DOM will generate.

Returns
string One of the O4DOI_* schema types.

Definition at line 99 of file O4DOIExportDom.inc.php.

Referenced by _objectElement(), and O4DOIExportDom().

O4DOIExportDom::_getSchemaInfo (   $infoType)

Internal schema-specific configuration.

Parameters
$infoTypestring
Returns
array

Definition at line 111 of file O4DOIExportDom.inc.php.

Referenced by _getObjectElementName(), _getObjectType(), _isArticle(), _isWork(), and getRootElementName().

& O4DOIExportDom::_headerElement ( )

Generate the O4DOI header element.

Returns
XMLNode|DOMImplementation

Definition at line 369 of file O4DOIExportDom.inc.php.

References PKPApplication\getApplication(), DOIExportDom\getDoc(), getJournal(), and DOIExportDom\getPluginSetting().

Referenced by generate().

& O4DOIExportDom::_idElement (   $workOrProduct,
  $idType,
  $id 
)

Create a work or product id element.

Parameters
$workOrProductstring "Work" or "Product"
$idTypestring One of the O4DOI_ID_TYPE_* constants
$idstring The ID.
Returns
XMLNode|DOMImplementation

Definition at line 651 of file O4DOIExportDom.inc.php.

References DOIExportDom\getDoc().

Referenced by _objectElement(), _relationElement(), and _serialVersionElement().

O4DOIExportDom::_isArticle ( )

Whether the DOM represents a serial article.

Returns
boolean

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

References _getSchemaInfo().

Referenced by _objectElement().

O4DOIExportDom::_isWork ( )

Whether the DOM represents an object-as-work.

Returns
boolean

Definition at line 135 of file O4DOIExportDom.inc.php.

References _getSchemaInfo().

Referenced by _objectElement(), and _serialPublicationElement().

& O4DOIExportDom::_journalIssueElement ( $issue,
  $journalLocalePrecedence 
)

Create the journal issue element.

Parameters
$issueIssue
$journalLocalePrecedencearray
Returns
XMLNode|DOMImplementation

Definition at line 811 of file O4DOIExportDom.inc.php.

References _exportIssuesAsWork(), _extentElement(), _getObjectType(), _publicationDateElement(), _titleElement(), DAORegistry\getDAO(), DOIExportDom\getDoc(), getJournal(), and DOIExportDom\getTranslationsByPrecedence().

Referenced by _objectElement().

& O4DOIExportDom::_otherTextElement (   $locale,
  $description 
)

Create a description text element.

Parameters
$localestring
$descriptionstring
Returns
XMLNode|DOMImplementation

Definition at line 1092 of file O4DOIExportDom.inc.php.

References DOIExportDom\createElementWithText(), PKPLocale\get3LetterIsoFromLocale(), and DOIExportDom\getDoc().

Referenced by _objectElement().

& O4DOIExportDom::_publicationDateElement (   $datePublished)

Create a publication date element.

Parameters
$datePublishedstring The publication timestamp.
Returns
XMLNode|DOMImplementation

Definition at line 925 of file O4DOIExportDom.inc.php.

References DOIExportDom\createElementWithText().

Referenced by _journalIssueElement(), and _objectElement().

& O4DOIExportDom::_publisherElement (   $journalLocalePrecedence)

Create a publisher element.

Parameters
$journalLocalePrecedencearray
Returns
XMLNode|DOMImplementation

Definition at line 754 of file O4DOIExportDom.inc.php.

References DOIExportDom\getDoc(), and DOIExportDom\getPublisher().

Referenced by _serialWorkElement().

& O4DOIExportDom::_relationElement (   $workOrProduct,
  $relationCode,
  $ids 
)

Create a description text element.

Parameters
$workOrProductstring
$relationCodestring One of the O4DOI_RELATION_* constants.
$idsarray
Returns
XMLNode|DOMImplementation

Definition at line 1122 of file O4DOIExportDom.inc.php.

References _idElement(), and DOIExportDom\getDoc().

Referenced by _objectElement().

& O4DOIExportDom::_serialPublicationElement ( $issue,
  $journalLocalePrecedence 
)

Generate O4DOI serial publication.

Parameters
$issueIssue
$journalLocalePrecedencearray
Returns
XMLNode|DOMImplementation

Definition at line 671 of file O4DOIExportDom.inc.php.

References _isWork(), _serialVersionElement(), _serialWorkElement(), DOIExportDom\getDoc(), and getJournal().

Referenced by _objectElement().

& O4DOIExportDom::_serialVersionElement (   $issn,
  $productForm 
)

Create a serial version element.

Parameters
$issnstring
$productFormOne of the O4DOI_PRODUCT_FORM_* constants
Returns
XMLNode|DOMImplementation

Definition at line 774 of file O4DOIExportDom.inc.php.

References _idElement(), DOIExportDom\getDoc(), getJournal(), and String\regexp_replace().

Referenced by _serialPublicationElement().

& O4DOIExportDom::_serialWorkElement (   $journalLocalePrecedence)

Generate O4DOI serial work.

Parameters
$journalLocalePrecedencearray
Returns
XMLNode|DOMImplementation

Definition at line 697 of file O4DOIExportDom.inc.php.

References _publisherElement(), _titleElement(), DOIExportDom\getDoc(), getJournal(), DOIExportDom\getPluginSetting(), and DOIExportDom\getTranslationsByPrecedence().

Referenced by _serialPublicationElement().

O4DOIExportDom::_setSchemaInfo (   $schema)

Return information about the given schema.

Parameters
$schemastring One of the O4DOI_* schema constants.
Returns
array An array with schema information.

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

Referenced by O4DOIExportDom().

& O4DOIExportDom::_subjectElement (   $subjectSchemeId,
  $subjectHeadingOrCode,
  $subjectSchemeName = null 
)

Create a subject element.

Parameters
$subjectSchemeIdstring One of the O4DOI_SUBJECT_SCHEME_* constants.
$subjectHeadingOrCodestring The subject.
$subjectSchemeNamestring|null A subject scheme name.
Returns
XMLNode|DOMImplementation

Definition at line 1064 of file O4DOIExportDom.inc.php.

References DOIExportDom\getDoc().

Referenced by _contentItemElement().

& O4DOIExportDom::_titleElement (   $locale,
  $localizedTitle,
  $titleType 
)

Create a work or product id element.

Parameters
$localestring e.g. 'en_US'
$localizedTitlestring
$titleTypestring One of the O4DOI_TITLE_TYPE_* constants.
Returns
XMLNode|DOMImplementation

Definition at line 727 of file O4DOIExportDom.inc.php.

References PKPLocale\get3LetterIsoFromLocale(), DOIExportDom\getDoc(), and String\html2text().

Referenced by _contentItemElement(), _journalIssueElement(), and _serialWorkElement().

& O4DOIExportDom::generate ( $objects)
& O4DOIExportDom::getCache ( )

Get the object cache.

Returns
PubObjectCache

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

Referenced by retrievePublicationObjects().

& O4DOIExportDom::getJournal ( )

Get the journal (a.k.a. serial title) of this O4DOI message.

Returns
Journal

Definition at line 166 of file O4DOIExportDom.inc.php.

Referenced by _headerElement(), _journalIssueElement(), _objectElement(), _serialPublicationElement(), _serialVersionElement(), _serialWorkElement(), and retrievePublicationObjects().

O4DOIExportDom::getNamespace ( )
See Also
DOIExportDom::getNamespace()

Definition at line 257 of file O4DOIExportDom.inc.php.

& O4DOIExportDom::getRequest ( )

Get the current request.

Returns
Request

Definition at line 154 of file O4DOIExportDom.inc.php.

Referenced by _objectElement().

O4DOIExportDom::getRootElementName ( )
See Also
DOIExportDom::getRootElementName()

Definition at line 250 of file O4DOIExportDom.inc.php.

References _getSchemaInfo().

O4DOIExportDom::getXmlSchemaLocation ( )
O4DOIExportDom::O4DOIExportDom ( $request,
$plugin,
  $schema,
$journal,
$objectCache,
  $exportIssuesAs 
)

Constructor

Parameters
$requestRequest
$pluginDOIExportPlugin
$schemastring One of the O4DOI_* schema constants.
$journalJournal
$objectCachePubObjectCache
$exportIssuesAsWhether issues are exported as work or as manifestation. One of the O4DOI_* schema constants.

Definition at line 206 of file O4DOIExportDom.inc.php.

References _getSchema(), and _setSchemaInfo().

& O4DOIExportDom::retrievePublicationObjects ( $object)

Retrieve all the OJS publication objects containing the data required to generate the given O4DOI schema.

Parameters
$objectIssue|PublishedArticle|ArticleGalley The object to export.
Returns
array An array with the required OJS objects.

Definition at line 280 of file O4DOIExportDom.inc.php.

References getCache(), getJournal(), DOIExportDom\retrieveArticlesByIssue(), and DOIExportDom\retrieveGalleysByArticle().

Referenced by _objectElement().


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