JPL-IMCE / gov.nasa.jpl.imce.oml.converters

Converters among supported representations of OML models (textual, owl2-dl+swrl, tabular)
2 stars 1 forks source link

Converter is unable to read oml.catalog.xml if it is in a directory that contains spaces #49

Closed sjiherzig closed 6 years ago

sjiherzig commented 6 years ago

The converter currently reports that it cannot find any files, and no rewrite rules, if the oml catalog can not be found (no file not found exception is thrown). This leads to no conversion taking place. Running the converter, and pointing to a catalog file that is contained in a directory structure that contains no directories with spaces works fine.

Output if catalog is located in a directory a la /Some/Directory with Spaces/oml.catalog.xml:

LMC-051695:ontologies sherzig$ OMLConverters/bin/omlConverter text -v:files --cat ./oml.catalog.xml -o
Resolved 0 files across 0 catalog rewrite rules.
### 1 Conversion Errors! ###
No OML files found for OML Catalog: /Applications/OML Workbench/OML Workbench 0.8.app/Contents/MacOS/workspace/gov.nasa.jpl.imce.caesar.adapters.magicdraw/gov.nasa.jpl.caesar.adapters.magicdraw.transformation/ontologies/oml.catalog.xml
java.lang.IllegalArgumentException: No OML files found for OML Catalog: /Applications/OML Workbench/OML Workbench 0.8.app/Contents/MacOS/workspace/gov.nasa.jpl.imce.caesar.adapters.magicdraw/gov.nasa.jpl.caesar.adapters.magicdraw.transformation/ontologies/oml.catalog.xml
    at gov.nasa.jpl.imce.oml.converters.OMLCatalogScope$$anonfun$toOMLCatalogScope$2$$anonfun$apply$6.apply(OMLCatalogScope.scala:95)
    at gov.nasa.jpl.imce.oml.converters.OMLCatalogScope$$anonfun$toOMLCatalogScope$2$$anonfun$apply$6.apply(OMLCatalogScope.scala:54)
    at scalaz.$bslash$div.flatMap(Either.scala:135)
    at gov.nasa.jpl.imce.oml.converters.OMLCatalogScope$$anonfun$toOMLCatalogScope$2.apply(OMLCatalogScope.scala:54)
    at gov.nasa.jpl.imce.oml.converters.OMLCatalogScope$$anonfun$toOMLCatalogScope$2.apply(OMLCatalogScope.scala:50)
    at scalaz.$bslash$div.flatMap(Either.scala:135)
    at gov.nasa.jpl.imce.oml.converters.OMLCatalogScope$.toOMLCatalogScope(OMLCatalogScope.scala:50)
    at gov.nasa.jpl.imce.oml.converters.OMLConverter$.main(OMLConverter.scala:388)
    at gov.nasa.jpl.imce.oml.converters.OMLConverter.main(OMLConverter.scala)

Output if it is located in a directory a la /Some/DirectoryWithNoSpaces/oml.catalog.xml:

...
=> 55 resolved based on the rewrite rule for: (/Users/sherzig/tmp20180215/ontologies/imce.jpl.nasa.gov,http://imce.jpl.nasa.gov/)
...
NicolasRouquette commented 6 years ago

Please indicate which version of the converter you used.