Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
150 changes: 150 additions & 0 deletions examples/illustrations/forensic_lifecycle/drafting.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
@prefix co: <http://purl.org/co/> .
@prefix drafting: <http://example.org/ontology/drafting/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix uco-action: <https://ontology.unifiedcyberontology.org/uco/action/> .
@prefix uco-core: <https://ontology.unifiedcyberontology.org/uco/core/> .
@prefix uco-types: <https://ontology.unifiedcyberontology.org/uco/types/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

drafting:ActionLifecycle-shape
a sh:NodeShape ;
rdfs:comment "This shape replaces anonymous property shapes unintentionallydeactivated by deactivating uco-action:ActionLifecycle while adding one new property shape to support the proposal."@en ;
sh:property
[
rdfs:comment "This property shape is proposed to move into uco-action:ArrayOfAction."@en ;
rdfs:isDefinedBy <https://github.com/ucoProject/UCO/issues/678> ;
sh:class drafting:ThreadOfActions ;
sh:maxCount "1"^^xsd:integer ;
sh:minCount "1"^^xsd:integer ;
sh:nodeKind sh:IRI ;
sh:path drafting:phaseThread ;
] ,
[
rdfs:isDefinedBy uco-action:ActionLifecycle ;
sh:class uco-core:UcoObject ;
sh:maxCount "0"^^xsd:integer ;
sh:nodeKind sh:IRI ;
sh:path uco-action:error ;
] ,
[
rdfs:isDefinedBy uco-action:ActionLifecycle ;
sh:datatype xsd:dateTime ;
sh:maxCount "0"^^xsd:integer ;
sh:nodeKind sh:Literal ;
sh:path uco-action:endTime ;
] ,
[
rdfs:isDefinedBy uco-action:ActionLifecycle ;
sh:datatype xsd:dateTime ;
sh:maxCount "0"^^xsd:integer ;
sh:nodeKind sh:Literal ;
sh:path uco-action:startTime ;
] ,
[
rdfs:isDefinedBy uco-action:ActionLifecycle ;
sh:datatype xsd:nonNegativeInteger ;
sh:maxCount "0"^^xsd:integer ;
sh:nodeKind sh:Literal ;
sh:path uco-action:actionCount ;
] ,
[
rdfs:isDefinedBy uco-action:ActionLifecycle ;
sh:maxCount "0"^^xsd:integer ;
sh:path uco-action:actionStatus ;
]
;
sh:targetClass uco-action:ActionLifecycle ;
.

drafting:ThreadOfActions
a
owl:Class ,
sh:NodeShape
;
rdfs:subClassOf
uco-core:UcoInherentCharacterizationThing ,
uco-types:Thread ,
[
a owl:Restriction ;
rdfs:comment "A thread of actions groups and orders at least one action. While there should be at least one Action linked, to allow for partial information sharing, this minimal link missing is warned about if absent, but not enforced."@en ;
rdfs:seeAlso drafting:ThreadOfActions-actions-shape ;
owl:onProperty co:element ;
owl:someValuesFrom uco-action:Action ;
] ,
[
a owl:Restriction ;
rdfs:comment "A thread of actions groups and orders at least one action. While there should be at least one ThreadItem linked, to allow for partial information sharing, this minimal link missing is warned about if absent, but not enforced."@en ;
rdfs:seeAlso drafting:ThreadOfActions-actions-shape ;
owl:onProperty co:item ;
owl:someValuesFrom uco-types:ThreadItem ;
]
;
rdfs:label "ThreadOfActions"@en ;
rdfs:comment "A thread of actions is a partially ordered set of references to actions that are performed as a group. As a summary of the member actions, co:element can directly link the ordered actions; but, the order between the actions is set by ThreadItems linked by co:item."@en ;
rdfs:isDefinedBy <https://github.com/ucoProject/UCO/issues/678> ;
sh:property
[
sh:class uco-action:Action ;
sh:path co:element ;
] ,
[
sh:class uco-action:Action ;
sh:path (
co:item
co:itemContent
) ;
] ,
[
sh:class uco-types:ThreadItem ;
sh:path co:item ;
]
;
sh:targetClass drafting:ThreadOfActions ;
.

drafting:ThreadOfActions-actions-shape
a sh:NodeShape ;
rdfs:comment "This shape checks whether a ThreadOfActions links to an Action in an ordered or unordered manner. In scenarios with partial data sharing where the thread is intended to be indicated but not defined, this shape can be deactivated to quiet warnings."@en ;
sh:property
drafting:ThreadOfActions-element-shape ,
drafting:ThreadOfActions-item-shape
;
sh:targetClass drafting:ThreadOfActions ;
.

drafting:ThreadOfActions-element-shape
a sh:PropertyShape ;
sh:message "Some Action(s) should be directly linked to a ThreadOfActions with co:element."@en ;
sh:minCount "1"^^xsd:integer ;
sh:path co:element ;
sh:severity sh:Warning ;
.

drafting:ThreadOfActions-item-shape
a sh:PropertyShape ;
sh:message "Some ThreadItem(s) should be linked to a ThreadOfActions with co:item."@en ;
sh:minCount "1"^^xsd:integer ;
sh:path co:item ;
sh:severity sh:Warning ;
.

drafting:phaseThread
a owl:ObjectProperty ;
rdfs:subPropertyOf uco-action:subaction ;
rdfs:label "phaseThread"@en ;
rdfs:comment
"Note:This property might or might not replace uco-action:phase."@en ,
"The partially ordered set of actions or sub action-lifecycles that represent the action lifecycle."@en
;
rdfs:isDefinedBy <https://github.com/ucoProject/UCO/issues/678> ;
rdfs:range drafting:ThreadOfActions ;
.

uco-action:ActionLifecycle
rdfs:comment "TODO - This shape is being deactivated in order to deactivate one linked anonymous property shape; the effect is unfortunately overly broad, deactivating other shapes that are restored in drafting:ActionLifecycle-shape."@en ;
sh:deactivated "true"^^xsd:boolean ;
.

99 changes: 29 additions & 70 deletions examples/illustrations/forensic_lifecycle/forensic_lifecycle.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"kb": "http://example.org/kb/",
"acme": "http://custompb.acme.org/core#",
"case-investigation": "https://ontology.caseontology.org/case/investigation/",
"drafting": "http://example.org/ontology/drafting/",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"uco-action": "https://ontology.unifiedcyberontology.org/uco/action/",
"uco-core": "https://ontology.unifiedcyberontology.org/uco/core/",
Expand All @@ -18,36 +19,17 @@
},
"@graph": [
{
"@id": "kb:forensic_lifecycle-d1780ea9-0289-46f4-bebf-25add2120e60",
"@id": "kb:forensic_lifecycle-b87e1d27-980a-40af-b1fc-64f935ede85e",
"@type": "uco-action:ActionLifecycle",
"uco-core:description": "Describes the forensic lifecycle.",
"uco-action:phase": {
"@id": "kb:array-of-action-7bfb7e0e-0607-4733-82f1-bbf13a2112bf"
"uco-core:description": "Describes a forensic lifecycle.",
"drafting:phaseThread": {
"@id": "kb:thread-of-actions-6d1da03e-06e3-4a3f-b364-00aeb9a32f52"
}
},
{
"@id": "kb:array-of-action-7bfb7e0e-0607-4733-82f1-bbf13a2112bf",
"@id": "kb:thread-of-actions-6d1da03e-06e3-4a3f-b364-00aeb9a32f52",
"@type": [
"uco-action:ArrayOfAction",
"co:List"
],
"rdfs:comment": "TODO - Propose defining ArrayOfAction as subclass of co:List; or, deprecate and set qualified shapes on uco-action:phase. Deprecate action:action, replacing with co:element. Define types:ListItem, similar to types:ThreadItem.",
"uco-action:action": [
{
"@id": "kb:phase-42cf3a99-f609-443a-9ed1-c71a81335f76"
},
{
"@id": "kb:phase-23d8e393-b6d4-4446-aee5-3ff3c94cd4ed"
},
{
"@id": "kb:phase-fa076a4f-2fd6-4832-9caa-72d6c3a55333"
},
{
"@id": "kb:phase-2c08ce87-7660-440f-9e75-dfb0a5d1858f"
},
{
"@id": "kb:phase-2d0c2aff-0af8-4199-98f4-88f700eff427"
}
"drafting:ThreadOfActions"
],
"co:element": [
{
Expand All @@ -72,71 +54,48 @@
},
"co:item": [
{
"@id": "kb:list-item-bed033ed-e2c3-43c9-a74d-3a242502f58d",
"@type": [
"co:ListItem",
"uco-core:UcoInherentCharacterizationThing"
],
"co:index": {
"@type": "xsd:positiveInteger",
"@value": "1"
},
"@id": "kb:thread-item-28808080-7d88-4d21-9fc0-fab18cde8ffc",
"@type": "uco-types:ThreadItem",
"co:itemContent": {
"@id": "kb:phase-42cf3a99-f609-443a-9ed1-c71a81335f76"
},
"uco-types:threadNextItem": {
"@id": "kb:thread-item-41073be0-f403-4641-8095-bbfad577f79e"
}
},
{
"@id": "kb:list-item-01ad3a0c-1102-44f4-8433-1b89f6eb52aa",
"@type": [
"co:ListItem",
"uco-core:UcoInherentCharacterizationThing"
],
"co:index": {
"@type": "xsd:positiveInteger",
"@value": "2"
},
"@id": "kb:thread-item-41073be0-f403-4641-8095-bbfad577f79e",
"@type": "uco-types:ThreadItem",
"co:itemContent": {
"@id": "kb:phase-23d8e393-b6d4-4446-aee5-3ff3c94cd4ed"
},
"uco-types:threadNextItem": {
"@id": "kb:thread-item-e2daa304-a1af-4ef0-9a7f-bc8ca0352363"
}
},
{
"@id": "kb:list-item-6f344a10-edf4-4914-ae96-3ae59b69d058",
"@type": [
"co:ListItem",
"uco-core:UcoInherentCharacterizationThing"
],
"co:index": {
"@type": "xsd:positiveInteger",
"@value": "3"
},
"@id": "kb:thread-item-e2daa304-a1af-4ef0-9a7f-bc8ca0352363",
"@type": "uco-types:ThreadItem",
"co:itemContent": {
"@id": "kb:phase-fa076a4f-2fd6-4832-9caa-72d6c3a55333"
},
"uco-types:threadNextItem": {
"@id": "kb:thread-item-f16536c5-ba0c-4fb1-a940-a5c83762e98a"
}
},
{
"@id": "kb:list-item-f70efc71-ae31-4b18-ac7a-7a6439d99dd9",
"@type": [
"co:ListItem",
"uco-core:UcoInherentCharacterizationThing"
],
"co:index": {
"@type": "xsd:positiveInteger",
"@value": "4"
},
"@id": "kb:thread-item-f16536c5-ba0c-4fb1-a940-a5c83762e98a",
"@type": "uco-types:ThreadItem",
"co:itemContent": {
"@id": "kb:phase-2c08ce87-7660-440f-9e75-dfb0a5d1858f"
},
"uco-types:threadNextItem": {
"@id": "kb:thread-item-faa3f691-276a-4fb0-b9f2-f124b51b4627"
}
},
{
"@id": "kb:list-item-2022e71d-368a-414d-89b4-f3d8ca48d6ec",
"@type": [
"co:ListItem",
"uco-core:UcoInherentCharacterizationThing"
],
"co:index": {
"@type": "xsd:positiveInteger",
"@value": "5"
},
"@id": "kb:thread-item-faa3f691-276a-4fb0-b9f2-f124b51b4627",
"@type": "uco-types:ThreadItem",
"co:itemContent": {
"@id": "kb:phase-2d0c2aff-0af8-4199-98f4-88f700eff427"
}
Expand Down
Loading