From c478a284ac197f2d7b5d116333fe1010c636ae9f Mon Sep 17 00:00:00 2001 From: "AD\\aabdoun" Date: Wed, 5 Nov 2025 09:44:28 +0100 Subject: [PATCH 1/2] changer url http://xmlns.com/foaf/0.1/ on https://www.w3.org/2000/01/rdf-schema# --- .../inria/corese/core/load/OwlImportTest.java | 14 +++++------ .../owl_imports/test_owl_import.html | 24 +++++++++---------- .../owl_imports/test_owl_import.jsonld | 7 +++--- .../data-test/owl_imports/test_owl_import.nq | 6 ++--- .../data-test/owl_imports/test_owl_import.nt | 6 ++--- .../data-test/owl_imports/test_owl_import.rdf | 4 ++-- .../owl_imports/test_owl_import.trig | 7 +++--- .../data-test/owl_imports/test_owl_import.ttl | 7 +++--- 8 files changed, 36 insertions(+), 39 deletions(-) diff --git a/src/test/java/fr/inria/corese/core/load/OwlImportTest.java b/src/test/java/fr/inria/corese/core/load/OwlImportTest.java index a27405173..dd61d7d53 100644 --- a/src/test/java/fr/inria/corese/core/load/OwlImportTest.java +++ b/src/test/java/fr/inria/corese/core/load/OwlImportTest.java @@ -40,7 +40,7 @@ public void testRdfImportDisabled() throws LoadException { @Test public void testRdfImportEnabled() throws LoadException { int graphSize = testImport("test_owl_import.rdf", true); - assertEquals(628, graphSize); + assertEquals(95, graphSize); } /** @@ -58,7 +58,7 @@ public void testTurtleImportDisabled() throws LoadException { @Test public void testTurtleImportEnabled() throws LoadException { int graphSize = testImport("test_owl_import.ttl", true); - assertEquals(628, graphSize); + assertEquals(95, graphSize); } /** @@ -76,7 +76,7 @@ public void testTrigImportDisabled() throws LoadException { @Test public void testTrigImportEnabled() throws LoadException { int graphSize = testImport("test_owl_import.trig", true); - assertEquals(628, graphSize); + assertEquals(95, graphSize); } /** @@ -94,7 +94,7 @@ public void testNTriplesImportDisabled() throws LoadException { @Test public void testNTriplesImportEnabled() throws LoadException { int graphSize = testImport("test_owl_import.nt", true); - assertEquals(628, graphSize); + assertEquals(95, graphSize); } /** @@ -112,7 +112,7 @@ public void testNQuadsImportDisabled() throws LoadException { @Test public void testNQuadsImportEnabled() throws LoadException { int graphSize = testImport("test_owl_import.nq", true); - assertEquals(628, graphSize); + assertEquals(95, graphSize); } /** @@ -130,7 +130,7 @@ public void testJsonLdImportDisabled() throws LoadException { @Test public void testJsonLdImportEnabled() throws LoadException { int graphSize = testImport("test_owl_import.jsonld", true); - assertEquals(628, graphSize); + assertEquals(95, graphSize); } /** @@ -148,7 +148,7 @@ public void testRdfaImportDisabled() throws LoadException { @Test public void testRdfaImportEnabled() throws LoadException { int graphSize = testImport("test_owl_import.html", true); - assertEquals(628, graphSize); + assertEquals(95, graphSize); } /** diff --git a/src/test/resources/data-test/owl_imports/test_owl_import.html b/src/test/resources/data-test/owl_imports/test_owl_import.html index 12be37e94..fb5530e5e 100644 --- a/src/test/resources/data-test/owl_imports/test_owl_import.html +++ b/src/test/resources/data-test/owl_imports/test_owl_import.html @@ -1,25 +1,25 @@ + prefix="rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# owl: http://www.w3.org/2002/07/owl# rdfs: http://www.w3.org/2000/01/rdf-schema#"> RDFa Example -
- -
+
+ +
-
- Person - -
+
+ Person + +
-
- Student - -
+
+ Student + +
\ No newline at end of file diff --git a/src/test/resources/data-test/owl_imports/test_owl_import.jsonld b/src/test/resources/data-test/owl_imports/test_owl_import.jsonld index 6c0175ad0..c21f5a3a0 100644 --- a/src/test/resources/data-test/owl_imports/test_owl_import.jsonld +++ b/src/test/resources/data-test/owl_imports/test_owl_import.jsonld @@ -5,15 +5,14 @@ "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", "owl": "http://www.w3.org/2002/07/owl#", "xsd": "http://www.w3.org/2001/XMLSchema#", - "rdfs": "http://www.w3.org/2000/01/rdf-schema#", - "foaf": "http://xmlns.com/foaf/0.1/" + "rdfs": "http://www.w3.org/2000/01/rdf-schema#" }, "@graph": [ { "@id": "http://example.org/ontology", "@type": "owl:Ontology", "owl:imports": { - "@id": "http://xmlns.com/foaf/0.1/" + "@id": "https://www.w3.org/2000/01/rdf-schema#" } }, { @@ -21,7 +20,7 @@ "@type": "owl:Class", "rdfs:label": "Person", "rdfs:subClassOf": { - "@id": "http://xmlns.com/foaf/0.1/Person" + "@id": "https://www.w3.org/2000/01/rdf-schema#Resource" } }, { diff --git a/src/test/resources/data-test/owl_imports/test_owl_import.nq b/src/test/resources/data-test/owl_imports/test_owl_import.nq index 8ed5b9114..5177ba010 100644 --- a/src/test/resources/data-test/owl_imports/test_owl_import.nq +++ b/src/test/resources/data-test/owl_imports/test_owl_import.nq @@ -1,8 +1,8 @@ . - . + . . "Person" . - . + . . "Student" . - . + . \ No newline at end of file diff --git a/src/test/resources/data-test/owl_imports/test_owl_import.nt b/src/test/resources/data-test/owl_imports/test_owl_import.nt index a6d5ef2bc..475cd108a 100644 --- a/src/test/resources/data-test/owl_imports/test_owl_import.nt +++ b/src/test/resources/data-test/owl_imports/test_owl_import.nt @@ -1,8 +1,8 @@ . - . + . . "Person" . - . + . . "Student" . - . + . \ No newline at end of file diff --git a/src/test/resources/data-test/owl_imports/test_owl_import.rdf b/src/test/resources/data-test/owl_imports/test_owl_import.rdf index 59d4f884e..ae44bed18 100644 --- a/src/test/resources/data-test/owl_imports/test_owl_import.rdf +++ b/src/test/resources/data-test/owl_imports/test_owl_import.rdf @@ -7,12 +7,12 @@ xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> - + Person - + diff --git a/src/test/resources/data-test/owl_imports/test_owl_import.trig b/src/test/resources/data-test/owl_imports/test_owl_import.trig index 81e85529d..5f43c1104 100644 --- a/src/test/resources/data-test/owl_imports/test_owl_import.trig +++ b/src/test/resources/data-test/owl_imports/test_owl_import.trig @@ -2,17 +2,16 @@ @prefix owl: . @prefix xsd: . @prefix rdfs: . -@prefix foaf: . { a owl:Ontology ; - owl:imports . + owl:imports . :Person a owl:Class ; rdfs:label "Person" ; - rdfs:subClassOf foaf:Person . + rdfs:subClassOf rdfs:Resource . :Student a owl:Class ; rdfs:label "Student" ; rdfs:subClassOf :Person . -} +} \ No newline at end of file diff --git a/src/test/resources/data-test/owl_imports/test_owl_import.ttl b/src/test/resources/data-test/owl_imports/test_owl_import.ttl index c69d8cfc1..bfe09a0a7 100644 --- a/src/test/resources/data-test/owl_imports/test_owl_import.ttl +++ b/src/test/resources/data-test/owl_imports/test_owl_import.ttl @@ -2,15 +2,14 @@ @prefix owl: . @prefix xsd: . @prefix rdfs: . -@prefix foaf: . a owl:Ontology ; - owl:imports . + owl:imports . :Person a owl:Class ; rdfs:label "Person" ; - rdfs:subClassOf foaf:Person . + rdfs:subClassOf rdfs:Resource . :Student a owl:Class ; rdfs:label "Student" ; - rdfs:subClassOf :Person . + rdfs:subClassOf :Person . \ No newline at end of file From bf6eaf8ea8df79af507ceced61003d2909652019 Mon Sep 17 00:00:00 2001 From: "AD\\aabdoun" Date: Wed, 5 Nov 2025 14:09:21 +0100 Subject: [PATCH 2/2] fix owl --- .../inria/corese/core/load/OwlImportTest.java | 18 +++++++++--------- .../data-test/owl_imports/test_owl_import.html | 5 ++--- .../owl_imports/test_owl_import.jsonld | 4 ++-- .../data-test/owl_imports/test_owl_import.nq | 4 ++-- .../data-test/owl_imports/test_owl_import.nt | 4 ++-- .../data-test/owl_imports/test_owl_import.rdf | 4 ++-- .../data-test/owl_imports/test_owl_import.trig | 4 ++-- .../data-test/owl_imports/test_owl_import.ttl | 3 +-- 8 files changed, 22 insertions(+), 24 deletions(-) diff --git a/src/test/java/fr/inria/corese/core/load/OwlImportTest.java b/src/test/java/fr/inria/corese/core/load/OwlImportTest.java index dd61d7d53..60dc4ad3c 100644 --- a/src/test/java/fr/inria/corese/core/load/OwlImportTest.java +++ b/src/test/java/fr/inria/corese/core/load/OwlImportTest.java @@ -40,7 +40,7 @@ public void testRdfImportDisabled() throws LoadException { @Test public void testRdfImportEnabled() throws LoadException { int graphSize = testImport("test_owl_import.rdf", true); - assertEquals(95, graphSize); + assertEquals(8, graphSize); } /** @@ -58,7 +58,7 @@ public void testTurtleImportDisabled() throws LoadException { @Test public void testTurtleImportEnabled() throws LoadException { int graphSize = testImport("test_owl_import.ttl", true); - assertEquals(95, graphSize); + assertEquals(8, graphSize); } /** @@ -76,7 +76,7 @@ public void testTrigImportDisabled() throws LoadException { @Test public void testTrigImportEnabled() throws LoadException { int graphSize = testImport("test_owl_import.trig", true); - assertEquals(95, graphSize); + assertEquals(8, graphSize); } /** @@ -94,7 +94,7 @@ public void testNTriplesImportDisabled() throws LoadException { @Test public void testNTriplesImportEnabled() throws LoadException { int graphSize = testImport("test_owl_import.nt", true); - assertEquals(95, graphSize); + assertEquals(8, graphSize); } /** @@ -112,7 +112,7 @@ public void testNQuadsImportDisabled() throws LoadException { @Test public void testNQuadsImportEnabled() throws LoadException { int graphSize = testImport("test_owl_import.nq", true); - assertEquals(95, graphSize); + assertEquals(8, graphSize); } /** @@ -130,7 +130,7 @@ public void testJsonLdImportDisabled() throws LoadException { @Test public void testJsonLdImportEnabled() throws LoadException { int graphSize = testImport("test_owl_import.jsonld", true); - assertEquals(95, graphSize); + assertEquals(8, graphSize); } /** @@ -139,7 +139,7 @@ public void testJsonLdImportEnabled() throws LoadException { @Test public void testRdfaImportDisabled() throws LoadException { int graphSize = testImport("test_owl_import.html", false); - assertEquals(8, graphSize); + assertEquals(7, graphSize); } /** @@ -148,7 +148,7 @@ public void testRdfaImportDisabled() throws LoadException { @Test public void testRdfaImportEnabled() throws LoadException { int graphSize = testImport("test_owl_import.html", true); - assertEquals(95, graphSize); + assertEquals(7, graphSize); } /** @@ -171,4 +171,4 @@ private int testImport(String fileName, boolean enableImport) throws LoadExcepti loader.parse(resourcePath); return graph.size(); } -} +} \ No newline at end of file diff --git a/src/test/resources/data-test/owl_imports/test_owl_import.html b/src/test/resources/data-test/owl_imports/test_owl_import.html index fb5530e5e..3fcdec5e4 100644 --- a/src/test/resources/data-test/owl_imports/test_owl_import.html +++ b/src/test/resources/data-test/owl_imports/test_owl_import.html @@ -8,12 +8,11 @@
- +
- Person - +
diff --git a/src/test/resources/data-test/owl_imports/test_owl_import.jsonld b/src/test/resources/data-test/owl_imports/test_owl_import.jsonld index c21f5a3a0..0b067f434 100644 --- a/src/test/resources/data-test/owl_imports/test_owl_import.jsonld +++ b/src/test/resources/data-test/owl_imports/test_owl_import.jsonld @@ -12,7 +12,7 @@ "@id": "http://example.org/ontology", "@type": "owl:Ontology", "owl:imports": { - "@id": "https://www.w3.org/2000/01/rdf-schema#" + "@id": "https://ns.inria.fr/sparql-extension/" } }, { @@ -20,7 +20,7 @@ "@type": "owl:Class", "rdfs:label": "Person", "rdfs:subClassOf": { - "@id": "https://www.w3.org/2000/01/rdf-schema#Resource" + "@id": "https://ns.inria.fr/sparql-extension#Extension" } }, { diff --git a/src/test/resources/data-test/owl_imports/test_owl_import.nq b/src/test/resources/data-test/owl_imports/test_owl_import.nq index 5177ba010..061e73b15 100644 --- a/src/test/resources/data-test/owl_imports/test_owl_import.nq +++ b/src/test/resources/data-test/owl_imports/test_owl_import.nq @@ -1,8 +1,8 @@ . - . + . . "Person" . - . + . . "Student" . . \ No newline at end of file diff --git a/src/test/resources/data-test/owl_imports/test_owl_import.nt b/src/test/resources/data-test/owl_imports/test_owl_import.nt index 475cd108a..3780f60b3 100644 --- a/src/test/resources/data-test/owl_imports/test_owl_import.nt +++ b/src/test/resources/data-test/owl_imports/test_owl_import.nt @@ -1,8 +1,8 @@ . - . + . . "Person" . - . + . . "Student" . . \ No newline at end of file diff --git a/src/test/resources/data-test/owl_imports/test_owl_import.rdf b/src/test/resources/data-test/owl_imports/test_owl_import.rdf index ae44bed18..74017ffd3 100644 --- a/src/test/resources/data-test/owl_imports/test_owl_import.rdf +++ b/src/test/resources/data-test/owl_imports/test_owl_import.rdf @@ -7,12 +7,12 @@ xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> - + Person - + diff --git a/src/test/resources/data-test/owl_imports/test_owl_import.trig b/src/test/resources/data-test/owl_imports/test_owl_import.trig index 5f43c1104..985e308fe 100644 --- a/src/test/resources/data-test/owl_imports/test_owl_import.trig +++ b/src/test/resources/data-test/owl_imports/test_owl_import.trig @@ -5,11 +5,11 @@ { a owl:Ontology ; - owl:imports . + owl:imports . :Person a owl:Class ; rdfs:label "Person" ; - rdfs:subClassOf rdfs:Resource . + rdfs:subClassOf . :Student a owl:Class ; rdfs:label "Student" ; diff --git a/src/test/resources/data-test/owl_imports/test_owl_import.ttl b/src/test/resources/data-test/owl_imports/test_owl_import.ttl index bfe09a0a7..2688b7cda 100644 --- a/src/test/resources/data-test/owl_imports/test_owl_import.ttl +++ b/src/test/resources/data-test/owl_imports/test_owl_import.ttl @@ -1,10 +1,9 @@ @prefix : . @prefix owl: . -@prefix xsd: . @prefix rdfs: . a owl:Ontology ; - owl:imports . + owl:imports . :Person a owl:Class ; rdfs:label "Person" ;