Skip to content

Commit

Permalink
Support @type property in DDA JSONLD schema
Browse files Browse the repository at this point in the history
Signed-off-by: George J Padayatti <george.padayatti@igrant.io>
  • Loading branch information
georgepadayatti committed Aug 17, 2022
1 parent 1a6b7b8 commit f33284f
Show file tree
Hide file tree
Showing 2 changed files with 139 additions and 188 deletions.
Original file line number Diff line number Diff line change
@@ -1,198 +1,146 @@
{
"@context": {
"dda": "https://docs.igrant.io/schema/data-disclosure-agreement/v1.0/#",
"schema": "https://schema.org/",
"mydata": "https://dictionary.mydata.org/prodserv/",
"dpv": "http://www.w3.org/ns/dpv#",
"sec": "https://w3id.org/security#",
"language": {
"@id": "mydata:language",
"@type": "@id"
},
"version": {
"@id": "dda:version",
"@type": "schema:version"
},
"templateId": {
"@id": "dda:templateId",
"@type": "mydata:uid"
},
"templateVersion": {
"@id": "dda:templateVersion",
"@type": "schema:version"
},
"dataController": {
"@id": "dda:dataController",
"@type": "@id",
"@version": 1.1,
"@protected": true,
"ddaRegistry": "https://docs.igrant.io/docs/data-exchange-agreements/#",
"DataDisclosureAgreement": {
"@id": "ddaRegistry:data-disclosure-agreement",
"@type": "ddaRegistry:data-disclosure-agreement",
"@context": {
"did": {
"@id": "dda:dcDid",
"@type": "@id"
},
"name": {
"@id": "dda:dcName",
"@type": "@id"
},
"legalId": {
"@id": "dda:dcLegalId",
"@type": "@id"
},
"url": {
"@id": "dda:dcURL",
"@type": "@id"
},
"industrySector": {
"@id": "dda:dcIndustrySector",
"@type": "@id"
}
}
},
"agreementPeriod": {
"@id": "dda:agreementPeriod",
"@type": "@id"
},
"dataSharingRestrictions": {
"@id": "dda:dataSharingRestrictions",
"@type": "@id",
"@context": {
"policyUrl": {
"@id": "dda:dsrPolicyUrl",
"@type": "@id"
},
"jurisdiction": {
"@id": "dda:dsrJurisdiction",
"@type": "@id"
},
"industrySector": {
"@id": "dda:dsrIndustrySector",
"@type": "@id"
},
"dataRetentionPeriod": {
"@id": "dda:dsrDataRetentionPeriod",
"@type": "@id"
},
"geographicRestriction": {
"@id": "dda:dsrGeographicRestriction",
"@type": "@id"
},
"storageLocation": {
"@id": "dda:dsrStorageLocation",
"@type": "@id"
}
}
},
"purpose": {
"@id": "dda:purpose",
"@type": "dpv:Purpose"
},
"purposeDescription": {
"@id": "dda:purposeDescription",
"@type": "@id"
},
"lawfulBasis": {
"@id": "dda:lawfulBasis",
"@type": "@id"
},
"personalData": {
"@id": "dda:personalData",
"@type": "@id",
"@container": "@list",
"@context": {
"attributeId": {
"@id": "dda:pdAttributeId",
"@type": "mydata:uid"
},
"attributeName": {
"@id": "dda:pdAttributeName",
"@type": "schema:Text"
},
"attributeSensitive": {
"@id": "dda:pdAttributeSensitive",
"@type": "schema:Boolean"
},
"attributeCategory": {
"@id": "dda:pdAttributeCategory",
"@type": "dpv:PersonalDataCategory"
}
}
},
"codeOfConduct": {
"@id": "dda:codeOfConduct",
"@type": "@id"
},
"dataUsingService": {
"@id": "dda:dataUsingService",
"@type": "@id",
"@context": {
"did": {
"@id": "dda:dusDid",
"@type": "@id"
},
"name": {
"@id": "dda:dusName",
"@type": "@id"
},
"legalId": {
"@id": "dda:dusLegalId",
"@type": "@id"
},
"url": {
"@id": "dda:dusUrl",
"@type": "@id"
},
"industrySector": {
"@id": "dda:dusIndustrySector",
"@type": "@id"
},
"usagePurposes": {
"@id": "dda:dusUsagePurposes",
"@type": "@id"
},
"jurisdiction": {
"@id": "dda:dusJurisdiction",
"@type": "@id"
},
"withdrawal": {
"@id": "dda:dusWithdrawal",
"@type": "@id"
},
"privacyRights": {
"@id": "dda:dusPrivacyRights",
"@type": "@id"
},
"signatureContact": {
"@id": "dda:dusSignatureContact",
"@type": "@id"
}
}
},
"event": {
"@id": "dda:event",
"@type": "@id",
"@container": "@list",
"@context": {
"id": {
"@id": "dda:eventId",
"dda": "https://docs.igrant.io/schema/data-disclosure-agreement/v1.0/#",
"schema": "https://schema.org/",
"mydata": "https://dictionary.mydata.org/prodserv/",
"dpv": "http://www.w3.org/ns/dpv#",
"sec": "https://w3id.org/security#",
"@version": 1.1,
"@protected": true,
"language": "mydata:language",
"version": {
"@id": "dda:version",
"@type": "schema:version"
},
"templateId": {
"@id": "dda:templateId",
"@type": "mydata:uid"
},
"timeStamp": {
"@id": "dda:eventTimestamp",
"@type": "schema:DateTime"
},
"did": {
"@id": "dda:eventDid",
"@type": "@id"
},
"state": {
"@id": "dda:eventState",
"@type": "schema:Text"
"templateVersion": {
"@id": "dda:templateVersion",
"@type": "schema:version"
},
"dataController": {
"@id": "dda:dataController",
"@type": "dda:dataController",
"@context": {
"dda": "https://docs.igrant.io/schema/data-disclosure-agreement/v1.0/#",
"@version": 1.1,
"@protected": true,
"did": "dda:dcDid",
"name": "dda:dcName",
"legalId": "dda:dcLegalId",
"url": "dda:dcURL",
"industrySector": "dda:dcIndustrySector"
}
},
"agreementPeriod": "dda:agreementPeriod",
"dataSharingRestrictions": {
"@id": "dda:dataSharingRestrictions",
"@type": "dda:dataSharingRestrictions",
"@context": {
"dda": "https://docs.igrant.io/schema/data-disclosure-agreement/v1.0/#",
"@version": 1.1,
"@protected": true,
"policyUrl": "dda:dsrPolicyUrl",
"jurisdiction": "dda:dsrJurisdiction",
"industrySector": "dda:dsrIndustrySector",
"dataRetentionPeriod": "dda:dsrDataRetentionPeriod",
"geographicRestriction": "dda:dsrGeographicRestriction",
"storageLocation": "dda:dsrStorageLocation"
}
},
"purpose": {
"@id": "dda:purpose",
"@type": "dpv:Purpose"
},
"purposeDescription": "dda:purposeDescription",
"lawfulBasis": "dda:lawfulBasis",
"personalData": {
"@id": "dda:personalData",
"@type": "dda:personalData",
"@container": "@list",
"@context": {
"dda": "https://docs.igrant.io/schema/data-disclosure-agreement/v1.0/#",
"@version": 1.1,
"@protected": true,
"attributeId": {
"@id": "dda:pdAttributeId",
"@type": "mydata:uid"
},
"attributeName": {
"@id": "dda:pdAttributeName",
"@type": "schema:Text"
},
"attributeSensitive": {
"@id": "dda:pdAttributeSensitive",
"@type": "schema:Boolean"
},
"attributeCategory": {
"@id": "dda:pdAttributeCategory",
"@type": "dpv:PersonalDataCategory"
}
}
},
"codeOfConduct": "dda:codeOfConduct",
"dataUsingService": {
"@id": "dda:dataUsingService",
"@type": "dda:dataUsingService",
"@context": {
"dda": "https://docs.igrant.io/schema/data-disclosure-agreement/v1.0/#",
"@version": 1.1,
"@protected": true,
"did": "dda:dusDid",
"name": "dda:dusName",
"legalId": "dda:dusLegalId",
"url": "dda:dusUrl",
"industrySector": "dda:dusIndustrySector",
"usagePurposes": "dda:dusUsagePurposes",
"jurisdiction": "dda:dusJurisdiction",
"withdrawal": "dda:dusWithdrawal",
"privacyRights": "dda:dusPrivacyRights",
"signatureContact": "dda:dusSignatureContact"
}
},
"event": {
"@id": "dda:event",
"@type": "dda:event",
"@container": "@list",
"@context": {
"dda": "https://docs.igrant.io/schema/data-disclosure-agreement/v1.0/#",
"@version": 1.1,
"@protected": true,
"id": {
"@id": "dda:eventId",
"@type": "mydata:uid"
},
"timeStamp": {
"@id": "dda:eventTimestamp",
"@type": "schema:DateTime"
},
"did": {
"@id": "dda:eventDid",
"@type": "@id"
},
"state": {
"@id": "dda:eventState",
"@type": "schema:Text"
}
}
},
"proofChain": {
"@id": "sec:proof",
"@type": "@id",
"@container": "@list"
}
}
},
"proofChain": {
"@id": "sec:proof",
"@type": "@id",
"@container": "@list"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
"https://w3id.org/security/v2"
],
"@id": "urn:uuid:xyz",
"@type": [
"DataDisclosureAgreement"
],
"language": "en",
"version": "0.0.1",
"templateId": "urn:uuid:abc",
Expand Down

0 comments on commit f33284f

Please sign in to comment.