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