@twin.org/standards-w3c-odrl 0.0.3-next.53 → 0.0.3-next.55
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 +5 -0
- package/dist/es/dataTypes/odrlDataTypes.js.map +1 -1
- package/dist/es/models/IOdrlAction.js.map +1 -1
- package/dist/es/models/IOdrlAsset.js.map +1 -1
- package/dist/es/models/IOdrlAssetCollection.js.map +1 -1
- package/dist/es/models/IOdrlConstraint.js.map +1 -1
- package/dist/es/models/IOdrlDuty.js.map +1 -1
- package/dist/es/models/IOdrlLogicalConstraint.js.map +1 -1
- package/dist/es/models/IOdrlParty.js.map +1 -1
- package/dist/es/models/IOdrlPartyCollection.js.map +1 -1
- package/dist/es/models/IOdrlPermission.js.map +1 -1
- package/dist/es/models/IOdrlPolicy.js.map +1 -1
- package/dist/es/models/IOdrlProhibition.js.map +1 -1
- package/dist/es/models/IOdrlRule.js.map +1 -1
- package/dist/es/models/odrlContextType.js.map +1 -1
- package/dist/es/schemas/OdrlAction.json +4 -3
- package/dist/es/schemas/OdrlAgreement.json +10 -195
- package/dist/es/schemas/OdrlAsset.json +6 -5
- package/dist/es/schemas/OdrlAssetCollection.json +10 -49
- package/dist/es/schemas/OdrlConstraint.json +6 -7
- package/dist/es/schemas/OdrlContextType.json +30 -0
- package/dist/es/schemas/OdrlDuty.json +12 -158
- package/dist/es/schemas/OdrlLogicalConstraint.json +8 -6
- package/dist/es/schemas/OdrlLogicalConstraintOperand.json +3 -3
- package/dist/es/schemas/OdrlOffer.json +9 -224
- package/dist/es/schemas/OdrlParty.json +8 -6
- package/dist/es/schemas/OdrlPartyCollection.json +9 -73
- package/dist/es/schemas/OdrlPermission.json +9 -155
- package/dist/es/schemas/OdrlPolicy.json +14 -58
- package/dist/es/schemas/OdrlProhibition.json +8 -154
- package/dist/es/schemas/OdrlRule.json +3 -2
- package/dist/es/schemas/OdrlSet.json +8 -253
- package/dist/types/models/IOdrlAction.d.ts +2 -1
- package/dist/types/models/IOdrlAsset.d.ts +3 -2
- package/dist/types/models/IOdrlAssetCollection.d.ts +3 -1
- package/dist/types/models/IOdrlConstraint.d.ts +4 -8
- package/dist/types/models/IOdrlDuty.d.ts +2 -1
- package/dist/types/models/IOdrlLogicalConstraint.d.ts +1 -0
- package/dist/types/models/IOdrlParty.d.ts +6 -4
- package/dist/types/models/IOdrlPartyCollection.d.ts +2 -1
- package/dist/types/models/IOdrlPermission.d.ts +2 -1
- package/dist/types/models/IOdrlPolicy.d.ts +11 -9
- package/dist/types/models/IOdrlProhibition.d.ts +2 -1
- package/dist/types/models/IOdrlRule.d.ts +6 -5
- package/dist/types/models/odrlContextType.d.ts +2 -9
- package/docs/changelog.md +30 -0
- package/docs/reference/classes/OdrlDataTypes.md +2 -2
- package/docs/reference/interfaces/IOdrlAction.md +6 -6
- package/docs/reference/interfaces/IOdrlAgreement.md +20 -20
- package/docs/reference/interfaces/IOdrlAsset.md +6 -6
- package/docs/reference/interfaces/IOdrlAssetCollection.md +9 -9
- package/docs/reference/interfaces/IOdrlConstraint.md +10 -10
- package/docs/reference/interfaces/IOdrlDuty.md +17 -17
- package/docs/reference/interfaces/IOdrlLogicalConstraint.md +5 -5
- package/docs/reference/interfaces/IOdrlLogicalConstraintOperand.md +1 -1
- package/docs/reference/interfaces/IOdrlOffer.md +21 -21
- package/docs/reference/interfaces/IOdrlParty.md +9 -9
- package/docs/reference/interfaces/IOdrlPartyCollection.md +12 -12
- package/docs/reference/interfaces/IOdrlPermission.md +14 -14
- package/docs/reference/interfaces/IOdrlPolicy.md +22 -22
- package/docs/reference/interfaces/IOdrlProhibition.md +14 -14
- package/docs/reference/interfaces/IOdrlRule.md +12 -12
- package/docs/reference/interfaces/IOdrlSet.md +22 -22
- package/docs/reference/type-aliases/OdrlContextType.md +1 -1
- package/docs/reference/variables/ActionType.md +55 -55
- package/docs/reference/variables/ConflictStrategyType.md +3 -3
- package/docs/reference/variables/LeftOperandType.md +32 -32
- package/docs/reference/variables/LogicalConstraintType.md +4 -4
- package/docs/reference/variables/OdrlContexts.md +4 -4
- package/docs/reference/variables/OdrlTypes.md +16 -16
- package/docs/reference/variables/OperatorType.md +14 -14
- package/docs/reference/variables/PolicyType.md +4 -4
- package/docs/reference/variables/RightOperandType.md +1 -1
- package/docs/reference/variables/RuleType.md +3 -3
- package/docs/reference/variables/StatusType.md +4 -4
- package/package.json +3 -3
|
@@ -9,6 +9,7 @@ import OdrlAgreementSchema from "../schemas/OdrlAgreement.json" with { type: "js
|
|
|
9
9
|
import OdrlAssetSchema from "../schemas/OdrlAsset.json" with { type: "json" };
|
|
10
10
|
import OdrlAssetCollectionSchema from "../schemas/OdrlAssetCollection.json" with { type: "json" };
|
|
11
11
|
import OdrlConstraintSchema from "../schemas/OdrlConstraint.json" with { type: "json" };
|
|
12
|
+
import ContextTypeSchema from "../schemas/OdrlContextType.json" with { type: "json" };
|
|
12
13
|
import OdrlDutySchema from "../schemas/OdrlDuty.json" with { type: "json" };
|
|
13
14
|
import OdrlLogicalConstraintSchema from "../schemas/OdrlLogicalConstraint.json" with { type: "json" };
|
|
14
15
|
import OdrlLogicalConstraintOperandSchema from "../schemas/OdrlLogicalConstraintOperand.json" with { type: "json" };
|
|
@@ -98,6 +99,10 @@ export class OdrlDataTypes {
|
|
|
98
99
|
{
|
|
99
100
|
type: OdrlTypes.Rule,
|
|
100
101
|
schema: OdrlRuleSchema
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
type: "ContextType",
|
|
105
|
+
schema: ContextTypeSchema
|
|
101
106
|
}
|
|
102
107
|
];
|
|
103
108
|
DataTypeHelper.registerTypes(OdrlContexts.Namespace, OdrlContexts.JsonLdContext, types);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odrlDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/odrlDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAA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C;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,wBAAwB;gBACxC,MAAM,EAAE,kCAAkC;aAC1C;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,GAAG;gBACnB,MAAM,EAAE,aAAa;aACrB;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,KAAK;gBACrB,MAAM,EAAE,eAAe;aACvB;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,SAAS;gBACzB,MAAM,EAAE,mBAAmB;aAC3B;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,IAAI;gBACpB,MAAM,EAAE,cAAc;aACtB;SACD,CAAC;QAEF,cAAc,CAAC,aAAa,CAAC,YAAY,CAAC,SAAS,EAAE,YAAY,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;QACxF,cAAc,CAAC,aAAa,CAC3B,YAAY,CAAC,mBAAmB,EAChC,YAAY,CAAC,aAAa,EAC1B,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAC7D,CAAC;IACH,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { DataTypeHelper } from \"@twin.org/data-core\";\nimport { JsonLdProcessor } from \"@twin.org/data-json-ld\";\nimport { OdrlContexts } from \"../models/odrlContexts.js\";\nimport { OdrlTypes } from \"../models/types/odrlTypes.js\";\nimport OdrlActionSchema from \"../schemas/OdrlAction.json\" with { type: \"json\" };\nimport OdrlAgreementSchema from \"../schemas/OdrlAgreement.json\" with { type: \"json\" };\nimport OdrlAssetSchema from \"../schemas/OdrlAsset.json\" with { type: \"json\" };\nimport OdrlAssetCollectionSchema from \"../schemas/OdrlAssetCollection.json\" with { type: \"json\" };\nimport OdrlConstraintSchema from \"../schemas/OdrlConstraint.json\" with { type: \"json\" };\nimport OdrlDutySchema from \"../schemas/OdrlDuty.json\" with { type: \"json\" };\nimport OdrlLogicalConstraintSchema from \"../schemas/OdrlLogicalConstraint.json\" with { type: \"json\" };\nimport OdrlLogicalConstraintOperandSchema from \"../schemas/OdrlLogicalConstraintOperand.json\" with { type: \"json\" };\nimport OdrlOfferSchema from \"../schemas/OdrlOffer.json\" with { type: \"json\" };\nimport OdrlPartySchema from \"../schemas/OdrlParty.json\" with { type: \"json\" };\nimport OdrlPartyCollectionSchema from \"../schemas/OdrlPartyCollection.json\" with { type: \"json\" };\nimport OdrlPermissionSchema from \"../schemas/OdrlPermission.json\" with { type: \"json\" };\nimport OdrlPolicySchema from \"../schemas/OdrlPolicy.json\" with { type: \"json\" };\nimport OdrlProhibitionSchema from \"../schemas/OdrlProhibition.json\" with { type: \"json\" };\nimport OdrlRuleSchema from \"../schemas/OdrlRule.json\" with { type: \"json\" };\nimport OdrlSetSchema from \"../schemas/OdrlSet.json\" with { type: \"json\" };\n\n/**\n * Handle all the data types for ODRL.\n */\nexport class OdrlDataTypes {\n\t/**\n\t * Register the JSON-LD Redirects.\n\t */\n\tpublic static registerRedirects(): void {\n\t\tJsonLdProcessor.addRedirect(/https?:\\/\\/www\\.w3\\.org\\/ns\\/odrl\\/?/, OdrlContexts.JsonLdContext);\n\t}\n\n\t/**\n\t * Register all the data types.\n\t */\n\tpublic static registerTypes(): void {\n\t\tconst types = [\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Policy,\n\t\t\t\tschema: OdrlPolicySchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Asset,\n\t\t\t\tschema: OdrlAssetSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.AssetCollection,\n\t\t\t\tschema: OdrlAssetCollectionSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Party,\n\t\t\t\tschema: OdrlPartySchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.PartyCollection,\n\t\t\t\tschema: OdrlPartyCollectionSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Action,\n\t\t\t\tschema: OdrlActionSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Permission,\n\t\t\t\tschema: OdrlPermissionSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Prohibition,\n\t\t\t\tschema: OdrlProhibitionSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Duty,\n\t\t\t\tschema: OdrlDutySchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Constraint,\n\t\t\t\tschema: OdrlConstraintSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.LogicalConstraint,\n\t\t\t\tschema: OdrlLogicalConstraintSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.LogicalConstraintOperand,\n\t\t\t\tschema: OdrlLogicalConstraintOperandSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Set,\n\t\t\t\tschema: OdrlSetSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Offer,\n\t\t\t\tschema: OdrlOfferSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Agreement,\n\t\t\t\tschema: OdrlAgreementSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Rule,\n\t\t\t\tschema: OdrlRuleSchema\n\t\t\t}\n\t\t];\n\n\t\tDataTypeHelper.registerTypes(OdrlContexts.Namespace, OdrlContexts.JsonLdContext, types);\n\t\tDataTypeHelper.registerTypes(\n\t\t\tOdrlContexts.JsonSchemaNamespace,\n\t\t\tOdrlContexts.JsonLdContext,\n\t\t\ttypes.map(t => ({ type: `Odrl${t.type}`, schema: t.schema }))\n\t\t);\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"odrlDataTypes.js","sourceR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AAE,cAAc;aACtB;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,UAAU;gBAC1B,MAAM,EAAE,oBAAoB;aAC5B;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,iBAAiB;gBACjC,MAAM,EAAE,2BAA2B;aACnC;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,wBAAwB;gBACxC,MAAM,EAAE,kCAAkC;aAC1C;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,GAAG;gBACnB,MAAM,EAAE,aAAa;aACrB;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,KAAK;gBACrB,MAAM,EAAE,eAAe;aACvB;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,SAAS;gBACzB,MAAM,EAAE,mBAAmB;aAC3B;YACD;gBACC,IAAI,EAAE,SAAS,CAAC,IAAI;gBACpB,MAAM,EAAE,cAAc;aACtB;YACD;gBACC,IAAI,EAAE,aAAa;gBACnB,MAAM,EAAE,iBAAiB;aACzB;SACD,CAAC;QAEF,cAAc,CAAC,aAAa,CAAC,YAAY,CAAC,SAAS,EAAE,YAAY,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;QACxF,cAAc,CAAC,aAAa,CAC3B,YAAY,CAAC,mBAAmB,EAChC,YAAY,CAAC,aAAa,EAC1B,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAC7D,CAAC;IACH,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { DataTypeHelper } from \"@twin.org/data-core\";\nimport { JsonLdProcessor } from \"@twin.org/data-json-ld\";\nimport { OdrlContexts } from \"../models/odrlContexts.js\";\nimport { OdrlTypes } from \"../models/types/odrlTypes.js\";\nimport OdrlActionSchema from \"../schemas/OdrlAction.json\" with { type: \"json\" };\nimport OdrlAgreementSchema from \"../schemas/OdrlAgreement.json\" with { type: \"json\" };\nimport OdrlAssetSchema from \"../schemas/OdrlAsset.json\" with { type: \"json\" };\nimport OdrlAssetCollectionSchema from \"../schemas/OdrlAssetCollection.json\" with { type: \"json\" };\nimport OdrlConstraintSchema from \"../schemas/OdrlConstraint.json\" with { type: \"json\" };\nimport ContextTypeSchema from \"../schemas/OdrlContextType.json\" with { type: \"json\" };\nimport OdrlDutySchema from \"../schemas/OdrlDuty.json\" with { type: \"json\" };\nimport OdrlLogicalConstraintSchema from \"../schemas/OdrlLogicalConstraint.json\" with { type: \"json\" };\nimport OdrlLogicalConstraintOperandSchema from \"../schemas/OdrlLogicalConstraintOperand.json\" with { type: \"json\" };\nimport OdrlOfferSchema from \"../schemas/OdrlOffer.json\" with { type: \"json\" };\nimport OdrlPartySchema from \"../schemas/OdrlParty.json\" with { type: \"json\" };\nimport OdrlPartyCollectionSchema from \"../schemas/OdrlPartyCollection.json\" with { type: \"json\" };\nimport OdrlPermissionSchema from \"../schemas/OdrlPermission.json\" with { type: \"json\" };\nimport OdrlPolicySchema from \"../schemas/OdrlPolicy.json\" with { type: \"json\" };\nimport OdrlProhibitionSchema from \"../schemas/OdrlProhibition.json\" with { type: \"json\" };\nimport OdrlRuleSchema from \"../schemas/OdrlRule.json\" with { type: \"json\" };\nimport OdrlSetSchema from \"../schemas/OdrlSet.json\" with { type: \"json\" };\n\n/**\n * Handle all the data types for ODRL.\n */\nexport class OdrlDataTypes {\n\t/**\n\t * Register the JSON-LD Redirects.\n\t */\n\tpublic static registerRedirects(): void {\n\t\tJsonLdProcessor.addRedirect(/https?:\\/\\/www\\.w3\\.org\\/ns\\/odrl\\/?/, OdrlContexts.JsonLdContext);\n\t}\n\n\t/**\n\t * Register all the data types.\n\t */\n\tpublic static registerTypes(): void {\n\t\tconst types = [\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Policy,\n\t\t\t\tschema: OdrlPolicySchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Asset,\n\t\t\t\tschema: OdrlAssetSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.AssetCollection,\n\t\t\t\tschema: OdrlAssetCollectionSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Party,\n\t\t\t\tschema: OdrlPartySchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.PartyCollection,\n\t\t\t\tschema: OdrlPartyCollectionSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Action,\n\t\t\t\tschema: OdrlActionSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Permission,\n\t\t\t\tschema: OdrlPermissionSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Prohibition,\n\t\t\t\tschema: OdrlProhibitionSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Duty,\n\t\t\t\tschema: OdrlDutySchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Constraint,\n\t\t\t\tschema: OdrlConstraintSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.LogicalConstraint,\n\t\t\t\tschema: OdrlLogicalConstraintSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.LogicalConstraintOperand,\n\t\t\t\tschema: OdrlLogicalConstraintOperandSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Set,\n\t\t\t\tschema: OdrlSetSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Offer,\n\t\t\t\tschema: OdrlOfferSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Agreement,\n\t\t\t\tschema: OdrlAgreementSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: OdrlTypes.Rule,\n\t\t\t\tschema: OdrlRuleSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: \"ContextType\",\n\t\t\t\tschema: ContextTypeSchema\n\t\t\t}\n\t\t];\n\n\t\tDataTypeHelper.registerTypes(OdrlContexts.Namespace, OdrlContexts.JsonLdContext, types);\n\t\tDataTypeHelper.registerTypes(\n\t\t\tOdrlContexts.JsonSchemaNamespace,\n\t\t\tOdrlContexts.JsonLdContext,\n\t\t\ttypes.map(t => ({ type: `Odrl${t.type}`, schema: t.schema }))\n\t\t);\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOdrlAction.js","sourceRoot":"","sources":["../../../src/models/IOdrlAction.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IOdrlConstraint } from \"./IOdrlConstraint.js\";\nimport type { IOdrlLogicalConstraint } from \"./IOdrlLogicalConstraint.js\";\nimport type { ActionType } from \"./types/actionType.js\";\n\n/**\n * Interface for ODRL Actions.\n * https://www.w3.org/TR/odrl-model/#action\n */\nexport interface IOdrlAction {\n\t/**\n\t * The value/identifier of the action.\n\t * Used in complex action definitions.\n\t */\n\t\"rdf:value\"?: { \"@id\": string };\n\n\t/**\n\t * Direct action identifier.\n\t * Used in simple action references.\n\t */\n\t\"@id\"?: string;\n\n\t/**\n\t * Refinements applied to the action.\n\t */\n\trefinement
|
|
1
|
+
{"version":3,"file":"IOdrlAction.js","sourceRoot":"","sources":["../../../src/models/IOdrlAction.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ObjectOrArray } from \"@twin.org/core\";\nimport type { IOdrlConstraint } from \"./IOdrlConstraint.js\";\nimport type { IOdrlLogicalConstraint } from \"./IOdrlLogicalConstraint.js\";\nimport type { ActionType } from \"./types/actionType.js\";\n\n/**\n * Interface for ODRL Actions.\n * https://www.w3.org/TR/odrl-model/#action\n */\nexport interface IOdrlAction {\n\t/**\n\t * The value/identifier of the action.\n\t * Used in complex action definitions.\n\t */\n\t\"rdf:value\"?: { \"@id\": string };\n\n\t/**\n\t * Direct action identifier.\n\t * Used in simple action references.\n\t */\n\t\"@id\"?: string;\n\n\t/**\n\t * Refinements applied to the action.\n\t */\n\trefinement?: ObjectOrArray<IOdrlConstraint | IOdrlLogicalConstraint>;\n\n\t/**\n\t * Reference to the action this action is included in.\n\t */\n\tincludedIn?: ActionType | string;\n\n\t/**\n\t * References to actions this action implies.\n\t */\n\timplies?: (ActionType | string)[];\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOdrlAsset.js","sourceRoot":"","sources":["../../../src/models/IOdrlAsset.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IOdrlAssetCollection } from \"./IOdrlAssetCollection.js\";\n\n/**\n * Interface for ODRL Assets.\n * https://www.w3.org/TR/odrl-model/#asset\n */\nexport interface IOdrlAsset {\n\t/**\n\t * The unique identifier for the asset.\n\t * Should be an IRI.\n\t */\n\tuid?: string;\n\n\t/**\n\t * The type of the asset.\n\t * Can be used to specify additional type information.\n\t */\n\t\"@type\"?: string;\n\n\t/**\n\t * Reference to the asset collection this asset is part of.\n\t * Used to identify an AssetCollection that this Asset is a member of.\n\t */\n\tpartOf?: string | IOdrlAssetCollection
|
|
1
|
+
{"version":3,"file":"IOdrlAsset.js","sourceRoot":"","sources":["../../../src/models/IOdrlAsset.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ObjectOrArray } from \"@twin.org/core\";\nimport type { IOdrlAssetCollection } from \"./IOdrlAssetCollection.js\";\n\n/**\n * Interface for ODRL Assets.\n * https://www.w3.org/TR/odrl-model/#asset\n */\nexport interface IOdrlAsset {\n\t/**\n\t * The unique identifier for the asset.\n\t * Should be an IRI.\n\t */\n\tuid?: string;\n\n\t/**\n\t * The type of the asset.\n\t * Can be used to specify additional type information.\n\t */\n\t\"@type\"?: string;\n\n\t/**\n\t * Reference to the asset collection this asset is part of.\n\t * Used to identify an AssetCollection that this Asset is a member of.\n\t */\n\tpartOf?: ObjectOrArray<string | IOdrlAssetCollection>;\n\n\t/**\n\t * Reference to the policy that governs this asset.\n\t * Used to identify the Policy that governs this Asset.\n\t */\n\thasPolicy?: ObjectOrArray<string>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOdrlAssetCollection.js","sourceRoot":"","sources":["../../../src/models/IOdrlAssetCollection.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IOdrlAsset } from \"./IOdrlAsset.js\";\nimport type { IOdrlConstraint } from \"./IOdrlConstraint.js\";\nimport type { IOdrlLogicalConstraint } from \"./IOdrlLogicalConstraint.js\";\n\n/**\n * Interface for ODRL Asset Collections.\n * An AssetCollection is a single resource representing a set of member resources,\n * where all members of the set will be the subject of the Rule.\n * https://www.w3.org/TR/odrl-model/#asset\n */\nexport interface IOdrlAssetCollection extends IOdrlAsset {\n\t/**\n\t * Reference to the source of the asset collection.\n\t * Must be an IRI that references the AssetCollection.\n\t */\n\tsource: string;\n\n\t/**\n\t * Refinements applied to the asset collection.\n\t * Used to specify the refinement context under which to identify individual Asset(s)\n\t * of the complete collection. The refinement applies to the characteristics of each\n\t * member of the collection (not the resource as a whole).\n\t */\n\trefinement
|
|
1
|
+
{"version":3,"file":"IOdrlAssetCollection.js","sourceRoot":"","sources":["../../../src/models/IOdrlAssetCollection.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ObjectOrArray } from \"@twin.org/core\";\nimport type { IOdrlAsset } from \"./IOdrlAsset.js\";\nimport type { IOdrlConstraint } from \"./IOdrlConstraint.js\";\nimport type { IOdrlLogicalConstraint } from \"./IOdrlLogicalConstraint.js\";\n\n/**\n * Interface for ODRL Asset Collections.\n * An AssetCollection is a single resource representing a set of member resources,\n * where all members of the set will be the subject of the Rule.\n * https://www.w3.org/TR/odrl-model/#asset\n */\nexport interface IOdrlAssetCollection extends IOdrlAsset {\n\t/**\n\t * Reference to the source of the asset collection.\n\t * Must be an IRI that references the AssetCollection.\n\t * @json-schema format:uri\n\t */\n\tsource: string;\n\n\t/**\n\t * Refinements applied to the asset collection.\n\t * Used to specify the refinement context under which to identify individual Asset(s)\n\t * of the complete collection. The refinement applies to the characteristics of each\n\t * member of the collection (not the resource as a whole).\n\t */\n\trefinement?: ObjectOrArray<IOdrlConstraint | IOdrlLogicalConstraint>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOdrlConstraint.js","sourceRoot":"","sources":["../../../src/models/IOdrlConstraint.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { LeftOperandType } from \"./types/leftOperandType.js\";\nimport type { OperatorType } from \"./types/operatorType.js\";\nimport type { StatusType } from \"./types/statusType.js\";\n\n/**\n * Interface for ODRL Constraints.\n * https://www.w3.org/TR/odrl-model/#constraint\n */\nexport interface IOdrlConstraint {\n\t/**\n\t * Optional unique identifier for the constraint.\n\t */\n\tuid?: string;\n\n\t/**\n\t * The left operand of the constraint.\n\t */\n\tleftOperand: string | LeftOperandType;\n\n\t/**\n\t * The operator of the constraint.\n\t */\n\toperator: OperatorType;\n\n\t/**\n\t * The right operand of the constraint.\n\t * value with optional @type is used for literal values (like \"5.00\" with type \"xsd:decimal\")\n\t * id is used when referencing a URI/identifier (like odrl:policyUsage)\n\t * Mutually exclusive with rightOperandReference.\n\t */\n\trightOperand
|
|
1
|
+
{"version":3,"file":"IOdrlConstraint.js","sourceRoot":"","sources":["../../../src/models/IOdrlConstraint.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ObjectOrArray } from \"@twin.org/core\";\nimport type { LeftOperandType } from \"./types/leftOperandType.js\";\nimport type { OperatorType } from \"./types/operatorType.js\";\nimport type { StatusType } from \"./types/statusType.js\";\n\n/**\n * Interface for ODRL Constraints.\n * https://www.w3.org/TR/odrl-model/#constraint\n */\nexport interface IOdrlConstraint {\n\t/**\n\t * Optional unique identifier for the constraint.\n\t */\n\tuid?: string;\n\n\t/**\n\t * The left operand of the constraint.\n\t */\n\tleftOperand: string | LeftOperandType;\n\n\t/**\n\t * The operator of the constraint.\n\t */\n\toperator: OperatorType;\n\n\t/**\n\t * The right operand of the constraint.\n\t * value with optional @type is used for literal values (like \"5.00\" with type \"xsd:decimal\")\n\t * id is used when referencing a URI/identifier (like odrl:policyUsage)\n\t * Mutually exclusive with rightOperandReference.\n\t */\n\trightOperand?: ObjectOrArray<\n\t\t| string\n\t\t| {\n\t\t\t\t\"@value\": string;\n\t\t\t\t\"@type\"?: string;\n\t\t }\n\t\t| {\n\t\t\t\t\"@id\": string;\n\t\t }\n\t>;\n\n\t/**\n\t * Reference to the right operand.\n\t * Can be used to reference external resources or policies using an IRI.\n\t * Mutually exclusive with rightOperand.\n\t */\n\trightOperandReference?: ObjectOrArray<string>;\n\n\t/**\n\t * The data type of the right operand.\n\t */\n\tdataType?: string;\n\n\t/**\n\t * The unit for the right operand value.\n\t */\n\tunit?: string;\n\n\t/**\n\t * The status value for comparison.\n\t */\n\tstatus?: StatusType;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOdrlDuty.js","sourceRoot":"","sources":["../../../src/models/IOdrlDuty.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IOdrlRule } from \"./IOdrlRule.js\";\n\n/**\n * Interface for Duty Rules.\n * A Duty is the obligation to exercise an action, with all refinements satisfied.\n * A Duty is fulfilled if all constraints are satisfied and if its action has been exercised.\n * https://www.w3.org/TR/odrl-model/#duty\n */\nexport interface IOdrlDuty extends IOdrlRule {\n\t/**\n\t * The party to be attributed\n\t * Used when the duty involves attribution\n\t */\n\tattributedParty?: string;\n\n\t/**\n\t * The party performing the tracking\n\t * Used when the duty involves tracking\n\t */\n\ttrackingParty?: string;\n\t/**\n\t * The consequences if the duty is not fulfilled.\n\t * Only applicable when the Duty is referenced by a Rule with duty or obligation\n\t * properties.\n\t */\n\tconsequence?: IOdrlDuty
|
|
1
|
+
{"version":3,"file":"IOdrlDuty.js","sourceRoot":"","sources":["../../../src/models/IOdrlDuty.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ObjectOrArray } from \"@twin.org/core\";\nimport type { IOdrlRule } from \"./IOdrlRule.js\";\n\n/**\n * Interface for Duty Rules.\n * A Duty is the obligation to exercise an action, with all refinements satisfied.\n * A Duty is fulfilled if all constraints are satisfied and if its action has been exercised.\n * https://www.w3.org/TR/odrl-model/#duty\n */\nexport interface IOdrlDuty extends IOdrlRule {\n\t/**\n\t * The party to be attributed\n\t * Used when the duty involves attribution\n\t */\n\tattributedParty?: string;\n\n\t/**\n\t * The party performing the tracking\n\t * Used when the duty involves tracking\n\t */\n\ttrackingParty?: string;\n\t/**\n\t * The consequences if the duty is not fulfilled.\n\t * Only applicable when the Duty is referenced by a Rule with duty or obligation\n\t * properties.\n\t */\n\tconsequence?: ObjectOrArray<IOdrlDuty>;\n\n\t/**\n\t * The party to be compensated\n\t * Used when the duty involves compensation\n\t */\n\tcompensatedParty?: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOdrlLogicalConstraint.js","sourceRoot":"","sources":["../../../src/models/IOdrlLogicalConstraint.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IOdrlLogicalConstraintOperand } from \"./IOdrlLogicalConstraintOperand.js\";\n\n/**\n * Interface for ODRL Logical Constraints.\n * A Logical Constraint compares two or more existing Constraints by one logical operator.\n * If the comparison returns a logical match, then the Logical Constraint is satisfied.\n * https://www.w3.org/TR/odrl-model/#constraint-logical\n */\nexport interface IOdrlLogicalConstraint {\n\t/**\n\t * Optional unique identifier for the logical constraint.\n\t * Must be an IRI.\n\t */\n\tuid?: string;\n\n\t/**\n\t * AND operator - all constraints must be satisfied.\n\t * Exactly one logical operator must be present.\n\t */\n\tand?: IOdrlLogicalConstraintOperand;\n\n\t/**\n\t * OR operator - at least one constraint must be satisfied.\n\t * Exactly one logical operator must be present.\n\t */\n\tor?: IOdrlLogicalConstraintOperand;\n\n\t/**\n\t * XOR operator - exactly one constraint must be satisfied.\n\t * Exactly one logical operator must be present.\n\t */\n\txone?: IOdrlLogicalConstraintOperand;\n\n\t/**\n\t * AND Sequence operator - all constraints must be satisfied in order.\n\t * Exactly one logical operator must be present.\n\t */\n\tandSequence?: IOdrlLogicalConstraintOperand;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IOdrlLogicalConstraint.js","sourceRoot":"","sources":["../../../src/models/IOdrlLogicalConstraint.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IOdrlLogicalConstraintOperand } from \"./IOdrlLogicalConstraintOperand.js\";\n\n/**\n * Interface for ODRL Logical Constraints.\n * A Logical Constraint compares two or more existing Constraints by one logical operator.\n * If the comparison returns a logical match, then the Logical Constraint is satisfied.\n * https://www.w3.org/TR/odrl-model/#constraint-logical\n */\nexport interface IOdrlLogicalConstraint {\n\t/**\n\t * Optional unique identifier for the logical constraint.\n\t * Must be an IRI.\n\t * @json-schema format:uri\n\t */\n\tuid?: string;\n\n\t/**\n\t * AND operator - all constraints must be satisfied.\n\t * Exactly one logical operator must be present.\n\t */\n\tand?: IOdrlLogicalConstraintOperand;\n\n\t/**\n\t * OR operator - at least one constraint must be satisfied.\n\t * Exactly one logical operator must be present.\n\t */\n\tor?: IOdrlLogicalConstraintOperand;\n\n\t/**\n\t * XOR operator - exactly one constraint must be satisfied.\n\t * Exactly one logical operator must be present.\n\t */\n\txone?: IOdrlLogicalConstraintOperand;\n\n\t/**\n\t * AND Sequence operator - all constraints must be satisfied in order.\n\t * Exactly one logical operator must be present.\n\t */\n\tandSequence?: IOdrlLogicalConstraintOperand;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOdrlParty.js","sourceRoot":"","sources":["../../../src/models/IOdrlParty.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IOdrlPartyCollection } from \"./IOdrlPartyCollection.js\";\n\n/**\n * Interface for ODRL Parties.\n * https://www.w3.org/TR/odrl-model/#party\n */\nexport interface IOdrlParty {\n\t/**\n\t * The unique identifier for the party.\n\t * Must be an IRI.\n\t */\n\tuid?: string;\n\n\t/**\n\t * The type of the party.\n\t * Can be used to specify additional type information (e.g., \"Party\",\n\t * \"vcard:Organization\", \"vcard:Individual\").\n\t */\n\t\"@type\"?: string
|
|
1
|
+
{"version":3,"file":"IOdrlParty.js","sourceRoot":"","sources":["../../../src/models/IOdrlParty.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ObjectOrArray } from \"@twin.org/core\";\nimport type { IOdrlPartyCollection } from \"./IOdrlPartyCollection.js\";\n\n/**\n * Interface for ODRL Parties.\n * https://www.w3.org/TR/odrl-model/#party\n */\nexport interface IOdrlParty {\n\t/**\n\t * The unique identifier for the party.\n\t * Must be an IRI.\n\t * @json-schema format:uri\n\t */\n\tuid?: string;\n\n\t/**\n\t * The type of the party.\n\t * Can be used to specify additional type information (e.g., \"Party\",\n\t * \"vcard:Organization\", \"vcard:Individual\").\n\t */\n\t\"@type\"?: ObjectOrArray<string>;\n\n\t/**\n\t * Reference to the party collection this party is part of.\n\t * Used to identify a PartyCollection that a Party entity is a member of.\n\t */\n\tpartOf?: ObjectOrArray<string | IOdrlPartyCollection>;\n\n\t/**\n\t * Reference to a policy where this party is an assignee.\n\t * When assigneeOf is asserted, the Party MUST be inferred to undertake\n\t * the assignee functional role of all the Rules of that Policy.\n\t */\n\tassigneeOf?: ObjectOrArray<string>;\n\n\t/**\n\t * Reference to a policy where this party is an assigner.\n\t * When assignerOf is asserted, the Party MUST be inferred to undertake\n\t * the assigner functional role of all the Rules of that Policy.\n\t */\n\tassignerOf?: ObjectOrArray<string>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOdrlPartyCollection.js","sourceRoot":"","sources":["../../../src/models/IOdrlPartyCollection.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IOdrlConstraint } from \"./IOdrlConstraint.js\";\nimport type { IOdrlLogicalConstraint } from \"./IOdrlLogicalConstraint.js\";\nimport type { IOdrlParty } from \"./IOdrlParty.js\";\n\n/**\n * Interface for ODRL Party Collections.\n * A PartyCollection identifies a collection of entities and is a subclass of Party.\n * https://www.w3.org/TR/odrl-model/#party\n */\nexport interface IOdrlPartyCollection extends IOdrlParty {\n\t/**\n\t * Reference to the source of the party collection.\n\t * Used to identify the origin or location of the collection.\n\t */\n\tsource: string;\n\n\t/**\n\t * Refinements applied to the party collection.\n\t * Used to specify constraints that apply to all members of the collection.\n\t */\n\trefinement
|
|
1
|
+
{"version":3,"file":"IOdrlPartyCollection.js","sourceRoot":"","sources":["../../../src/models/IOdrlPartyCollection.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ObjectOrArray } from \"@twin.org/core\";\nimport type { IOdrlConstraint } from \"./IOdrlConstraint.js\";\nimport type { IOdrlLogicalConstraint } from \"./IOdrlLogicalConstraint.js\";\nimport type { IOdrlParty } from \"./IOdrlParty.js\";\n\n/**\n * Interface for ODRL Party Collections.\n * A PartyCollection identifies a collection of entities and is a subclass of Party.\n * https://www.w3.org/TR/odrl-model/#party\n */\nexport interface IOdrlPartyCollection extends IOdrlParty {\n\t/**\n\t * Reference to the source of the party collection.\n\t * Used to identify the origin or location of the collection.\n\t */\n\tsource: string;\n\n\t/**\n\t * Refinements applied to the party collection.\n\t * Used to specify constraints that apply to all members of the collection.\n\t */\n\trefinement?: ObjectOrArray<IOdrlConstraint | IOdrlLogicalConstraint>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOdrlPermission.js","sourceRoot":"","sources":["../../../src/models/IOdrlPermission.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IOdrlDuty } from \"./IOdrlDuty.js\";\nimport type { IOdrlRule } from \"./IOdrlRule.js\";\n\n/**\n * Interface for Permission Rules.\n * A Permission allows an action to be exercised on an Asset\n * if all constraints are satisfied and if all duties are fulfilled.\n * https://www.w3.org/TR/odrl-model/#permission\n */\nexport interface IOdrlPermission extends IOdrlRule {\n\t/**\n\t * The duties that must be fulfilled before the permission can be exercised.\n\t * A Permission MAY have none, one, or more duty property values.\n\t */\n\tduty?: IOdrlDuty
|
|
1
|
+
{"version":3,"file":"IOdrlPermission.js","sourceRoot":"","sources":["../../../src/models/IOdrlPermission.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ObjectOrArray } from \"@twin.org/core\";\nimport type { IOdrlDuty } from \"./IOdrlDuty.js\";\nimport type { IOdrlRule } from \"./IOdrlRule.js\";\n\n/**\n * Interface for Permission Rules.\n * A Permission allows an action to be exercised on an Asset\n * if all constraints are satisfied and if all duties are fulfilled.\n * https://www.w3.org/TR/odrl-model/#permission\n */\nexport interface IOdrlPermission extends IOdrlRule {\n\t/**\n\t * The duties that must be fulfilled before the permission can be exercised.\n\t * A Permission MAY have none, one, or more duty property values.\n\t */\n\tduty?: ObjectOrArray<IOdrlDuty>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOdrlPolicy.js","sourceRoot":"","sources":["../../../src/models/IOdrlPolicy.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IOdrlAction } from \"./IOdrlAction.js\";\nimport type { IOdrlAsset } from \"./IOdrlAsset.js\";\nimport type { IOdrlAssetCollection } from \"./IOdrlAssetCollection.js\";\nimport type { IOdrlDuty } from \"./IOdrlDuty.js\";\nimport type { IOdrlParty } from \"./IOdrlParty.js\";\nimport type { IOdrlPartyCollection } from \"./IOdrlPartyCollection.js\";\nimport type { IOdrlPermission } from \"./IOdrlPermission.js\";\nimport type { IOdrlProhibition } from \"./IOdrlProhibition.js\";\nimport type { OdrlContextType } from \"./odrlContextType.js\";\nimport type { ActionType } from \"./types/actionType.js\";\nimport type { ConflictStrategyType } from \"./types/conflictStrategyType.js\";\nimport type { PolicyType } from \"./types/policyType.js\";\n\n/**\n * Interface representing an ODRL Policy.\n * https://www.w3.org/TR/odrl-model/#policy\n */\nexport interface IOdrlPolicy {\n\t/**\n\t * The context for the policy.\n\t * Must include \"https://www.w3.org/ns/odrl.jsonld\"\n\t */\n\t\"@context\": OdrlContextType;\n\n\t/**\n\t * The type of policy.\n\t * Must be one of: \"Set\", \"Offer\", \"Agreement\"\n\t */\n\t\"@type\": PolicyType;\n\n\t/**\n\t * The unique identifier for the policy.\n\t * Must be an IRI.\n\t */\n\tuid: string;\n\n\t/**\n\t * The profile(s) this policy conforms to.\n\t * IRIs identifying the ODRL Profile(s).\n\t */\n\tprofile?: string
|
|
1
|
+
{"version":3,"file":"IOdrlPolicy.js","sourceRoot":"","sources":["../../../src/models/IOdrlPolicy.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ObjectOrArray } from \"@twin.org/core\";\nimport type { IOdrlAction } from \"./IOdrlAction.js\";\nimport type { IOdrlAsset } from \"./IOdrlAsset.js\";\nimport type { IOdrlAssetCollection } from \"./IOdrlAssetCollection.js\";\nimport type { IOdrlDuty } from \"./IOdrlDuty.js\";\nimport type { IOdrlParty } from \"./IOdrlParty.js\";\nimport type { IOdrlPartyCollection } from \"./IOdrlPartyCollection.js\";\nimport type { IOdrlPermission } from \"./IOdrlPermission.js\";\nimport type { IOdrlProhibition } from \"./IOdrlProhibition.js\";\nimport type { OdrlContextType } from \"./odrlContextType.js\";\nimport type { ActionType } from \"./types/actionType.js\";\nimport type { ConflictStrategyType } from \"./types/conflictStrategyType.js\";\nimport type { PolicyType } from \"./types/policyType.js\";\n\n/**\n * Interface representing an ODRL Policy.\n * https://www.w3.org/TR/odrl-model/#policy\n */\nexport interface IOdrlPolicy {\n\t/**\n\t * The context for the policy.\n\t * Must include \"https://www.w3.org/ns/odrl.jsonld\"\n\t */\n\t\"@context\": OdrlContextType;\n\n\t/**\n\t * The type of policy.\n\t * Must be one of: \"Set\", \"Offer\", \"Agreement\"\n\t */\n\t\"@type\": PolicyType;\n\n\t/**\n\t * The unique identifier for the policy.\n\t * Must be an IRI.\n\t * @json-schema format:uri\n\t */\n\tuid: string;\n\n\t/**\n\t * The profile(s) this policy conforms to.\n\t * IRIs identifying the ODRL Profile(s).\n\t */\n\tprofile?: ObjectOrArray<string>;\n\n\t/**\n\t * The assigner of the policy.\n\t * Applies to all rules unless overridden at rule level.\n\t */\n\tassigner?: ObjectOrArray<string | IOdrlParty | IOdrlPartyCollection>;\n\n\t/**\n\t * The assignee of the policy.\n\t * Applies to all rules unless overridden at rule level.\n\t */\n\tassignee?: ObjectOrArray<string | IOdrlParty | IOdrlPartyCollection>;\n\n\t/**\n\t * The target asset for the rule.\n\t */\n\ttarget?: ObjectOrArray<string | IOdrlAsset | IOdrlAssetCollection>;\n\n\t/**\n\t * The action associated with the rule.\n\t */\n\taction?: ObjectOrArray<ActionType | string | IOdrlAction>;\n\n\t/**\n\t * The parent policy(ies) this policy inherits from.\n\t * IRIs identifying the parent Policy(ies).\n\t */\n\tinheritFrom?: ObjectOrArray<string>;\n\n\t/**\n\t * The conflict resolution strategy.\n\t * - perm: Permissions override Prohibitions\n\t * - prohibit: Prohibitions override Permissions\n\t * - invalid: Policy is void if conflicts exist (default)\n\t */\n\tconflict?: ConflictStrategyType;\n\n\t/**\n\t * The permissions in the policy.\n\t * At least one of permission, prohibition, or obligation must be present.\n\t */\n\tpermission?: ObjectOrArray<IOdrlPermission>;\n\n\t/**\n\t * The prohibitions in the policy.\n\t * At least one of permission, prohibition, or obligation must be present.\n\t */\n\tprohibition?: ObjectOrArray<IOdrlProhibition>;\n\n\t/**\n\t * The obligations in the policy.\n\t * At least one of permission, prohibition, or obligation must be present.\n\t */\n\tobligation?: ObjectOrArray<IOdrlDuty>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOdrlProhibition.js","sourceRoot":"","sources":["../../../src/models/IOdrlProhibition.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IOdrlDuty } from \"./IOdrlDuty.js\";\nimport type { IOdrlRule } from \"./IOdrlRule.js\";\n\n/**\n * Interface for Prohibition Rules.\n * https://www.w3.org/TR/odrl-model/#prohibition\n */\nexport interface IOdrlProhibition extends IOdrlRule {\n\t/**\n\t * The remedies that must be fulfilled if prohibition is violated.\n\t */\n\tremedy?: IOdrlDuty
|
|
1
|
+
{"version":3,"file":"IOdrlProhibition.js","sourceRoot":"","sources":["../../../src/models/IOdrlProhibition.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ObjectOrArray } from \"@twin.org/core\";\nimport type { IOdrlDuty } from \"./IOdrlDuty.js\";\nimport type { IOdrlRule } from \"./IOdrlRule.js\";\n\n/**\n * Interface for Prohibition Rules.\n * https://www.w3.org/TR/odrl-model/#prohibition\n */\nexport interface IOdrlProhibition extends IOdrlRule {\n\t/**\n\t * The remedies that must be fulfilled if prohibition is violated.\n\t */\n\tremedy?: ObjectOrArray<IOdrlDuty>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOdrlRule.js","sourceRoot":"","sources":["../../../src/models/IOdrlRule.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IOdrlAction } from \"./IOdrlAction.js\";\nimport type { IOdrlAsset } from \"./IOdrlAsset.js\";\nimport type { IOdrlAssetCollection } from \"./IOdrlAssetCollection.js\";\nimport type { IOdrlConstraint } from \"./IOdrlConstraint.js\";\nimport type { IOdrlLogicalConstraint } from \"./IOdrlLogicalConstraint.js\";\nimport type { IOdrlParty } from \"./IOdrlParty.js\";\nimport type { IOdrlPartyCollection } from \"./IOdrlPartyCollection.js\";\nimport type { ActionType } from \"./types/actionType.js\";\n\n/**\n * Base interface for ODRL Rules.\n * https://www.w3.org/TR/odrl-model/#rule\n */\nexport interface IOdrlRule {\n\t/**\n\t * Optional unique identifier for the rule.\n\t */\n\tuid?: string;\n\n\t/**\n\t * The action associated with the rule.\n\t */\n\taction?: ActionType | string | IOdrlAction
|
|
1
|
+
{"version":3,"file":"IOdrlRule.js","sourceRoot":"","sources":["../../../src/models/IOdrlRule.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ObjectOrArray } from \"@twin.org/core\";\nimport type { IOdrlAction } from \"./IOdrlAction.js\";\nimport type { IOdrlAsset } from \"./IOdrlAsset.js\";\nimport type { IOdrlAssetCollection } from \"./IOdrlAssetCollection.js\";\nimport type { IOdrlConstraint } from \"./IOdrlConstraint.js\";\nimport type { IOdrlLogicalConstraint } from \"./IOdrlLogicalConstraint.js\";\nimport type { IOdrlParty } from \"./IOdrlParty.js\";\nimport type { IOdrlPartyCollection } from \"./IOdrlPartyCollection.js\";\nimport type { ActionType } from \"./types/actionType.js\";\n\n/**\n * Base interface for ODRL Rules.\n * https://www.w3.org/TR/odrl-model/#rule\n */\nexport interface IOdrlRule {\n\t/**\n\t * Optional unique identifier for the rule.\n\t */\n\tuid?: string;\n\n\t/**\n\t * The action associated with the rule.\n\t */\n\taction?: ObjectOrArray<ActionType | string | IOdrlAction>;\n\n\t/**\n\t * The target asset for the rule.\n\t */\n\ttarget?: ObjectOrArray<string | IOdrlAsset | IOdrlAssetCollection>;\n\n\t/**\n\t * The assigner of the rule.\n\t */\n\tassigner?: ObjectOrArray<string | IOdrlParty | IOdrlPartyCollection>;\n\n\t/**\n\t * The assignee of the rule.\n\t */\n\tassignee?: ObjectOrArray<string | IOdrlParty | IOdrlPartyCollection>;\n\n\t/**\n\t * Constraints applied to the rule.\n\t */\n\tconstraint?: ObjectOrArray<IOdrlConstraint | IOdrlLogicalConstraint>;\n\n\t/**\n\t * Additional relation sub-properties as defined in ODRL profiles.\n\t * For example, 'summary' in profile \"http://example.com/odrl:profile:03\"\n\t * indicates where the output should be stored.\n\t */\n\tsummary?: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odrlContextType.js","sourceRoot":"","sources":["../../../src/models/odrlContextType.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { OdrlContexts } from \"./odrlContexts.js\";\n\n/**\n * The ODRL JSON-LD context type.\n */\nexport type OdrlContextType =\n\t| typeof OdrlContexts.Context\n\t|
|
|
1
|
+
{"version":3,"file":"odrlContextType.js","sourceRoot":"","sources":["../../../src/models/odrlContextType.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { SingleOccurrenceArray } from \"@twin.org/core\";\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { OdrlContexts } from \"./odrlContexts.js\";\n\n/**\n * The ODRL JSON-LD context type.\n */\nexport type OdrlContextType =\n\t| typeof OdrlContexts.Context\n\t| SingleOccurrenceArray<IJsonLdContextDefinitionElement, typeof OdrlContexts.Context>;\n"]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://schema.twindev.org/w3c-odrl/OdrlAction",
|
|
4
|
-
"
|
|
4
|
+
"title": "OdrlAction",
|
|
5
|
+
"description": "Interface for ODRL Actions.\nhttps://www.w3.org/TR/odrl-model/#action",
|
|
5
6
|
"type": "object",
|
|
6
7
|
"properties": {
|
|
7
8
|
"rdf:value": {
|
|
@@ -14,11 +15,11 @@
|
|
|
14
15
|
"required": [
|
|
15
16
|
"@id"
|
|
16
17
|
],
|
|
17
|
-
"description": "The value/identifier of the action
|
|
18
|
+
"description": "The value/identifier of the action.\nUsed in complex action definitions."
|
|
18
19
|
},
|
|
19
20
|
"@id": {
|
|
20
21
|
"type": "string",
|
|
21
|
-
"description": "Direct action identifier
|
|
22
|
+
"description": "Direct action identifier.\nUsed in simple action references."
|
|
22
23
|
},
|
|
23
24
|
"refinement": {
|
|
24
25
|
"anyOf": [
|
|
@@ -1,82 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://schema.twindev.org/w3c-odrl/OdrlAgreement",
|
|
4
|
-
"
|
|
4
|
+
"title": "OdrlAgreement",
|
|
5
|
+
"description": "Interface representing an ODRL Agreement.\nAn Agreement requires both an assigner and assignee (both agreeing parties).\nhttps://www.w3.org/TR/odrl-model/#policy-agreement",
|
|
5
6
|
"type": "object",
|
|
6
7
|
"properties": {
|
|
7
|
-
"@context": {
|
|
8
|
-
"description": "The ODRL JSON-LD context type.",
|
|
9
|
-
"anyOf": [
|
|
10
|
-
{
|
|
11
|
-
"type": "string",
|
|
12
|
-
"const": "http://www.w3.org/ns/odrl.jsonld"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"type": "array",
|
|
16
|
-
"items": {
|
|
17
|
-
"type": "string",
|
|
18
|
-
"const": "http://www.w3.org/ns/odrl.jsonld"
|
|
19
|
-
},
|
|
20
|
-
"minItems": 1,
|
|
21
|
-
"maxItems": 1
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"type": "array",
|
|
25
|
-
"minItems": 2,
|
|
26
|
-
"prefixItems": [
|
|
27
|
-
{
|
|
28
|
-
"type": "string",
|
|
29
|
-
"const": "http://www.w3.org/ns/odrl.jsonld"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
|
33
|
-
}
|
|
34
|
-
],
|
|
35
|
-
"items": {
|
|
36
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"type": "array",
|
|
41
|
-
"minItems": 2,
|
|
42
|
-
"prefixItems": [
|
|
43
|
-
{
|
|
44
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"type": "string",
|
|
48
|
-
"const": "http://www.w3.org/ns/odrl.jsonld"
|
|
49
|
-
}
|
|
50
|
-
],
|
|
51
|
-
"items": {
|
|
52
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
]
|
|
56
|
-
},
|
|
57
8
|
"@type": {
|
|
58
|
-
"type": "string",
|
|
59
9
|
"const": "Agreement",
|
|
60
10
|
"description": "The type must be \"Agreement\"."
|
|
61
11
|
},
|
|
62
|
-
"uid": {
|
|
63
|
-
"type": "string",
|
|
64
|
-
"description": "The unique identifier for the policy. Must be an IRI."
|
|
65
|
-
},
|
|
66
|
-
"profile": {
|
|
67
|
-
"anyOf": [
|
|
68
|
-
{
|
|
69
|
-
"type": "string"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"type": "array",
|
|
73
|
-
"items": {
|
|
74
|
-
"type": "string"
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
],
|
|
78
|
-
"description": "The profile(s) this policy conforms to. IRIs identifying the ODRL Profile(s)."
|
|
79
|
-
},
|
|
80
12
|
"assigner": {
|
|
81
13
|
"anyOf": [
|
|
82
14
|
{
|
|
@@ -86,7 +18,7 @@
|
|
|
86
18
|
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlParty"
|
|
87
19
|
}
|
|
88
20
|
],
|
|
89
|
-
"description": "The assigner of the agreement
|
|
21
|
+
"description": "The assigner of the agreement.\nRequired for Agreement policies."
|
|
90
22
|
},
|
|
91
23
|
"assignee": {
|
|
92
24
|
"anyOf": [
|
|
@@ -97,134 +29,17 @@
|
|
|
97
29
|
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlParty"
|
|
98
30
|
}
|
|
99
31
|
],
|
|
100
|
-
"description": "The assignee of the agreement
|
|
101
|
-
},
|
|
102
|
-
"target": {
|
|
103
|
-
"anyOf": [
|
|
104
|
-
{
|
|
105
|
-
"type": "string"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAsset"
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAssetCollection"
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"type": "array",
|
|
115
|
-
"items": {
|
|
116
|
-
"anyOf": [
|
|
117
|
-
{
|
|
118
|
-
"type": "string"
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAsset"
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAssetCollection"
|
|
125
|
-
}
|
|
126
|
-
]
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
],
|
|
130
|
-
"description": "The target asset for the rule."
|
|
131
|
-
},
|
|
132
|
-
"action": {
|
|
133
|
-
"anyOf": [
|
|
134
|
-
{
|
|
135
|
-
"$ref": "https://schema.twindev.org/w3c-odrl/ActionType"
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
"type": "string"
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAction"
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
"type": "array",
|
|
145
|
-
"items": {
|
|
146
|
-
"anyOf": [
|
|
147
|
-
{
|
|
148
|
-
"$ref": "https://schema.twindev.org/w3c-odrl/ActionType"
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
"type": "string"
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAction"
|
|
155
|
-
}
|
|
156
|
-
]
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
],
|
|
160
|
-
"description": "The action associated with the rule."
|
|
161
|
-
},
|
|
162
|
-
"inheritFrom": {
|
|
163
|
-
"anyOf": [
|
|
164
|
-
{
|
|
165
|
-
"type": "string"
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
"type": "array",
|
|
169
|
-
"items": {
|
|
170
|
-
"type": "string"
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
],
|
|
174
|
-
"description": "The parent policy(ies) this policy inherits from. IRIs identifying the parent Policy(ies)."
|
|
175
|
-
},
|
|
176
|
-
"conflict": {
|
|
177
|
-
"$ref": "https://schema.twindev.org/w3c-odrl/ConflictStrategyType",
|
|
178
|
-
"description": "The conflict resolution strategy.\n- perm: Permissions override Prohibitions\n- prohibit: Prohibitions override Permissions\n- invalid: Policy is void if conflicts exist (default)"
|
|
179
|
-
},
|
|
180
|
-
"permission": {
|
|
181
|
-
"anyOf": [
|
|
182
|
-
{
|
|
183
|
-
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlPermission"
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
"type": "array",
|
|
187
|
-
"items": {
|
|
188
|
-
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlPermission"
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
],
|
|
192
|
-
"description": "The permissions in the policy. At least one of permission, prohibition, or obligation must be present."
|
|
193
|
-
},
|
|
194
|
-
"prohibition": {
|
|
195
|
-
"anyOf": [
|
|
196
|
-
{
|
|
197
|
-
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlProhibition"
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
"type": "array",
|
|
201
|
-
"items": {
|
|
202
|
-
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlProhibition"
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
],
|
|
206
|
-
"description": "The prohibitions in the policy. At least one of permission, prohibition, or obligation must be present."
|
|
207
|
-
},
|
|
208
|
-
"obligation": {
|
|
209
|
-
"anyOf": [
|
|
210
|
-
{
|
|
211
|
-
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlDuty"
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
"type": "array",
|
|
215
|
-
"items": {
|
|
216
|
-
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlDuty"
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
],
|
|
220
|
-
"description": "The obligations in the policy. At least one of permission, prohibition, or obligation must be present."
|
|
32
|
+
"description": "The assignee of the agreement.\nRequired for Agreement policies."
|
|
221
33
|
}
|
|
222
34
|
},
|
|
223
35
|
"required": [
|
|
224
|
-
"@context",
|
|
225
36
|
"@type",
|
|
226
|
-
"assignee",
|
|
227
37
|
"assigner",
|
|
228
|
-
"
|
|
38
|
+
"assignee"
|
|
39
|
+
],
|
|
40
|
+
"allOf": [
|
|
41
|
+
{
|
|
42
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlPolicy"
|
|
43
|
+
}
|
|
229
44
|
]
|
|
230
45
|
}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://schema.twindev.org/w3c-odrl/OdrlAsset",
|
|
4
|
-
"
|
|
4
|
+
"title": "OdrlAsset",
|
|
5
|
+
"description": "Interface for ODRL Assets.\nhttps://www.w3.org/TR/odrl-model/#asset",
|
|
5
6
|
"type": "object",
|
|
6
7
|
"properties": {
|
|
7
8
|
"uid": {
|
|
8
9
|
"type": "string",
|
|
9
|
-
"description": "The unique identifier for the asset
|
|
10
|
+
"description": "The unique identifier for the asset.\nShould be an IRI."
|
|
10
11
|
},
|
|
11
12
|
"@type": {
|
|
12
13
|
"type": "string",
|
|
13
|
-
"description": "The type of the asset
|
|
14
|
+
"description": "The type of the asset.\nCan be used to specify additional type information."
|
|
14
15
|
},
|
|
15
16
|
"partOf": {
|
|
16
17
|
"anyOf": [
|
|
@@ -34,7 +35,7 @@
|
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
37
|
],
|
|
37
|
-
"description": "Reference to the asset collection this asset is part of
|
|
38
|
+
"description": "Reference to the asset collection this asset is part of.\nUsed to identify an AssetCollection that this Asset is a member of."
|
|
38
39
|
},
|
|
39
40
|
"hasPolicy": {
|
|
40
41
|
"anyOf": [
|
|
@@ -48,7 +49,7 @@
|
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
51
|
],
|
|
51
|
-
"description": "Reference to the policy that governs this asset
|
|
52
|
+
"description": "Reference to the policy that governs this asset.\nUsed to identify the Policy that governs this Asset."
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
55
|
}
|
|
@@ -1,58 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://schema.twindev.org/w3c-odrl/OdrlAssetCollection",
|
|
4
|
-
"
|
|
4
|
+
"title": "OdrlAssetCollection",
|
|
5
|
+
"description": "Interface for ODRL Asset Collections.\nAn AssetCollection is a single resource representing a set of member resources,\nwhere all members of the set will be the subject of the Rule.\nhttps://www.w3.org/TR/odrl-model/#asset",
|
|
5
6
|
"type": "object",
|
|
6
7
|
"properties": {
|
|
7
|
-
"uid": {
|
|
8
|
-
"type": "string",
|
|
9
|
-
"description": "The unique identifier for the asset. Should be an IRI."
|
|
10
|
-
},
|
|
11
|
-
"@type": {
|
|
12
|
-
"type": "string",
|
|
13
|
-
"description": "The type of the asset. Can be used to specify additional type information."
|
|
14
|
-
},
|
|
15
|
-
"partOf": {
|
|
16
|
-
"anyOf": [
|
|
17
|
-
{
|
|
18
|
-
"type": "string"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAssetCollection"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"type": "array",
|
|
25
|
-
"items": {
|
|
26
|
-
"anyOf": [
|
|
27
|
-
{
|
|
28
|
-
"type": "string"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAssetCollection"
|
|
32
|
-
}
|
|
33
|
-
]
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
],
|
|
37
|
-
"description": "Reference to the asset collection this asset is part of. Used to identify an AssetCollection that this Asset is a member of."
|
|
38
|
-
},
|
|
39
|
-
"hasPolicy": {
|
|
40
|
-
"anyOf": [
|
|
41
|
-
{
|
|
42
|
-
"type": "string"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"type": "array",
|
|
46
|
-
"items": {
|
|
47
|
-
"type": "string"
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
],
|
|
51
|
-
"description": "Reference to the policy that governs this asset. Used to identify the Policy that governs this Asset."
|
|
52
|
-
},
|
|
53
8
|
"source": {
|
|
54
9
|
"type": "string",
|
|
55
|
-
"description": "Reference to the source of the asset collection
|
|
10
|
+
"description": "Reference to the source of the asset collection.\nMust be an IRI that references the AssetCollection.",
|
|
11
|
+
"format": "uri"
|
|
56
12
|
},
|
|
57
13
|
"refinement": {
|
|
58
14
|
"anyOf": [
|
|
@@ -76,10 +32,15 @@
|
|
|
76
32
|
}
|
|
77
33
|
}
|
|
78
34
|
],
|
|
79
|
-
"description": "Refinements applied to the asset collection
|
|
35
|
+
"description": "Refinements applied to the asset collection.\nUsed to specify the refinement context under which to identify individual Asset(s)\nof the complete collection. The refinement applies to the characteristics of each\nmember of the collection (not the resource as a whole)."
|
|
80
36
|
}
|
|
81
37
|
},
|
|
82
38
|
"required": [
|
|
83
39
|
"source"
|
|
40
|
+
],
|
|
41
|
+
"allOf": [
|
|
42
|
+
{
|
|
43
|
+
"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAsset"
|
|
44
|
+
}
|
|
84
45
|
]
|
|
85
46
|
}
|