-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfrequency.inc.php
41 lines (38 loc) · 1.39 KB
/
frequency.inc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
/*PhpDoc:
name: frequency.inc.php
title: liste des valeurs de fréquence et méthodes associées
doc: |
journal: |
5/7/2021:
- création
*/
class Frequency {
// Mapping valeur DiDo en URI
const MAPPING = [
'daily'=> 'http://publications.europa.eu/resource/authority/frequency/DAILY',
'weekly'=> 'http://publications.europa.eu/resource/authority/frequency/WEEKLY',
'monthly'=> 'http://publications.europa.eu/resource/authority/frequency/MONTHLY',
'quarterly'=> 'http://publications.europa.eu/resource/authority/frequency/QUARTERLY',
'semiannual'=>'http://publications.europa.eu/resource/authority/frequency/ANNUAL_2',
'annual'=> 'http://publications.europa.eu/resource/authority/frequency/ANNUAL',
'punctual'=> 'http://publications.europa.eu/resource/authority/frequency/NEVER',
'irregular'=> 'http://publications.europa.eu/resource/authority/frequency/IRREG',
'unknown'=> 'http://publications.europa.eu/resource/authority/frequency/UNKNOWN',
];
// retourne le tableau de mapping
static function mappingToURI(): array {
return self::MAPPING;
}
// Renvoit le JSON-LD définissant comme dct:Frequency les URI utilisées
static function jsonld(): array {
$result = [];
foreach (self::MAPPING as $code => $uri) {
$result[] = [
'@id'=> $uri,
'@type'=> 'dct:Frequency',
];
}
return $result;
}
};