2013-05-07 22:01:22 +02:00
|
|
|
<?php
|
2013-05-07 19:48:37 +02:00
|
|
|
/**
|
|
|
|
* \file
|
|
|
|
* \brief Response to Verb ListSets
|
|
|
|
*
|
2013-05-07 22:01:22 +02:00
|
|
|
* Lists what sets are available to records in the system.
|
2013-05-07 22:16:52 +02:00
|
|
|
* This variable is filled in config-sets.php
|
2013-05-07 19:48:37 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
// Here the size of sets is small, no resumptionToken is taken care.
|
|
|
|
if (is_array($SETS)) {
|
2013-05-07 22:01:22 +02:00
|
|
|
$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();
|
2013-05-07 19:48:37 +02:00
|
|
|
}
|