shalinshah1993 / SBSCL

The Systems Biology Simulation Core Library (SBSCL) provides an efficient and exhaustive Java implementation of methods to interpret the content of models encoded in the Systems Biology Markup Language (SBML) and its numerical solution.
https://draeger-lab.github.io/SBSCL/
GNU Lesser General Public License v3.0
0 stars 2 forks source link

SED-ML FileResolver is broken #32

Closed matthiaskoenig closed 6 years ago

matthiaskoenig commented 6 years ago

It seems to me that the SED-ML file resolver is not working correctly. When trying to resolve relative URIs for models it resolves them relative to the current working directory, but it should resolve relative to the SED-ML absolute path!

This breaks the following test, which relies on a model abc_1.xml located next to the SED-ML file sed1.xml.

@Test
public final void testBasicSEDMLExecutorForLocalFile() throws XMLException, IOException 
shalinshah1993 commented 6 years ago

I checked the code, it seems like jlibsedml issue. Our code already has FileModelResolver added in the code whose getModelXMLFor() method should check for the model in the current directory. Can you please point out this issue to Richard Adams or someone else from jlibsedml? I am unable to find their GitHub page and their SourceForge page has disabled create a ticket for bugs.

matthiaskoenig commented 6 years ago

I commited a fix for this. Currently the SED-ML executor is initialized with a sedml object. Because this object has no knowledge about the base directory the file was in the models with relative paths could not work. One needs to provide the base directory of the sedml file which is than used to resolve model files with relative paths.

shalinshah1993 commented 6 years ago

This issue was moved to draeger-lab/SBSCL#22