diff --git a/tetras_extraction/macao_12/result/macao_full.ttl b/tetras_extraction/macao_12/result/macao_full.ttl index 547d75f012d743aa7b02e3850b92d02f8cda5ab2..6cd9b157cb574fbdadae7f5eac732b64e05bafc7 100644 --- a/tetras_extraction/macao_12/result/macao_full.ttl +++ b/tetras_extraction/macao_12/result/macao_full.ttl @@ -4,9 +4,8 @@ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . -<http://www.semanticweb.org/eliott/ontologies/2024/4/macao-content> a owl:Ontology ; - rdfs:label "macao-content" ; - owl:imports <http://www.semanticweb.org/eliott/ontologies/2024/4/macao> . +<http://www.semanticweb.org/eliott/ontologies/2024/4/macao-full> a owl:Ontology ; + rdfs:label "macao-full" . :Image a owl:Class ; rdfs:subClassOf :MacaoObject, @@ -84,10 +83,6 @@ rdfs:domain :MacaoContenu ; rdfs:range rdf:PlainLiteral . -<http://www.semanticweb.org/eliott/ontologies/2024/4/macao> a owl:Ontology ; - rdfs:label "macao-schema"@fr ; - owl:versionInfo 1.1 . - :FlashObject a owl:Class ; rdfs:subClassOf :MacaoObject, :MacaoRessource . diff --git a/tetras_extraction/macao_12/script/src/transform.py b/tetras_extraction/macao_12/script/src/transform.py index 9bfc779028747cb03868524785d281e6945ce4d1..a0c3890834c796f1c1152aea69ba11cd907ad42e 100644 --- a/tetras_extraction/macao_12/script/src/transform.py +++ b/tetras_extraction/macao_12/script/src/transform.py @@ -1,4 +1,4 @@ -from rdflib import Graph +from rdflib import OWL, RDF, Graph from common import * @@ -72,5 +72,12 @@ def main(): # """, # ) - # Save the full graph + # ==> Save + # Remove dependency on previous ontologies + for ontology in graph.subjects(RDF.type, OWL.Ontology): + graph.remove((ontology, None, None)) + # Declare new ontology + onto_uri = URIRef("http://www.semanticweb.org/eliott/ontologies/2024/4/macao-full") + graph.add((onto_uri, RDF.type, OWL.Ontology)) + graph.add((onto_uri, RDFS.label, Literal("macao-full"))) graph.serialize(RDF_FULL_FILE, "turtle", base=NS)