@twin.org/standards-w3c-odrl 0.0.2-next.8 → 0.0.3-next.1
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 +274 -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 +273 -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 +271 -0
- package/dist/es/schemas/OdrlProhibition.json +198 -0
- package/dist/es/schemas/OdrlRule.json +191 -0
- package/dist/es/schemas/OdrlSet.json +272 -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,271 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.twindev.org/w3c-odrl/OdrlPolicy",
|
|
4
|
+
"description": "Interface representing an ODRL Policy. https://www.w3.org/TR/odrl-model/#policy",
|
|
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
|
+
"items": {
|
|
18
|
+
"anyOf": [
|
|
19
|
+
{
|
|
20
|
+
"type": "string",
|
|
21
|
+
"const": "https://www.w3.org/ns/odrl/2/"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"additionalItems": {
|
|
29
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"type": "array",
|
|
34
|
+
"minItems": 2,
|
|
35
|
+
"items": {
|
|
36
|
+
"anyOf": [
|
|
37
|
+
{
|
|
38
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"type": "string",
|
|
42
|
+
"const": "https://www.w3.org/ns/odrl/2/"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"additionalItems": {
|
|
47
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"@id": {
|
|
53
|
+
"anyOf": [
|
|
54
|
+
{
|
|
55
|
+
"type": "string"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"type": "array",
|
|
59
|
+
"items": {
|
|
60
|
+
"type": "string"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
"@included": {
|
|
66
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
|
|
67
|
+
},
|
|
68
|
+
"@graph": {
|
|
69
|
+
"anyOf": [
|
|
70
|
+
{
|
|
71
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"type": "array",
|
|
75
|
+
"items": {
|
|
76
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
"@nest": {
|
|
82
|
+
"anyOf": [
|
|
83
|
+
{
|
|
84
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"type": "array",
|
|
88
|
+
"items": {
|
|
89
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
"@type": {
|
|
95
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/PolicyType",
|
|
96
|
+
"description": "The type of policy. Must be one of: \"Set\", \"Offer\", \"Agreement\""
|
|
97
|
+
},
|
|
98
|
+
"@reverse": {
|
|
99
|
+
"type": "object",
|
|
100
|
+
"additionalProperties": {
|
|
101
|
+
"type": "string"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"@index": {
|
|
105
|
+
"type": "string"
|
|
106
|
+
},
|
|
107
|
+
"uid": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"description": "The unique identifier for the policy. Must be an IRI."
|
|
110
|
+
},
|
|
111
|
+
"profile": {
|
|
112
|
+
"anyOf": [
|
|
113
|
+
{
|
|
114
|
+
"type": "string"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"type": "array",
|
|
118
|
+
"items": {
|
|
119
|
+
"type": "string"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
"description": "The profile(s) this policy conforms to. IRIs identifying the ODRL Profile(s)."
|
|
124
|
+
},
|
|
125
|
+
"assigner": {
|
|
126
|
+
"anyOf": [
|
|
127
|
+
{
|
|
128
|
+
"type": "string"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlParty"
|
|
132
|
+
}
|
|
133
|
+
],
|
|
134
|
+
"description": "The assigner of the policy. Applies to all rules unless overridden at rule level."
|
|
135
|
+
},
|
|
136
|
+
"assignee": {
|
|
137
|
+
"anyOf": [
|
|
138
|
+
{
|
|
139
|
+
"type": "string"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlParty"
|
|
143
|
+
}
|
|
144
|
+
],
|
|
145
|
+
"description": "The assignee of the policy. Applies to all rules unless overridden at rule level."
|
|
146
|
+
},
|
|
147
|
+
"target": {
|
|
148
|
+
"anyOf": [
|
|
149
|
+
{
|
|
150
|
+
"type": "string"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAsset"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"type": "array",
|
|
157
|
+
"items": {
|
|
158
|
+
"anyOf": [
|
|
159
|
+
{
|
|
160
|
+
"type": "string"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAsset"
|
|
164
|
+
}
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
],
|
|
169
|
+
"description": "The target asset for the rule."
|
|
170
|
+
},
|
|
171
|
+
"action": {
|
|
172
|
+
"anyOf": [
|
|
173
|
+
{
|
|
174
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/ActionType"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"type": "string"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAction"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"type": "array",
|
|
184
|
+
"items": {
|
|
185
|
+
"anyOf": [
|
|
186
|
+
{
|
|
187
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/ActionType"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"type": "string"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAction"
|
|
194
|
+
}
|
|
195
|
+
]
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
],
|
|
199
|
+
"description": "The action associated with the rule."
|
|
200
|
+
},
|
|
201
|
+
"inheritFrom": {
|
|
202
|
+
"anyOf": [
|
|
203
|
+
{
|
|
204
|
+
"type": "string"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"type": "array",
|
|
208
|
+
"items": {
|
|
209
|
+
"type": "string"
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
],
|
|
213
|
+
"description": "The parent policy(ies) this policy inherits from. IRIs identifying the parent Policy(ies)."
|
|
214
|
+
},
|
|
215
|
+
"conflict": {
|
|
216
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/ConflictStrategyType",
|
|
217
|
+
"description": "The conflict resolution strategy.\n- perm: Permissions override Prohibitions\n- prohibit: Prohibitions override Permissions\n- invalid: Policy is void if conflicts exist (default)"
|
|
218
|
+
},
|
|
219
|
+
"permission": {
|
|
220
|
+
"type": "array",
|
|
221
|
+
"items": {
|
|
222
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlPermission"
|
|
223
|
+
},
|
|
224
|
+
"description": "The permissions in the policy. At least one of permission, prohibition, or obligation must be present."
|
|
225
|
+
},
|
|
226
|
+
"prohibition": {
|
|
227
|
+
"type": "array",
|
|
228
|
+
"items": {
|
|
229
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlProhibition"
|
|
230
|
+
},
|
|
231
|
+
"description": "The prohibitions in the policy. At least one of permission, prohibition, or obligation must be present."
|
|
232
|
+
},
|
|
233
|
+
"obligation": {
|
|
234
|
+
"type": "array",
|
|
235
|
+
"items": {
|
|
236
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlDuty"
|
|
237
|
+
},
|
|
238
|
+
"description": "The obligations in the policy. At least one of permission, prohibition, or obligation must be present."
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
"required": [
|
|
242
|
+
"@context",
|
|
243
|
+
"@type",
|
|
244
|
+
"uid"
|
|
245
|
+
],
|
|
246
|
+
"additionalProperties": {
|
|
247
|
+
"anyOf": [
|
|
248
|
+
{
|
|
249
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIndexMap"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIdMap"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdTypeMap"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"type": "array"
|
|
268
|
+
}
|
|
269
|
+
]
|
|
270
|
+
}
|
|
271
|
+
}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.twindev.org/w3c-odrl/OdrlProhibition",
|
|
4
|
+
"description": "Interface for Prohibition Rules. https://www.w3.org/TR/odrl-model/#prohibition",
|
|
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 rule."
|
|
77
|
+
},
|
|
78
|
+
"action": {
|
|
79
|
+
"anyOf": [
|
|
80
|
+
{
|
|
81
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/ActionType"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"type": "string"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAction"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"type": "array",
|
|
91
|
+
"items": {
|
|
92
|
+
"anyOf": [
|
|
93
|
+
{
|
|
94
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/ActionType"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"type": "string"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAction"
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"description": "The action associated with the rule."
|
|
107
|
+
},
|
|
108
|
+
"target": {
|
|
109
|
+
"anyOf": [
|
|
110
|
+
{
|
|
111
|
+
"type": "string"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAsset"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"type": "array",
|
|
118
|
+
"items": {
|
|
119
|
+
"anyOf": [
|
|
120
|
+
{
|
|
121
|
+
"type": "string"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAsset"
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"description": "The target asset for the rule."
|
|
131
|
+
},
|
|
132
|
+
"assigner": {
|
|
133
|
+
"anyOf": [
|
|
134
|
+
{
|
|
135
|
+
"type": "string"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlParty"
|
|
139
|
+
}
|
|
140
|
+
],
|
|
141
|
+
"description": "The assigner of the rule."
|
|
142
|
+
},
|
|
143
|
+
"assignee": {
|
|
144
|
+
"anyOf": [
|
|
145
|
+
{
|
|
146
|
+
"type": "string"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlParty"
|
|
150
|
+
}
|
|
151
|
+
],
|
|
152
|
+
"description": "The assignee of the rule."
|
|
153
|
+
},
|
|
154
|
+
"constraint": {
|
|
155
|
+
"type": "array",
|
|
156
|
+
"items": {
|
|
157
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlConstraint"
|
|
158
|
+
},
|
|
159
|
+
"description": "Constraints applied to the rule."
|
|
160
|
+
},
|
|
161
|
+
"summary": {
|
|
162
|
+
"type": "string",
|
|
163
|
+
"description": "Additional relation sub-properties as defined in ODRL profiles. For example, 'summary' in profile \"http://example.com/odrl:profile:03\" indicates where the output should be stored."
|
|
164
|
+
},
|
|
165
|
+
"remedy": {
|
|
166
|
+
"type": "array",
|
|
167
|
+
"items": {
|
|
168
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlDuty"
|
|
169
|
+
},
|
|
170
|
+
"description": "The remedies that must be fulfilled if prohibition is violated."
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"additionalProperties": {
|
|
174
|
+
"anyOf": [
|
|
175
|
+
{
|
|
176
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIndexMap"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIdMap"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdTypeMap"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"type": "array"
|
|
195
|
+
}
|
|
196
|
+
]
|
|
197
|
+
}
|
|
198
|
+
}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.twindev.org/w3c-odrl/OdrlRule",
|
|
4
|
+
"description": "Base interface for ODRL Rules. https://www.w3.org/TR/odrl-model/#rule",
|
|
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 rule."
|
|
77
|
+
},
|
|
78
|
+
"action": {
|
|
79
|
+
"anyOf": [
|
|
80
|
+
{
|
|
81
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/ActionType"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"type": "string"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAction"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"type": "array",
|
|
91
|
+
"items": {
|
|
92
|
+
"anyOf": [
|
|
93
|
+
{
|
|
94
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/ActionType"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"type": "string"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAction"
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"description": "The action associated with the rule."
|
|
107
|
+
},
|
|
108
|
+
"target": {
|
|
109
|
+
"anyOf": [
|
|
110
|
+
{
|
|
111
|
+
"type": "string"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAsset"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"type": "array",
|
|
118
|
+
"items": {
|
|
119
|
+
"anyOf": [
|
|
120
|
+
{
|
|
121
|
+
"type": "string"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAsset"
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"description": "The target asset for the rule."
|
|
131
|
+
},
|
|
132
|
+
"assigner": {
|
|
133
|
+
"anyOf": [
|
|
134
|
+
{
|
|
135
|
+
"type": "string"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlParty"
|
|
139
|
+
}
|
|
140
|
+
],
|
|
141
|
+
"description": "The assigner of the rule."
|
|
142
|
+
},
|
|
143
|
+
"assignee": {
|
|
144
|
+
"anyOf": [
|
|
145
|
+
{
|
|
146
|
+
"type": "string"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlParty"
|
|
150
|
+
}
|
|
151
|
+
],
|
|
152
|
+
"description": "The assignee of the rule."
|
|
153
|
+
},
|
|
154
|
+
"constraint": {
|
|
155
|
+
"type": "array",
|
|
156
|
+
"items": {
|
|
157
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlConstraint"
|
|
158
|
+
},
|
|
159
|
+
"description": "Constraints applied to the rule."
|
|
160
|
+
},
|
|
161
|
+
"summary": {
|
|
162
|
+
"type": "string",
|
|
163
|
+
"description": "Additional relation sub-properties as defined in ODRL profiles. For example, 'summary' in profile \"http://example.com/odrl:profile:03\" indicates where the output should be stored."
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"additionalProperties": {
|
|
167
|
+
"anyOf": [
|
|
168
|
+
{
|
|
169
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIndexMap"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIdMap"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdTypeMap"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"type": "array"
|
|
188
|
+
}
|
|
189
|
+
]
|
|
190
|
+
}
|
|
191
|
+
}
|