- add citation for dc:source inside datasetxml2oai.pmh.xslt

- add ddc collection for ListSets request
- add ddc category into the header of GetReord and GetRecords requests
- npm updates
This commit is contained in:
Arno Kaimbacher 2022-12-02 12:26:25 +01:00
parent ab57fabc36
commit b1d62e14f7
10 changed files with 322 additions and 23 deletions

View file

@ -12,13 +12,13 @@ export enum OaiErrorCodes {
// https://medium.com/@juliapassynkova/map-your-typescript-enums-e402d406b229
export const OaiModelError = new Map<number, string>([
[OaiErrorCodes.BADVERB, 'badVerb'],
[OaiErrorCodes.BADARGUMENT, 'badArgument'],
[OaiErrorCodes.NORECORDSMATCH, 'noRecordsMatch'],
[OaiErrorCodes.CANNOTDISSEMINATEFORMAT, 'cannotDisseminateFormat'],
[OaiErrorCodes.BADRESUMPTIONTOKEN, 'badResumptionToken'],
[OaiErrorCodes.IDDOESNOTEXIST, 'idDoesNotExist']
]);
[OaiErrorCodes.BADVERB, "badVerb"],
[OaiErrorCodes.BADARGUMENT, "badArgument"],
[OaiErrorCodes.NORECORDSMATCH, "noRecordsMatch"],
[OaiErrorCodes.CANNOTDISSEMINATEFORMAT, "cannotDisseminateFormat"],
[OaiErrorCodes.BADRESUMPTIONTOKEN, "badResumptionToken"],
[OaiErrorCodes.IDDOESNOTEXIST, "idDoesNotExist"],
]);
// class OaiModelError {
// // const BADVERB = 1010;
@ -27,7 +27,6 @@ export const OaiModelError = new Map<number, string>([
// // const BADRESUMPTIONTOKEN = 1013;
// // const NORECORDSMATCH = 1014;
// // const IDDOESNOTEXIST = 1015;
// protected static $oaiErrorCodes = {
// OaiErrorCodes. 'badVerb',
@ -38,13 +37,12 @@ export const OaiModelError = new Map<number, string>([
// IDDOESNOTEXIST: 'idDoesNotExist',
// };
// public static function mapCode($code)
// {
// if (false === array_key_exists($code, self::$oaiErrorCodes)) {
// throw new OaiModelException("Unknown oai error code $code");
// }
// return self::$oaiErrorCodes[$code];
// }
// public static function mapCode($code)
// {
// if (false === array_key_exists($code, self::$oaiErrorCodes)) {
// throw new OaiModelException("Unknown oai error code $code");
// }
// return self::$oaiErrorCodes[$code];
// }
// }