Repository: ontodev/robot (java)

Issue:
robot outputs invalid turtle syntax
This may be a problem in OWL API, but just tracking here for now. Run these commands on the latest MONDO release:

```bash
curl -L -O 'http://purl.obolibrary.org/obo/mondo/releases/2023-07-03/mondo.owl'
riot --validate mondo.owl
# outputs some warnings about URN format in SWRL variables, but not fatal
robot convert -i mondo.owl -o mondo.ttl
riot --validate mondo.ttl
# 15:17:40 ERROR riot            :: [line: 212732, col: 100] Unrecognized (expected an RDF Term): [SEMICOLON]
```

The problem section of the file looks like this:

```turtle
###  http://purl.obolibrary.org/obo/MONDO_0000290
obo:MONDO_0000290 rdf:type owl:Class ;
                  owl:equivalentClass [ owl:intersectionOf ( obo:MONDO_0005550
                                                             _:genid24281 rdf:type owl:Restriction ;
                                                                          owl:onProperty obo:RO_0014001 ;
                                                                          owl:someValuesFrom obo:NCBITaxon_5763
                                                           ) ;
                                      rdf:type owl:Class
                                      ] ;
rdfs:subClassOf obo:MONDO_0002428 ,
                obo:MONDO_0020067 ,
                _:genid24281 ;
obo:IAO_0000115 "A infectious disease involving the Naegleria fowleri." ;
terms:conformsTo <http://purl.obolibrary.org/obo/mondo/patterns/infectious_disease_by_agent.yaml> ;
oboInOwl:hasDbXref "DOID:0050242" ,
                   "GARD:0009554" ,
                   "MESH:C535275" ,
                   "SCTID:721816008" ,
                   "UMLS:C0300934" ,
                   "UMLS:C4303098" ;
oboInOwl:hasExactSynonym "Naegleria fowleri infection" ;
oboInOwl:hasRelatedSynonym "infections, Naegleria fowleri" ;
oboInOwl:id "MONDO:0000290" ;
oboInOwl:inSubset mondo:mondo_rare ,
                  mondo:rare ;
rdfs:label "primary amebic meningoencephalitis" ;
skos:exactMatch <http://identifiers.org/mesh/C535275> ,
                <http://identifiers.org/snomedct/721816008> ,
                <http://linkedlifedata.com/resource/umls/id/C0300934> ,
                <http://linkedlifedata.com/resource/umls/id/C4303098> ,
                obo:DOID_0050242 .

_:genid24281 rdf:type owl:Restriction ;
              owl:onProperty obo:RO_0014001 ;
              owl:someValuesFrom obo:NCBITaxon_5763 .
```

In the intersection list you would expect the existential restriction to be enclosed in `[ ]`, but instead there is a blank node ID `_:genid24281` followed by invalid inline properties. The blank node ID is reused twice below, which it should not be (OWL is supposed to use fresh blank nodes for reference to a class expression). That's fine in turtle, but might suggest the source of the error.

Based on the type of expression, it's possible this is somehow related to `robot relax`.

Pull request description:
Update OWL API to 4.5.26
Resolves #1129

- [ ] `docs/` have been added/updated (not necessary)
- [x] tests have been added/updated
- [x] `mvn verify` says all tests pass
- [X] `mvn site` says all JavaDocs correct
- [X] `CHANGELOG.md` has been updated

The last OWL API version (4.5.25) had some major issues with the way complex turtle axioms are written, see #1129. This version solves this problem.



Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0443c691..cea1beea 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 - Updated ELK from 0.4.3 to 0.5.0. [#999]. This is an important change as ELK 0.5.0 is more complete than 0.4.3, which means that it will potentially uncover inferences, in particular unsatisfiable classes, which were not recognised by ELK 0.4.3.
 - Add support for pluggable commands [#1119]
 
+### Changed
+- Migrate to OWL API 4.5.26 to deal with [broken turtle serialiser](https://github.com/ontodev/robot/issues/1129). [#1135]
+- Improvements to `export` and `report` for XLSX format [#1148]
+
 ## [1.9.4] - 2023-05-23
 
 ### Changed
@@ -369,6 +373,8 @@ First official release of ROBOT!
 [`template`]: http://robot.obolibrary.org/template
 [`validate`]: http://robot.obolibrary.org/validate
 
+[#1148]: https://github.com/ontodev/robot/pull/1148
+[#1135]: https://github.com/ontodev/robot/pull/1135
 [#1119]: https://github.com/ontodev/robot/pull/1119
 [#1100]: https://github.com/ontodev/robot/pull/1100
 [#1091]: https://github.com/ontodev/robot/issues/1091
diff --git a/docs/examples/subset_result.owl b/docs/examples/subset_result.owl
index d79a8139..49e751c2 100644
--- a/docs/examples/subset_result.owl
+++ b/docs/examples/subset_result.owl
@@ -25,21 +25,23 @@
     <!-- http://www.geneontology.org/formats/oboInOwl#hasDbXref -->
 
     <owl:AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#hasDbXref">
-        <rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">database_cross_reference</rdfs:label>
+        <rdfs:label>database_cross_reference</rdfs:label>
     </owl:AnnotationProperty>
     
 
 
     <!-- http://www.geneontology.org/formats/oboInOwl#id -->
 
-    <owl:AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#id"/>
+    <owl:AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#id">
+        <rdfs:label>id</rdfs:label>
+    </owl:AnnotationProperty>
     
 
 
     <!-- http://www.geneontology.org/formats/oboInOwl#inSubset -->
 
     <owl:AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#inSubset">
-        <rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">in_subset</rdfs:label>
+        <rdfs:label>in_subset</rdfs:label>
     </owl:AnnotationProperty>
     
 
@@ -47,7 +49,7 @@
     <!-- http://www.geneontology.org/formats/oboInOwl#shorthand -->
 
     <owl:AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#shorthand">
-        <rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">shorthand</rdfs:label>
+        <rdfs:label>shorthand</rdfs:label>
     </owl:AnnotationProperty>
     
 
@@ -66,10 +68,10 @@
     <!-- http://purl.obolibrary.org/obo/BFO_0000050 -->
 
     <owl:ObjectProperty rdf:about="http://purl.obolibrary.org/obo/BFO_0000050">
-    	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#TransitiveProperty"/>
-        <oboInOwl:hasDbXref rdf:datatype="http://www.w3.org/2001/XMLSchema#string">BFO:0000050</oboInOwl:hasDbXref>
-        <oboInOwl:id rdf:datatype="http://www.w3.org/2001/XMLSchema#string">part_of</oboInOwl:id>
-        <oboInOwl:shorthand rdf:datatype="http://www.w3.org/2001/XMLSchema#string">part_of</oboInOwl:shorthand>
+        <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#TransitiveProperty"/>
+        <oboInOwl:hasDbXref>BFO:0000050</oboInOwl:hasDbXref>
+        <oboInOwl:id>part_of</oboInOwl:id>
+        <oboInOwl:shorthand>part_of</oboInOwl:shorthand>
     </owl:ObjectProperty>
     
 
@@ -88,7 +90,7 @@
     <!-- http://purl.obolibrary.org/obo/ONT_1 -->
 
     <owl:Class rdf:about="http://purl.obolibrary.org/obo/ONT_1">
-        <oboInOwl:id rdf:datatype="http://www.w3.org/2001/XMLSchema#string">ONT:1</oboInOwl:id>
+        <oboInOwl:id>ONT:1</oboInOwl:id>
         <oboInOwl:inSubset rdf:resource="http://purl.obolibrary.org/obo/test#foo"/>
     </owl:Class>
     
@@ -103,11 +105,12 @@
                 <owl:someValuesFrom rdf:resource="http://purl.obolibrary.org/obo/ONT_1"/>
             </owl:Restriction>
         </rdfs:subClassOf>
-        <oboInOwl:id rdf:datatype="http://www.w3.org/2001/XMLSchema#string">ONT:5</oboInOwl:id>
+        <oboInOwl:id>ONT:5</oboInOwl:id>
         <oboInOwl:inSubset rdf:resource="http://purl.obolibrary.org/obo/test#foo"/>
     </owl:Class>
 </rdf:RDF>
 
 
 
-<!-- Generated by the OWL API (version 4.5.9) https://github.com/owlcs/owlapi -->
\ No newline at end of file
+<!-- Generated by the OWL API (version 4.5.26) https://github.com/owlcs/owlapi -->
+
diff --git a/pom.xml b/pom.xml
index 02d33cc3..dd685cc0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -166,7 +166,7 @@
     <dependency>
       <groupId>net.sourceforge.owlapi</groupId>
       <artifactId>owlapi-api</artifactId>
-      <version>4.5.25</version>
+      <version>4.5.26</version>
       <exclusions>
         <exclusion>
           <groupId>com.google.code.findbugs</groupId>
@@ -177,7 +177,7 @@
     <dependency>
       <groupId>net.sourceforge.owlapi</groupId>
       <artifactId>owlapi-apibinding</artifactId>
-      <version>4.5.25</version>
+      <version>4.5.26</version>
       <exclusions>
         <exclusion>
           <groupId>com.google.code.findbugs</groupId>
@@ -188,7 +188,7 @@
     <dependency>
       <groupId>net.sourceforge.owlapi</groupId>
       <artifactId>owlapi-rio</artifactId>
-      <version>4.5.25</version>
+      <version>4.5.26</version>
       <exclusions>
         <exclusion>
           <groupId>com.google.code.findbugs</groupId>
diff --git a/robot-core/pom.xml b/robot-core/pom.xml
index c9ebd9f9..8f8334e7 100644
--- a/robot-core/pom.xml
+++ b/robot-core/pom.xml
@@ -86,7 +86,7 @@
     <dependency>
       <groupId>net.sourceforge.owlapi</groupId>
       <artifactId>owlapi-api</artifactId>
-      <version>4.5.25</version>
+      <version>4.5.26</version>
       <exclusions>
         <exclusion>
           <groupId>com.google.code.findbugs</groupId>
@@ -97,7 +97,7 @@
     <dependency>
       <groupId>net.sourceforge.owlapi</groupId>
       <artifactId>owlapi-apibinding</artifactId>
-      <version>4.5.25</version>
+      <version>4.5.26</version>
       <exclusions>
         <exclusion>
           <groupId>com.google.code.findbugs</groupId>
@@ -108,7 +108,7 @@
     <dependency>
       <groupId>net.sourceforge.owlapi</groupId>
       <artifactId>owlapi-rio</artifactId>
-      <version>4.5.25</version>
+      <version>4.5.26</version>
       <exclusions>
         <exclusion>
           <groupId>com.google.code.findbugs</groupId>


Test patch:
diff --git a/robot-core/src/test/resources/subset_result.owl b/robot-core/src/test/resources/subset_result.owl
index 480b49d7..1d49b022 100644
--- a/robot-core/src/test/resources/subset_result.owl
+++ b/robot-core/src/test/resources/subset_result.owl
@@ -25,21 +25,22 @@
     <!-- http://www.geneontology.org/formats/oboInOwl#hasDbXref -->
 
     <owl:AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#hasDbXref">
-        <rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">database_cross_reference</rdfs:label>
+        <rdfs:label>database_cross_reference</rdfs:label>
     </owl:AnnotationProperty>
     
 
 
     <!-- http://www.geneontology.org/formats/oboInOwl#id -->
 
-    <owl:AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#id"/>
-    
+    <owl:AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#id">
+        <rdfs:label>id</rdfs:label>
+    </owl:AnnotationProperty>
 
 
     <!-- http://www.geneontology.org/formats/oboInOwl#inSubset -->
 
     <owl:AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#inSubset">
-        <rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">in_subset</rdfs:label>
+        <rdfs:label>in_subset</rdfs:label>
     </owl:AnnotationProperty>
     
 
@@ -47,7 +48,7 @@
     <!-- http://www.geneontology.org/formats/oboInOwl#shorthand -->
 
     <owl:AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#shorthand">
-        <rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">shorthand</rdfs:label>
+        <rdfs:label>shorthand</rdfs:label>
     </owl:AnnotationProperty>
     
 
@@ -67,9 +68,9 @@
 
     <owl:ObjectProperty rdf:about="http://purl.obolibrary.org/obo/BFO_0000050">
         <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#TransitiveProperty"/>
-        <oboInOwl:hasDbXref rdf:datatype="http://www.w3.org/2001/XMLSchema#string">BFO:0000050</oboInOwl:hasDbXref>
-        <oboInOwl:id rdf:datatype="http://www.w3.org/2001/XMLSchema#string">part_of</oboInOwl:id>
-        <oboInOwl:shorthand rdf:datatype="http://www.w3.org/2001/XMLSchema#string">part_of</oboInOwl:shorthand>
+        <oboInOwl:hasDbXref>BFO:0000050</oboInOwl:hasDbXref>
+        <oboInOwl:id>part_of</oboInOwl:id>
+        <oboInOwl:shorthand>part_of</oboInOwl:shorthand>
     </owl:ObjectProperty>
     
 
@@ -88,7 +89,7 @@
     <!-- http://purl.obolibrary.org/obo/ONT_1 -->
 
     <owl:Class rdf:about="http://purl.obolibrary.org/obo/ONT_1">
-        <oboInOwl:id rdf:datatype="http://www.w3.org/2001/XMLSchema#string">ONT:1</oboInOwl:id>
+        <oboInOwl:id>ONT:1</oboInOwl:id>
         <oboInOwl:inSubset rdf:resource="http://purl.obolibrary.org/obo/test#foo"/>
     </owl:Class>
     
@@ -103,7 +104,7 @@
                 <owl:someValuesFrom rdf:resource="http://purl.obolibrary.org/obo/ONT_1"/>
             </owl:Restriction>
         </rdfs:subClassOf>
-        <oboInOwl:id rdf:datatype="http://www.w3.org/2001/XMLSchema#string">ONT:5</oboInOwl:id>
+        <oboInOwl:id>ONT:5</oboInOwl:id>
         <oboInOwl:inSubset rdf:resource="http://purl.obolibrary.org/obo/test#foo"/>
     </owl:Class>
 </rdf:RDF>