Open Journal Systems  3.3.0
PKPOAIDAO Class Reference
Inheritance diagram for PKPOAIDAO:
DAO OAIDAO DRIVERDAO

Public Member Functions

 _doCommonOAIFromRowOperations ($record, $row)
 
 _getRecordsRecordSet ($setIds, $from, $until, $set, $submissionId=null, $orderBy='journal_id, submission_id')
 
 _returnIdentifierFromRow ($row)
 
 _returnRecordFromRow ($row)
 
 clearTokens ()
 
 getEarliestDatestamp ($setIds=array())
 
 getIdentifiers ($setIds, $from, $until, $set, $offset, $limit, &$total)
 
 getRecord ($dataObjectId, $setIds=array())
 
 getRecords ($setIds, $from, $until, $set, $offset, $limit, &$total)
 
 getToken ($tokenId)
 
 insertToken ($token)
 
 recordExists ($dataObjectId, $setIds=array())
 
 setOAI ($oai)
 
- Public Member Functions inherited from DAO
 __construct ($dataSource=null, $callHooks=true)
 
 concat ()
 
 convertFromDB ($value, $type)
 
 convertToDB ($value, &$type)
 
 dateFromDB ($d)
 
 datetimeFromDB ($dt)
 
 datetimeToDB ($dt)
 
 dateToDB ($d)
 
 flushCache ()
 
 formatDateToDB ($date, $defaultNumWeeks=null, $acceptPastDate=true)
 
 getAdditionalFieldNames ()
 
 getAffectedRows ()
 
 getDataObjectSettings ($tableName, $idFieldName, $idFieldValue, $dataObject)
 
 getDataSource ()
 
 getDirectionMapping ($direction)
 
 getDriver ()
 
 getLocaleFieldNames ()
 
 getType ($value)
 
 handleError ($dataSource, $sql)
 
 nullOrInt ($value)
 
 replace ($table, $arrFields, $keyCols)
 
retrieve ($sql, $params=false, $callHooks=true)
 
retrieveCached ($sql, $params=false, $secsToCache=3600, $callHooks=true)
 
retrieveLimit ($sql, $params=false, $numRows=false, $offset=false, $callHooks=true)
 
retrieveRange ($sql, $params=false, $dbResultRange=null, $callHooks=true)
 
 setCacheDir ()
 
 setDataSource ($dataSource)
 
 update ($sql, $params=false, $callHooks=true, $dieOnError=true)
 
 updateDataObjectSettings ($tableName, $dataObject, $idArray)
 

Data Fields

 $oai
 
- Data Fields inherited from DAO
 $_dataSource
 

Additional Inherited Members

- Static Public Member Functions inherited from DAO
static getDataChangedEvent ($elementId=null, $parentElementId=null, $content='')
 
- Protected Member Functions inherited from DAO
 _getInsertId ($table='', $id='')
 

Detailed Description

Base class for DAO operations for the OAI interface.

See also
OAI

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

Member Function Documentation

◆ _doCommonOAIFromRowOperations()

PKPOAIDAO::_doCommonOAIFromRowOperations (   $record,
  $row 
)

Common operations for OAIRecord and OAIIdentifier object data set.

Parameters
$recordOAIRecord/OAIIdentifier
$rowarray
Returns
OAIRecord/OAIIdentifier

Definition at line 244 of file PKPOAIDAO.inc.php.

References DAO\datetimeFromDB(), and OAIUtils\UTCDate().

Referenced by _returnIdentifierFromRow(), and _returnRecordFromRow().

◆ _getRecordsRecordSet()

PKPOAIDAO::_getRecordsRecordSet (   $setIds,
  $from,
  $until,
  $set,
  $submissionId = null,
  $orderBy = 'journal_id,
submission_id'   
)
abstract

Get a OAI records record set.

Parameters
$setIdsarray Objects ids that specify an OAI set, in hierarchical order.
$fromint/string *nix timestamp or ISO datetime string
$untilint/string *nix timestamp or ISO datetime string
$setstring
$submissionIdint optional
$orderBystring UNFILTERED
Returns
ADORecordSet

Reimplemented in OAIDAO.

Referenced by getEarliestDatestamp(), getIdentifiers(), getRecord(), and getRecords().

◆ _returnIdentifierFromRow()

PKPOAIDAO::_returnIdentifierFromRow (   $row)

Return OAIIdentifier object from database row.

Parameters
$rowarray
Returns
OAIIdentifier

Definition at line 229 of file PKPOAIDAO.inc.php.

References _doCommonOAIFromRowOperations(), and HookRegistry\call().

Referenced by getIdentifiers().

◆ _returnRecordFromRow()

PKPOAIDAO::_returnRecordFromRow (   $row)

Return OAIRecord object from database row.

Parameters
$rowarray
Returns
OAIRecord

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

References _doCommonOAIFromRowOperations(), and HookRegistry\call().

Referenced by DRIVERDAO\getDRIVERRecordsOrIdentifiers(), getEarliestDatestamp(), getRecord(), and getRecords().

◆ clearTokens()

PKPOAIDAO::clearTokens ( )

Clear stale resumption tokens.

Definition at line 42 of file PKPOAIDAO.inc.php.

References DAO\update().

◆ getEarliestDatestamp()

PKPOAIDAO::getEarliestDatestamp (   $setIds = array())

Return the *nix timestamp of the earliest published submission.

Parameters
$setIdsarray optional Objects ids that specify an OAI set, in hierarchical order. If empty, all records from all sets will be included.
Returns
int

Definition at line 193 of file PKPOAIDAO.inc.php.

References _getRecordsRecordSet(), _returnRecordFromRow(), and OAIUtils\UTCtoTimestamp().

◆ getIdentifiers()

PKPOAIDAO::getIdentifiers (   $setIds,
  $from,
  $until,
  $set,
  $offset,
  $limit,
$total 
)

Return set of OAI identifiers matching specified parameters.

Parameters
$setIdsarray Objects ids that specify an OAI set, in hierarchical order. The returned records will be part of this set.
$fromint timestamp
$untilint timestamp
$setstring setSpec
$offsetint
$limitint
$totalint
Returns
array OAIIdentifier

Definition at line 171 of file PKPOAIDAO.inc.php.

References _getRecordsRecordSet(), and _returnIdentifierFromRow().

◆ getRecord()

PKPOAIDAO::getRecord (   $dataObjectId,
  $setIds = array() 
)

Return OAI record for specified data object.

Parameters
$dataObjectIdint
$setIdsarray optional Objects ids that specify an OAI set, in hierarchical order. If passed, will check for the data object id only inside the specified set.
Returns
OAIRecord

Definition at line 120 of file PKPOAIDAO.inc.php.

References _getRecordsRecordSet(), and _returnRecordFromRow().

Referenced by recordExists().

◆ getRecords()

PKPOAIDAO::getRecords (   $setIds,
  $from,
  $until,
  $set,
  $offset,
  $limit,
$total 
)

Return set of OAI records matching specified parameters.

Parameters
$setIdsarray Objects ids that specify an OAI set, in hierarchical order. The returned records will be part of this set.
$fromint timestamp
$untilint timestamp
$setstring setSpec
$offsetint
$limitint
$totalint
Returns
array OAIRecord

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

References _getRecordsRecordSet(), and _returnRecordFromRow().

◆ getToken()

PKPOAIDAO::getToken (   $tokenId)

Retrieve a resumption token.

Parameters
$tokenIdstring OAI resumption token
Returns
OAIResumptionToken

Definition at line 53 of file PKPOAIDAO.inc.php.

References DAO\retrieve().

◆ insertToken()

PKPOAIDAO::insertToken (   $token)

Insert an OAI resumption token, generating a new ID.

Parameters
$tokenOAIResumptionToken
Returns
OAIResumptionToken

Definition at line 76 of file PKPOAIDAO.inc.php.

References DAO\retrieve(), and DAO\update().

◆ recordExists()

PKPOAIDAO::recordExists (   $dataObjectId,
  $setIds = array() 
)

Check if a data object ID specifies a data object.

Parameters
$dataObjectIdint
$setIdsarray optional Objects ids that specify an OAI set, in hierarchical order. If passed, will check for the data object id only inside the specified set.
Returns
boolean

Definition at line 108 of file PKPOAIDAO.inc.php.

References getRecord().

◆ setOAI()

PKPOAIDAO::setOAI (   $oai)

Set parent OAI object.

Parameters
JournalOAI

Reimplemented in DRIVERDAO.

Definition at line 32 of file PKPOAIDAO.inc.php.

References $oai.

Field Documentation

◆ $oai

OAI PKPOAIDAO::$oai

parent OAI object

Definition at line 25 of file PKPOAIDAO.inc.php.

Referenced by DRIVERDAO\setOAI(), and setOAI().


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