Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to create properties with a characteristic set to '' #716

Closed
bjonnh opened this issue Jul 31, 2020 · 1 comment · Fixed by #719
Closed

Impossible to create properties with a characteristic set to '' #716

bjonnh opened this issue Jul 31, 2020 · 1 comment · Fixed by #719
Assignees

Comments

@bjonnh
Copy link
Contributor

bjonnh commented Jul 31, 2020

**Robot version ** 1.7.0

** Problem ** When trying to create properties from a template, I get a index out of bound error
It seems to work without the CHARACTERISTIC column. When playing around I had another error message that said that the characteristic '' was not valid, but I couldn't find how I got that one.

It works if they are both set to transitive, so it seems that the empty characteristic should be handled?

** Source file **

id,type,Label,comment,characteristic
ID,TYPE,A rdfs:label,A rdfs:comment,CHARACTERISTIC SPLIT=|
nav:x,owl:ObjectProperty,x,x,
nav:y,owl:ObjectProperty,y,y,transitive

**Output with -vvv **

        --ontology-iri "https://onto.nprod.net/nav.owl" \
        --prefix "ero:http://purl.obolibrary.org/obo/ERO_" --prefix "nav:https://onto.nprod.net/NAV_" \
        --output tables/current/properties.owl
2020-07-31 17:24:33,903 DEBUG org.semanticweb.owlapi.utilities.Injector - Loading file META-INF/services/org.semanticweb.owlapi.model.OWLOntologyManager
2020-07-31 17:24:33,905 DEBUG org.semanticweb.owlapi.utilities.Injector - Loading URL for service jar:file:XXX/2020-newnavigator/local/robot.jar!/META-INF/services/org.semanticweb.owlapi.model.OWLOntologyManager
2020-07-31 17:24:33,906 DEBUG org.semanticweb.owlapi.utilities.Injector - Loading URL for service jar:file:XXX/2020-newnavigator/local/robot.jar!/META-INF/services/org.semanticweb.owlapi.model.OWLOntologyManager
2020-07-31 17:24:33,906 DEBUG org.semanticweb.owlapi.utilities.Injector - Loading URL for service jar:file:XXX/2020-newnavigator/local/robot.jar!/META-INF/services/org.semanticweb.owlapi.model.OWLOntologyManager
2020-07-31 17:24:33,943 DEBUG org.semanticweb.owlapi.utilities.Injector - Loading file META-INF/services/org.semanticweb.owlapi.model.OWLDataFactory
2020-07-31 17:24:33,944 DEBUG org.semanticweb.owlapi.utilities.Injector - Loading URL for service jar:file:XXX/2020-newnavigator/local/robot.jar!/META-INF/services/org.semanticweb.owlapi.model.OWLDataFactory
2020-07-31 17:24:33,944 DEBUG org.semanticweb.owlapi.utilities.Injector - Loading URL for service jar:file:XXX/2020-newnavigator/local/robot.jar!/META-INF/services/org.semanticweb.owlapi.model.OWLDataFactory
2020-07-31 17:24:33,945 DEBUG org.semanticweb.owlapi.utilities.Injector - Loading URL for service jar:file:XXX/2020-newnavigator/local/robot.jar!/META-INF/services/org.semanticweb.owlapi.model.OWLDataFactory
2020-07-31 17:24:34,278 DEBUG org.semanticweb.owlapi.utilities.Injector - Injecting object uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl@544820b7
2020-07-31 17:24:34,293 DEBUG org.semanticweb.owlapi.utilities.Injector - Loading file META-INF/services/org.semanticweb.owlapi.model.OWLOntologyIRIMapper
2020-07-31 17:24:34,294 DEBUG org.semanticweb.owlapi.utilities.Injector - No files found for META-INF/services/org.semanticweb.owlapi.model.OWLOntologyIRIMapper
2020-07-31 17:24:34,297 DEBUG org.semanticweb.owlapi.utilities.Injector - Injecting values [[]] on method public void uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.setIRIMappers(java.util.Set).
2020-07-31 17:24:34,299 DEBUG org.semanticweb.owlapi.utilities.Injector - Loading file META-INF/services/org.semanticweb.owlapi.model.OWLOntologyFactory
2020-07-31 17:24:34,300 DEBUG org.semanticweb.owlapi.utilities.Injector - Loading URL for service jar:file:XXX/2020-newnavigator/local/robot.jar!/META-INF/services/org.semanticweb.owlapi.model.OWLOntologyFactory
2020-07-31 17:24:34,300 DEBUG org.semanticweb.owlapi.utilities.Injector - Loading URL for service jar:file:XXX/2020-newnavigator/local/robot.jar!/META-INF/services/org.semanticweb.owlapi.model.OWLOntologyFactory
2020-07-31 17:24:34,300 DEBUG org.semanticweb.owlapi.utilities.Injector - Loading URL for service jar:file:XXX/2020-newnavigator/local/robot.jar!/META-INF/services/org.semanticweb.owlapi.model.OWLOntologyFactory
2020-07-31 17:24:34,305 DEBUG org.semanticweb.owlapi.utilities.Injector - Injecting values [[uk.ac.manchester.cs.owl.owlapi.OWLOntologyFactoryImpl@b7838a9]] on method public void uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.setOntologyFactories(java.util.Set).
2020-07-31 17:24:34,306 DEBUG org.semanticweb.owlapi.utilities.Injector - Loading file META-INF/services/org.semanticweb.owlapi.io.OWLParserFactory
2020-07-31 17:24:34,307 DEBUG org.semanticweb.owlapi.utilities.Injector - Loading URL for service jar:file:XXX/2020-newnavigator/local/robot.jar!/META-INF/services/org.semanticweb.owlapi.io.OWLParserFactory
2020-07-31 17:24:34,307 DEBUG org.semanticweb.owlapi.utilities.Injector - Loading URL for service jar:file:XXX/2020-newnavigator/local/robot.jar!/META-INF/services/org.semanticweb.owlapi.io.OWLParserFactory
2020-07-31 17:24:34,307 DEBUG org.semanticweb.owlapi.utilities.Injector - Loading URL for service jar:file:XXX/2020-newnavigator/local/robot.jar!/META-INF/services/org.semanticweb.owlapi.io.OWLParserFactory
2020-07-31 17:24:34,336 DEBUG org.semanticweb.owlapi.utilities.Injector - Injecting values [[org.semanticweb.owlapi.rio.RioTrigParserFactory@3a3e4aff, org.semanticweb.owlapi.rio.RioJsonLDParserFactory@1522d8a0, org.semanticweb.owlapi.rio.RioRDFaParserFactory@1c6804cd, org.semanticweb.owlapi.krss2.parser.KRSS2OWLParserFactory@58fe0499, org.semanticweb.owlapi.rio.RioTrixParserFactory@7e22550a, org.semanticweb.owlapi.rio.RioNQuadsParserFactory@b6b1987, org.semanticweb.owlapi.rio.RioN3ParserFactory@774698ab, org.semanticweb.owlapi.functional.parser.OWLFunctionalSyntaxOWLParserFactory@1cbf6e72, org.semanticweb.owlapi.manchestersyntax.parser.ManchesterOWLSyntaxOntologyParserFactory@6035b93b, org.semanticweb.owlapi.rdf.turtle.parser.TurtleOntologyParserFactory@5c00384f, org.semanticweb.owlapi.oboformat.OBOFormatOWLAPIParserFactory@62163b39, org.semanticweb.owlapi.rio.RioRDFXMLParserFactory@39ad977d, org.semanticweb.owlapi.rio.RioBinaryRdfParserFactory@4bc28c33, org.semanticweb.owlapi.rdf.rdfxml.parser.RDFXMLParserFactory@674658f7, org.semanticweb.owlapi.rio.RioNTriplesParserFactory@698122b2, org.semanticweb.owlapi.rio.RioTurtleParserFactory@7516e4e5, org.semanticweb.owlapi.owlxml.parser.OWLXMLParserFactory@fb9c7aa, org.semanticweb.owlapi.rio.RioJsonParserFactory@6bea52d4]] on method public void uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.setOntologyParsers(java.util.Set).
2020-07-31 17:24:34,337 DEBUG org.semanticweb.owlapi.utilities.Injector - Loading file META-INF/services/org.semanticweb.owlapi.model.OWLStorerFactory
2020-07-31 17:24:34,338 DEBUG org.semanticweb.owlapi.utilities.Injector - Loading URL for service jar:file:XXX/2020-newnavigator/local/robot.jar!/META-INF/services/org.semanticweb.owlapi.model.OWLStorerFactory
2020-07-31 17:24:34,338 DEBUG org.semanticweb.owlapi.utilities.Injector - Loading URL for service jar:file:XXX/2020-newnavigator/local/robot.jar!/META-INF/services/org.semanticweb.owlapi.model.OWLStorerFactory
2020-07-31 17:24:34,338 DEBUG org.semanticweb.owlapi.utilities.Injector - Loading URL for service jar:file:XXX/2020-newnavigator/local/robot.jar!/META-INF/services/org.semanticweb.owlapi.model.OWLStorerFactory
2020-07-31 17:24:34,350 DEBUG org.semanticweb.owlapi.utilities.Injector - Injecting values [[org.semanticweb.owlapi.rio.RioTrigStorerFactory@19ae6bb, org.semanticweb.owlapi.rio.RioNQuadsStorerFactory@42f48531, org.semanticweb.owlapi.rio.RioRDFXMLStorerFactory@505a9d7c, org.semanticweb.owlapi.dlsyntax.renderer.DLSyntaxHTMLStorerFactory@4fbda97b, org.semanticweb.owlapi.oboformat.OBOFormatStorerFactory@1080b026, org.semanticweb.owlapi.rio.RioTrixStorerFactory@72cf2de5, org.semanticweb.owlapi.owlxml.renderer.OWLXMLStorerFactory@75d0911a, org.semanticweb.owlapi.rio.RioNTriplesStorerFactory@1f2f9244, org.semanticweb.owlapi.krss2.renderer.KRSS2OWLSyntaxStorerFactory@7c2b6087, org.semanticweb.owlapi.manchestersyntax.renderer.ManchesterSyntaxStorerFactory@4b672daa, org.semanticweb.owlapi.rio.RioBinaryRdfStorerFactory@25e2a451, org.semanticweb.owlapi.functional.renderer.FunctionalSyntaxStorerFactory@22b53226, org.semanticweb.owlapi.rio.RioJsonLDStorerFactory@201b6b6f, org.semanticweb.owlapi.latex.renderer.LatexStorerFactory@27305e6, org.semanticweb.owlapi.rdf.rdfxml.renderer.RDFXMLStorerFactory@422c3c7a, org.semanticweb.owlapi.rio.RioTurtleStorerFactory@45c8d09f, org.semanticweb.owlapi.rio.RioJsonStorerFactory@3e5499cc, org.semanticweb.owlapi.rdf.turtle.renderer.TurtleStorerFactory@3b77a04f, org.semanticweb.owlapi.rio.RioN3StorerFactory@2a3c96e3, org.semanticweb.owlapi.dlsyntax.renderer.DLSyntaxStorerFactory@354fc8f0]] on method public void uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.setOntologyStorers(java.util.Set).
2020-07-31 17:24:34,388 DEBUG org.obolibrary.robot.ExceptionHelper - Missing exception ID: Index 4 out of bounds for length 4
Index 4 out of bounds for length 4
java.lang.IndexOutOfBoundsException: Index 4 out of bounds for length 4
        at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
        at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
        at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
        at java.base/java.util.Objects.checkIndex(Objects.java:372)
        at java.base/java.util.ArrayList.get(ArrayList.java:459)
        at org.obolibrary.robot.Template.getCharacteristics(Template.java:2188)
        at org.obolibrary.robot.Template.addObjectPropertyAxioms(Template.java:1002)
        at org.obolibrary.robot.Template.processRow(Template.java:721)
        at org.obolibrary.robot.Template.generateOutputOntology(Template.java:361)
        at org.obolibrary.robot.TemplateOperation.template(TemplateOperation.java:181)
        at org.obolibrary.robot.TemplateCommand.execute(TemplateCommand.java:147)
        at org.obolibrary.robot.CommandManager.executeCommand(CommandManager.java:248)
        at org.obolibrary.robot.CommandManager.execute(CommandManager.java:192)
        at org.obolibrary.robot.CommandManager.main(CommandManager.java:139)
        at org.obolibrary.robot.CommandLineInterface.main(CommandLineInterface.java:59)
@bjonnh
Copy link
Contributor Author

bjonnh commented Jul 31, 2020

If I put the CHARACTERISTICS SPLIT=| column before another column, then I get:

java.lang.Exception: template#UNKNOWN CHARACTERISTIC ERROR property 'NAV_x' has unknown characteristic '' at line 3, column 3 in table "tables/current/properties.csv".
        at org.obolibrary.robot.Template.addObjectPropertyAxioms(Template.java:1034)
        at org.obolibrary.robot.Template.processRow(Template.java:721)
        at org.obolibrary.robot.Template.generateOutputOntology(Template.java:361)
        at org.obolibrary.robot.TemplateOperation.template(TemplateOperation.java:181)
        at org.obolibrary.robot.TemplateCommand.execute(TemplateCommand.java:147)
        at org.obolibrary.robot.CommandManager.executeCommand(CommandManager.java:248)
        at org.obolibrary.robot.CommandManager.execute(CommandManager.java:192)
        at org.obolibrary.robot.CommandManager.main(CommandManager.java:139)
        at org.obolibrary.robot.CommandLineInterface.main(CommandLineInterface.java:59)

bjonnh added a commit to bjonnh/robot that referenced this issue Jul 31, 2020
This handle the two cases raised by this issue:
- we need to allow empty characteristics
- in the case of characteristics being the last	column,
  the list of elements in the row is one element short
  when the characteristic is empty, handling that case
bjonnh added a commit to bjonnh/robot that referenced this issue Jul 31, 2020
This handle the two cases raised by this issue:
- we need to allow empty characteristics
- in the case of characteristics being the last	column,
  the list of elements in the row is one element short
  when the characteristic is empty, handling that case
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants