Skip to content

Commit 65278b2

Browse files
ihermanmsporny
authored andcommitted
Added missing terms
1 parent 854bb1a commit 65278b2

File tree

7 files changed

+96
-183
lines changed

7 files changed

+96
-183
lines changed

vocab/credentials/v2/mk_vocab.rb

+17-17
Original file line numberDiff line numberDiff line change
@@ -181,16 +181,16 @@ def to_jsonld
181181
rdfs_datatypes << node
182182
end
183183

184-
instances.each do |id, entry|
185-
# context[id] = namespaced(id) unless entry[:@type] == '@null'
186-
# Instance definition
187-
rdfs_instances << {
188-
'@id' => namespaced(id),
189-
'@type' => entry[:type],
190-
'rdfs:label' => {"en" => entry[:label].to_s},
191-
'rdfs:comment' => {"en" => entry[:comment].to_s},
192-
}
193-
end
184+
# instances.each do |id, entry|
185+
# context[id] = namespaced(id) unless entry[:@type] == '@null'
186+
# # Instance definition
187+
# rdfs_instances << {
188+
# '@id' => namespaced(id),
189+
# '@type' => entry[:type],
190+
# 'rdfs:label' => {"en" => entry[:label].to_s},
191+
# 'rdfs:comment' => {"en" => entry[:comment].to_s},
192+
# }
193+
# end
194194

195195
# Use separate rdfs context so as not to polute the context.
196196
ontology = {
@@ -287,13 +287,13 @@ def to_ttl
287287
output << %( rdfs:isDefinedBy cred: .)
288288
end
289289

290-
output << "\n# Instance definitions" unless @instances.empty?
291-
@instances.each do |id, entry|
292-
output << "cred:#{id} a #{namespaced(entry[:type])};"
293-
output << %( rdfs:label "#{entry[:label]}"@en;)
294-
output << %( rdfs:comment """#{entry[:comment]}"""@en;)
295-
output << %( rdfs:isDefinedBy cred: .)
296-
end
290+
# output << "\n# Instance definitions" unless @instances.empty?
291+
# @instances.each do |id, entry|
292+
# output << "cred:#{id} a #{namespaced(entry[:type])};"
293+
# output << %( rdfs:label "#{entry[:label]}"@en;)
294+
# output << %( rdfs:comment """#{entry[:comment]}"""@en;)
295+
# output << %( rdfs:isDefinedBy cred: .)
296+
# end
297297

298298
output.join("\n")
299299
end

vocab/credentials/v2/template.html

+2-34
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ <h2>Introduction</h2>
132132
<dd><code>http://purl.org/dc/terms/</code></dd>
133133
<dt><code>odrl</code>:</dt>
134134
<dd><code>http://www.w3.org/ns/odrl/2/</code></dd>
135+
<dt><code>owl</code>:</dt>
136+
<dd><code>http://www.w3.org/2002/07/owl#</code></dd>
135137
<dt><code>xsd</code>:</dt>
136138
<dd><code>http://www.w3.org/2001/XMLSchema#</code></dd>
137139
</dl>
@@ -189,39 +191,5 @@ <h2><%= sect[:heading] %></h2>
189191
</table>
190192
</section>
191193
<% end%>
192-
<!-- <section>
193-
<h2>Term Definitions</h2>
194-
<dl class="terms-list">
195-
<% context.keys.sort.each do |term|%>
196-
<% defn = context[term] %>
197-
<% if term != "xsd" && term != "cred" && term != "id" && term != "odrl" && term != "type" %>
198-
<dt><%= term %></dt>
199-
<dd>
200-
<% if defn.is_a?(String) %>
201-
<%= defn %>
202-
<% elsif defn['@id'] %>
203-
<%= defn['@id'] %>
204-
<% elsif defn['@reverse'] %>
205-
reverse of <%= defn['@reverse'] %>
206-
<% else %>
207-
<%= term %>
208-
<% end %>
209-
<% if defn.is_a?(Hash) && defn['@type'] %>
210-
with string values interpreted as <%= defn['@type'] %>
211-
<% end%>
212-
<% if defn.is_a?(Hash) && defn['@container'] %>
213-
<% if defn['@container'] == '@language' %>
214-
with object values interpreted as language-specific, indexed by language
215-
<% elsif defn['@container'] == '@index' %>
216-
with object values interpreted indexed by index
217-
<% else %>
218-
with array values interpreted as <%= defn['@container'] %>
219-
<% end %>
220-
<% end%>
221-
</dd>
222-
<% end %>
223-
<% end %>
224-
</dl>
225-
</section> -->
226194
</body>
227195
</html>

vocab/credentials/v2/vocab.csv

+3
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ refreshService,rdf:Property,refresh service,,VerifiableCredential,cred:RefreshSe
2323
serviceEndpoint,rdf:Property,service endpoint,,RefreshService,,@id,,The value of the `serviceEndpoint` property MUST be a URL to the service endpoint associated with the subject.
2424
termsOfUse,rdf:Property,terms of use,,VerifiableCredential,odrl:Policy,@id,,"If specified, the value of the `termsOfUse` property MUST specify one or more terms of use policies under which the creator issued the credential or presentation. If the recipient (a holder or verifier) is not willing to adhere to the specified terms of use, then they do so on their own responsibility and might incur legal liability if they violate the stated Terms of Use. Each `termsOfUse` MUST specify its type, for example, `IssuerPolicy`, and optionally, its instance `id`. The precise contents of each term of use is determined by the specific `TermsOfUse` type definition."
2525
verifiableCredential,rdf:Property,verifiable credential,,VerifiablePresentation,cred:VerifiableCredentialGraph,@id,@graph,"The value of the `verifiableCredential` property MUST identify a `Verifiable Credential Graph` (informally, it indirectly identifies a `Verifiable Credential` contained in a separate graph)."
26+
issued,rdf:Property,issue date,,VerifiableCredential,xsd:dateTime,,,The value of the `issued` property MUST be a string value of an ISO8601 combined date and time string representing the date and time the credential was issued. Note that this date represents the earliest date when the information associated with the `credentialSubject` property became valid.
27+
holder,rdf:Property,holder,,"VerifiableCredential,VerifiablePresentation",,@id,,The value of the `holder` property MUST be a URI. It is RECOMMENDED that dereferencing the URI results in a document containing machine-readable information about the holder that can be used to verify the information expressed in the credential.
28+

vocab/credentials/v2/vocabulary.html

+32-130
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
},
2121
specStatus: "base",
2222
shortName: "2018/credentials/v2",
23-
publishDate: "2022-09-02",
23+
publishDate: "2022-09-06",
2424
thisVersion: "https://w3.org/2018/credentials/v2",
2525
doJsonLd: true,
2626
editors: [{
@@ -96,7 +96,7 @@
9696
<a rel="alternate" href="vocabulary.jsonld">JSON-LD</a>.
9797
</p>
9898
<dl>
99-
<dt>Published:</dt><dd><time property="dc:date">2022-09-02</time></dd>
99+
<dt>Published:</dt><dd><time property="dc:date">2022-09-06</time></dd>
100100
<dt>Version Info:</dt>
101101
<!-- <dd><a href="" property="owl:versionInfo"></a></dd> -->
102102
<dd>2.0</dd>
@@ -124,6 +124,8 @@ <h2>Introduction</h2>
124124
<dd><code>http://purl.org/dc/terms/</code></dd>
125125
<dt><code>odrl</code>:</dt>
126126
<dd><code>http://www.w3.org/ns/odrl/2/</code></dd>
127+
<dt><code>owl</code>:</dt>
128+
<dd><code>http://www.w3.org/2002/07/owl#</code></dd>
127129
<dt><code>xsd</code>:</dt>
128130
<dd><code>http://www.w3.org/2001/XMLSchema#</code></dd>
129131
</dl>
@@ -272,6 +274,21 @@ <h2>Property Definitions</h2>
272274
</dl>
273275
</td>
274276
</tr>
277+
<tr><td class="bold" id="holder">holder</td>
278+
<td resource="cred:holder" typeof="rdf:Property">
279+
<em property="rdfs:label">holder</em>
280+
<p property="rdfs:comment">The value of the `holder` property MUST be a URI. It is RECOMMENDED that dereferencing the URI results in a document containing machine-readable information about the holder that can be used to verify the information expressed in the credential.</p>
281+
<span property="rdfs:isDefinedBy" resource="cred:"></span>
282+
<dl class="terms">
283+
<dt>rdfs:domain</dt>
284+
<dd property="rdfs:domain" resource="_:">
285+
Union of
286+
<span property="owl:unionOf" inlist=true resource="cred:VerifiableCredential">cred:VerifiableCredential</span>
287+
<span property="owl:unionOf" inlist=true resource="cred:VerifiablePresentation">cred:VerifiablePresentation</span>
288+
</dd>
289+
</dl>
290+
</td>
291+
</tr>
275292
<tr><td class="bold" id="issuanceDate">issuanceDate</td>
276293
<td resource="cred:issuanceDate" typeof="rdf:Property">
277294
<em property="rdfs:label">issuance date</em>
@@ -285,6 +302,19 @@ <h2>Property Definitions</h2>
285302
</dl>
286303
</td>
287304
</tr>
305+
<tr><td class="bold" id="issued">issued</td>
306+
<td resource="cred:issued" typeof="rdf:Property">
307+
<em property="rdfs:label">issue date</em>
308+
<p property="rdfs:comment">The value of the `issued` property MUST be a string value of an ISO8601 combined date and time string representing the date and time the credential was issued. Note that this date represents the earliest date when the information associated with the `credentialSubject` property became valid.</p>
309+
<span property="rdfs:isDefinedBy" resource="cred:"></span>
310+
<dl class="terms">
311+
<dt>rdfs:range</dt>
312+
<dd property="rdfs:range" resource="xsd:dateTime">xsd:dateTime</dd>
313+
<dt>rdfs:domain</dt>
314+
<dd property="rdfs:domain" resource="cred:VerifiableCredential">cred:VerifiableCredential</dd>
315+
</dl>
316+
</td>
317+
</tr>
288318
<tr><td class="bold" id="issuer">issuer</td>
289319
<td resource="cred:issuer" typeof="rdf:Property">
290320
<em property="rdfs:label">issuer</em>
@@ -348,133 +378,5 @@ <h2>Property Definitions</h2>
348378
</tr>
349379
</table>
350380
</section>
351-
<!-- <section>
352-
<h2>Term Definitions</h2>
353-
<dl class="terms-list">
354-
<dt>dc</dt>
355-
<dd>
356-
http://purl.org/dc/terms/
357-
</dd>
358-
<dt>dc:date</dt>
359-
<dd>
360-
dc:date
361-
with string values interpreted as xsd:date
362-
</dd>
363-
<dt>dc:description</dt>
364-
<dd>
365-
dc:description
366-
with object values interpreted as language-specific, indexed by language
367-
</dd>
368-
<dt>dc:title</dt>
369-
<dd>
370-
dc:title
371-
with object values interpreted as language-specific, indexed by language
372-
</dd>
373-
<dt>owl</dt>
374-
<dd>
375-
http://www.w3.org/2002/07/owl#
376-
</dd>
377-
<dt>owl:equivalentClass</dt>
378-
<dd>
379-
owl:equivalentClass
380-
with string values interpreted as @vocab
381-
</dd>
382-
<dt>owl:equivalentProperty</dt>
383-
<dd>
384-
owl:equivalentProperty
385-
with string values interpreted as @vocab
386-
</dd>
387-
<dt>owl:imports</dt>
388-
<dd>
389-
owl:imports
390-
with string values interpreted as @id
391-
</dd>
392-
<dt>owl:inverseOf</dt>
393-
<dd>
394-
owl:inverseOf
395-
with string values interpreted as @vocab
396-
</dd>
397-
<dt>owl:oneOf</dt>
398-
<dd>
399-
owl:oneOf
400-
with string values interpreted as @vocab
401-
with array values interpreted as @list
402-
</dd>
403-
<dt>owl:unionOf</dt>
404-
<dd>
405-
owl:unionOf
406-
with string values interpreted as @vocab
407-
with array values interpreted as @list
408-
</dd>
409-
<dt>owl:versionInfo</dt>
410-
<dd>
411-
owl:versionInfo
412-
with string values interpreted as @id
413-
</dd>
414-
<dt>rdf</dt>
415-
<dd>
416-
http://www.w3.org/1999/02/22-rdf-syntax-ns#
417-
</dd>
418-
<dt>rdfs</dt>
419-
<dd>
420-
http://www.w3.org/2000/01/rdf-schema#
421-
</dd>
422-
<dt>rdfs:comment</dt>
423-
<dd>
424-
rdfs:comment
425-
with object values interpreted as language-specific, indexed by language
426-
</dd>
427-
<dt>rdfs:domain</dt>
428-
<dd>
429-
rdfs:domain
430-
with string values interpreted as @id
431-
</dd>
432-
<dt>rdfs:label</dt>
433-
<dd>
434-
rdfs:label
435-
with object values interpreted as language-specific, indexed by language
436-
</dd>
437-
<dt>rdfs:range</dt>
438-
<dd>
439-
rdfs:range
440-
with string values interpreted as @id
441-
</dd>
442-
<dt>rdfs:seeAlso</dt>
443-
<dd>
444-
rdfs:seeAlso
445-
with string values interpreted as @id
446-
</dd>
447-
<dt>rdfs:subClassOf</dt>
448-
<dd>
449-
rdfs:subClassOf
450-
with string values interpreted as @id
451-
</dd>
452-
<dt>rdfs:subPropertyOf</dt>
453-
<dd>
454-
rdfs:subPropertyOf
455-
with string values interpreted as @id
456-
</dd>
457-
<dt>rdfs_classes</dt>
458-
<dd>
459-
reverse of rdfs:isDefinedBy
460-
with string values interpreted as @id
461-
</dd>
462-
<dt>rdfs_datatypes</dt>
463-
<dd>
464-
reverse of rdfs:isDefinedBy
465-
with string values interpreted as @id
466-
</dd>
467-
<dt>rdfs_instances</dt>
468-
<dd>
469-
reverse of rdfs:isDefinedBy
470-
with string values interpreted as @id
471-
</dd>
472-
<dt>rdfs_properties</dt>
473-
<dd>
474-
reverse of rdfs:isDefinedBy
475-
with string values interpreted as @id
476-
</dd>
477-
</dl>
478-
</section> -->
479381
</body>
480382
</html>

vocab/credentials/v2/vocabulary.jsonld

+29-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
"dc:description": {
8787
"en": "This document describes the RDFS vocabulary description used for Verifiable Credentials [[VC-DATA-MODEL]]."
8888
},
89-
"dc:date": "2022-09-02",
89+
"dc:date": "2022-09-06",
9090
"rdfs:seeAlso": [
9191
"https://www.w3.org/TR/vc-data-model-2.0/"
9292
],
@@ -244,6 +244,22 @@
244244
"rdfs:domain": "cred:VerifiableCredential",
245245
"rdfs:range": "xsd:dateTime"
246246
},
247+
{
248+
"@id": "cred:holder",
249+
"@type": "rdf:Property",
250+
"rdfs:label": {
251+
"en": "holder"
252+
},
253+
"rdfs:comment": {
254+
"en": "The value of the `holder` property MUST be a URI. It is RECOMMENDED that dereferencing the URI results in a document containing machine-readable information about the holder that can be used to verify the information expressed in the credential."
255+
},
256+
"rdfs:domain": {
257+
"owl:unionOf": [
258+
"cred:VerifiableCredential",
259+
"cred:VerifiablePresentation"
260+
]
261+
}
262+
},
247263
{
248264
"@id": "cred:issuanceDate",
249265
"@type": "rdf:Property",
@@ -256,6 +272,18 @@
256272
"rdfs:domain": "cred:VerifiableCredential",
257273
"rdfs:range": "xsd:dateTime"
258274
},
275+
{
276+
"@id": "cred:issued",
277+
"@type": "rdf:Property",
278+
"rdfs:label": {
279+
"en": "issue date"
280+
},
281+
"rdfs:comment": {
282+
"en": "The value of the `issued` property MUST be a string value of an ISO8601 combined date and time string representing the date and time the credential was issued. Note that this date represents the earliest date when the information associated with the `credentialSubject` property became valid."
283+
},
284+
"rdfs:domain": "cred:VerifiableCredential",
285+
"rdfs:range": "xsd:dateTime"
286+
},
259287
{
260288
"@id": "cred:issuer",
261289
"@type": "rdf:Property",

vocab/credentials/v2/vocabulary.ttl

+12-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
cred: a owl:Ontology;
1111
dc:title "Verifiable Credentials Vocabulary v2.0"@en;
1212
dc:description """This document describes the RDFS vocabulary description used for Verifiable Credentials [[VC-DATA-MODEL]]."""@en;
13-
dc:date "2022-09-02"^^xsd:date;
13+
dc:date "2022-09-06"^^xsd:date;
1414
rdfs:seeAlso <https://www.w3.org/TR/vc-data-model-2.0/>;
1515
.
1616

@@ -84,12 +84,23 @@ cred:expirationDate a rdf:Property;
8484
rdfs:domain cred:VerifiableCredential;
8585
rdfs:range xsd:dateTime;
8686
rdfs:isDefinedBy cred: .
87+
cred:holder a rdf:Property;
88+
rdfs:label "holder"@en;
89+
rdfs:comment """The value of the `holder` property MUST be a URI. It is RECOMMENDED that dereferencing the URI results in a document containing machine-readable information about the holder that can be used to verify the information expressed in the credential."""@en;
90+
rdfs:domain [ owl:unionOf (cred:VerifiableCredential cred:VerifiablePresentation)];
91+
rdfs:isDefinedBy cred: .
8792
cred:issuanceDate a rdf:Property;
8893
rdfs:label "issuance date"@en;
8994
rdfs:comment """The value of the `issuanceDate` property MUST be a string value of an ISO8601 combined date and time string representing the date and time the credential was issued. Note that this date represents the earliest date when the information associated with the `credentialSubject` property became valid."""@en;
9095
rdfs:domain cred:VerifiableCredential;
9196
rdfs:range xsd:dateTime;
9297
rdfs:isDefinedBy cred: .
98+
cred:issued a rdf:Property;
99+
rdfs:label "issue date"@en;
100+
rdfs:comment """The value of the `issued` property MUST be a string value of an ISO8601 combined date and time string representing the date and time the credential was issued. Note that this date represents the earliest date when the information associated with the `credentialSubject` property became valid."""@en;
101+
rdfs:domain cred:VerifiableCredential;
102+
rdfs:range xsd:dateTime;
103+
rdfs:isDefinedBy cred: .
93104
cred:issuer a rdf:Property;
94105
rdfs:label "issuer"@en;
95106
rdfs:comment """The value of the `issuer` property MUST be a URI. It is RECOMMENDED that dereferencing the URI results in a document containing machine-readable information about the issuer that can be used to verify the information expressed in the credential."""@en;

vocab/credentials/vocab.csv

+1
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ refreshService,rdf:Property,refresh service,,VerifiableCredential,cred:RefreshSe
2020
serviceEndpoint,rdf:Property,service endpoint,,RefreshService,,@id,,The value of the serviceEndpoint property MUST be a URL to the service endpoint associated with the subject.
2121
termsOfUse,rdf:Property,terms of use,,VerifiableCredential,odrl:Policy,@id,,"If specified, the value of the termsOfUse property MUST specify one or more terms of use policies under which the creator issued the credential or presentation. If the recipient (a holder or verifier) is not willing to adhere to the specified terms of use, then they do so on their own responsibility and might incur legal liability if they violate the stated Terms of Use. Each termsOfUse MUST specify its type, for example, IssuerPolicy, and optionally, its instance id. The precise contents of each term of use is determined by the specific TermsOfUse type definition."
2222
verifiableCredential,rdf:Property,verifiable credential,,VerifiablePresentation,cred:VerifiableCredential,@id,@graph,The value of the verifiableCredential property MUST describe a VerifiableCredential.
23+
holder,rdf:Property,holder,,"VerifiableCredential,VerifiablePresentation",,@id,,The value of the holder property MUST be a URI. It is RECOMMENDED that dereferencing the URI results in a document containing machine-readable information about the holder that can be used to verify the information expressed in the credential.

0 commit comments

Comments
 (0)