Open Journal Systems  2.4.4
 All Classes Namespaces Functions Variables Groups Pages
PKPOAIDAO Class Reference
Inheritance diagram for PKPOAIDAO:
DAO OAIDAO DRIVERDAO OpenAIREDAO

Public Member Functions

_doCommonOAIFromRowOperations (&$record, &$row)
 
_getRecordsRecordSet ($setIds, $from, $until, $set)
 
_returnIdentifierFromRow (&$row)
 
_returnRecordFromRow (&$row)
 
 clearTokens ()
 
 getAccessibleRecordWhereClause ()
 
 getDateRangeWhereClause ($from, $until)
 
 getEarliestDatestamp ($selectStatement, $setIds=array())
 
getIdentifiers ($setIds, $from, $until, $set, $offset, $limit, &$total)
 
 getOrderedRecordParams ($dataObjectId=null, $setIds=array(), $set=null)
 
getRecord ($dataObjectId, $setIds=array())
 
 getRecordJoinClause ($dataObjectId=null, $setIds=array(), $set=null)
 
getRecords ($setIds, $from, $until, $set, $offset, $limit, &$total)
 
 getRecordSelectStatement ()
 
getToken ($tokenId)
 
insertToken (&$token)
 
 PKPOAIDAO ()
 
 recordExists ($dataObjectId, $setIds=array())
 
 setOAI (&$oai)
 
setOAIData ($record, &$row, $isRecord)
 
- Public Member Functions inherited from DAO
 concat ()
 
 convertFromDB ($value, $type)
 
 convertToDB ($value, &$type)
 
 DAO ($dataSource=null, $callHooks=true)
 
 dateFromDB ($d)
 
 datetimeFromDB ($dt)
 
 datetimeToDB ($dt)
 
 dateToDB ($d)
 
 flushCache ()
 
 formatDateToDB ($date, $defaultNumWeeks=null, $acceptPastDate=true)
 
 getAffectedRows ()
 
 getDataChangedEvent ($elementId=null, $parentElementId=null)
 
getDataSource ()
 
 getDirectionMapping ($direction)
 
 getDriver ()
 
 getInsertId ($table= '', $id= '', $callHooks=true)
 
 getType ($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)
 

Additional Inherited Members

- Public Attributes inherited from DAO
 $_dataSource
 

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

& PKPOAIDAO::_doCommonOAIFromRowOperations ( $record,
$row 
)

Common operations for OAIRecord and OAIIdentifier object data set.

Parameters
$recordOAIRecord/OAIIdentifier
$rowarray
Returns
OAIRecord/OAIIdentifier

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

References DAO\datetimeFromDB(), and setOAIData().

Referenced by _returnIdentifierFromRow(), and _returnRecordFromRow().

& PKPOAIDAO::_getRecordsRecordSet (   $setIds,
  $from,
  $until,
  $set 
)

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
Returns
ADORecordSet

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

References getAccessibleRecordWhereClause(), getDateRangeWhereClause(), getOrderedRecordParams(), getRecordJoinClause(), getRecordSelectStatement(), and DAO\retrieve().

Referenced by DRIVERDAO\getDRIVERRecordsOrIdentifiers(), getIdentifiers(), OpenAIREDAO\getOpenAIRERecordsOrIdentifiers(), and getRecords().

& PKPOAIDAO::_returnIdentifierFromRow ( $row)

Return OAIIdentifier object from database row.

Parameters
$rowarray
Returns
OAIIdentifier

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

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

Referenced by getIdentifiers().

& PKPOAIDAO::_returnRecordFromRow ( $row)

Return OAIRecord object from database row.

Parameters
$rowarray
Returns
OAIRecord

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

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

Referenced by getRecord(), and getRecords().

PKPOAIDAO::clearTokens ( )

Clear stale resumption tokens.

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

References DAO\update().

PKPOAIDAO::getAccessibleRecordWhereClause ( )

Return the string defining the WHERE part of an sql that will filter only accessible OAI records.

Must be implemented by subclasses.

Returns
string

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

Referenced by _getRecordsRecordSet(), getEarliestDatestamp(), getRecord(), and recordExists().

PKPOAIDAO::getDateRangeWhereClause (   $from,
  $until 
)

Return the string defining the WHERE part of an sql that will filter records in an specific date range.

Must be implemented by subclasses.

Parameters
$fromint/string *nix timestamp or ISO datetime string
$untilint/string *nix timestamp or ISO datetime string
Returns
string

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

Referenced by _getRecordsRecordSet().

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

Return the *nix timestamp of the earliest published submission.

Parameters
$selectStatementstring
$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 51 of file PKPOAIDAO.inc.php.

References DAO\datetimeFromDB(), getAccessibleRecordWhereClause(), getOrderedRecordParams(), getRecordJoinClause(), and DAO\retrieve().

& 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 177 of file PKPOAIDAO.inc.php.

References _getRecordsRecordSet(), and _returnIdentifierFromRow().

PKPOAIDAO::getOrderedRecordParams (   $dataObjectId = null,
  $setIds = array(),
  $set = null 
)

Get an array with the parameters in the correct order to be used by the get record join sql. If you need a different order, override this method.

Parameters
$dataObjectIdint
$setIdsarray Objects ids that specify an OAI set, in hierarchical order.
$setString
Returns
array

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

Referenced by _getRecordsRecordSet(), getEarliestDatestamp(), getRecord(), and recordExists().

& 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 109 of file PKPOAIDAO.inc.php.

References _returnRecordFromRow(), getAccessibleRecordWhereClause(), getOrderedRecordParams(), getRecordJoinClause(), getRecordSelectStatement(), and DAO\retrieve().

PKPOAIDAO::getRecordJoinClause (   $dataObjectId = null,
  $setIds = array(),
  $set = null 
)

Return the string defining the JOIN part of an sql that will join all necessary tables to make available all fields selected on the getRecordSelectStatement().

Must be implemented by subclasses.

Parameters
$dataObjectIdint
$setIdsarray Objects ids that specify an OAI set, in hierarchical order.
$setstring
Returns
string

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

Referenced by _getRecordsRecordSet(), getEarliestDatestamp(), getRecord(), and recordExists().

& 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 144 of file PKPOAIDAO.inc.php.

References _getRecordsRecordSet(), and _returnRecordFromRow().

PKPOAIDAO::getRecordSelectStatement ( )

Return the string defining the SELECT part of an sql that will select all the necessary fields to build a record object.

Must be implemented by subclasses.

Returns
string

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

Referenced by _getRecordsRecordSet(), and getRecord().

& PKPOAIDAO::getToken (   $tokenId)

Retrieve a resumption token.

Returns
OAIResumptionToken

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

References DAO\retrieve().

& PKPOAIDAO::insertToken ( $token)

Insert an OAI resumption token, generating a new ID.

Parameters
$tokenOAIResumptionToken
Returns
OAIResumptionToken

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

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

PKPOAIDAO::PKPOAIDAO ( )

Constructor.

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

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 82 of file PKPOAIDAO.inc.php.

References getAccessibleRecordWhereClause(), getOrderedRecordParams(), getRecordJoinClause(), and DAO\retrieve().

PKPOAIDAO::setOAI ( $oai)

Set parent OAI object.

Parameters
JournalOAI

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

& PKPOAIDAO::setOAIData (   $record,
$row,
  $isRecord 
)

Set application specific data to OAIRecord and OAIIdentifier objects.

Must be implemented by subclasses.

Parameters
$recordOAIIdentifier/OAIRecord
$rowarray
$isRecordboolean Is the object an OAIRecord? If true, specific OAIRecord data can be set.
Returns
OAIIdentifier/OAIRecord

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

Referenced by _doCommonOAIFromRowOperations().


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