Author: fortim
Date: 2008-12-05 13:53:44 -0800 (Fri, 05 Dec 2008)
New Revision: 1661

Added:
   trunk/qubit/apps/qubit/modules/oai/actions/listIdentifiersAction.class.php
   trunk/qubit/apps/qubit/modules/oai/templates/listIdentifiersSuccess.php
Modified:
   trunk/qubit/apps/qubit/modules/oai/config/view.yml
Log:
New listIdentifiers response

Added: 
trunk/qubit/apps/qubit/modules/oai/actions/listIdentifiersAction.class.php
===================================================================
--- trunk/qubit/apps/qubit/modules/oai/actions/listIdentifiersAction.class.php  
                        (rev 0)
+++ trunk/qubit/apps/qubit/modules/oai/actions/listIdentifiersAction.class.php  
2008-12-05 21:53:44 UTC (rev 1661)
@@ -0,0 +1,31 @@
+<?php
+
+/**
+ * listIdentifiers action.
+ *
+ * @package    qubit
+ * @subpackage oai
+ * @author     Your name here
+ * @version    SVN: $Id: actions.class.php 9301 2008-05-27 01:08:46Z dwhittle $
+ */
+class OaiListIdentifiersAction extends sfAction
+{
+  public function execute($request)
+  {
+   $this->date = gmdate('Y-m-d\TH:i:s\Z');
+   $this->attributes = $this->getRequest()->getGetParameters();
+
+   $this->from = $this->request->getParameter('from');
+   $this->until = $this->request->getParameter('until');
+   $this->collectionsTable = oai::getCollectionArray();
+   $this->records = QubitInformationObject::getUpdatedRecords($this->from, 
$this->until);
+
+   $this->attributesKeys = array_keys($this->attributes);
+   $this->requestAttributes = '';
+   foreach ($this->attributesKeys as $key)
+   {
+     $this->requestAttributes.= ' '.$key.'="'.$this->attributes[$key].'"';
+   }
+
+  }
+}


Property changes on: 
trunk/qubit/apps/qubit/modules/oai/actions/listIdentifiersAction.class.php
___________________________________________________________________
Added: svn:executable
   + *

Modified: trunk/qubit/apps/qubit/modules/oai/config/view.yml
===================================================================
--- trunk/qubit/apps/qubit/modules/oai/config/view.yml  2008-12-05 21:51:18 UTC 
(rev 1660)
+++ trunk/qubit/apps/qubit/modules/oai/config/view.yml  2008-12-05 21:53:44 UTC 
(rev 1661)
@@ -4,3 +4,5 @@
   has_layout: false
 listMetadataFormatsSuccess:
   has_layout: false
+listIdentifiersSuccess:
+  has_layout: false

Added: trunk/qubit/apps/qubit/modules/oai/templates/listIdentifiersSuccess.php
===================================================================
--- trunk/qubit/apps/qubit/modules/oai/templates/listIdentifiersSuccess.php     
                        (rev 0)
+++ trunk/qubit/apps/qubit/modules/oai/templates/listIdentifiersSuccess.php     
2008-12-05 21:53:44 UTC (rev 1661)
@@ -0,0 +1,14 @@
+<?php echo '<?' ?>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";> 
+  <responseDate><?php echo $date ?></responseDate> 
+  <request<?php echo $sf_data->getRaw('requestAttributes')?>><?php echo 
$sf_data->getRaw('path') ?></request>  
+  <ListIdentifiers>
+<?php foreach($records as $record):?>
+    <header>
+      <identifier><?php echo $record->getId() ?></identifier>
+      <datestamp><?php echo oai::getDate($record->getUpdatedAt())?></datestamp>
+      <setSpec><?php echo oai::getSetSpec($record->getLft(), 
$collectionsTable)?></setSpec>
+    </header>
+<?php endforeach; ?>
+  </ListIdentifiers>
+</OAI-PMH>


Property changes on: 
trunk/qubit/apps/qubit/modules/oai/templates/listIdentifiersSuccess.php
___________________________________________________________________
Added: svn:executable
   + *


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to