Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
PKPOAIDAO Class Reference
Inheritance diagram for PKPOAIDAO:
DAO OAIDAO

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 ()
 
getDataSource ()
 
 getDirectionMapping ($direction)
 
 getDriver ()
 
 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)
 

Public Attributes

 $oai
 
- Public Attributes inherited from DAO
 $_dataSource
 

Additional Inherited Members

- Static Public Member Functions inherited from DAO
static getDataChangedEvent ($elementId=null, $parentElementId=null)
 
- 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

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

Common operations for OAIRecord and OAIIdentifier object data set.

Parameters
$recordOAIRecord/OAIIdentifier
$rowarray
Returns
OAIRecord/OAIIdentifier

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

Referenced by setOAIData().

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

& PKPOAIDAO::_returnIdentifierFromRow (   $row)

Return OAIIdentifier object from database row.

Parameters
$rowarray
Returns
OAIIdentifier

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

& PKPOAIDAO::_returnRecordFromRow (   $row)

Return OAIRecord object from database row.

Parameters
$rowarray
Returns
OAIRecord

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

PKPOAIDAO::clearTokens ( )

Clear stale resumption tokens.

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

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

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

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

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

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

Referenced by setOAI().

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

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

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

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

& PKPOAIDAO::getToken (   $tokenId)

Retrieve a resumption token.

Returns
OAIResumptionToken

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

& PKPOAIDAO::insertToken ( $token)

Insert an OAI resumption token, generating a new ID.

Parameters
$tokenOAIResumptionToken
Returns
OAIResumptionToken

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

PKPOAIDAO::PKPOAIDAO ( )

Constructor.

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

References $oai.

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

PKPOAIDAO::setOAI ( $oai)

Set parent OAI object.

Parameters
JournalOAI

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

References getOrderedRecordParams().

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

References _doCommonOAIFromRowOperations().

Member Data Documentation

OAI PKPOAIDAO::$oai

parent OAI object

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

Referenced by PKPOAIDAO().


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