Open Journal Systems  3.3.0
JournalOAI Class Reference
Inheritance diagram for JournalOAI:
OAI

Public Member Functions

 __construct ($config)
 
 articleIdToIdentifier ($articleId)
 
 getNonPathInfoParams ()
 
 identifierExists ($identifier)
 
 identifiers ($metadataPrefix, $from, $until, $set, $offset, $limit, &$total)
 
 identifierToArticleId ($identifier)
 
 record ($identifier)
 
 records ($metadataPrefix, $from, $until, $set, $offset, $limit, &$total)
 
 repositoryInfo ()
 
 resumptionToken ($tokenId)
 
 saveResumptionToken ($offset, $params)
 
 sets ($offset, $limit, &$total)
 
 setSpecToSectionId ($setSpec, $journalId=null)
 
 validIdentifier ($identifier)
 
- Public Member Functions inherited from OAI
 checkParams ($required=array(), $optional=array())
 
 error ($code, $message)
 
 execute ()
 
 extractDateParams ($params, &$from, &$until)
 
 formatMetadata ($format, $record)
 
 getParam ($name)
 
 getParams ()
 
 GetRecord ()
 
 Identify ()
 
 ListIdentifiers ()
 
 ListMetadataFormats ()
 
 ListRecords ()
 
 ListSets ()
 
 metadataFormats ($namesOnly=false, $identifier=null)
 
 paramExists ($name)
 
 response ($response, $printParams=true)
 
 setParams ($params)
 

Data Fields

 $dao
 
 $journal
 
 $journalId
 
 $site
 
- Data Fields inherited from OAI
 $config
 
 $params
 
 $protocolVersion = '2.0'
 

Detailed Description

OJS-specific OAI interface. Designed to support both a site-wide and journal-specific OAI interface (based on where the request is directed).

See also
OAIDAO

Definition at line 22 of file JournalOAI.inc.php.

Constructor & Destructor Documentation

◆ __construct()

JournalOAI::__construct (   $config)

Reimplemented from OAI.

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

References OAI\$config, PKPApplication\get(), and DAORegistry\getDAO().

Member Function Documentation

◆ articleIdToIdentifier()

JournalOAI::articleIdToIdentifier (   $articleId)

Convert article ID to OAI identifier.

Parameters
$articleIdint
Returns
string

Definition at line 75 of file JournalOAI.inc.php.

Referenced by repositoryInfo().

◆ getNonPathInfoParams()

JournalOAI::getNonPathInfoParams ( )

Return a list of ignorable GET parameters.

Returns
array

Reimplemented from OAI.

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

◆ identifierExists()

JournalOAI::identifierExists (   $identifier)

Check if identifier exists.

Parameters
$identifierstring
Returns
boolean

Reimplemented from OAI.

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

References identifierToArticleId().

◆ identifiers()

JournalOAI::identifiers (   $metadataPrefix,
  $from,
  $until,
  $set,
  $offset,
  $limit,
$total 
)

Return set of OAI identifiers.

See also
getRecords
Returns
array OAIIdentifier

Reimplemented from OAI.

Definition at line 198 of file JournalOAI.inc.php.

References $journalId, HookRegistry\call(), and setSpecToSectionId().

◆ identifierToArticleId()

JournalOAI::identifierToArticleId (   $identifier)

Convert OAI identifier to article ID.

Parameters
$identifierstring
Returns
int|false

Definition at line 84 of file JournalOAI.inc.php.

Referenced by identifierExists(), record(), and validIdentifier().

◆ record()

JournalOAI::record (   $identifier)

Return OAI record for specified identifier.

Parameters
$identifierstring
Returns
OAIRecord (or false, if identifier is invalid)

Reimplemented from OAI.

Definition at line 167 of file JournalOAI.inc.php.

References identifierToArticleId().

◆ records()

JournalOAI::records (   $metadataPrefix,
  $from,
  $until,
  $set,
  $offset,
  $limit,
$total 
)

Return set of OAI records.

Parameters
$metadataPrefixstring specified metadata prefix
$fromint minimum timestamp
$untilint maximum timestamp
$setstring specified set
$offsetint current record offset
$limitint maximum number of records to return
$totalint output parameter, set to total number of records
Returns
array OAIRecord

Reimplemented from OAI.

Definition at line 181 of file JournalOAI.inc.php.

References $journalId, HookRegistry\call(), and setSpecToSectionId().

◆ repositoryInfo()

JournalOAI::repositoryInfo ( )

Return information about the repository.

Returns
OAIRepository

Reimplemented from OAI.

Definition at line 121 of file JournalOAI.inc.php.

References articleIdToIdentifier(), and DAORegistry\getDAO().

◆ resumptionToken()

JournalOAI::resumptionToken (   $tokenId)

Retrieve a resumption token.

Parameters
$tokenIdstring
Returns
OAIResumptionToken|false

Reimplemented from OAI.

Definition at line 226 of file JournalOAI.inc.php.

◆ saveResumptionToken()

JournalOAI::saveResumptionToken (   $offset,
  $params 
)

Save a resumption token.

Parameters
$offsetint current offset
$paramsarray request parameters
Returns
OAIResumptionToken the saved token

Reimplemented from OAI.

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

References OAI\$params.

◆ sets()

JournalOAI::sets (   $offset,
  $limit,
$total 
)

Return set of OAI sets.

Parameters
$offsetint current set offset
$limitint Maximum number of sets to return
$totalint output parameter, set to total number of sets

Reimplemented from OAI.

Definition at line 215 of file JournalOAI.inc.php.

References HookRegistry\call().

◆ setSpecToSectionId()

JournalOAI::setSpecToSectionId (   $setSpec,
  $journalId = null 
)

Get the journal ID and section ID corresponding to a set specifier.

Returns
array

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

Referenced by identifiers(), and records().

◆ validIdentifier()

JournalOAI::validIdentifier (   $identifier)

Check if identifier is in the valid format.

Parameters
$identifierstring
Returns
boolean

Reimplemented from OAI.

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

References identifierToArticleId().

Field Documentation

◆ $dao

OAIDAO JournalOAI::$dao

DAO for retrieving OAI records/tokens from database

Definition at line 45 of file JournalOAI.inc.php.

◆ $journal

Journal JournalOAI::$journal

associated journal object

Definition at line 33 of file JournalOAI.inc.php.

◆ $journalId

int null JournalOAI::$journalId

Journal ID; null if no journal

Definition at line 39 of file JournalOAI.inc.php.

Referenced by identifiers(), and records().

◆ $site

Site JournalOAI::$site

associated site object

Definition at line 27 of file JournalOAI.inc.php.


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