From 9676d55c03a3470b4ab410a707cb046c11186e16 Mon Sep 17 00:00:00 2001 From: Philipp Schneider <schneider.philipp@uni-muenster.de> Date: Fri, 31 Mar 2023 12:17:22 +0200 Subject: [PATCH] Rename objects ontology to object --- ...l => digital-heraldry-ontology-object.ttl} | 44 +++++++++---------- research-dataset-creation-pipeline.ipynb | 4 +- src/rdf-mappings/dho_namespaces.py | 2 +- .../integrate_manuscript_metadata_into_kg.py | 8 ++-- 4 files changed, 29 insertions(+), 29 deletions(-) rename data/ontologies/{digital-heraldry-ontology-objects.ttl => digital-heraldry-ontology-object.ttl} (78%) diff --git a/data/ontologies/digital-heraldry-ontology-objects.ttl b/data/ontologies/digital-heraldry-ontology-object.ttl similarity index 78% rename from data/ontologies/digital-heraldry-ontology-objects.ttl rename to data/ontologies/digital-heraldry-ontology-object.ttl index 21e32bf..1217069 100644 --- a/data/ontologies/digital-heraldry-ontology-objects.ttl +++ b/data/ontologies/digital-heraldry-ontology-object.ttl @@ -1,25 +1,25 @@ -@prefix : <http://digitalheraldry.org/digital-heraldry-ontology/objects#> . +@prefix : <http://digitalheraldry.org/digital-heraldry-ontology/object#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix xml: <http://www.w3.org/XML/1998/namespace> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix dhoh: <http://digitalheraldry.org/digital-heraldry-ontology/heraldry#> . -@prefix dhoo: <http://digitalheraldry.org/digital-heraldry-ontology/objects#> . +@prefix dhoo: <http://digitalheraldry.org/digital-heraldry-ontology/object#> . @prefix dhor: <http://digitalheraldry.org/digital-heraldry-ontology/representation#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix vann: <http://purl.org/vocab/vann/> . @prefix dcterms: <http://purl.org/dc/terms/> . -@base <http://digitalheraldry.org/digital-heraldry-ontology/objects#> . - -<http://digitalheraldry.org/digital-heraldry-ontology/objects#> rdf:type owl:Ontology ; - owl:versionIRI <http://digitalheraldry.org/digital-heraldry-ontology/objects/0.1.0> ; - dcterms:creator "Philipp Schneider" , - "Torsten Hiltmann" ; - dcterms:description "The Digital Heraldry Object Ontology is used to describe objects and their metadata that display coats of arms. It is used together with the Digital Heraldry Ontology to describe coats of arms and the Digital Heraldry Representation Ontology to link these descriptions to particular places on objects."@en ; - dcterms:license <https://creativecommons.org/licenses/by/4.0/> ; - dcterms:publisher "https://www.geschichte.hu-berlin.de/de/bereiche-und-lehrstuehle/digital-history" ; - dcterms:title "Digital Heraldry Objects Ontology" ; - vann:preferredNamespacePrefix "dhoo" . +@base <http://digitalheraldry.org/digital-heraldry-ontology/object#> . + +<http://digitalheraldry.org/digital-heraldry-ontology/object#> rdf:type owl:Ontology ; + owl:versionIRI <http://digitalheraldry.org/digital-heraldry-ontology/object/0.1.0> ; + dcterms:creator "Philipp Schneider" , + "Torsten Hiltmann" ; + dcterms:description "The Digital Heraldry Object Ontology is used to describe objects and their metadata that display coats of arms. It is used together with the Digital Heraldry Ontology to describe coats of arms and the Digital Heraldry Representation Ontology to link these descriptions to particular places on objects."@en ; + dcterms:license <https://creativecommons.org/licenses/by/4.0/> ; + dcterms:publisher "https://www.geschichte.hu-berlin.de/de/bereiche-und-lehrstuehle/digital-history" ; + dcterms:title "Digital Heraldry Object Ontology" ; + vann:preferredNamespacePrefix "dhoo" . ################################################################# # Annotation properties @@ -53,34 +53,34 @@ vann:preferredNamespacePrefix rdf:type owl:AnnotationProperty . # Object Properties ################################################################# -### http://digitalheraldry.org/digital-heraldry-ontology/objects#datedInCentury +### http://digitalheraldry.org/digital-heraldry-ontology/object#datedInCentury dhoo:datedInCentury rdf:type owl:ObjectProperty . -### http://digitalheraldry.org/digital-heraldry-ontology/objects#hasDate +### http://digitalheraldry.org/digital-heraldry-ontology/object#hasDate dhoo:hasDate rdf:type owl:ObjectProperty ; rdfs:domain dhoo:Object . -### http://digitalheraldry.org/digital-heraldry-ontology/objects#hasEarliestDate +### http://digitalheraldry.org/digital-heraldry-ontology/object#hasEarliestDate dhoo:hasEarliestDate rdf:type owl:ObjectProperty ; rdfs:subPropertyOf dhoo:hasDate . -### http://digitalheraldry.org/digital-heraldry-ontology/objects#hasGridSystem +### http://digitalheraldry.org/digital-heraldry-ontology/object#hasGridSystem dhoo:hasGridSystem rdf:type owl:ObjectProperty . -### http://digitalheraldry.org/digital-heraldry-ontology/objects#hasLatestDate +### http://digitalheraldry.org/digital-heraldry-ontology/object#hasLatestDate dhoo:hasLatestDate rdf:type owl:ObjectProperty ; rdfs:subPropertyOf dhoo:hasDate . -### http://digitalheraldry.org/digital-heraldry-ontology/objects#hasLibraryPlace +### http://digitalheraldry.org/digital-heraldry-ontology/object#hasLibraryPlace dhoo:hasLibraryPlace rdf:type owl:ObjectProperty . -### http://digitalheraldry.org/digital-heraldry-ontology/objects#hasTitle +### http://digitalheraldry.org/digital-heraldry-ontology/object#hasTitle dhoo:hasTitle rdf:type owl:ObjectProperty . @@ -88,13 +88,13 @@ dhoo:hasTitle rdf:type owl:ObjectProperty . # Classes ################################################################# -### http://digitalheraldry.org/digital-heraldry-ontology/objects#Manuscript +### http://digitalheraldry.org/digital-heraldry-ontology/object#Manuscript dhoo:Manuscript rdf:type owl:Class ; rdfs:subClassOf dhoo:Object ; rdfs:label "Manuscript"@en . -### http://digitalheraldry.org/digital-heraldry-ontology/objects#Object +### http://digitalheraldry.org/digital-heraldry-ontology/object#Object dhoo:Object rdf:type owl:Class ; rdfs:label "Object"@en . diff --git a/research-dataset-creation-pipeline.ipynb b/research-dataset-creation-pipeline.ipynb index 5640785..3b6ce17 100644 --- a/research-dataset-creation-pipeline.ipynb +++ b/research-dataset-creation-pipeline.ipynb @@ -87845,7 +87845,7 @@ "metadata": {}, "outputs": [], "source": [ - "merge_graphs('data/rdf-output/research-dataset/knowledge-graph-objects-research-dataset.ttl', 'data/ontologies/digital-heraldry-ontology-objects.ttl', 'data/rdf-output/research-dataset/knowledge-graph-objects-research-dataset.ttl')" + "merge_graphs('data/rdf-output/research-dataset/knowledge-graph-object-research-dataset.ttl', 'data/ontologies/digital-heraldry-ontology-object.ttl', 'data/rdf-output/research-dataset/knowledge-graph-object-research-dataset.ttl')" ] }, { @@ -87866,7 +87866,7 @@ } ], "source": [ - "!python src/rdf-mappings/merge_rdf_files_into_kg.py -i data/rdf-output/research-dataset/knowledge-graph-blazon-research-dataset.ttl data/rdf-output/research-dataset/knowledge-graph-objects-research-dataset.ttl data/rdf-output/research-dataset/knowledge-graph-representation-research-dataset.ttl" + "!python src/rdf-mappings/merge_rdf_files_into_kg.py -i data/rdf-output/research-dataset/knowledge-graph-blazon-research-dataset.ttl data/rdf-output/research-dataset/knowledge-graph-object-research-dataset.ttl data/rdf-output/research-dataset/knowledge-graph-representation-research-dataset.ttl" ] } ], diff --git a/src/rdf-mappings/dho_namespaces.py b/src/rdf-mappings/dho_namespaces.py index b964585..7414ee1 100644 --- a/src/rdf-mappings/dho_namespaces.py +++ b/src/rdf-mappings/dho_namespaces.py @@ -11,7 +11,7 @@ dho_uri = URIRef('http://digitalheraldry.org/digital-heraldry-ontology/heraldry# dho_n = Namespace(dho_uri) dho_blazon_n = Namespace(URIRef('http://digitalheraldry.org/digital-heraldry-ontology/blazon#')) dho_rep_n = Namespace(URIRef('http://digitalheraldry.org/digital-heraldry-ontology/representation#')) -dho_obj_n = Namespace(URIRef('http://digitalheraldry.org/digital-heraldry-ontology/objects#')) +dho_obj_n = Namespace(URIRef('http://digitalheraldry.org/digital-heraldry-ontology/object#')) dho_ent_n = Namespace(URIRef('http://digitalheraldry.org/digital-heraldry-ontology/entity#')) dho_data_n = Namespace(URIRef('http://digitalheraldry.org/digital-heraldry-ontology/data#')) diff --git a/src/rdf-mappings/integrate_manuscript_metadata_into_kg.py b/src/rdf-mappings/integrate_manuscript_metadata_into_kg.py index a4a8a9b..c93524e 100644 --- a/src/rdf-mappings/integrate_manuscript_metadata_into_kg.py +++ b/src/rdf-mappings/integrate_manuscript_metadata_into_kg.py @@ -37,15 +37,15 @@ if __name__ == '__main__': metadata_file = 'data/input/armorial_manuscripts_summary.xlsx' kg_file = 'data/rdf-output/research-dataset/knowledge-graph-representation-research-dataset.ttl' - object_ontology_file = 'data/ontologies/digital-heraldry-ontology-objects.ttl' + object_ontology_file = 'data/ontologies/digital-heraldry-ontology-object.ttl' output_files = [ { - "output_file": "data/rdf-output/research-dataset/knowledge-graph-objects-research-dataset.ttl", + "output_file": "data/rdf-output/research-dataset/knowledge-graph-object-research-dataset.ttl", "file_format": "turtle" }, { - "output_file": "data/rdf-output/research-dataset/knowledge-graph-objects-research-dataset.jsonld", + "output_file": "data/rdf-output/research-dataset/knowledge-graph-object-research-dataset.jsonld", "file_format": "json-ld" } ] @@ -54,7 +54,7 @@ if __name__ == '__main__': g = Graph() g.parse(object_ontology_file) - # Create objects graph with metadata on manuscripts + # Create object graph with metadata on manuscripts df_metadata = pd.read_excel(metadata_file) print(df_metadata) -- GitLab