Exemple #1
0
 /**
  * @see OAI#OAI
  */
 function ConferenceOAI($config)
 {
     parent::OAI($config);
     $this->site =& Request::getSite();
     $this->conference =& Request::getConference();
     $this->conferenceId = isset($this->conference) ? $this->conference->getId() : null;
     $this->dao =& DAORegistry::getDAO('OAIDAO');
     $this->dao->setOAI($this);
 }
Exemple #2
0
 /**
  * @copydoc OAI::OAI()
  */
 function JournalOAI($config)
 {
     parent::OAI($config);
     $this->site = Request::getSite();
     $this->journal = Request::getJournal();
     $this->journalId = isset($this->journal) ? $this->journal->getId() : null;
     $this->dao = DAORegistry::getDAO('OAIDAO');
     $this->dao->setOAI($this);
 }
 /**
  * @see OAI#OAI
  */
 function PressOAI($config)
 {
     parent::OAI($config);
     $application = PKPApplication::getApplication();
     $request = $application->getRequest();
     $this->site = $request->getSite();
     $this->press = $request->getPress();
     $this->pressId = isset($this->press) ? $this->press->getId() : null;
     $this->dao = DAORegistry::getDAO('OAIDAO');
     $this->dao->setOAI($this);
 }
Exemple #4
0
 /**
  * @see OAI#metadataFormats
  */
 function &metadataFormats($namesOnly = false, $identifier = null)
 {
     // Get a full list of metadata formats implemented in the system
     $metadataFormats =& parent::metadataFormats($namesOnly, $identifier);
     // ...and if we need to, check that this record is able to do it
     if ($identifier !== null) {
         $recordId = $this->identifierToRecordId($identifier);
         $recordDao = DAORegistry::getDAO('RecordDAO');
         $schemaPluginName = $recordDao->getRecordSchemaPluginName($recordId);
     }
     return $metadataFormats;
 }
Exemple #5
0
 /**
  * Answer the current record-table name
  * 
  * @return string
  * @access public
  * @static
  * @since 3/9/07
  */
 static function getCurrentRecordTable()
 {
     $currentHarvesterConfig = OAI::getCurrentHarvesterConfig();
     return 'oai_' . $currentHarvesterConfig['name'];
 }
Exemple #6
0
    global $SQL;
    return ' and ' . $SQL['datestamp'] . " <= '" . addslashes($until) . "'";
}
// filter for from
function fromQuery($from)
{
    global $SQL;
    return ' and ' . $SQL['datestamp'] . " >= '" . addslashes($from) . "'";
}
// filter for sets
function setQuery($set)
{
    global $SQL;
    return ' and ' . $SQL['set'] . " LIKE '%" . addslashes($set) . "%'";
}
// There is no need to change anything below.
// Current Date
$datetime = gmstrftime('%Y-%m-%dT%T');
$responseDate = $datetime . 'Z';
// do not change
$XMLHEADER = '<?xml version="1.0" encoding="UTF-8"?>
<OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/
         http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">' . "\n";
$xmlheader = $XMLHEADER . ' <responseDate>' . $responseDate . "</responseDate>\n";
// the xml schema namespace, do not change this
$XMLSCHEMA = 'http://www.w3.org/2001/XMLSchema-instance';
// the name of the table where your store your metadata
$SQL['table'] = OAI::getCurrentRecordTable();