Skip to content

Commit

Permalink
48 situation module (#57)
Browse files Browse the repository at this point in the history
* Add situation module

* Add situation module

* change prefix

* Fix namespaces

* add gfo-core module

* add gfo-situation-simple pattern

* update gfo-situation-simple pattern

* update update gfo-situation-simple pattern

* add gfo-situation-object pattern

* add gfo-situation-object-extended pattern

* Update gfo-core module

* update gfo-core module

* add gfo-presentic module

* add gfo-presentic module

* update gfo-core module

* add gfo-timeExtended module

* add gfo-connector-presentic-timeExtended module

* delete gfo-base

* Add situation patterns+examples from JAO paper

* Corrections

* Add new files to CI workflow

* Fix import resolution

* Remove CI test step for deleted ontology

* Specify profile for reasoning tests

* Update documentation

* Replace robot `reason` calls with `report`

* Disable report for gfo-light.owl again

This file will be replaced in another pull request

* Add some labels

* Update import statement of gfo.owl

* Add gfo.owl to tested files

* Remove unnecessary prefixes

* Merge imports of some modules before reporting

* Add labels to examples

* Add rdfs:labels to individuals

* Correct auto generated labels that start with a number

* Remove module files from PR

* Remove module tests from PR

* Temporarily reinstitute gfo-base.owl

* Fix import

* replace gfo-core by gfo-base

* replace risk_sit_1_timespan by 10_months_timespan

---------

Co-authored-by: auciteli <[email protected]>
Co-authored-by: AlexU75 <[email protected]>
Co-authored-by: Christoph Beger <[email protected]>
  • Loading branch information
4 people authored Jan 23, 2025
1 parent 4b85f3b commit 1b1c0ce
Show file tree
Hide file tree
Showing 22 changed files with 3,836 additions and 8 deletions.
50 changes: 45 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,51 @@ jobs:
steps:
- uses: actions/checkout@v4

- run: check-rdfxml gfo.owl
- run: check-rdfxml gfo-light.owl
- run: check-rdfxml modules/gfo-base.owl
# - run: check-rdfxml modules/gfo-core.ttl
# - run: check-rdfxml modules/gfo-presentic.ttl
# - run: check-rdfxml modules/gfo-timeExtended.ttl
# - run: check-rdfxml modules/gfo-connector-presentic-timeExtended.ttl
- run: check-rdfxml modules/situation/gfo-situation.ttl
- run: check-rdfxml modules/situation/gfo-situation-object-extended.ttl
- run: check-rdfxml modules/situation/gfo-situation-object.ttl
- run: check-rdfxml modules/situation/gfo-situation-presentic-object-reified-presentic-attributives.ttl
- run: check-rdfxml modules/situation/gfo-situation-presentic-object-reified-presentic-objects.ttl
- run: check-rdfxml modules/situation/gfo-situation-presentic-object.ttl
- run: check-rdfxml modules/situation/gfo-situation-presentic-simple.ttl
- run: check-rdfxml modules/situation/gfo-situation-simple.ttl
- run: check-rdfxml modules/situation/gfo-situation-time-extended.ttl
- run: check-rdfxml modules/situation/examples/gfo-situation-object-example.ttl
- run: check-rdfxml modules/situation/examples/gfo-situation-object-extended-example.ttl
- run: check-rdfxml modules/situation/examples/gfo-situation-presentic-object-example.ttl
- run: check-rdfxml modules/situation/examples/gfo-situation-presentic-object-reified-presentic-attributives-example.ttl
- run: check-rdfxml modules/situation/examples/gfo-situation-presentic-object-reified-presentic-objects-example.ttl
- run: check-rdfxml modules/situation/examples/gfo-situation-presentic-simple-example.ttl
- run: check-rdfxml modules/situation/examples/gfo-situation-simple-example.ttl
- run: check-rdfxml modules/situation/examples/gfo-situation-time-extended-example.ttl

- run: robot reason --input gfo-light.owl
- run: robot reason --input modules/gfo-base.owl
- run: robot report --profile qc_report/profile.txt -i gfo.owl
# - run: robot report --profile qc_report/profile.txt -i gfo-light.owl
# - run: robot report --profile qc_report/profile.txt -i modules/gfo-core.ttl
# - run: robot report --profile qc_report/profile.txt -i modules/gfo-presentic.ttl
# - run: robot report --profile qc_report/profile.txt -i modules/gfo-timeExtended.ttl
- run: robot report --profile qc_report/profile.txt -i modules/situation/gfo-situation.ttl
- run: robot report --profile qc_report/profile.txt -i modules/situation/gfo-situation-object-extended.ttl
- run: robot report --profile qc_report/profile.txt -i modules/situation/gfo-situation-object.ttl
- run: robot report --profile qc_report/profile.txt -i modules/situation/gfo-situation-presentic-object-reified-presentic-attributives.ttl
- run: robot report --profile qc_report/profile.txt -i modules/situation/gfo-situation-presentic-object-reified-presentic-objects.ttl
- run: robot report --profile qc_report/profile.txt -i modules/situation/gfo-situation-presentic-object.ttl
- run: robot report --profile qc_report/profile.txt -i modules/situation/gfo-situation-presentic-simple.ttl
- run: robot report --profile qc_report/profile.txt -i modules/situation/gfo-situation-simple.ttl
- run: robot report --profile qc_report/profile.txt -i modules/situation/gfo-situation-time-extended.ttl

# - run: robot report --input gfo-light.owl --profile qc_report/profile.txt
- run: robot report --input modules/gfo-base.owl --profile qc_report/profile.txt
# - run: robot merge --collapse-import-closure true -i modules/gfo-connector-presentic-timeExtended.ttl report --profile qc_report/profile.txt
- run: robot merge --collapse-import-closure true -i modules/situation/examples/gfo-situation-object-example.ttl report --profile qc_report/profile.txt
- run: robot merge --collapse-import-closure true -i modules/situation/examples/gfo-situation-object-extended-example.ttl report --profile qc_report/profile.txt
- run: robot merge --collapse-import-closure true -i modules/situation/examples/gfo-situation-presentic-object-example.ttl report --profile qc_report/profile.txt
- run: robot merge --collapse-import-closure true -i modules/situation/examples/gfo-situation-presentic-object-reified-presentic-attributives-example.ttl report --profile qc_report/profile.txt
- run: robot merge --collapse-import-closure true -i modules/situation/examples/gfo-situation-presentic-object-reified-presentic-objects-example.ttl report --profile qc_report/profile.txt
- run: robot merge --collapse-import-closure true -i modules/situation/examples/gfo-situation-presentic-simple-example.ttl report --profile qc_report/profile.txt
- run: robot merge --collapse-import-closure true -i modules/situation/examples/gfo-situation-simple-example.ttl report --profile qc_report/profile.txt
- run: robot merge --collapse-import-closure true -i modules/situation/examples/gfo-situation-time-extended-example.ttl report --profile qc_report/profile.txt
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ If you want to contribute changes, please do so by:
Edit the ontology files using a suitable ontology editor or text editor.
Adhere to the GFO's existing coding style and conventions.
Ensure your changes are well-documented and understandable.
You can run the following command with docker to check your changes locally (in this case `modules/gfo-base.owl` is checked):
You can run the following command with docker to check your changes locally (in this case `modules/gfo-core.owl` is checked):

docker run -it -v .:/gfo -w /gfo obolibrary/odklite robot report --input modules/gfo-base.owl --profile qc_report/profile.txt
docker run -it -v .:/gfo -w /gfo obolibrary/odklite robot report --input modules/gfo-core.owl --profile qc_report/profile.txt

4. Commit and push all changes.
5. Create a [pull request](https://github.com/Onto-Med/GFO/pulls).
Expand Down
4 changes: 4 additions & 0 deletions catalog-v001.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog prefer="public" xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<uri id="gfo-core" name="https://w3id.org/gfo/core/" uri="modules/gfo-core.ttl"/>
</catalog>
2 changes: 1 addition & 1 deletion gfo.owl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<owl:versionInfo rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2024-11-18</owl:versionInfo>
<owl:versionIRI rdf:resource="https://w3id.org/gfo/release/2024-11-18" />
<owl:priorVersion rdf:resource="https://w3id.org/gfo/release/2024-07-05" />
<owl:imports rdf:resource="https://w3id.org/gfo/base/" />
<owl:imports rdf:resource="https://w3id.org/gfo/base" />
<dc:title xml:lang="en">General Formal Ontology (GFO)</dc:title>
<rdfs:label xml:lang="en">General Formal Ontology (GFO)</rdfs:label>
<dc:description xml:lang="en">The General Formal Ontology is a top-level ontology for conceptual
Expand Down
20 changes: 20 additions & 0 deletions modules/situation/examples/catalog-v001.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog prefer="public" xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<uri id="Imports Wizard Entry" name="https://w3id.org/gfo/pattern/situation/simple" uri="../gfo-situation-simple.ttl"/>
<uri id="Imports Wizard Entry" name="https://w3id.org/gfo/pattern/situation/time-extended" uri="../gfo-situation-time-extended.ttl"/>
<uri id="Imports Wizard Entry" name="https://w3id.org/gfo/pattern/situation/object" uri="../gfo-situation-object.ttl"/>
<uri id="Imports Wizard Entry" name="https://w3id.org/gfo/pattern/situation/object-extended" uri="../gfo-situation-object-extended.ttl"/>
<uri id="Imports Wizard Entry" name="https://w3id.org/gfo/pattern/situation/presentic-simple" uri="../gfo-situation-presentic-simple.ttl"/>
<uri id="Imports Wizard Entry" name="https://w3id.org/gfo/pattern/situation/presentic-object" uri="../gfo-situation-presentic-object.ttl"/>
<uri id="Imports Wizard Entry" name="https://w3id.org/gfo/pattern/situation/presentic-object-reified-presentic-attributives" uri="../gfo-situation-presentic-object-reified-presentic-attributives.ttl"/>
<uri id="Imports Wizard Entry" name="https://w3id.org/gfo/pattern/situation/presentic-object-reified-presentic-objects" uri="../gfo-situation-presentic-object-reified-presentic-objects.ttl"/>
<uri id="Imports Wizard Entry" name="https://w3id.org/gfo/pattern/situation/simple-example" uri="gfo-situation-simple-example.ttl"/>
<uri id="Imports Wizard Entry" name="https://w3id.org/gfo/pattern/situation/time-extended-example" uri="gfo-situation-time-extended-example.ttl"/>
<uri id="Imports Wizard Entry" name="https://w3id.org/gfo/pattern/situation/object-example" uri="gfo-situation-object-example.ttl"/>
<uri id="Imports Wizard Entry" name="https://w3id.org/gfo/pattern/situation/object-extended-example" uri="gfo-situation-object-extended-example.ttl"/>
<uri id="Imports Wizard Entry" name="https://w3id.org/gfo/pattern/situation/presentic-simple-example" uri="gfo-situation-presentic-simple-example.ttl"/>
<uri id="Imports Wizard Entry" name="https://w3id.org/gfo/pattern/situation/presentic-object-example" uri="gfo-situation-presentic-object-example.ttl"/>
<uri id="Imports Wizard Entry" name="https://w3id.org/gfo/pattern/situation/presentic-object-reified-presentic-attributives-example" uri="gfo-situation-presentic-object-reified-presentic-attributives-example.ttl"/>
<uri id="Imports Wizard Entry" name="https://w3id.org/gfo/pattern/situation/presentic-object-reified-presentic-objects-example" uri="gfo-situation-presentic-object-reified-presentic-objects-example.ttl"/>
<group id="Folder Repository, directory=, recursive=true, Auto-Update=true, version=2" prefer="public" xml:base=""/>
</catalog>
183 changes: 183 additions & 0 deletions modules/situation/examples/gfo-situation-object-example.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
@prefix : <https://w3id.org/gfo/situation/> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rio: <https://w3id.org/rio/> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix bibo: <http://purl.org/ontology/bibo/> .
@prefix doap: <http://usefulinc.com/ns/doap#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix vann: <http://purl.org/vocab/vann/> .
@prefix terms: <http://purl.org/dc/terms/> .
@prefix rio-ex: <https://w3id.org/rio/example/> .
@prefix gfo-core: <https://w3id.org/gfo/core/> .
@base <https://w3id.org/gfo/situation/> .

<https://w3id.org/gfo/pattern/situation/object-example> rdf:type owl:Ontology ;
owl:versionIRI <https://w3id.org/gfo/pattern/situation/object-example/release/2024-12-19> ;
owl:imports <https://w3id.org/gfo/pattern/situation/object> ;
dc:created "2024-12-11" ;
dc:creator "Alexandr Uciteli" ,
"Christoph Beger" ,
"Frank Löbe" ,
"Franz Matthies" ,
"Heinrich Herre" ,
"Konrad Höffner" ,
"Patryk Burek" ,
"Ralph Schäfermeier" ;
dc:description "GFO-object-situation-example is an example for the object design pattern for modeling object situations."@en ;
dc:modified "2024-12-11" ;
dc:title "General Formal Ontology (object situation pattern example)"@en ;
terms:license <http://creativecommons.org/licenses/by/4.0/> ;
bibo:doi <https://zenodo.org/doi/10.5281/zenodo.5205419> ;
vann:preferredNamespacePrefix "gfo-object-situation-example" ;
vann:preferredNamespaceURI "https://w3id.org/gfo/pattern/situation/object-example" ;
doap:repository <https://github.com/Onto-Med/GFO> ;
rdfs:label "GFO object situation pattern example"@en ;
owl:versionInfo "2024-12-11" ;
foaf:homepage "https://github.com/Onto-Med/GFO" .

#################################################################
# Annotation properties
#################################################################

### http://purl.org/dc/elements/1.1/created
dc:created rdf:type owl:AnnotationProperty .


### http://purl.org/dc/elements/1.1/creator
dc:creator rdf:type owl:AnnotationProperty .


### http://purl.org/dc/elements/1.1/description
dc:description rdf:type owl:AnnotationProperty .


### http://purl.org/dc/elements/1.1/modified
dc:modified rdf:type owl:AnnotationProperty .


### http://purl.org/dc/elements/1.1/title
dc:title rdf:type owl:AnnotationProperty .


### http://purl.org/dc/terms/license
terms:license rdf:type owl:AnnotationProperty .


### http://purl.org/ontology/bibo/doi
bibo:doi rdf:type owl:AnnotationProperty .


### http://purl.org/vocab/vann/preferredNamespacePrefix
vann:preferredNamespacePrefix rdf:type owl:AnnotationProperty .


### http://purl.org/vocab/vann/preferredNamespaceURI
vann:preferredNamespaceURI rdf:type owl:AnnotationProperty .


### http://usefulinc.com/ns/doap#repository
doap:repository rdf:type owl:AnnotationProperty .


### http://www.w3.org/2000/01/rdf-schema#comment
rdfs:comment rdf:type owl:AnnotationProperty .


### http://www.w3.org/2002/07/owl#versionInfo
owl:versionInfo rdf:type owl:AnnotationProperty .


### http://www.w3.org/2004/02/skos/core#altLabel
skos:altLabel rdf:type owl:AnnotationProperty .


### http://www.w3.org/2004/02/skos/core#definition
skos:definition rdf:type owl:AnnotationProperty .


### http://www.w3.org/2004/02/skos/core#example
skos:example rdf:type owl:AnnotationProperty .


### http://xmlns.com/foaf/0.1/homepage
foaf:homepage rdf:type owl:AnnotationProperty .


#################################################################
# Classes
#################################################################

### https://w3id.org/rio/Patient
rio:Patient rdf:type owl:Class ;
rdfs:subClassOf gfo-core:Object ,
[ rdf:type owl:Restriction ;
owl:onProperty gfo-core:hasQuality ;
owl:someValuesFrom rio:PatientAge
] ,
[ rdf:type owl:Restriction ;
owl:onProperty gfo-core:participatesIn ;
owl:someValuesFrom rio:RiskSituation
] ;
rdfs:label "Patient"@en .


### https://w3id.org/rio/PatientAge
rio:PatientAge rdf:type owl:Class ;
rdfs:subClassOf gfo-core:Quality ;
rdfs:label "Patient age"@en .


### https://w3id.org/rio/RiskSeverity
rio:RiskSeverity rdf:type owl:Class ;
rdfs:subClassOf gfo-core:Quality ;
rdfs:label "Risk severity"@en .


### https://w3id.org/rio/RiskSituation
rio:RiskSituation rdf:type owl:Class ;
rdfs:subClassOf :Situation ,
[ rdf:type owl:Restriction ;
owl:onProperty gfo-core:hasParticipantQuality ;
owl:someValuesFrom rio:PatientAge
] ;
rdfs:label "Risk situation"@en .


#################################################################
# Individuals
#################################################################

### https://w3id.org/rio/example/highly_severe
rio-ex:highly_severe rdf:type owl:NamedIndividual ,
rio:RiskSeverity ;
rdfs:label "highly_severe"@en .


### https://w3id.org/rio/example/patient_1
rio-ex:patient_1 rdf:type owl:NamedIndividual ,
rio:Patient ;
gfo-core:hasQuality <https://w3id.org/rio/example/10_months> ;
gfo-core:participatesIn rio-ex:risk_sit1 ;
rdfs:label "patient_1"@en .


### https://w3id.org/rio/example/risk_sit1
rio-ex:risk_sit1 rdf:type owl:NamedIndividual ,
rio:RiskSituation ;
gfo-core:hasParticipantQuality <https://w3id.org/rio/example/10_months> ;
gfo-core:hasQuality rio-ex:highly_severe ;
rdfs:label "risk_sit1"@en .


### https://w3id.org/rio/example/10_months
<https://w3id.org/rio/example/10_months> rdf:type owl:NamedIndividual ,
rio:PatientAge ;
rdfs:label "10_months"@en .


### Generated by the OWL API (version 4.5.29.2024-05-13T12:11:03Z) https://github.com/owlcs/owlapi
Loading

0 comments on commit 1b1c0ce

Please sign in to comment.