Skip to content

Commit

Permalink
Require core:objectStatus only be used on UcoObjects
Browse files Browse the repository at this point in the history
A follow-on patch will regenerate Make-managed files.

References:
* #549

Signed-off-by: Alex Nelson <[email protected]>
  • Loading branch information
ajnelson-nist committed Aug 13, 2024
1 parent 9c826de commit e9e9e0f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ontology/uco/core/core.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,12 @@ core:objectStatus
rdfs:range core:ObjectStatusVocab ;
.

core:objectStatus-subjects-shape
a sh:NodeShape ;
sh:class core:UcoObject ;
sh:targetSubjectsOf core:objectStatus ;
.

core:referenceURL
a owl:DatatypeProperty ;
rdfs:label "referenceURL"@en ;
Expand Down
11 changes: 11 additions & 0 deletions tests/examples/object_status_XFAIL.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@
"@type": "core:UcoObject",
"rdfs:comment": "This will trigger an error from using a value outside of the required vocabulary.",
"core:objectStatus": "Initial draft"
},
{
"@id": "kb:File-c9c36379-8eca-4a85-887c-b51f7721edfd",
"@type": "observable:File",
"core:hasFacet": {
"@id": "kb:ArchiveFileFacet-5884ca1c-2f5e-4e66-bdc6-7d48606f9fbc",
"@type": "observable:ArchiveFileFacet",
"rdfs:comment": "This will trigger an error from using objectStatus on a non-UcoObject thing.",
"core:objectStatus": "Draft",
"observable:archiveType": "Currently-unknown compressing-and-encrypting type seen multiple places, further research needed"
}
}
]
}
4 changes: 4 additions & 0 deletions tests/examples/test_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,10 @@ def test_object_status_XFAIL() -> None:
"http://example.org/kb/UcoObject-6ae2b245-a8cd-45dc-9f40-5b2738879351",
str(NS_SH.Violation)
),
(
"http://example.org/kb/ArchiveFileFacet-5884ca1c-2f5e-4e66-bdc6-7d48606f9fbc",
str(NS_SH.Violation)
),
}
)

Expand Down

0 comments on commit e9e9e0f

Please sign in to comment.