1 | <?php declare(strict_types = 1); |
||
17 | abstract class Resource extends DataType |
||
18 | { |
||
19 | const CLASSES = ['ConceptScheme', 'Concordance', 'Mapping', 'Registry', 'Concept']; |
||
20 | |||
21 | const TYPES = []; |
||
22 | |||
23 | const FIELDS = [ |
||
24 | 'uri' => 'URI', |
||
25 | 'type' => ['Listing'], |
||
26 | 'identifier' => ['Listing'], |
||
27 | 'created' => 'Date', |
||
28 | 'issued' => 'Date', |
||
29 | 'modified' => 'Date', |
||
30 | 'creator' => ['Set', 'Concept'], |
||
31 | 'contributor' => ['Set', 'Concept'], |
||
32 | 'publisher' => ['Set', 'Concept'], |
||
33 | 'partOf' => ['Set', 'Concept'], |
||
34 | ]; |
||
35 | |||
36 | /** |
||
37 | * URI if the Concept, ConceptScheme, ConceptType, Mapping |
||
38 | * or whatever this resource refers to. |
||
39 | */ |
||
40 | protected $uri; |
||
41 | |||
42 | /** |
||
43 | * Additional identifiers. |
||
44 | */ |
||
45 | protected $identifier; |
||
46 | |||
47 | /** |
||
48 | * Resource types(s). |
||
49 | */ |
||
50 | protected $type; |
||
51 | |||
52 | /** |
||
53 | * Date of creation. |
||
54 | */ |
||
55 | protected $created; |
||
56 | |||
57 | /** |
||
58 | * Date of protectedation. |
||
59 | */ |
||
60 | protected $issued; |
||
61 | |||
62 | /** |
||
63 | * Date of last modification. |
||
64 | */ |
||
65 | protected $modified; |
||
66 | |||
67 | /** |
||
68 | * Agent primarily responsible for creation of resource. |
||
69 | */ |
||
70 | protected $creator; |
||
71 | |||
72 | /** |
||
73 | * Agent responsible for making contributions to the resource. |
||
74 | */ |
||
75 | protected $contributor; |
||
76 | |||
77 | /** |
||
78 | * Agent responsible for making the resource available. |
||
79 | */ |
||
80 | protected $publisher; |
||
81 | |||
82 | /** |
||
83 | * Resources which this resource is part of. |
||
84 | */ |
||
85 | protected $partOf; |
||
86 | |||
87 | |||
88 | /** |
||
89 | * Guess subclass from list of type URIs. |
||
90 | */ |
||
91 | public static function guessClassFromTypes(array $types) |
||
104 | } |
||
105 |