diff --git a/case_utils/ontology/Makefile b/case_utils/ontology/Makefile index 8c6028c..8ed473c 100644 --- a/case_utils/ontology/Makefile +++ b/case_utils/ontology/Makefile @@ -40,15 +40,30 @@ $(case_srcdir)/.venv.done.log: \ touch -c $@ test -r $@ +# Build monolith including transitive import closure outside of +# CDO-maintained ontologies, removing need for network retrieval for +# non-CDO class and property definitions. case-$(case_version).ttl: \ $(case_srcdir)/.venv.done.log \ $(RDF_TOOLKIT_JAR) $(MAKE) \ --directory $(case_srcdir)/tests \ case_monolithic.ttl - cp \ - $(case_srcdir)/tests/case_monolithic.ttl \ - $@ + source $(case_srcdir)/venv/bin/activate \ + && rdfpipe \ + --output-format turtle \ + $(case_srcdir)/tests/case_monolithic.ttl \ + $(uco_srcdir)/dependencies/collections-ontology/collections.owl \ + $(uco_srcdir)/dependencies/error/docs/current/error.ttl \ + > __$@ + java -jar $(RDF_TOOLKIT_JAR) \ + --inline-blank-nodes \ + --source __$@ \ + --source-format turtle \ + --target _$@ \ + --target-format turtle + rm __$@ + mv _$@ $@ case-$(case_version)-subclasses.ttl: \ case-$(case_version).ttl \ diff --git a/case_utils/ontology/case-1.0.0-subclasses.ttl b/case_utils/ontology/case-1.0.0-subclasses.ttl index f953f39..fa8e678 100644 --- a/case_utils/ontology/case-1.0.0-subclasses.ttl +++ b/case_utils/ontology/case-1.0.0-subclasses.ttl @@ -3,10 +3,26 @@ @prefix rdfs: . @prefix xs: . + + rdfs:subClassOf ; + . + + + rdfs:subClassOf owl:Thing ; + . + + + rdfs:subClassOf owl:Thing ; + . + rdfs:subClassOf ; . + + rdfs:subClassOf ; + . + rdfs:subClassOf ; . diff --git a/case_utils/ontology/case-1.0.0.ttl b/case_utils/ontology/case-1.0.0.ttl index 00e5ac1..2e2216b 100644 --- a/case_utils/ontology/case-1.0.0.ttl +++ b/case_utils/ontology/case-1.0.0.ttl @@ -1,4 +1,5 @@ # imports: http://purl.org/co +# imports: http://purl.org/spar/error # imports: https://ontology.caseontology.org/case/investigation/1.0.0 # imports: https://ontology.caseontology.org/case/vocabulary/1.0.0 # imports: https://ontology.unifiedcyberontology.org/co/1.0.0 @@ -23,7 +24,9 @@ @prefix co: . @prefix configuration: . @prefix core: . -@prefix dct: . +@prefix dc: . +@prefix dcterms: . +@prefix error: . @prefix identity: . @prefix investigation: . @prefix location: . @@ -35,7 +38,9 @@ @prefix rdfs: . @prefix role: . @prefix sh: . -@prefix time: . +@prefix swrl: . +@prefix swrlb: . +@prefix time1: . @prefix tool: . @prefix types: . @prefix uco-co: . @@ -45,11 +50,42 @@ @prefix vocabulary: . @prefix xsd: . + + a owl:Ontology ; + dc:contributor + "Marco Ocana" , + "Paolo Ciccarese" , + "Silvio Peroni" + ; + dc:creator ; + dc:date "March 19, 2012" ; + dc:format "application/rdf+xml" ; + dc:language "en" ; + dc:title """The Collections Ontology +(CO)"""@en ; + owl:imports ; + owl:versionInfo "2.0" ; + . + + + a owl:Ontology ; + rdfs:label "Error Ontology"@en ; + dc:creator "Silvio Peroni" ; + dc:date "2010-11-29"^^xsd:date ; + dc:description """The Error Ontology is an unit test that allow to produce an inconsistent model if a particular (and incorrect) situation happens. + +It works by means of a data property, \"hasError\" that denies its usage for ant resource. In fact, by defining its domain as \"all those resource that don't have any hasErrorDescription assertion\", a resource that asserts having an error makes the ontology inconsistent."""@en ; + dc:rights "This work is distributed under a Creative Commons Attribution Licence (http://creativecommons.org/licenses/by/3.0/)."@en ; + dc:title """The Error Ontology +Making contraints on ontology resources"""@en ; + owl:versionInfo "1.0" ; + . + a owl:Ontology ; rdfs:label "case-master"@en ; rdfs:comment "The Cyber-investigation Analysis Standard Expression (CASE) ontology is a community-developed standard that defines concepts used in a broad range of cyber-investigation domains, including digital forensic science, incident response, counter-terrorism, criminal justice, forensic intelligence, and situational awareness. CASE includes all aspects of the digital forensic process, from evidence-gathering and chain of custody, to generating a final report. The goal is to increase sharing and interoperability of cyber-investigation information among organizations and between forensic analytic tools. CASE aligns with and extends the Unified Cyber Ontology (UCO). The preferred namespace abbreviation for this ontology is: case-master."@en ; - dct:title "Cyber-investigation Analysis Standard Expression (CASE)"@en ; + dcterms:title "Cyber-investigation Analysis Standard Expression (CASE)"@en ; owl:imports investigation:1.0.0 , vocab:1.0.0 , @@ -217,10 +253,10 @@ a owl:Ontology ; rdfs:label "uco-time"@en ; owl:imports core:1.0.0 ; - owl:incompatibleWith time:0.9.1 ; + owl:incompatibleWith time1:0.9.1 ; owl:ontologyIRI ; - owl:priorVersion time:0.9.1 ; - owl:versionIRI time:1.0.0 ; + owl:priorVersion time1:0.9.1 ; + owl:versionIRI time1:1.0.0 ; . @@ -265,7 +301,7 @@ observable:1.0.0 , pattern:1.0.0 , role:1.0.0 , - time:1.0.0 , + time1:1.0.0 , tool:1.0.0 , types:1.0.0 , victim:1.0.0 , @@ -297,8 +333,352 @@ owl:versionIRI vocabulary:1.0.0 ; . +co:Bag + a owl:Class ; + rdfs:subClassOf co:Collection ; + rdfs:label "bag"@en ; + rdfs:comment "Collection that can have a number of copies of each object"@en ; + owl:disjointWith co:Set ; + . + +co:Collection + a owl:Class ; + rdfs:subClassOf + owl:Thing , + [ + a owl:Restriction ; + owl:onProperty co:element ; + owl:allValuesFrom owl:Thing ; + ] , + [ + a owl:Restriction ; + owl:onProperty co:size ; + owl:cardinality "1"^^xsd:nonNegativeInteger ; + ] + ; + rdfs:label "collection"@en ; + rdfs:comment "A group of objects that can be considered as a whole."@en ; + owl:disjointWith co:Item ; + . + +co:Item + a owl:Class ; + rdfs:subClassOf + owl:Thing , + [ + a owl:Restriction ; + owl:onProperty [ + owl:inverseOf co:item ; + ] ; + owl:someValuesFrom co:Bag ; + ] + ; + rdfs:label "item"@en ; + rdfs:comment "Element belonging to a bag"@en ; + . + +co:List + a owl:Class ; + rdfs:subClassOf + [ + a owl:Class ; + owl:intersectionOf ( + co:Bag + [ + a owl:Restriction ; + owl:onProperty co:item ; + owl:allValuesFrom co:ListItem ; + ] + ) ; + ] , + [ + a owl:Restriction ; + owl:onProperty co:firstItem ; + owl:maxCardinality "1"^^xsd:nonNegativeInteger ; + ] , + [ + a owl:Restriction ; + owl:onProperty co:lastItem ; + owl:maxCardinality "1"^^xsd:nonNegativeInteger ; + ] + ; + rdfs:label "list"@en ; + rdfs:comment "An ordered array of items, that can be present in multiple copies"@en ; + . + co:ListItem - rdfs:subClassOf co:Item ; + a owl:Class ; + rdfs:subClassOf + co:Item , + [ + a owl:Restriction ; + owl:onProperty co:index ; + owl:cardinality "1"^^xsd:nonNegativeInteger ; + ] + ; + rdfs:label "list item"@en ; + rdfs:comment "element belonging to a list"@en ; + . + +co:Set + a owl:Class ; + rdfs:subClassOf co:Collection ; + rdfs:label "set"@en ; + rdfs:comment "A collection that cannot contain duplicate elements."@en ; + . + +co:element + a owl:ObjectProperty ; + rdfs:label "has element"@en ; + rdfs:comment "The link to the members of a collection"@en ; + rdfs:domain co:Collection ; + owl:propertyChainAxiom ( + co:item + co:itemContent + ) ; + . + +co:elementOf + a owl:ObjectProperty ; + rdfs:label "is element of"@en ; + rdfs:comment "The link to a collection in which the object is member."@en ; + owl:inverseOf co:element ; + . + +co:firstItem + a + owl:ObjectProperty , + owl:FunctionalProperty + ; + rdfs:subPropertyOf co:item ; + rdfs:label "has first item"@en ; + rdfs:comment "The link to the first item of the list."@en ; + rdfs:domain co:List ; + rdfs:range [ + a owl:Class ; + owl:intersectionOf ( + co:ListItem + [ + a owl:Restriction ; + owl:onProperty co:previousItem ; + owl:cardinality "0"^^xsd:nonNegativeInteger ; + ] + [ + a owl:Restriction ; + owl:onProperty co:index ; + owl:hasValue "1"^^xsd:positiveInteger ; + ] + ) ; + ] ; + . + +co:firstItemOf + a owl:ObjectProperty ; + rdfs:subPropertyOf co:itemOf ; + rdfs:label "is first item of"@en ; + rdfs:comment "The link to a list in which the item is first item."@en ; + owl:inverseOf co:firstItem ; + . + +co:followedBy + a + owl:ObjectProperty , + owl:TransitiveProperty + ; + rdfs:label "is followed by"@en ; + rdfs:comment "The link to the following item in a list."@en ; + dc:description "Given the list (I[1], I[2], ... , I[i-1], I[i], I[i+1], ... , I[n-1], I[n]), the item I[i] is followed by I[i+1], ... , I[n-1] and I[n]."@en ; + rdfs:domain co:ListItem ; + rdfs:range co:ListItem ; + . + +co:index + a owl:DatatypeProperty ; + rdfs:label "has index"@en ; + rdfs:comment "A number identifying the position, starting from 1, of a particular list item within a list."@en ; + rdfs:domain co:ListItem ; + rdfs:range xsd:positiveInteger ; + . + +co:item + a owl:ObjectProperty ; + rdfs:label "has item"@en ; + rdfs:comment "The link to every item of the bag"@en ; + rdfs:domain co:Bag ; + rdfs:range co:Item ; + owl:propertyChainAxiom ( + co:item + co:nextItem + ) ; + . + +co:itemContent + a + owl:ObjectProperty , + owl:FunctionalProperty + ; + rdfs:label "has item content"@en ; + rdfs:comment "The link to the actual resource to which the item refers."@en ; + rdfs:domain co:Item ; + rdfs:range [ + a owl:Class ; + owl:complementOf co:Item ; + ] ; + . + +co:itemContentOf + a owl:ObjectProperty ; + rdfs:label "is item content of"@en ; + rdfs:comment "The link to the item that refers to the resource."@en ; + owl:inverseOf co:itemContent ; + . + +co:itemOf + a owl:ObjectProperty ; + rdfs:label "is item of"@en ; + rdfs:comment "The link to a bag in which the item is member."@en ; + owl:inverseOf co:item ; + . + +co:lastItem + a + owl:ObjectProperty , + owl:FunctionalProperty + ; + rdfs:subPropertyOf co:item ; + rdfs:label "has last item"@en ; + rdfs:comment "The link to the last item of the list."@en ; + rdfs:domain co:List ; + rdfs:range [ + a owl:Class ; + owl:intersectionOf ( + co:ListItem + [ + a owl:Restriction ; + owl:onProperty co:nextItem ; + owl:cardinality "0"^^xsd:nonNegativeInteger ; + ] + ) ; + ] ; + . + +co:lastItemOf + a owl:ObjectProperty ; + rdfs:subPropertyOf co:itemOf ; + rdfs:label "is last item of"@en ; + rdfs:comment "The link to a list in which the item is last item."@en ; + owl:inverseOf co:lastItem ; + . + +co:nextItem + a + owl:ObjectProperty , + owl:FunctionalProperty + ; + rdfs:subPropertyOf co:followedBy ; + rdfs:label "has next item"@en ; + rdfs:comment "The link to the next item in a list."@en ; + dc:description "Given the list (I[1], I[2], ... , I[i-1], I[i], I[i+1], ... , I[n-1], I[n]), the next item of I[i] is I[i+1]."@en ; + . + +co:precededBy + a + owl:ObjectProperty , + owl:TransitiveProperty + ; + rdfs:label "is preceded by"@en ; + rdfs:comment "The link to the preceding item in a list."@en ; + dc:description "Given the list (I[1], I[2], ... , I[i-1], I[i], I[i+1], ... , I[n-1], I[n]), the item I[i] is preceded by I[i-1], ... , I[2] and I[1]."@en ; + owl:inverseOf co:followedBy ; + . + +co:previousItem + a + owl:ObjectProperty , + owl:FunctionalProperty + ; + rdfs:subPropertyOf co:precededBy ; + rdfs:label "has previous item"@en ; + rdfs:comment "The link to the previous item in a list."@en ; + dc:description "Given the list (I[1], I[2], ... , I[i-1], I[i], I[i+1], ... , I[n-1], I[n]), the previous item of I[i] is I[i-1]."@en ; + owl:inverseOf co:nextItem ; + . + +co:size + a owl:DatatypeProperty ; + rdfs:label "has size"@en ; + rdfs:comment "The number of item belonging to a collection."@en ; + dc:description """CO defines the size of a collection as the sum of the number of times entities that are part of the collection appear in it. This means that co:size considers how much each entity is involved by a particular collection, i.e.: +- the size of the set {a, b, c} is three +- the size of the bag [a, a, b, b, b, c] is five +- the size of the list (a, b, c, b, a, b, c, c) is seven"""@en ; + rdfs:domain co:Collection ; + rdfs:range xsd:nonNegativeInteger ; + . + +dc:contributor + a owl:AnnotationProperty ; + . + +dc:creator + a owl:AnnotationProperty ; + . + +dc:date + a owl:AnnotationProperty ; + . + +dc:description + a owl:AnnotationProperty ; + . + +dc:format + a owl:AnnotationProperty ; + . + +dc:language + a owl:AnnotationProperty ; + . + +dc:publisher + a owl:AnnotationProperty ; + . + +dc:rights + a owl:AnnotationProperty ; + . + +dc:title + a owl:AnnotationProperty ; + . + +error:hasError + a owl:DatatypeProperty ; + rdfs:label "has error"@en ; + rdfs:comment "It describes in some way, usually in natural language, which kind of error results from this resource."@en ; + dc:description "A data property linking a resource that contains a logical error (which results in it belonging to the class owl:Nothing, therefore making the model inconsistent) to a textual description of that error."@en ; + rdfs:domain [ + a owl:Restriction ; + owl:onProperty error:hasError ; + owl:cardinality "0"^^xsd:nonNegativeInteger ; + ] ; + rdfs:range xsd:string ; + . + +rdfs:comment + a owl:AnnotationProperty ; + . + +rdfs:label + a owl:AnnotationProperty ; + . + +owl:Thing + a owl:Class ; + . + +owl:versionInfo + a owl:AnnotationProperty ; . investigation:Attorney @@ -16724,15 +17104,15 @@ role:Role sh:targetClass role:Role ; . -time:Time +time1:Time a rdfs:Datatype ; . -time:TimeRange +time1:TimeRange a rdfs:Datatype ; . -time:Timestamp +time1:Timestamp a rdfs:Datatype ; . @@ -18901,6 +19281,66 @@ vocabulary:WirelessNetworkSecurityModeVocab ] ; . + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + [] a owl:AllDisjointClasses ; owl:members ( @@ -18917,3 +19357,263 @@ vocabulary:WirelessNetworkSecurityModeVocab owl:AnnotatedTarget co:Item ; . +[] + a owl:Class ; + rdfs:subClassOf [ + a owl:Class ; + owl:intersectionOf ( + co:List + [ + a owl:Restriction ; + owl:onProperty co:firstItem ; + owl:someValuesFrom co:Item ; + ] + [ + a owl:Restriction ; + owl:onProperty co:lastItem ; + owl:someValuesFrom co:Item ; + ] + ) ; + ] ; + owl:intersectionOf ( + co:List + [ + a owl:Restriction ; + owl:onProperty co:item ; + owl:someValuesFrom co:ListItem ; + ] + ) ; + . + +[] + a swrl:Imp ; + swrl:body ( + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:nextItem ; + ] + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:index ; + ] + [ + a swrl:BuiltinAtom ; + swrl:arguments ( + + + "1"^^xsd:integer + ) ; + swrl:builtin swrlb:add ; + ] + ) ; + swrl:head ( + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:index ; + ] + ) ; + . + +[] + a swrl:Imp ; + swrl:body ( + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:itemOf ; + ] + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:index ; + ] + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:size ; + ] + ) ; + swrl:head ( + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:lastItem ; + ] + ) ; + . + +[] + a swrl:Imp ; + swrl:body ( + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:lastItem ; + ] + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:size ; + ] + ) ; + swrl:head ( + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:index ; + ] + ) ; + . + +[] + a swrl:Imp ; + swrl:body ( + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:itemOf ; + ] + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 "1" ; + swrl:propertyPredicate co:index ; + ] + ) ; + swrl:head ( + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:firstItem ; + ] + ) ; + . + +[] + a swrl:Imp ; + swrl:body ( + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:itemOf ; + ] + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:itemOf ; + ] + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:index ; + ] + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:index ; + ] + [ + a swrl:BuiltinAtom ; + swrl:arguments ( + + + "1"^^xsd:integer + ) ; + swrl:builtin swrlb:add ; + ] + ) ; + swrl:head ( + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:nextItem ; + ] + ) ; + . + +[] + a swrl:Imp ; + swrl:body ( + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:lastItem ; + ] + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:index ; + ] + ) ; + swrl:head ( + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:size ; + ] + ) ; + . + +[] + a swrl:Imp ; + swrl:body ( + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:followedBy ; + ] + ) ; + swrl:head ( + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 "A list item cannot be followed by itself" ; + swrl:propertyPredicate error:hasError ; + ] + ) ; + . + +[] + a swrl:Imp ; + swrl:body ( + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:precededBy ; + ] + ) ; + swrl:head ( + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 "A list item cannot be preceded by itself" ; + swrl:propertyPredicate error:hasError ; + ] + ) ; + . + diff --git a/case_utils/ontology/case-1.1.0-subclasses.ttl b/case_utils/ontology/case-1.1.0-subclasses.ttl index e022e71..4a9e40e 100644 --- a/case_utils/ontology/case-1.1.0-subclasses.ttl +++ b/case_utils/ontology/case-1.1.0-subclasses.ttl @@ -3,10 +3,26 @@ @prefix rdfs: . @prefix xs: . + + rdfs:subClassOf ; + . + + + rdfs:subClassOf owl:Thing ; + . + + + rdfs:subClassOf owl:Thing ; + . + rdfs:subClassOf ; . + + rdfs:subClassOf ; + . + rdfs:subClassOf ; . diff --git a/case_utils/ontology/case-1.1.0.ttl b/case_utils/ontology/case-1.1.0.ttl index 7423ae0..8d87b1b 100644 --- a/case_utils/ontology/case-1.1.0.ttl +++ b/case_utils/ontology/case-1.1.0.ttl @@ -1,4 +1,5 @@ # imports: http://purl.org/co +# imports: http://purl.org/spar/error # imports: https://ontology.caseontology.org/case/investigation/1.1.0 # imports: https://ontology.caseontology.org/case/vocabulary/1.1.0 # imports: https://ontology.unifiedcyberontology.org/co/1.1.0 @@ -25,7 +26,9 @@ @prefix co: . @prefix configuration: . @prefix core: . -@prefix dct: . +@prefix dc: . +@prefix dcterms: . +@prefix error: . @prefix identity: . @prefix investigation: . @prefix location: . @@ -37,7 +40,9 @@ @prefix rdfs: . @prefix role: . @prefix sh: . -@prefix time: . +@prefix swrl: . +@prefix swrlb: . +@prefix time1: . @prefix tool: . @prefix types: . @prefix uco-co: . @@ -47,11 +52,42 @@ @prefix vocabulary: . @prefix xsd: . + + a owl:Ontology ; + dc:contributor + "Marco Ocana" , + "Paolo Ciccarese" , + "Silvio Peroni" + ; + dc:creator ; + dc:date "March 19, 2012" ; + dc:format "application/rdf+xml" ; + dc:language "en" ; + dc:title """The Collections Ontology +(CO)"""@en ; + owl:imports ; + owl:versionInfo "2.0" ; + . + + + a owl:Ontology ; + rdfs:label "Error Ontology"@en ; + dc:creator "Silvio Peroni" ; + dc:date "2010-11-29"^^xsd:date ; + dc:description """The Error Ontology is an unit test that allow to produce an inconsistent model if a particular (and incorrect) situation happens. + +It works by means of a data property, \"hasError\" that denies its usage for ant resource. In fact, by defining its domain as \"all those resource that don't have any hasErrorDescription assertion\", a resource that asserts having an error makes the ontology inconsistent."""@en ; + dc:rights "This work is distributed under a Creative Commons Attribution Licence (http://creativecommons.org/licenses/by/3.0/)."@en ; + dc:title """The Error Ontology +Making contraints on ontology resources"""@en ; + owl:versionInfo "1.0" ; + . + a owl:Ontology ; rdfs:label "case-master"@en ; rdfs:comment "The Cyber-investigation Analysis Standard Expression (CASE) ontology is a community-developed standard that defines concepts used in a broad range of cyber-investigation domains, including digital forensic science, incident response, counter-terrorism, criminal justice, forensic intelligence, and situational awareness. CASE includes all aspects of the digital forensic process, from evidence-gathering and chain of custody, to generating a final report. The goal is to increase sharing and interoperability of cyber-investigation information among organizations and between forensic analytic tools. CASE aligns with and extends the Unified Cyber Ontology (UCO). The preferred namespace abbreviation for this ontology is: case-master."@en ; - dct:title "Cyber-investigation Analysis Standard Expression (CASE)"@en ; + dcterms:title "Cyber-investigation Analysis Standard Expression (CASE)"@en ; owl:backwardCompatibleWith ; owl:imports investigation:1.1.0 , @@ -219,10 +255,10 @@ a owl:Ontology ; rdfs:label "uco-time"@en ; - owl:backwardCompatibleWith time:1.0.0 ; + owl:backwardCompatibleWith time1:1.0.0 ; owl:imports core:1.1.0 ; - owl:priorVersion time:1.0.0 ; - owl:versionIRI time:1.1.0 ; + owl:priorVersion time1:1.0.0 ; + owl:versionIRI time1:1.1.0 ; . @@ -267,7 +303,7 @@ observable:1.1.0 , pattern:1.1.0 , role:1.1.0 , - time:1.1.0 , + time1:1.1.0 , tool:1.1.0 , types:1.1.0 , victim:1.1.0 , @@ -295,8 +331,352 @@ owl:versionIRI vocabulary:1.1.0 ; . +co:Bag + a owl:Class ; + rdfs:subClassOf co:Collection ; + rdfs:label "bag"@en ; + rdfs:comment "Collection that can have a number of copies of each object"@en ; + owl:disjointWith co:Set ; + . + +co:Collection + a owl:Class ; + rdfs:subClassOf + owl:Thing , + [ + a owl:Restriction ; + owl:onProperty co:element ; + owl:allValuesFrom owl:Thing ; + ] , + [ + a owl:Restriction ; + owl:onProperty co:size ; + owl:cardinality "1"^^xsd:nonNegativeInteger ; + ] + ; + rdfs:label "collection"@en ; + rdfs:comment "A group of objects that can be considered as a whole."@en ; + owl:disjointWith co:Item ; + . + +co:Item + a owl:Class ; + rdfs:subClassOf + owl:Thing , + [ + a owl:Restriction ; + owl:onProperty [ + owl:inverseOf co:item ; + ] ; + owl:someValuesFrom co:Bag ; + ] + ; + rdfs:label "item"@en ; + rdfs:comment "Element belonging to a bag"@en ; + . + +co:List + a owl:Class ; + rdfs:subClassOf + [ + a owl:Class ; + owl:intersectionOf ( + co:Bag + [ + a owl:Restriction ; + owl:onProperty co:item ; + owl:allValuesFrom co:ListItem ; + ] + ) ; + ] , + [ + a owl:Restriction ; + owl:onProperty co:firstItem ; + owl:maxCardinality "1"^^xsd:nonNegativeInteger ; + ] , + [ + a owl:Restriction ; + owl:onProperty co:lastItem ; + owl:maxCardinality "1"^^xsd:nonNegativeInteger ; + ] + ; + rdfs:label "list"@en ; + rdfs:comment "An ordered array of items, that can be present in multiple copies"@en ; + . + co:ListItem - rdfs:subClassOf co:Item ; + a owl:Class ; + rdfs:subClassOf + co:Item , + [ + a owl:Restriction ; + owl:onProperty co:index ; + owl:cardinality "1"^^xsd:nonNegativeInteger ; + ] + ; + rdfs:label "list item"@en ; + rdfs:comment "element belonging to a list"@en ; + . + +co:Set + a owl:Class ; + rdfs:subClassOf co:Collection ; + rdfs:label "set"@en ; + rdfs:comment "A collection that cannot contain duplicate elements."@en ; + . + +co:element + a owl:ObjectProperty ; + rdfs:label "has element"@en ; + rdfs:comment "The link to the members of a collection"@en ; + rdfs:domain co:Collection ; + owl:propertyChainAxiom ( + co:item + co:itemContent + ) ; + . + +co:elementOf + a owl:ObjectProperty ; + rdfs:label "is element of"@en ; + rdfs:comment "The link to a collection in which the object is member."@en ; + owl:inverseOf co:element ; + . + +co:firstItem + a + owl:ObjectProperty , + owl:FunctionalProperty + ; + rdfs:subPropertyOf co:item ; + rdfs:label "has first item"@en ; + rdfs:comment "The link to the first item of the list."@en ; + rdfs:domain co:List ; + rdfs:range [ + a owl:Class ; + owl:intersectionOf ( + co:ListItem + [ + a owl:Restriction ; + owl:onProperty co:previousItem ; + owl:cardinality "0"^^xsd:nonNegativeInteger ; + ] + [ + a owl:Restriction ; + owl:onProperty co:index ; + owl:hasValue "1"^^xsd:positiveInteger ; + ] + ) ; + ] ; + . + +co:firstItemOf + a owl:ObjectProperty ; + rdfs:subPropertyOf co:itemOf ; + rdfs:label "is first item of"@en ; + rdfs:comment "The link to a list in which the item is first item."@en ; + owl:inverseOf co:firstItem ; + . + +co:followedBy + a + owl:ObjectProperty , + owl:TransitiveProperty + ; + rdfs:label "is followed by"@en ; + rdfs:comment "The link to the following item in a list."@en ; + dc:description "Given the list (I[1], I[2], ... , I[i-1], I[i], I[i+1], ... , I[n-1], I[n]), the item I[i] is followed by I[i+1], ... , I[n-1] and I[n]."@en ; + rdfs:domain co:ListItem ; + rdfs:range co:ListItem ; + . + +co:index + a owl:DatatypeProperty ; + rdfs:label "has index"@en ; + rdfs:comment "A number identifying the position, starting from 1, of a particular list item within a list."@en ; + rdfs:domain co:ListItem ; + rdfs:range xsd:positiveInteger ; + . + +co:item + a owl:ObjectProperty ; + rdfs:label "has item"@en ; + rdfs:comment "The link to every item of the bag"@en ; + rdfs:domain co:Bag ; + rdfs:range co:Item ; + owl:propertyChainAxiom ( + co:item + co:nextItem + ) ; + . + +co:itemContent + a + owl:ObjectProperty , + owl:FunctionalProperty + ; + rdfs:label "has item content"@en ; + rdfs:comment "The link to the actual resource to which the item refers."@en ; + rdfs:domain co:Item ; + rdfs:range [ + a owl:Class ; + owl:complementOf co:Item ; + ] ; + . + +co:itemContentOf + a owl:ObjectProperty ; + rdfs:label "is item content of"@en ; + rdfs:comment "The link to the item that refers to the resource."@en ; + owl:inverseOf co:itemContent ; + . + +co:itemOf + a owl:ObjectProperty ; + rdfs:label "is item of"@en ; + rdfs:comment "The link to a bag in which the item is member."@en ; + owl:inverseOf co:item ; + . + +co:lastItem + a + owl:ObjectProperty , + owl:FunctionalProperty + ; + rdfs:subPropertyOf co:item ; + rdfs:label "has last item"@en ; + rdfs:comment "The link to the last item of the list."@en ; + rdfs:domain co:List ; + rdfs:range [ + a owl:Class ; + owl:intersectionOf ( + co:ListItem + [ + a owl:Restriction ; + owl:onProperty co:nextItem ; + owl:cardinality "0"^^xsd:nonNegativeInteger ; + ] + ) ; + ] ; + . + +co:lastItemOf + a owl:ObjectProperty ; + rdfs:subPropertyOf co:itemOf ; + rdfs:label "is last item of"@en ; + rdfs:comment "The link to a list in which the item is last item."@en ; + owl:inverseOf co:lastItem ; + . + +co:nextItem + a + owl:ObjectProperty , + owl:FunctionalProperty + ; + rdfs:subPropertyOf co:followedBy ; + rdfs:label "has next item"@en ; + rdfs:comment "The link to the next item in a list."@en ; + dc:description "Given the list (I[1], I[2], ... , I[i-1], I[i], I[i+1], ... , I[n-1], I[n]), the next item of I[i] is I[i+1]."@en ; + . + +co:precededBy + a + owl:ObjectProperty , + owl:TransitiveProperty + ; + rdfs:label "is preceded by"@en ; + rdfs:comment "The link to the preceding item in a list."@en ; + dc:description "Given the list (I[1], I[2], ... , I[i-1], I[i], I[i+1], ... , I[n-1], I[n]), the item I[i] is preceded by I[i-1], ... , I[2] and I[1]."@en ; + owl:inverseOf co:followedBy ; + . + +co:previousItem + a + owl:ObjectProperty , + owl:FunctionalProperty + ; + rdfs:subPropertyOf co:precededBy ; + rdfs:label "has previous item"@en ; + rdfs:comment "The link to the previous item in a list."@en ; + dc:description "Given the list (I[1], I[2], ... , I[i-1], I[i], I[i+1], ... , I[n-1], I[n]), the previous item of I[i] is I[i-1]."@en ; + owl:inverseOf co:nextItem ; + . + +co:size + a owl:DatatypeProperty ; + rdfs:label "has size"@en ; + rdfs:comment "The number of item belonging to a collection."@en ; + dc:description """CO defines the size of a collection as the sum of the number of times entities that are part of the collection appear in it. This means that co:size considers how much each entity is involved by a particular collection, i.e.: +- the size of the set {a, b, c} is three +- the size of the bag [a, a, b, b, b, c] is five +- the size of the list (a, b, c, b, a, b, c, c) is seven"""@en ; + rdfs:domain co:Collection ; + rdfs:range xsd:nonNegativeInteger ; + . + +dc:contributor + a owl:AnnotationProperty ; + . + +dc:creator + a owl:AnnotationProperty ; + . + +dc:date + a owl:AnnotationProperty ; + . + +dc:description + a owl:AnnotationProperty ; + . + +dc:format + a owl:AnnotationProperty ; + . + +dc:language + a owl:AnnotationProperty ; + . + +dc:publisher + a owl:AnnotationProperty ; + . + +dc:rights + a owl:AnnotationProperty ; + . + +dc:title + a owl:AnnotationProperty ; + . + +error:hasError + a owl:DatatypeProperty ; + rdfs:label "has error"@en ; + rdfs:comment "It describes in some way, usually in natural language, which kind of error results from this resource."@en ; + dc:description "A data property linking a resource that contains a logical error (which results in it belonging to the class owl:Nothing, therefore making the model inconsistent) to a textual description of that error."@en ; + rdfs:domain [ + a owl:Restriction ; + owl:onProperty error:hasError ; + owl:cardinality "0"^^xsd:nonNegativeInteger ; + ] ; + rdfs:range xsd:string ; + . + +rdfs:comment + a owl:AnnotationProperty ; + . + +rdfs:label + a owl:AnnotationProperty ; + . + +owl:Thing + a owl:Class ; + . + +owl:versionInfo + a owl:AnnotationProperty ; . investigation:Attorney @@ -16961,15 +17341,15 @@ role:Role sh:targetClass role:Role ; . -time:Time +time1:Time a rdfs:Datatype ; . -time:TimeRange +time1:TimeRange a rdfs:Datatype ; . -time:Timestamp +time1:Timestamp a rdfs:Datatype ; . @@ -19138,6 +19518,66 @@ vocabulary:WirelessNetworkSecurityModeVocab ] ; . + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + [] a owl:AllDisjointClasses ; owl:members ( @@ -19154,3 +19594,263 @@ vocabulary:WirelessNetworkSecurityModeVocab owl:annotatedTarget co:Item ; . +[] + a owl:Class ; + rdfs:subClassOf [ + a owl:Class ; + owl:intersectionOf ( + co:List + [ + a owl:Restriction ; + owl:onProperty co:firstItem ; + owl:someValuesFrom co:Item ; + ] + [ + a owl:Restriction ; + owl:onProperty co:lastItem ; + owl:someValuesFrom co:Item ; + ] + ) ; + ] ; + owl:intersectionOf ( + co:List + [ + a owl:Restriction ; + owl:onProperty co:item ; + owl:someValuesFrom co:ListItem ; + ] + ) ; + . + +[] + a swrl:Imp ; + swrl:body ( + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:nextItem ; + ] + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:index ; + ] + [ + a swrl:BuiltinAtom ; + swrl:arguments ( + + + "1"^^xsd:integer + ) ; + swrl:builtin swrlb:add ; + ] + ) ; + swrl:head ( + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:index ; + ] + ) ; + . + +[] + a swrl:Imp ; + swrl:body ( + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:itemOf ; + ] + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:index ; + ] + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:size ; + ] + ) ; + swrl:head ( + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:lastItem ; + ] + ) ; + . + +[] + a swrl:Imp ; + swrl:body ( + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:lastItem ; + ] + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:size ; + ] + ) ; + swrl:head ( + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:index ; + ] + ) ; + . + +[] + a swrl:Imp ; + swrl:body ( + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:itemOf ; + ] + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 "1" ; + swrl:propertyPredicate co:index ; + ] + ) ; + swrl:head ( + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:firstItem ; + ] + ) ; + . + +[] + a swrl:Imp ; + swrl:body ( + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:itemOf ; + ] + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:itemOf ; + ] + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:index ; + ] + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:index ; + ] + [ + a swrl:BuiltinAtom ; + swrl:arguments ( + + + "1"^^xsd:integer + ) ; + swrl:builtin swrlb:add ; + ] + ) ; + swrl:head ( + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:nextItem ; + ] + ) ; + . + +[] + a swrl:Imp ; + swrl:body ( + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:lastItem ; + ] + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:index ; + ] + ) ; + swrl:head ( + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:size ; + ] + ) ; + . + +[] + a swrl:Imp ; + swrl:body ( + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:followedBy ; + ] + ) ; + swrl:head ( + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 "A list item cannot be followed by itself" ; + swrl:propertyPredicate error:hasError ; + ] + ) ; + . + +[] + a swrl:Imp ; + swrl:body ( + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:precededBy ; + ] + ) ; + swrl:head ( + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 "A list item cannot be preceded by itself" ; + swrl:propertyPredicate error:hasError ; + ] + ) ; + . + diff --git a/case_utils/ontology/case-1.2.0-subclasses.ttl b/case_utils/ontology/case-1.2.0-subclasses.ttl index 0edee1b..75b04a8 100644 --- a/case_utils/ontology/case-1.2.0-subclasses.ttl +++ b/case_utils/ontology/case-1.2.0-subclasses.ttl @@ -3,10 +3,26 @@ @prefix rdfs: . @prefix xs: . + + rdfs:subClassOf ; + . + + + rdfs:subClassOf owl:Thing ; + . + + + rdfs:subClassOf owl:Thing ; + . + rdfs:subClassOf ; . + + rdfs:subClassOf ; + . + rdfs:subClassOf ; . diff --git a/case_utils/ontology/case-1.2.0.ttl b/case_utils/ontology/case-1.2.0.ttl index e2798f9..4944786 100644 --- a/case_utils/ontology/case-1.2.0.ttl +++ b/case_utils/ontology/case-1.2.0.ttl @@ -1,4 +1,5 @@ # imports: http://purl.org/co +# imports: http://purl.org/spar/error # imports: https://ontology.caseontology.org/case/investigation/1.2.0 # imports: https://ontology.caseontology.org/case/vocabulary/1.2.0 # imports: https://ontology.unifiedcyberontology.org/co/1.2.0 @@ -25,7 +26,9 @@ @prefix co: . @prefix configuration: . @prefix core: . +@prefix dc: . @prefix dcterms: . +@prefix error: . @prefix identity: . @prefix investigation: . @prefix location: . @@ -37,6 +40,8 @@ @prefix rdfs: . @prefix role: . @prefix sh: . +@prefix swrl: . +@prefix swrlb: . @prefix time1: . @prefix tool: . @prefix types: . @@ -47,6 +52,37 @@ @prefix vocabulary: . @prefix xsd: . + + a owl:Ontology ; + dc:contributor + "Marco Ocana" , + "Paolo Ciccarese" , + "Silvio Peroni" + ; + dc:creator ; + dc:date "March 19, 2012" ; + dc:format "application/rdf+xml" ; + dc:language "en" ; + dc:title """The Collections Ontology +(CO)"""@en ; + owl:imports ; + owl:versionInfo "2.0" ; + . + + + a owl:Ontology ; + rdfs:label "Error Ontology"@en ; + dc:creator "Silvio Peroni" ; + dc:date "2010-11-29"^^xsd:date ; + dc:description """The Error Ontology is an unit test that allow to produce an inconsistent model if a particular (and incorrect) situation happens. + +It works by means of a data property, \"hasError\" that denies its usage for ant resource. In fact, by defining its domain as \"all those resource that don't have any hasErrorDescription assertion\", a resource that asserts having an error makes the ontology inconsistent."""@en ; + dc:rights "This work is distributed under a Creative Commons Attribution Licence (http://creativecommons.org/licenses/by/3.0/)."@en ; + dc:title """The Error Ontology +Making contraints on ontology resources"""@en ; + owl:versionInfo "1.0" ; + . + a owl:Ontology ; rdfs:label "case-master"@en ; @@ -297,8 +333,352 @@ owl:versionIRI vocabulary:1.2.0 ; . +co:Bag + a owl:Class ; + rdfs:subClassOf co:Collection ; + rdfs:label "bag"@en ; + rdfs:comment "Collection that can have a number of copies of each object"@en ; + owl:disjointWith co:Set ; + . + +co:Collection + a owl:Class ; + rdfs:subClassOf + owl:Thing , + [ + a owl:Restriction ; + owl:onProperty co:element ; + owl:allValuesFrom owl:Thing ; + ] , + [ + a owl:Restriction ; + owl:onProperty co:size ; + owl:cardinality "1"^^xsd:nonNegativeInteger ; + ] + ; + rdfs:label "collection"@en ; + rdfs:comment "A group of objects that can be considered as a whole."@en ; + owl:disjointWith co:Item ; + . + +co:Item + a owl:Class ; + rdfs:subClassOf + owl:Thing , + [ + a owl:Restriction ; + owl:onProperty [ + owl:inverseOf co:item ; + ] ; + owl:someValuesFrom co:Bag ; + ] + ; + rdfs:label "item"@en ; + rdfs:comment "Element belonging to a bag"@en ; + . + +co:List + a owl:Class ; + rdfs:subClassOf + [ + a owl:Class ; + owl:intersectionOf ( + co:Bag + [ + a owl:Restriction ; + owl:onProperty co:item ; + owl:allValuesFrom co:ListItem ; + ] + ) ; + ] , + [ + a owl:Restriction ; + owl:onProperty co:firstItem ; + owl:maxCardinality "1"^^xsd:nonNegativeInteger ; + ] , + [ + a owl:Restriction ; + owl:onProperty co:lastItem ; + owl:maxCardinality "1"^^xsd:nonNegativeInteger ; + ] + ; + rdfs:label "list"@en ; + rdfs:comment "An ordered array of items, that can be present in multiple copies"@en ; + . + co:ListItem - rdfs:subClassOf co:Item ; + a owl:Class ; + rdfs:subClassOf + co:Item , + [ + a owl:Restriction ; + owl:onProperty co:index ; + owl:cardinality "1"^^xsd:nonNegativeInteger ; + ] + ; + rdfs:label "list item"@en ; + rdfs:comment "element belonging to a list"@en ; + . + +co:Set + a owl:Class ; + rdfs:subClassOf co:Collection ; + rdfs:label "set"@en ; + rdfs:comment "A collection that cannot contain duplicate elements."@en ; + . + +co:element + a owl:ObjectProperty ; + rdfs:label "has element"@en ; + rdfs:comment "The link to the members of a collection"@en ; + rdfs:domain co:Collection ; + owl:propertyChainAxiom ( + co:item + co:itemContent + ) ; + . + +co:elementOf + a owl:ObjectProperty ; + rdfs:label "is element of"@en ; + rdfs:comment "The link to a collection in which the object is member."@en ; + owl:inverseOf co:element ; + . + +co:firstItem + a + owl:ObjectProperty , + owl:FunctionalProperty + ; + rdfs:subPropertyOf co:item ; + rdfs:label "has first item"@en ; + rdfs:comment "The link to the first item of the list."@en ; + rdfs:domain co:List ; + rdfs:range [ + a owl:Class ; + owl:intersectionOf ( + co:ListItem + [ + a owl:Restriction ; + owl:onProperty co:previousItem ; + owl:cardinality "0"^^xsd:nonNegativeInteger ; + ] + [ + a owl:Restriction ; + owl:onProperty co:index ; + owl:hasValue "1"^^xsd:positiveInteger ; + ] + ) ; + ] ; + . + +co:firstItemOf + a owl:ObjectProperty ; + rdfs:subPropertyOf co:itemOf ; + rdfs:label "is first item of"@en ; + rdfs:comment "The link to a list in which the item is first item."@en ; + owl:inverseOf co:firstItem ; + . + +co:followedBy + a + owl:ObjectProperty , + owl:TransitiveProperty + ; + rdfs:label "is followed by"@en ; + rdfs:comment "The link to the following item in a list."@en ; + dc:description "Given the list (I[1], I[2], ... , I[i-1], I[i], I[i+1], ... , I[n-1], I[n]), the item I[i] is followed by I[i+1], ... , I[n-1] and I[n]."@en ; + rdfs:domain co:ListItem ; + rdfs:range co:ListItem ; + . + +co:index + a owl:DatatypeProperty ; + rdfs:label "has index"@en ; + rdfs:comment "A number identifying the position, starting from 1, of a particular list item within a list."@en ; + rdfs:domain co:ListItem ; + rdfs:range xsd:positiveInteger ; + . + +co:item + a owl:ObjectProperty ; + rdfs:label "has item"@en ; + rdfs:comment "The link to every item of the bag"@en ; + rdfs:domain co:Bag ; + rdfs:range co:Item ; + owl:propertyChainAxiom ( + co:item + co:nextItem + ) ; + . + +co:itemContent + a + owl:ObjectProperty , + owl:FunctionalProperty + ; + rdfs:label "has item content"@en ; + rdfs:comment "The link to the actual resource to which the item refers."@en ; + rdfs:domain co:Item ; + rdfs:range [ + a owl:Class ; + owl:complementOf co:Item ; + ] ; + . + +co:itemContentOf + a owl:ObjectProperty ; + rdfs:label "is item content of"@en ; + rdfs:comment "The link to the item that refers to the resource."@en ; + owl:inverseOf co:itemContent ; + . + +co:itemOf + a owl:ObjectProperty ; + rdfs:label "is item of"@en ; + rdfs:comment "The link to a bag in which the item is member."@en ; + owl:inverseOf co:item ; + . + +co:lastItem + a + owl:ObjectProperty , + owl:FunctionalProperty + ; + rdfs:subPropertyOf co:item ; + rdfs:label "has last item"@en ; + rdfs:comment "The link to the last item of the list."@en ; + rdfs:domain co:List ; + rdfs:range [ + a owl:Class ; + owl:intersectionOf ( + co:ListItem + [ + a owl:Restriction ; + owl:onProperty co:nextItem ; + owl:cardinality "0"^^xsd:nonNegativeInteger ; + ] + ) ; + ] ; + . + +co:lastItemOf + a owl:ObjectProperty ; + rdfs:subPropertyOf co:itemOf ; + rdfs:label "is last item of"@en ; + rdfs:comment "The link to a list in which the item is last item."@en ; + owl:inverseOf co:lastItem ; + . + +co:nextItem + a + owl:ObjectProperty , + owl:FunctionalProperty + ; + rdfs:subPropertyOf co:followedBy ; + rdfs:label "has next item"@en ; + rdfs:comment "The link to the next item in a list."@en ; + dc:description "Given the list (I[1], I[2], ... , I[i-1], I[i], I[i+1], ... , I[n-1], I[n]), the next item of I[i] is I[i+1]."@en ; + . + +co:precededBy + a + owl:ObjectProperty , + owl:TransitiveProperty + ; + rdfs:label "is preceded by"@en ; + rdfs:comment "The link to the preceding item in a list."@en ; + dc:description "Given the list (I[1], I[2], ... , I[i-1], I[i], I[i+1], ... , I[n-1], I[n]), the item I[i] is preceded by I[i-1], ... , I[2] and I[1]."@en ; + owl:inverseOf co:followedBy ; + . + +co:previousItem + a + owl:ObjectProperty , + owl:FunctionalProperty + ; + rdfs:subPropertyOf co:precededBy ; + rdfs:label "has previous item"@en ; + rdfs:comment "The link to the previous item in a list."@en ; + dc:description "Given the list (I[1], I[2], ... , I[i-1], I[i], I[i+1], ... , I[n-1], I[n]), the previous item of I[i] is I[i-1]."@en ; + owl:inverseOf co:nextItem ; + . + +co:size + a owl:DatatypeProperty ; + rdfs:label "has size"@en ; + rdfs:comment "The number of item belonging to a collection."@en ; + dc:description """CO defines the size of a collection as the sum of the number of times entities that are part of the collection appear in it. This means that co:size considers how much each entity is involved by a particular collection, i.e.: +- the size of the set {a, b, c} is three +- the size of the bag [a, a, b, b, b, c] is five +- the size of the list (a, b, c, b, a, b, c, c) is seven"""@en ; + rdfs:domain co:Collection ; + rdfs:range xsd:nonNegativeInteger ; + . + +dc:contributor + a owl:AnnotationProperty ; + . + +dc:creator + a owl:AnnotationProperty ; + . + +dc:date + a owl:AnnotationProperty ; + . + +dc:description + a owl:AnnotationProperty ; + . + +dc:format + a owl:AnnotationProperty ; + . + +dc:language + a owl:AnnotationProperty ; + . + +dc:publisher + a owl:AnnotationProperty ; + . + +dc:rights + a owl:AnnotationProperty ; + . + +dc:title + a owl:AnnotationProperty ; + . + +error:hasError + a owl:DatatypeProperty ; + rdfs:label "has error"@en ; + rdfs:comment "It describes in some way, usually in natural language, which kind of error results from this resource."@en ; + dc:description "A data property linking a resource that contains a logical error (which results in it belonging to the class owl:Nothing, therefore making the model inconsistent) to a textual description of that error."@en ; + rdfs:domain [ + a owl:Restriction ; + owl:onProperty error:hasError ; + owl:cardinality "0"^^xsd:nonNegativeInteger ; + ] ; + rdfs:range xsd:string ; + . + +rdfs:comment + a owl:AnnotationProperty ; + . + +rdfs:label + a owl:AnnotationProperty ; + . + +owl:Thing + a owl:Class ; + . + +owl:versionInfo + a owl:AnnotationProperty ; . investigation:Attorney @@ -19196,6 +19576,66 @@ vocabulary:WirelessNetworkSecurityModeVocab ] ; . + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + + + a swrl:Variable ; + . + [] a owl:AllDisjointClasses ; owl:members ( @@ -19212,3 +19652,263 @@ vocabulary:WirelessNetworkSecurityModeVocab owl:annotatedTarget co:Item ; . +[] + a owl:Class ; + rdfs:subClassOf [ + a owl:Class ; + owl:intersectionOf ( + co:List + [ + a owl:Restriction ; + owl:onProperty co:firstItem ; + owl:someValuesFrom co:Item ; + ] + [ + a owl:Restriction ; + owl:onProperty co:lastItem ; + owl:someValuesFrom co:Item ; + ] + ) ; + ] ; + owl:intersectionOf ( + co:List + [ + a owl:Restriction ; + owl:onProperty co:item ; + owl:someValuesFrom co:ListItem ; + ] + ) ; + . + +[] + a swrl:Imp ; + swrl:body ( + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:nextItem ; + ] + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:index ; + ] + [ + a swrl:BuiltinAtom ; + swrl:arguments ( + + + "1"^^xsd:integer + ) ; + swrl:builtin swrlb:add ; + ] + ) ; + swrl:head ( + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:index ; + ] + ) ; + . + +[] + a swrl:Imp ; + swrl:body ( + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:itemOf ; + ] + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:index ; + ] + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:size ; + ] + ) ; + swrl:head ( + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:lastItem ; + ] + ) ; + . + +[] + a swrl:Imp ; + swrl:body ( + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:lastItem ; + ] + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:size ; + ] + ) ; + swrl:head ( + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:index ; + ] + ) ; + . + +[] + a swrl:Imp ; + swrl:body ( + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:itemOf ; + ] + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 "1" ; + swrl:propertyPredicate co:index ; + ] + ) ; + swrl:head ( + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:firstItem ; + ] + ) ; + . + +[] + a swrl:Imp ; + swrl:body ( + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:itemOf ; + ] + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:itemOf ; + ] + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:index ; + ] + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:index ; + ] + [ + a swrl:BuiltinAtom ; + swrl:arguments ( + + + "1"^^xsd:integer + ) ; + swrl:builtin swrlb:add ; + ] + ) ; + swrl:head ( + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:nextItem ; + ] + ) ; + . + +[] + a swrl:Imp ; + swrl:body ( + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:lastItem ; + ] + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:index ; + ] + ) ; + swrl:head ( + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:size ; + ] + ) ; + . + +[] + a swrl:Imp ; + swrl:body ( + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:followedBy ; + ] + ) ; + swrl:head ( + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 "A list item cannot be followed by itself" ; + swrl:propertyPredicate error:hasError ; + ] + ) ; + . + +[] + a swrl:Imp ; + swrl:body ( + [ + a swrl:IndividualPropertyAtom ; + swrl:argument1 ; + swrl:argument2 ; + swrl:propertyPredicate co:precededBy ; + ] + ) ; + swrl:head ( + [ + a swrl:DatavaluedPropertyAtom ; + swrl:argument1 ; + swrl:argument2 "A list item cannot be preceded by itself" ; + swrl:propertyPredicate error:hasError ; + ] + ) ; + . + diff --git a/case_utils/ontology/src/subclasses_ttl.py b/case_utils/ontology/src/subclasses_ttl.py index 1bc03ca..1448fcb 100644 --- a/case_utils/ontology/src/subclasses_ttl.py +++ b/case_utils/ontology/src/subclasses_ttl.py @@ -18,7 +18,7 @@ This script creates an excerpt of an ontology graph that consists solely of all rdfs:subClassOf statements. """ -__version__ = "0.1.1" +__version__ = "0.2.0" import argparse @@ -39,6 +39,10 @@ def main() -> None: in_graph.parse(in_ttl) for triple in in_graph.triples((None, rdflib.RDFS.subClassOf, None)): + # Avoid owl:Restrictions and set-complements, which would get + # emitted as empty blank nodes. + if isinstance(triple[2], rdflib.BNode): + continue out_graph.add(triple) out_graph.serialize(args.out_ttl)