<?php /** * \file * \brief Response to Verb ListSets * * Lists what sets are available to records in the system. */ // Here the size of sets is small, no resumptionToken is taken care. if (is_array($SETS)) { $outputObj = new ANDS_Response_XML($args); foreach ($SETS as $set) { $setNode = $outputObj->add2_verbNode("set"); foreach ($set as $key => $val) { if ($key == 'setDescription') { $desNode = $outputObj->addChild($setNode, $key); $des = $outputObj->doc->createDocumentFragment(); $des->appendXML($val); $desNode->appendChild($des); } else { $outputObj->addChild($setNode, $key, $val); } } } } else { $errors[] = oai_error('noSetHierarchy'); oai_exit(); }
* \see http://www.openarchives.org/OAI/2.0/guidelines-oai-identifier.htm for details */ // The response to Identify is fixed if (SHOW_QUERY_ERROR) { echo "Here are some settings in raw format:\n"; print_r($identifyResponse); echo 'MAXRECORDS ',MAXRECORDS, ', MAXIDS ', MAXIDS,"\n"; echo 'Token is valid for ',TOKEN_VALID," seconds\n"; echo 'Tokens have prefix: ',TOKEN_PREFIX,"\n"; echo 'XMLSCHEMA: ',XMLSCHEMA,"\n"; echo "\n"; } $outputObj = new ANDS_Response_XML($args); foreach($identifyResponse as $key => $val) { $outputObj->add2_verbNode($key, $val); // adminEmail comes after protocolVersion if ($key === 'protocolVersion') { foreach ($adminEmail as $val) { $outputObj->add2_verbNode("adminEmail", $val); } } } if(isset($compression)) { foreach($compression as $val) { $outputObj->add2_verbNode("compression", $val); } }