@twin.org/standards-w3c-odrl 0.0.2-next.9 → 0.0.3-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/dataTypes/odrlDataTypes.js +113 -0
- package/dist/es/dataTypes/odrlDataTypes.js.map +1 -0
- package/dist/es/index.js +31 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/IOdrlAction.js +2 -0
- package/dist/es/models/IOdrlAction.js.map +1 -0
- package/dist/es/models/IOdrlAgreement.js +2 -0
- package/dist/es/models/IOdrlAgreement.js.map +1 -0
- package/dist/es/models/IOdrlAsset.js +2 -0
- package/dist/es/models/IOdrlAsset.js.map +1 -0
- package/dist/es/models/IOdrlAssetCollection.js +2 -0
- package/dist/es/models/IOdrlAssetCollection.js.map +1 -0
- package/dist/es/models/IOdrlConstraint.js +2 -0
- package/dist/es/models/IOdrlConstraint.js.map +1 -0
- package/dist/es/models/IOdrlDuty.js +2 -0
- package/dist/es/models/IOdrlDuty.js.map +1 -0
- package/dist/es/models/IOdrlLogicalConstraint.js +2 -0
- package/dist/es/models/IOdrlLogicalConstraint.js.map +1 -0
- package/dist/es/models/IOdrlOffer.js +2 -0
- package/dist/es/models/IOdrlOffer.js.map +1 -0
- package/dist/es/models/IOdrlParty.js +2 -0
- package/dist/es/models/IOdrlParty.js.map +1 -0
- package/dist/es/models/IOdrlPartyCollection.js +2 -0
- package/dist/es/models/IOdrlPartyCollection.js.map +1 -0
- package/dist/es/models/IOdrlPermission.js +2 -0
- package/dist/es/models/IOdrlPermission.js.map +1 -0
- package/dist/es/models/IOdrlPolicy.js +2 -0
- package/dist/es/models/IOdrlPolicy.js.map +1 -0
- package/dist/es/models/IOdrlProhibition.js +2 -0
- package/dist/es/models/IOdrlProhibition.js.map +1 -0
- package/dist/es/models/IOdrlRule.js +2 -0
- package/dist/es/models/IOdrlRule.js.map +1 -0
- package/dist/es/models/IOdrlSet.js +2 -0
- package/dist/es/models/IOdrlSet.js.map +1 -0
- package/dist/es/models/odrlContextType.js +2 -0
- package/dist/es/models/odrlContextType.js.map +1 -0
- package/dist/es/models/odrlContexts.js +17 -0
- package/dist/es/models/odrlContexts.js.map +1 -0
- package/dist/es/models/types/actionType.js +237 -0
- package/dist/es/models/types/actionType.js.map +1 -0
- package/dist/es/models/types/conflictStrategyType.js +21 -0
- package/dist/es/models/types/conflictStrategyType.js.map +1 -0
- package/dist/es/models/types/leftOperandType.js +137 -0
- package/dist/es/models/types/leftOperandType.js.map +1 -0
- package/dist/es/models/types/logicalConstraintType.js +25 -0
- package/dist/es/models/types/logicalConstraintType.js.map +1 -0
- package/dist/es/models/types/odrlTypes.js +69 -0
- package/dist/es/models/types/odrlTypes.js.map +1 -0
- package/dist/es/models/types/operatorType.js +65 -0
- package/dist/es/models/types/operatorType.js.map +1 -0
- package/dist/es/models/types/policyType.js +25 -0
- package/dist/es/models/types/policyType.js.map +1 -0
- package/dist/es/models/types/rightOperandType.js +14 -0
- package/dist/es/models/types/rightOperandType.js.map +1 -0
- package/dist/es/models/types/ruleType.js +21 -0
- package/dist/es/models/types/ruleType.js.map +1 -0
- package/dist/es/models/types/statusType.js +25 -0
- package/dist/es/models/types/statusType.js.map +1 -0
- package/dist/es/schemas/OdrlAction.json +153 -0
- package/dist/es/schemas/OdrlAgreement.json +270 -0
- package/dist/es/schemas/OdrlAsset.json +110 -0
- package/dist/es/schemas/OdrlAssetCollection.json +124 -0
- package/dist/es/schemas/OdrlConstraint.json +174 -0
- package/dist/es/schemas/OdrlDuty.json +217 -0
- package/dist/es/schemas/OdrlLogicalConstraint.json +204 -0
- package/dist/es/schemas/OdrlOffer.json +269 -0
- package/dist/es/schemas/OdrlParty.json +124 -0
- package/dist/es/schemas/OdrlPartyCollection.json +138 -0
- package/dist/es/schemas/OdrlPermission.json +198 -0
- package/dist/es/schemas/OdrlPolicy.json +267 -0
- package/dist/es/schemas/OdrlProhibition.json +198 -0
- package/dist/es/schemas/OdrlRule.json +191 -0
- package/dist/es/schemas/OdrlSet.json +268 -0
- package/dist/types/index.d.ts +28 -28
- package/dist/types/models/IOdrlAction.d.ts +3 -3
- package/dist/types/models/IOdrlAgreement.d.ts +3 -3
- package/dist/types/models/IOdrlAsset.d.ts +1 -1
- package/dist/types/models/IOdrlAssetCollection.d.ts +2 -2
- package/dist/types/models/IOdrlConstraint.d.ts +3 -3
- package/dist/types/models/IOdrlDuty.d.ts +1 -1
- package/dist/types/models/IOdrlOffer.d.ts +3 -3
- package/dist/types/models/IOdrlParty.d.ts +1 -1
- package/dist/types/models/IOdrlPartyCollection.d.ts +2 -2
- package/dist/types/models/IOdrlPermission.d.ts +2 -2
- package/dist/types/models/IOdrlPolicy.d.ts +10 -10
- package/dist/types/models/IOdrlProhibition.d.ts +2 -2
- package/dist/types/models/IOdrlRule.d.ts +5 -5
- package/dist/types/models/IOdrlSet.d.ts +2 -2
- package/dist/types/models/odrlContextType.d.ts +1 -1
- package/dist/types/models/types/odrlTypes.d.ts +0 -4
- package/docs/changelog.md +151 -0
- package/docs/reference/interfaces/IOdrlAction.md +1 -1
- package/docs/reference/interfaces/IOdrlAgreement.md +1 -1
- package/docs/reference/interfaces/IOdrlAsset.md +1 -1
- package/docs/reference/interfaces/IOdrlAssetCollection.md +1 -1
- package/docs/reference/interfaces/IOdrlConstraint.md +1 -1
- package/docs/reference/interfaces/IOdrlDuty.md +1 -1
- package/docs/reference/interfaces/IOdrlLogicalConstraint.md +1 -1
- package/docs/reference/interfaces/IOdrlOffer.md +1 -1
- package/docs/reference/interfaces/IOdrlParty.md +1 -1
- package/docs/reference/interfaces/IOdrlPartyCollection.md +1 -1
- package/docs/reference/interfaces/IOdrlPermission.md +1 -1
- package/docs/reference/interfaces/IOdrlPolicy.md +1 -1
- package/docs/reference/interfaces/IOdrlProhibition.md +1 -1
- package/docs/reference/interfaces/IOdrlRule.md +1 -1
- package/docs/reference/interfaces/IOdrlSet.md +1 -1
- package/docs/reference/variables/OdrlTypes.md +0 -6
- package/package.json +22 -10
- package/dist/cjs/index.cjs +0 -4008
- package/dist/esm/index.mjs +0 -3995
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.twindev.org/w3c-odrl/OdrlAgreement",
|
|
4
|
+
"description": "Interface representing an ODRL Agreement. An Agreement requires both an assigner and assignee (both agreeing parties). https://www.w3.org/TR/odrl-model/#policy-agreement",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"@context": {
|
|
8
|
+
"description": "The ODRL JSON-LD context type.",
|
|
9
|
+
"anyOf": [
|
|
10
|
+
{
|
|
11
|
+
"type": "string",
|
|
12
|
+
"const": "https://www.w3.org/ns/odrl/2/"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"type": "array",
|
|
16
|
+
"minItems": 2,
|
|
17
|
+
"prefixItems": [
|
|
18
|
+
{
|
|
19
|
+
"type": "string",
|
|
20
|
+
"const": "https://www.w3.org/ns/odrl/2/"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"items": {
|
|
27
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"type": "array",
|
|
32
|
+
"minItems": 2,
|
|
33
|
+
"prefixItems": [
|
|
34
|
+
{
|
|
35
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"type": "string",
|
|
39
|
+
"const": "https://www.w3.org/ns/odrl/2/"
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"items": {
|
|
43
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"@id": {
|
|
49
|
+
"anyOf": [
|
|
50
|
+
{
|
|
51
|
+
"type": "string"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"type": "array",
|
|
55
|
+
"items": {
|
|
56
|
+
"type": "string"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
"@included": {
|
|
62
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
|
|
63
|
+
},
|
|
64
|
+
"@graph": {
|
|
65
|
+
"anyOf": [
|
|
66
|
+
{
|
|
67
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"type": "array",
|
|
71
|
+
"items": {
|
|
72
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
"@nest": {
|
|
78
|
+
"anyOf": [
|
|
79
|
+
{
|
|
80
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"type": "array",
|
|
84
|
+
"items": {
|
|
85
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
"@type": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"const": "Agreement",
|
|
93
|
+
"description": "The type must be \"Agreement\"."
|
|
94
|
+
},
|
|
95
|
+
"@reverse": {
|
|
96
|
+
"type": "object",
|
|
97
|
+
"additionalProperties": {
|
|
98
|
+
"type": "string"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"@index": {
|
|
102
|
+
"type": "string"
|
|
103
|
+
},
|
|
104
|
+
"uid": {
|
|
105
|
+
"type": "string",
|
|
106
|
+
"description": "The unique identifier for the policy. Must be an IRI."
|
|
107
|
+
},
|
|
108
|
+
"profile": {
|
|
109
|
+
"anyOf": [
|
|
110
|
+
{
|
|
111
|
+
"type": "string"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"type": "array",
|
|
115
|
+
"items": {
|
|
116
|
+
"type": "string"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
"description": "The profile(s) this policy conforms to. IRIs identifying the ODRL Profile(s)."
|
|
121
|
+
},
|
|
122
|
+
"assigner": {
|
|
123
|
+
"anyOf": [
|
|
124
|
+
{
|
|
125
|
+
"type": "string"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlParty"
|
|
129
|
+
}
|
|
130
|
+
],
|
|
131
|
+
"description": "The assigner of the agreement. Required for Agreement policies."
|
|
132
|
+
},
|
|
133
|
+
"assignee": {
|
|
134
|
+
"anyOf": [
|
|
135
|
+
{
|
|
136
|
+
"type": "string"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlParty"
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
"description": "The assignee of the agreement. Required for Agreement policies."
|
|
143
|
+
},
|
|
144
|
+
"target": {
|
|
145
|
+
"anyOf": [
|
|
146
|
+
{
|
|
147
|
+
"type": "string"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAsset"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"type": "array",
|
|
154
|
+
"items": {
|
|
155
|
+
"anyOf": [
|
|
156
|
+
{
|
|
157
|
+
"type": "string"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAsset"
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
],
|
|
166
|
+
"description": "The target asset for the rule."
|
|
167
|
+
},
|
|
168
|
+
"action": {
|
|
169
|
+
"anyOf": [
|
|
170
|
+
{
|
|
171
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/ActionType"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"type": "string"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAction"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"type": "array",
|
|
181
|
+
"items": {
|
|
182
|
+
"anyOf": [
|
|
183
|
+
{
|
|
184
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/ActionType"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"type": "string"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAction"
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
],
|
|
196
|
+
"description": "The action associated with the rule."
|
|
197
|
+
},
|
|
198
|
+
"inheritFrom": {
|
|
199
|
+
"anyOf": [
|
|
200
|
+
{
|
|
201
|
+
"type": "string"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"type": "array",
|
|
205
|
+
"items": {
|
|
206
|
+
"type": "string"
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
],
|
|
210
|
+
"description": "The parent policy(ies) this policy inherits from. IRIs identifying the parent Policy(ies)."
|
|
211
|
+
},
|
|
212
|
+
"conflict": {
|
|
213
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/ConflictStrategyType",
|
|
214
|
+
"description": "The conflict resolution strategy.\n- perm: Permissions override Prohibitions\n- prohibit: Prohibitions override Permissions\n- invalid: Policy is void if conflicts exist (default)"
|
|
215
|
+
},
|
|
216
|
+
"permission": {
|
|
217
|
+
"type": "array",
|
|
218
|
+
"items": {
|
|
219
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlPermission"
|
|
220
|
+
},
|
|
221
|
+
"description": "The permissions in the policy. At least one of permission, prohibition, or obligation must be present."
|
|
222
|
+
},
|
|
223
|
+
"prohibition": {
|
|
224
|
+
"type": "array",
|
|
225
|
+
"items": {
|
|
226
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlProhibition"
|
|
227
|
+
},
|
|
228
|
+
"description": "The prohibitions in the policy. At least one of permission, prohibition, or obligation must be present."
|
|
229
|
+
},
|
|
230
|
+
"obligation": {
|
|
231
|
+
"type": "array",
|
|
232
|
+
"items": {
|
|
233
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlDuty"
|
|
234
|
+
},
|
|
235
|
+
"description": "The obligations in the policy. At least one of permission, prohibition, or obligation must be present."
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
"required": [
|
|
239
|
+
"@context",
|
|
240
|
+
"@type",
|
|
241
|
+
"assignee",
|
|
242
|
+
"assigner",
|
|
243
|
+
"uid"
|
|
244
|
+
],
|
|
245
|
+
"additionalProperties": {
|
|
246
|
+
"anyOf": [
|
|
247
|
+
{
|
|
248
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIndexMap"
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIdMap"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdTypeMap"
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"type": "array"
|
|
267
|
+
}
|
|
268
|
+
]
|
|
269
|
+
}
|
|
270
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.twindev.org/w3c-odrl/OdrlAsset",
|
|
4
|
+
"description": "Interface for ODRL Assets. https://www.w3.org/TR/odrl-model/#asset",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"@context": {
|
|
8
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionRoot"
|
|
9
|
+
},
|
|
10
|
+
"@id": {
|
|
11
|
+
"anyOf": [
|
|
12
|
+
{
|
|
13
|
+
"type": "string"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"type": "array",
|
|
17
|
+
"items": {
|
|
18
|
+
"type": "string"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
"@included": {
|
|
24
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
|
|
25
|
+
},
|
|
26
|
+
"@graph": {
|
|
27
|
+
"anyOf": [
|
|
28
|
+
{
|
|
29
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"type": "array",
|
|
33
|
+
"items": {
|
|
34
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"@nest": {
|
|
40
|
+
"anyOf": [
|
|
41
|
+
{
|
|
42
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"type": "array",
|
|
46
|
+
"items": {
|
|
47
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"@type": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"description": "The type of the asset. Can be used to specify additional type information."
|
|
55
|
+
},
|
|
56
|
+
"@reverse": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"additionalProperties": {
|
|
59
|
+
"type": "string"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"@index": {
|
|
63
|
+
"type": "string"
|
|
64
|
+
},
|
|
65
|
+
"uid": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"description": "The unique identifier for the asset. Should be an IRI."
|
|
68
|
+
},
|
|
69
|
+
"partOf": {
|
|
70
|
+
"anyOf": [
|
|
71
|
+
{
|
|
72
|
+
"type": "string"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAssetCollection"
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"description": "Reference to the asset collection this asset is part of. Used to identify an AssetCollection that this Asset is a member of."
|
|
79
|
+
},
|
|
80
|
+
"hasPolicy": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"description": "Reference to the policy that governs this asset. Used to identify the Policy that governs this Asset."
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"additionalProperties": {
|
|
86
|
+
"anyOf": [
|
|
87
|
+
{
|
|
88
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIndexMap"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIdMap"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdTypeMap"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"type": "array"
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.twindev.org/w3c-odrl/OdrlAssetCollection",
|
|
4
|
+
"description": "Interface for ODRL Asset Collections. An AssetCollection is a single resource representing a set of member resources, where all members of the set will be the subject of the Rule. https://www.w3.org/TR/odrl-model/#asset",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"@context": {
|
|
8
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionRoot"
|
|
9
|
+
},
|
|
10
|
+
"@id": {
|
|
11
|
+
"anyOf": [
|
|
12
|
+
{
|
|
13
|
+
"type": "string"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"type": "array",
|
|
17
|
+
"items": {
|
|
18
|
+
"type": "string"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
"@included": {
|
|
24
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
|
|
25
|
+
},
|
|
26
|
+
"@graph": {
|
|
27
|
+
"anyOf": [
|
|
28
|
+
{
|
|
29
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"type": "array",
|
|
33
|
+
"items": {
|
|
34
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"@nest": {
|
|
40
|
+
"anyOf": [
|
|
41
|
+
{
|
|
42
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"type": "array",
|
|
46
|
+
"items": {
|
|
47
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"@type": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"description": "The type of the asset. Can be used to specify additional type information."
|
|
55
|
+
},
|
|
56
|
+
"@reverse": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"additionalProperties": {
|
|
59
|
+
"type": "string"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"@index": {
|
|
63
|
+
"type": "string"
|
|
64
|
+
},
|
|
65
|
+
"uid": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"description": "The unique identifier for the asset. Should be an IRI."
|
|
68
|
+
},
|
|
69
|
+
"partOf": {
|
|
70
|
+
"anyOf": [
|
|
71
|
+
{
|
|
72
|
+
"type": "string"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAssetCollection"
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"description": "Reference to the asset collection this asset is part of. Used to identify an AssetCollection that this Asset is a member of."
|
|
79
|
+
},
|
|
80
|
+
"hasPolicy": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"description": "Reference to the policy that governs this asset. Used to identify the Policy that governs this Asset."
|
|
83
|
+
},
|
|
84
|
+
"source": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"description": "Reference to the source of the asset collection. Must be an IRI that references the AssetCollection."
|
|
87
|
+
},
|
|
88
|
+
"refinement": {
|
|
89
|
+
"type": "array",
|
|
90
|
+
"items": {
|
|
91
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlConstraint"
|
|
92
|
+
},
|
|
93
|
+
"description": "Refinements applied to the asset collection. Used to specify the refinement context under which to identify individual Asset(s) of the complete collection. The refinement applies to the characteristics of each member of the collection (not the resource as a whole)."
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"required": [
|
|
97
|
+
"source"
|
|
98
|
+
],
|
|
99
|
+
"additionalProperties": {
|
|
100
|
+
"anyOf": [
|
|
101
|
+
{
|
|
102
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIndexMap"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIdMap"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdTypeMap"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"type": "array"
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.twindev.org/w3c-odrl/OdrlConstraint",
|
|
4
|
+
"description": "Interface for ODRL Constraints. https://www.w3.org/TR/odrl-model/#constraint",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"@context": {
|
|
8
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionRoot"
|
|
9
|
+
},
|
|
10
|
+
"@id": {
|
|
11
|
+
"anyOf": [
|
|
12
|
+
{
|
|
13
|
+
"type": "string"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"type": "array",
|
|
17
|
+
"items": {
|
|
18
|
+
"type": "string"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
"@included": {
|
|
24
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
|
|
25
|
+
},
|
|
26
|
+
"@graph": {
|
|
27
|
+
"anyOf": [
|
|
28
|
+
{
|
|
29
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"type": "array",
|
|
33
|
+
"items": {
|
|
34
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"@nest": {
|
|
40
|
+
"anyOf": [
|
|
41
|
+
{
|
|
42
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"type": "array",
|
|
46
|
+
"items": {
|
|
47
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"@type": {
|
|
53
|
+
"anyOf": [
|
|
54
|
+
{
|
|
55
|
+
"type": "string"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"type": "array",
|
|
59
|
+
"items": {
|
|
60
|
+
"type": "string"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
"@reverse": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"additionalProperties": {
|
|
68
|
+
"type": "string"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"@index": {
|
|
72
|
+
"type": "string"
|
|
73
|
+
},
|
|
74
|
+
"uid": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"description": "Optional unique identifier for the constraint."
|
|
77
|
+
},
|
|
78
|
+
"leftOperand": {
|
|
79
|
+
"anyOf": [
|
|
80
|
+
{
|
|
81
|
+
"type": "string"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/LeftOperandType"
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"description": "The left operand of the constraint."
|
|
88
|
+
},
|
|
89
|
+
"operator": {
|
|
90
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OperatorType",
|
|
91
|
+
"description": "The operator of the constraint."
|
|
92
|
+
},
|
|
93
|
+
"rightOperand": {
|
|
94
|
+
"anyOf": [
|
|
95
|
+
{
|
|
96
|
+
"type": "string"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"type": "object",
|
|
100
|
+
"properties": {
|
|
101
|
+
"@value": {
|
|
102
|
+
"type": "string"
|
|
103
|
+
},
|
|
104
|
+
"@type": {
|
|
105
|
+
"type": "string"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"required": [
|
|
109
|
+
"@value"
|
|
110
|
+
],
|
|
111
|
+
"additionalProperties": false
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"type": "object",
|
|
115
|
+
"properties": {
|
|
116
|
+
"@id": {
|
|
117
|
+
"type": "string"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"required": [
|
|
121
|
+
"@id"
|
|
122
|
+
],
|
|
123
|
+
"additionalProperties": false
|
|
124
|
+
}
|
|
125
|
+
],
|
|
126
|
+
"description": "The right operand of the constraint. value with optional"
|
|
127
|
+
},
|
|
128
|
+
"rightOperandReference": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"description": "Reference to the right operand."
|
|
131
|
+
},
|
|
132
|
+
"dataType": {
|
|
133
|
+
"type": "string",
|
|
134
|
+
"description": "The data type of the right operand."
|
|
135
|
+
},
|
|
136
|
+
"unit": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"description": "The unit for the right operand value."
|
|
139
|
+
},
|
|
140
|
+
"status": {
|
|
141
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/StatusType",
|
|
142
|
+
"description": "The status value for comparison."
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"required": [
|
|
146
|
+
"leftOperand",
|
|
147
|
+
"operator"
|
|
148
|
+
],
|
|
149
|
+
"additionalProperties": {
|
|
150
|
+
"anyOf": [
|
|
151
|
+
{
|
|
152
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIndexMap"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIdMap"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdTypeMap"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"type": "array"
|
|
171
|
+
}
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
}
|