Skip to content

Commit

Permalink
Merge branch 'Feature-Issue-596-2.0.0' into unstable-2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ajnelson-nist committed May 10, 2024
2 parents a2c90f7 + 396ced2 commit 7c76935
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 106 deletions.
80 changes: 8 additions & 72 deletions ontology/uco/observable/observable.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -418,17 +418,9 @@ observable:Application
owl:Class ,
sh:NodeShape
;
rdfs:subClassOf observable:ObservableObject ;
rdfs:subClassOf observable:Software ;
rdfs:label "Application"@en ;
rdfs:comment "An application is a particular software program designed for end users."@en ;
rdfs:seeAlso [
a sh:NodeShape ;
rdfs:comment "This anonymous shape is attached with rdfs:seeAlso in order to associate a warning-severity class constraint, that will only be necessary as an independent shape until UCO 2.0.0."@en ;
sh:class observable:Software ;
sh:message "In UCO 2.0.0, uco-observable:Application will be a subclass of uco-observable:Software. In preparation for UCO 2.0.0, the additional type uco-observable:Software should be assigned to this node."@en ;
sh:severity sh:Warning ;
sh:targetClass observable:Application ;
] ;
sh:targetClass observable:Application ;
.

Expand Down Expand Up @@ -1210,17 +1202,9 @@ observable:Code
owl:Class ,
sh:NodeShape
;
rdfs:subClassOf observable:ObservableObject ;
rdfs:subClassOf observable:Software ;
rdfs:label "Code"@en ;
rdfs:comment "Code is a direct representation (source, byte or binary) of a collection of computer instructions that form software which tell a computer how to work. [based on https://en.wikipedia.org/wiki/Software]"@en ;
rdfs:seeAlso [
a sh:NodeShape ;
rdfs:comment "This anonymous shape is attached with rdfs:seeAlso in order to associate a warning-severity class constraint, that will only be necessary as an independent shape until UCO 2.0.0."@en ;
sh:class observable:Software ;
sh:message "In UCO 2.0.0, uco-observable:Code will be a subclass of uco-observable:Software. In preparation for UCO 2.0.0, the additional type uco-observable:Software should be assigned to this node."@en ;
sh:severity sh:Warning ;
sh:targetClass observable:Code ;
] ;
sh:targetClass observable:Code ;
.

Expand Down Expand Up @@ -4006,17 +3990,9 @@ observable:Library
owl:Class ,
sh:NodeShape
;
rdfs:subClassOf observable:ObservableObject ;
rdfs:subClassOf observable:Software ;
rdfs:label "Library"@en ;
rdfs:comment "A library is a suite of data and programming code that is used to develop software programs and applications. [based on https://www.techopedia.com/definition/3828/software-library]"@en ;
rdfs:seeAlso [
a sh:NodeShape ;
rdfs:comment "This anonymous shape is attached with rdfs:seeAlso in order to associate a warning-severity class constraint, that will only be necessary as an independent shape until UCO 2.0.0."@en ;
sh:class observable:Software ;
sh:message "In UCO 2.0.0, uco-observable:Library will be a subclass of uco-observable:Software. In preparation for UCO 2.0.0, the additional type uco-observable:Software should be assigned to this node."@en ;
sh:severity sh:Warning ;
sh:targetClass observable:Library ;
] ;
sh:targetClass observable:Library ;
.

Expand Down Expand Up @@ -5206,17 +5182,9 @@ observable:OperatingSystem
owl:Class ,
sh:NodeShape
;
rdfs:subClassOf observable:ObservableObject ;
rdfs:subClassOf observable:Software ;
rdfs:label "OperatingSystem"@en ;
rdfs:comment "An operating system is the software that manages computer hardware, software resources, and provides common services for computer programs. [based on https://en.wikipedia.org/wiki/Operating_system]"@en ;
rdfs:seeAlso [
a sh:NodeShape ;
rdfs:comment "This anonymous shape is attached with rdfs:seeAlso in order to associate a warning-severity class constraint, that will only be necessary as an independent shape until UCO 2.0.0."@en ;
sh:class observable:Software ;
sh:message "In UCO 2.0.0, uco-observable:OperatingSystem will be a subclass of uco-observable:Software. In preparation for UCO 2.0.0, the additional type uco-observable:Software should be assigned to this node."@en ;
sh:severity sh:Warning ;
sh:targetClass observable:OperatingSystem ;
] ;
sh:targetClass observable:OperatingSystem ;
.

Expand Down Expand Up @@ -5443,17 +5411,9 @@ observable:Process
owl:Class ,
sh:NodeShape
;
rdfs:subClassOf observable:ObservableObject ;
rdfs:subClassOf observable:Software ;
rdfs:label "Process"@en ;
rdfs:comment "A process is an instance of a computer program executed on an operating system."@en ;
rdfs:seeAlso [
a sh:NodeShape ;
rdfs:comment "This anonymous shape is attached with rdfs:seeAlso in order to associate a warning-severity class constraint, that will only be necessary as an independent shape until UCO 2.0.0."@en ;
sh:class observable:Software ;
sh:message "In UCO 2.0.0, uco-observable:Process will be a subclass of uco-observable:Software. In preparation for UCO 2.0.0, the additional type uco-observable:Software should be assigned to this node."@en ;
sh:severity sh:Warning ;
sh:targetClass observable:Process ;
] ;
sh:targetClass observable:Process ;
.

Expand Down Expand Up @@ -5546,17 +5506,9 @@ observable:ProcessThread
owl:Class ,
sh:NodeShape
;
rdfs:subClassOf observable:ObservableObject ;
rdfs:subClassOf observable:Process ;
rdfs:label "ProcessThread"@en ;
rdfs:comment "A process thread is the smallest sequence of programmed instructions that can be managed independently by a scheduler on a computer, which is typically a part of the operating system. It is a component of a process. Multiple threads can exist within one process, executing concurrently and sharing resources such as memory, while different processes do not share these resources. In particular, the threads of a process share its executable code and the values of its dynamically allocated variables and non-thread-local global variables at any given time. [based on https://en.wikipedia.org/wiki/Thread_(computing)]"@en ;
rdfs:seeAlso [
a sh:NodeShape ;
rdfs:comment "This anonymous shape is attached with rdfs:seeAlso in order to associate a warning-severity class constraint, that will only be necessary as an independent shape until UCO 2.0.0."@en ;
sh:class observable:Process ;
sh:message "In UCO 2.0.0, uco-observable:ProcessThread will be a subclass of uco-observable:Process. In preparation for UCO 2.0.0, the additional type uco-observable:Process should be assigned to this node."@en ;
sh:severity sh:Warning ;
sh:targetClass observable:ProcessThread ;
] ;
sh:targetClass observable:ProcessThread ;
.

Expand Down Expand Up @@ -8629,17 +8581,9 @@ observable:WindowsService
owl:Class ,
sh:NodeShape
;
rdfs:subClassOf observable:ObservableObject ;
rdfs:subClassOf observable:Service ;
rdfs:label "WindowsService"@en ;
rdfs:comment "A Windows service is a specific Windows service (a computer program that operates in the background of a Windows operating system, similar to the way a UNIX daemon runs on UNIX). [based on https://en.wikipedia.org/wiki/Windows_service]"@en ;
rdfs:seeAlso [
a sh:NodeShape ;
rdfs:comment "This anonymous shape is attached with rdfs:seeAlso in order to associate a warning-severity class constraint, that will only be necessary as an independent shape until UCO 2.0.0."@en ;
sh:class observable:Service ;
sh:message "In UCO 2.0.0, uco-observable:WindowsService will be a subclass of uco-observable:Service. In preparation for UCO 2.0.0, the additional type uco-observable:Service should be assigned to this node."@en ;
sh:severity sh:Warning ;
sh:targetClass observable:WindowsService ;
] ;
sh:targetClass observable:WindowsService ;
.

Expand Down Expand Up @@ -8762,17 +8706,9 @@ observable:WindowsTask
owl:Class ,
sh:NodeShape
;
rdfs:subClassOf observable:ObservableObject ;
rdfs:subClassOf observable:Task ;
rdfs:label "WindowsTask"@en ;
rdfs:comment "A Windows task is a process that is scheduled to execute on a Windows operating system by the Windows Task Scheduler. [based on http://msdn.microsoft.com/en-us/library/windows/desktop/aa381311(v=vs.85).aspx]"@en ;
rdfs:seeAlso [
a sh:NodeShape ;
rdfs:comment "This anonymous shape is attached with rdfs:seeAlso in order to associate a warning-severity class constraint, that will only be necessary as an independent shape until UCO 2.0.0."@en ;
sh:class observable:Task ;
sh:message "In UCO 2.0.0, uco-observable:WindowsTask will be a subclass of uco-observable:Task. In preparation for UCO 2.0.0, the additional type uco-observable:Task should be assigned to this node."@en ;
sh:severity sh:Warning ;
sh:targetClass observable:WindowsTask ;
] ;
sh:targetClass observable:WindowsTask ;
.

Expand Down
46 changes: 14 additions & 32 deletions tests/examples/observable_creation_time_XFAIL_validation.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,19 @@
[]
a sh:ValidationReport ;
sh:conforms "false"^^xsd:boolean ;
sh:result
[
a sh:ValidationResult ;
sh:focusNode <http://example.org/kb/windows-thread-da52a01e-41cc-42d5-85be-ca14bfa10fd6> ;
sh:resultMessage "In UCO 2.0.0, uco-observable:ProcessThread will be a subclass of uco-observable:Process. In preparation for UCO 2.0.0, the additional type uco-observable:Process should be assigned to this node."@en ;
sh:resultSeverity sh:Warning ;
sh:sourceConstraintComponent sh:ClassConstraintComponent ;
sh:sourceShape [
a sh:NodeShape ;
rdfs:comment "This anonymous shape is attached with rdfs:seeAlso in order to associate a warning-severity class constraint, that will only be necessary as an independent shape until UCO 2.0.0."@en ;
sh:class observable:Process ;
sh:message "In UCO 2.0.0, uco-observable:ProcessThread will be a subclass of uco-observable:Process. In preparation for UCO 2.0.0, the additional type uco-observable:Process should be assigned to this node."@en ;
sh:severity sh:Warning ;
sh:targetClass observable:ProcessThread ;
] ;
sh:value <http://example.org/kb/windows-thread-da52a01e-41cc-42d5-85be-ca14bfa10fd6> ;
] ,
[
a sh:ValidationResult ;
sh:focusNode <http://example.org/kb/windows-thread-facet-4967ae35-f00b-49c8-9dd2-38e3bdf851e1> ;
sh:resultMessage "observable:creationTime is deprecated, and an error to use as of UCO 2.0.0. observable:observableCreatedTime should be used instead."@en ;
sh:resultPath observable:creationTime ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MaxCountConstraintComponent ;
sh:sourceShape [
a sh:PropertyShape ;
sh:maxCount "0"^^xsd:integer ;
sh:message "observable:creationTime is deprecated, and an error to use as of UCO 2.0.0. observable:observableCreatedTime should be used instead."@en ;
sh:path observable:creationTime ;
] ;
]
;
sh:result [
a sh:ValidationResult ;
sh:focusNode <http://example.org/kb/windows-thread-facet-4967ae35-f00b-49c8-9dd2-38e3bdf851e1> ;
sh:resultMessage "observable:creationTime is deprecated, and an error to use as of UCO 2.0.0. observable:observableCreatedTime should be used instead."@en ;
sh:resultPath observable:creationTime ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MaxCountConstraintComponent ;
sh:sourceShape [
a sh:PropertyShape ;
sh:maxCount "0"^^xsd:integer ;
sh:message "observable:creationTime is deprecated, and an error to use as of UCO 2.0.0. observable:observableCreatedTime should be used instead."@en ;
sh:path observable:creationTime ;
] ;
] ;
.

6 changes: 4 additions & 2 deletions tests/examples/test_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,10 @@ def test_observable_creation_time_XFAIL() -> None:
"observable_creation_time_XFAIL_validation.ttl",
False,
expected_focus_node_severities={
("http://example.org/kb/windows-thread-da52a01e-41cc-42d5-85be-ca14bfa10fd6", str(NS_SH.Warning)),
("http://example.org/kb/windows-thread-facet-4967ae35-f00b-49c8-9dd2-38e3bdf851e1", str(NS_SH.Violation)),
(
"http://example.org/kb/windows-thread-facet-4967ae35-f00b-49c8-9dd2-38e3bdf851e1",
str(NS_SH.Violation)
)
}
)

Expand Down

0 comments on commit 7c76935

Please sign in to comment.