diff --git a/data/ontologies/digital-heraldry-ontology-representation.ttl b/data/ontologies/digital-heraldry-ontology-representation.ttl index 27f04b1021156e28da96f6ff67d0f56e98914301..7d58964bcc82d9a0e58156297f0243dc572acfdf 100644 --- a/data/ontologies/digital-heraldry-ontology-representation.ttl +++ b/data/ontologies/digital-heraldry-ontology-representation.ttl @@ -24,6 +24,14 @@ # Annotation properties ################################################################# +### http://digitalheraldry.org/digital-heraldry-ontology/representation#textHasPrimaryTranscription +dhor:textHasPrimaryTranscription rdf:type owl:AnnotationProperty ; + rdfs:comment "Primary Transcription of the text associated with a coat of arms"@en ; + rdfs:label "textHasPrimaryTranscription"@en ; + rdfs:range rdfs:Literal ; + rdfs:domain dhor:TextualTranskription . + + ### http://purl.org/dc/terms/creator dcterms:creator rdf:type owl:AnnotationProperty . @@ -166,16 +174,11 @@ dhor:partOfObject rdf:type owl:ObjectProperty ; rdfs:label "partOfObject"@en . -### http://digitalheraldry.org/digital-heraldry-ontology/representation#textHasPrimaryTranscription -dhor:textHasPrimaryTranscription rdf:type owl:ObjectProperty ; - rdfs:subPropertyOf dhor:textHasTranscription ; - rdfs:comment "Primary Transcription of the text associated with a coat of arms"@en ; - rdfs:label "textHasPrimaryTranscription"@en . - - ### http://digitalheraldry.org/digital-heraldry-ontology/representation#textHasTranscription dhor:textHasTranscription rdf:type owl:ObjectProperty ; rdfs:subPropertyOf owl:topObjectProperty ; + rdfs:domain dhor:CoatOfArmsRepresentation ; + rdfs:range dhor:TextualTranskription ; rdfs:comment "Transcription of the text associated with the representation of a coat of arms"@en ; rdfs:label "textHasTranscription"@en . @@ -257,4 +260,10 @@ dhor:Shield rdf:type owl:Class ; rdfs:label "Shield"@en . +### http://digitalheraldry.org/digital-heraldry-ontology/representation#TextualTranskription +dhor:TextualTranskription rdf:type owl:Class ; + rdfs:comment "Written Text that is interpreted as belonging to a specific instance of a dhor:CoatOfArmsRepresentation"@en ; + rdfs:label "TextualTranskription"@en . + + ### Generated by the OWL API (version 4.5.9.2019-02-01T07:24:44Z) https://github.com/owlcs/owlapi diff --git a/src/rdf-mappings/initial_ontology_definitions.py b/src/rdf-mappings/initial_ontology_definitions.py index 7bf136efa3e0350e145d8e272aad9cc126cc23f7..e93b3045cd8886eafb7115a91c9f96e02fd0b147 100644 --- a/src/rdf-mappings/initial_ontology_definitions.py +++ b/src/rdf-mappings/initial_ontology_definitions.py @@ -141,7 +141,7 @@ def create_initial_classes_and_properties_arm_items(g, dho_n): g.add((dho_n.mantlingPresent, RDFS.subPropertyOf, dho_n.hasTimbreAttribute)) g.add((dho_n.coatOfArmsPresentedAs, RDF.type, OWL.ObjectProperty)) - g.add((dho_n.textHasTranscription, RDF.type, OWL.ObjectProperty)) + #g.add((dho_n.textHasTranscription, RDF.type, OWL.ObjectProperty)) def create_initial_instances_arm_items(g, dho_data_n): """ diff --git a/src/rdf-mappings/map-tblArmItems.py b/src/rdf-mappings/map-tblArmItems.py index b8be4bde8a0f4df1b6b69cd3fa0d77e38c86f986..b8b5ed099cc060abf30fe43275f314a73c98e1b9 100644 --- a/src/rdf-mappings/map-tblArmItems.py +++ b/src/rdf-mappings/map-tblArmItems.py @@ -158,7 +158,11 @@ for index, row in df_tblArmItems.iterrows(): g.add((description_event_node, DCTERMS.date, Literal(str(row['description_time']), datatype=XSD.date))) # Add textual transcription from source - g.add((coa_reference_node, dho_rep_n.textHasPrimaryTranscription, Literal(str(row['ArmTxt'])))) + textual_transcription_node = URIRef(dho_rep_n + str(uuid.uuid4())) + g.add((textual_transcription_node, RDF.type, dho_rep_n.TextualTranskription)) + g.add((textual_transcription_node, RDF.type, OWL.NamedIndividual)) + g.add((coa_reference_node, dho_rep_n.textHasTranscription, textual_transcription_node)) + g.add((textual_transcription_node, dho_rep_n.textHasPrimaryTranscription, Literal(str(row['ArmTxt'])))) ################################### # CoA identification