From 22c29003e0ed0c32e3001c13713d3d54a1480da7 Mon Sep 17 00:00:00 2001 From: Arndt Date: Thu, 8 Aug 2024 15:20:05 +0200 Subject: [PATCH 1/3] #10 prepare switch to w3id --- README.md | 3 +-- dfgfo.ttl | 18 +++++++++++------- metadata.ttl | 8 +++++--- scripts/create_ontology.py | 2 +- w3id/.htaccess | 37 +++++++++++++++++++++++++++++++++++++ w3id/README.md | 32 ++++++++++++++++++++++++++++++++ 6 files changed, 87 insertions(+), 13 deletions(-) create mode 100644 w3id/.htaccess create mode 100644 w3id/README.md diff --git a/README.md b/README.md index 83282e0..85aca2f 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,7 @@ We decided to build upon this work and build and RDF based ontology, for the *DF ## Ontology * **Ontology TTL**: [dfgfo.ttl](./dfgfo.ttl) -* **Ontology IRI**: -* **Ontology PURL**: +* **Ontology PURL**: * **ontology prefix/id**: `dfgfo` ![screen capture of classes hierarchy in protege](./docs/dfgfo-hierarchies.png) diff --git a/dfgfo.ttl b/dfgfo.ttl index 32312d6..b36320e 100644 --- a/dfgfo.ttl +++ b/dfgfo.ttl @@ -1,9 +1,10 @@ @prefix dc: . -@prefix dfgfo: . +@prefix dcterms: . +@prefix dfgfo: . @prefix owl: . @prefix rdfs: . @prefix skos: . -@prefix terms: . +@prefix xsd: . dc:creator a owl:AnnotationProperty . @@ -11,20 +12,22 @@ dc:description a owl:AnnotationProperty . dc:title a owl:AnnotationProperty . -terms:license a owl:AnnotationProperty . +dcterms:license a owl:AnnotationProperty . skos:altLabel a owl:AnnotationProperty . - a owl:Ontology ; + a owl:Ontology ; dc:creator "André Castro", "Deutsche Forschungsgemeinschaft (DFG)", "Susanne Arndt" ; dc:description "DFG Fachsystematik Ontology / DFG Classification of Subject Areas Ontology (DFGFO) encodes the DFG Classification of Subject Areas into an ontology, where each subject number are is enconded into a Class with subclass statements following the DFG Classification of Subject Areas hierarchy. Labels are provide German and English." ; dc:title "DFG Fachsystematik - Ontologie - 2024-2028"@de, "DFG Classification of Subject Areas Ontology - 2024-2028"@en ; - terms:license ; + dcterms:license ; rdfs:comment "DFG Classification of Subject Areas Ontology is being created as part of the TIB Terminology Service"@de, - "DFG Fachsystematik - Ontology wurde zur Integration in den TIB Terminology Service erstellt"@de . + "DFG Fachsystematik - Ontology wurde zur Integration in den TIB Terminology Service erstellt"@de ; + owl:versionIRI dfgfo:2024 ; + owl:versionInfo "2024-2028"^^xsd:string . dfgfo:1.11-01 a owl:Class ; rdfs:label "Prehistory and World Archaeology"@en ; @@ -1429,4 +1432,5 @@ dfgfo:2.23 a owl:Class ; dfgfo:2.22 a owl:Class ; rdfs:label "Medicine"@en ; rdfs:subClassOf dfgfo:22 ; - skos:altLabel "Medizin"@de . \ No newline at end of file + skos:altLabel "Medizin"@de . + diff --git a/metadata.ttl b/metadata.ttl index 30eee4e..259e32c 100644 --- a/metadata.ttl +++ b/metadata.ttl @@ -5,6 +5,7 @@ @prefix rdfs: . @prefix obo: . @prefix skos: . +@prefix xsd: . dc:creator rdf:type owl:AnnotationProperty . @@ -17,7 +18,7 @@ terms:license rdf:type owl:AnnotationProperty . skos:altLabel rdf:type owl:AnnotationProperty . - rdf:type owl:Ontology ; + rdf:type owl:Ontology ; dc:creator "Deutsche Forschungsgemeinschaft (DFG)", "André Castro", "Susanne Arndt"; @@ -26,5 +27,6 @@ skos:altLabel rdf:type owl:AnnotationProperty . dc:title "DFG Fachsystematik - Ontologie - 2024-2028"@de ; rdfs:comment "DFG Classification of Subject Areas Ontology is being created as part of the TIB Terminology Service"@de ; rdfs:comment "DFG Fachsystematik - Ontology wurde zur Integration in den TIB Terminology Service erstellt"@de ; - terms:license . -# TODO: provide appropriate license - same license should go to github repo \ No newline at end of file + terms:license ; + owl:versionInfo "2024-2028"^^xsd:string ; + owl:versionIRI . \ No newline at end of file diff --git a/scripts/create_ontology.py b/scripts/create_ontology.py index f17ef91..d7d9a17 100644 --- a/scripts/create_ontology.py +++ b/scripts/create_ontology.py @@ -23,7 +23,7 @@ g_metadata.parse(str(dfg_onto_metadata_fn.absolute())) g_classes = Graph() -ns_str = 'https://github.com/tibonto/dfgfo/' +ns_str = 'https://w3id.org/dfgfo/2024/' namespace = Namespace(ns_str) g_classes.namespace_manager.bind('owl', 'http://www.w3.org/2002/07/owl#', override=False) diff --git a/w3id/.htaccess b/w3id/.htaccess new file mode 100644 index 0000000..d3eb55e --- /dev/null +++ b/w3id/.htaccess @@ -0,0 +1,37 @@ +Header set Access-Control-Allow-Origin * +Options +FollowSymLinks +RewriteEngine on + +# Specific content-type -> Access respective ontology + +# HTML: +# RewriteCond %{HTTP_ACCEPT} text/html +# RewriteRule ^$ https://nfdi4ing.pages.rwth-aachen.de/metadata4ing/metadata4ing/index.html [R=303,L,NE] + +RewriteCond %{HTTP_ACCEPT} text/html +RewriteRule ^(2020)$ https://terminology.tib.eu/ts/ontologies/dfgfo [R=303,L,NE] + +RewriteCond %{HTTP_ACCEPT} text/html +RewriteRule ^([2-9]\d{3})$ https://terminology.tib.eu/ts/ontologies/dfgfo$1 [R=303,L,NE] + +RewriteCond %{HTTP_ACCEPT} text/html +RewriteRule ^2020/(\d{1,3}(-\d{2})?$) https://terminology.tib.eu/ts/ontologies/dfgfo/terms?iri=https\%3A\%2F\%2Fgithub.com\%2Ftibonto\%2Fdfgfo\%2F$1 [R=303,L,NE] + +RewriteCond %{HTTP_ACCEPT} text/html +RewriteRule ^2024/(\d\.\d{2}(-\d{2})?$|\d{1,2}$) https://terminology.tib.eu/ts/ontologies/dfgfo2024/terms?iri=https\%3A\%2F\%2Fw3id.org\%2Fdfgfo\%2F2024\%2F$1 [R=303,L,NE] + + +# Turtle 2020 +RewriteCond %{HTTP_ACCEPT} text/turtle [OR] +RewriteCond %{HTTP_ACCEPT} application/x-turtle +RewriteRule ^(2020)$ https://raw.githubusercontent.com/tibonto/DFG-Fachsystematik-Ontology/2023-01-17/dfgfo.ttl [R=303,L,NE] + +# Turtle 2024 +RewriteCond %{HTTP_ACCEPT} text/turtle [OR] +RewriteCond %{HTTP_ACCEPT} application/x-turtle +RewriteRule ^(2024)$ https://raw.githubusercontent.com/tibonto/DFG-Fachsystematik-Ontology/2024-2024-08-31/dfgfo.ttl [R=303,L,NE] + +# Turtle with versioning +RewriteCond %{HTTP_ACCEPT} text/turtle [OR] +RewriteCond %{HTTP_ACCEPT} application/x-turtle +RewriteRule ^([2-9]\d{3})$ https://raw.githubusercontent.com/tibonto/DFG-Fachsystematik-Ontology/$1/dfgfo.ttl [R=303,L,NE] diff --git a/w3id/README.md b/w3id/README.md new file mode 100644 index 0000000..fdc8ce9 --- /dev/null +++ b/w3id/README.md @@ -0,0 +1,32 @@ +# w3ids for DFGFO + +## What is DFGFO? + +DFGFO is an ontology version of the Subject Classification of Deutsche Forschungsgemeinschaft (DFG). + +Read more at the GitHub repository at [https://github.com/tibonto/DFG-Fachsystematik-Ontology](https://github.com/tibonto/DFG-Fachsystematik-Ontology). + +## Contacts + +* Susanne Arndt (GitHub: [SArndt-TIB](https://github.com/SArndt-TIB), Mail: ) +* Dorothea Iglezakis (GitHub: [doigl](https://github.com/doigl), Mail: ) +* André Castro (GitHub: [andrecastro0o](https://github.com/andrecastro0o), Mail: ) + + +## Redirects + +### Version 2024 - 2028 + +|ID|Accept-Header|Target|Description| +|-|-|-|-| +||text/turtle||Turtle file (.ttl) of the entire ontology (2024 version)| +||text/html||Landing page of DFGFO 2024 at the TIB Terminology Service| +|>|text/html|>|Landing page of a specific DFGFO 2024 term at the TIB Terminology Service, f.e. for term '3.16-01 Preparatory and Physical Chemistry of Polymer', the termID would be 3.16-01| + +### Version 2020-2024 + +|ID|Accept-Header|Target|Description| +|-|-|-|-| +||text/turtle||Turtle file (.ttl) of the entire ontology (2020 version)| +||text/html||Landing page of DFGFO 2020 at the TIB Terminology Service| +|>|text/html|>|Landing page of a specific DFGFO 2020 term at the TIB Terminology Service, f.e. for term '44 Computer Science, Systems and Electrical Engineering', the termID would be 44| From 4c88b685131a1b995dec1083016e68d641605e01 Mon Sep 17 00:00:00 2001 From: Arndt Date: Thu, 8 Aug 2024 15:24:42 +0200 Subject: [PATCH 2/3] correct versionIRI --- dfgfo.ttl | 2 +- metadata.ttl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dfgfo.ttl b/dfgfo.ttl index b36320e..943b022 100644 --- a/dfgfo.ttl +++ b/dfgfo.ttl @@ -26,7 +26,7 @@ skos:altLabel a owl:AnnotationProperty . dcterms:license ; rdfs:comment "DFG Classification of Subject Areas Ontology is being created as part of the TIB Terminology Service"@de, "DFG Fachsystematik - Ontology wurde zur Integration in den TIB Terminology Service erstellt"@de ; - owl:versionIRI dfgfo:2024 ; + owl:versionIRI dfgfo: ; owl:versionInfo "2024-2028"^^xsd:string . dfgfo:1.11-01 a owl:Class ; diff --git a/metadata.ttl b/metadata.ttl index 259e32c..928ceb1 100644 --- a/metadata.ttl +++ b/metadata.ttl @@ -29,4 +29,4 @@ skos:altLabel rdf:type owl:AnnotationProperty . rdfs:comment "DFG Fachsystematik - Ontology wurde zur Integration in den TIB Terminology Service erstellt"@de ; terms:license ; owl:versionInfo "2024-2028"^^xsd:string ; - owl:versionIRI . \ No newline at end of file + owl:versionIRI dfgfo: . \ No newline at end of file From 2a3188bfaba49b74c9872bd7b0e0096c61b1611f Mon Sep 17 00:00:00 2001 From: Arndt Date: Tue, 20 Aug 2024 11:38:03 +0200 Subject: [PATCH 3/3] #10 remove redundant files, set reference to https://github.com/perma-id/w3id.org/tree/master/dfgfo --- w3id/.htaccess | 37 ------------------------------------- w3id/README.md | 31 +------------------------------ 2 files changed, 1 insertion(+), 67 deletions(-) delete mode 100644 w3id/.htaccess diff --git a/w3id/.htaccess b/w3id/.htaccess deleted file mode 100644 index d3eb55e..0000000 --- a/w3id/.htaccess +++ /dev/null @@ -1,37 +0,0 @@ -Header set Access-Control-Allow-Origin * -Options +FollowSymLinks -RewriteEngine on - -# Specific content-type -> Access respective ontology - -# HTML: -# RewriteCond %{HTTP_ACCEPT} text/html -# RewriteRule ^$ https://nfdi4ing.pages.rwth-aachen.de/metadata4ing/metadata4ing/index.html [R=303,L,NE] - -RewriteCond %{HTTP_ACCEPT} text/html -RewriteRule ^(2020)$ https://terminology.tib.eu/ts/ontologies/dfgfo [R=303,L,NE] - -RewriteCond %{HTTP_ACCEPT} text/html -RewriteRule ^([2-9]\d{3})$ https://terminology.tib.eu/ts/ontologies/dfgfo$1 [R=303,L,NE] - -RewriteCond %{HTTP_ACCEPT} text/html -RewriteRule ^2020/(\d{1,3}(-\d{2})?$) https://terminology.tib.eu/ts/ontologies/dfgfo/terms?iri=https\%3A\%2F\%2Fgithub.com\%2Ftibonto\%2Fdfgfo\%2F$1 [R=303,L,NE] - -RewriteCond %{HTTP_ACCEPT} text/html -RewriteRule ^2024/(\d\.\d{2}(-\d{2})?$|\d{1,2}$) https://terminology.tib.eu/ts/ontologies/dfgfo2024/terms?iri=https\%3A\%2F\%2Fw3id.org\%2Fdfgfo\%2F2024\%2F$1 [R=303,L,NE] - - -# Turtle 2020 -RewriteCond %{HTTP_ACCEPT} text/turtle [OR] -RewriteCond %{HTTP_ACCEPT} application/x-turtle -RewriteRule ^(2020)$ https://raw.githubusercontent.com/tibonto/DFG-Fachsystematik-Ontology/2023-01-17/dfgfo.ttl [R=303,L,NE] - -# Turtle 2024 -RewriteCond %{HTTP_ACCEPT} text/turtle [OR] -RewriteCond %{HTTP_ACCEPT} application/x-turtle -RewriteRule ^(2024)$ https://raw.githubusercontent.com/tibonto/DFG-Fachsystematik-Ontology/2024-2024-08-31/dfgfo.ttl [R=303,L,NE] - -# Turtle with versioning -RewriteCond %{HTTP_ACCEPT} text/turtle [OR] -RewriteCond %{HTTP_ACCEPT} application/x-turtle -RewriteRule ^([2-9]\d{3})$ https://raw.githubusercontent.com/tibonto/DFG-Fachsystematik-Ontology/$1/dfgfo.ttl [R=303,L,NE] diff --git a/w3id/README.md b/w3id/README.md index fdc8ce9..2f9c392 100644 --- a/w3id/README.md +++ b/w3id/README.md @@ -1,32 +1,3 @@ # w3ids for DFGFO -## What is DFGFO? - -DFGFO is an ontology version of the Subject Classification of Deutsche Forschungsgemeinschaft (DFG). - -Read more at the GitHub repository at [https://github.com/tibonto/DFG-Fachsystematik-Ontology](https://github.com/tibonto/DFG-Fachsystematik-Ontology). - -## Contacts - -* Susanne Arndt (GitHub: [SArndt-TIB](https://github.com/SArndt-TIB), Mail: ) -* Dorothea Iglezakis (GitHub: [doigl](https://github.com/doigl), Mail: ) -* André Castro (GitHub: [andrecastro0o](https://github.com/andrecastro0o), Mail: ) - - -## Redirects - -### Version 2024 - 2028 - -|ID|Accept-Header|Target|Description| -|-|-|-|-| -||text/turtle||Turtle file (.ttl) of the entire ontology (2024 version)| -||text/html||Landing page of DFGFO 2024 at the TIB Terminology Service| -|>|text/html|>|Landing page of a specific DFGFO 2024 term at the TIB Terminology Service, f.e. for term '3.16-01 Preparatory and Physical Chemistry of Polymer', the termID would be 3.16-01| - -### Version 2020-2024 - -|ID|Accept-Header|Target|Description| -|-|-|-|-| -||text/turtle||Turtle file (.ttl) of the entire ontology (2020 version)| -||text/html||Landing page of DFGFO 2020 at the TIB Terminology Service| -|>|text/html|>|Landing page of a specific DFGFO 2020 term at the TIB Terminology Service, f.e. for term '44 Computer Science, Systems and Electrical Engineering', the termID would be 44| +You can find the w3id specification for DFGFO at .