Skip to content

Commit

Permalink
Remove requirement that a Dictionary must have at least one entry
Browse files Browse the repository at this point in the history
This has analagous rationale to UCO Issue 599, as well as supporting the
data-sharing use case where a dictionary key repetition is wished to be
shared without sharing other members of the dictionary.

No effects were observed on Make-managed files.

References:
* #599
* #602

Signed-off-by: Alex Nelson <[email protected]>
  • Loading branch information
ajnelson-nist committed Jun 4, 2024
1 parent 1e6d1af commit 6d4b850
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
1 change: 0 additions & 1 deletion ontology/uco/types/types.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ types:Dictionary
rdfs:comment "A dictionary is list of (term/key, value) pairs with each term/key having an expectation to exist no more than once. types:Dictionary alone does not validate this expectation, but validation is available. For use cases where this expectation must be validated, the subclass types:ProperDictionary should be used instead of types:Dictionary. For instances where this expectation has been found to be violated, the subclass types:ImproperDictionary should be used instead of types:Dictionary."@en ;
sh:property [
sh:class types:DictionaryEntry ;
sh:minCount "1"^^xsd:integer ;
sh:nodeKind sh:IRI ;
sh:path types:entry ;
] ;
Expand Down
16 changes: 1 addition & 15 deletions tests/examples/dictionary_PASS.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,21 +82,7 @@
{
"@id": "kb:ImproperDictionary-7fa3ea45-6426-4ad3-bb5f-7559e07adeb4",
"@type": "types:ImproperDictionary",
"repeatsKey": "z",
"types:entry": [
{
"@id": "kb:DictionaryEntry-cf363490-65ba-465f-8459-239c6a5d640e",
"@type": "types:DictionaryEntry",
"types:key": "x",
"types:value": "1"
},
{
"@id": "kb:DictionaryEntry-8e71524c-9921-44e8-839d-2d27281941bb",
"@type": "types:DictionaryEntry",
"types:key": "y",
"types:value": "2"
}
]
"repeatsKey": "z"
},
{
"@id": "kb:ImproperDictionary-14e28425-00c1-4f11-b2ed-21390fc0749a",
Expand Down

0 comments on commit 6d4b850

Please sign in to comment.