owlcollab / oboformat

Automatically exported from code.google.com/p/oboformat
5 stars 2 forks source link

Curly braces in comments #78

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
See:

http://oboformat.googlecode.com/svn/trunk/src/test/resources/fbbt_comment_test.o
bo

{}s should be escaped in comments. The parser should optionally automatically 
repair (as OE does) or throw a more graceful warning than:

obolib-obo2owl src/test/resources/fbbt_comment_test.obo
CMDARGS= src/test/resources/fbbt_comment_test.obo
/usr/bin/java -d64 -Xmx2048M -Xms2048M -DentityExpansionLimit=512000 
-DlauncherDir=/Users/cjm/Eclipse/workspace/oboformat/bin -jar 
/Users/cjm/Eclipse/workspace/oboformat/bin/oboformat-all.jar 
src/test/resources/fbbt_comment_test.obo
2012-09-21 15:11:34,269 WARN  
org.obolibrary.oboformat.parser.OBOFormatParser.parseQual(OBOFormatParser.java:1
265)  - qualifier values should be enclosed in quotes. You have: 
GawB}VGlut[OK371] [FBti0076967] (Gao et al., 2008).=
2012-09-21 15:11:34,377 INFO  
org.obolibrary.cli.OBORunner.runConversion(OBORunner.java:146)  - saving to 
test,file:/Users/cjm/Eclipse/workspace/oboformat/./test.owl via RDF/XML
Exception in thread "main" 
org.semanticweb.owlapi.model.OWLOntologyStorageException: 
http://www.geneontology.org/formats/oboInOwl#GawB}VGlut[OK371] [FBti0076967] 
(Gao et al., 2008).
        at org.coode.owlapi.rdf.rdfxml.RDFXMLOntologyStorer.storeOntology(RDFXMLOntologyStorer.java:84)
        at org.semanticweb.owlapi.util.AbstractOWLOntologyStorer.storeOntology(AbstractOWLOntologyStorer.java:94)
        at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.saveOntology(OWLOntologyManagerImpl.java:838)
        at org.obolibrary.cli.OBORunner.runConversion(OBORunner.java:147)
        at org.obolibrary.cli.OBORunner.main(OBORunner.java:89)
Caused by: org.coode.xml.IllegalElementNameException: Illegal Element Name 
(Element Is Not A QName): 
http://www.geneontology.org/formats/oboInOwl#GawB}VGlut[OK371] [FBti0076967] 
(Gao et al., 2008).
        ... 5 more

Original issue reported on code.google.com by cmung...@gmail.com on 21 Sep 2012 at 10:13

GoogleCodeExporter commented 9 years ago
Additional nodes:

we should ensure compatibility with OE. It seems the case that:

 * If a comment tag-val line ends with a syntactically correct trailing qualifier, then it is treated as a trailing qualifier
 * Otherwise, if the comment line contains an unescaped '{' it will either
  * 1. repair this by escaping with '\'
  * 2. throw an error

I revise my initial recommendation. I think we should allow trailing qualifiers 
on comments (this will be useful in general), translated to axiom annotations 
as usual. Unescaped trailing qualifiers are errors - we may want to provide 
repairs, but this may be hard to implement as we aren't sticking to the 
grammar, so I think it is fine to throw errors with unescaped '{'s. 

In fact I believe this is the current behavior, so nothing need be changed in 
the implementation here.

Original comment by cmung...@gmail.com on 29 Nov 2012 at 8:28

GoogleCodeExporter commented 9 years ago

Original comment by cmung...@gmail.com on 29 Nov 2012 at 8:28