Search code examples
graphdb

Using relative paths in imports parameter of GDB repository configuration?


According to the GDB documentation, it seems like it should be possible to use relative paths in the imports parameter of a GDB repository configuration. But I cannot make it work! Does anyone know how relative paths are resolved?


Solution

  • GraphDB will check the value of these two parameters:

                owlim:defaultNS "http://myFile1.defaultprefix.com;http://defaultNS2.com" ;
                owlim:imports "myFile1.ttl;myfile2.ttl" ;
    

    Please make sure that the parameters both have the same length; otherwise, the database will not know what the default prefix for each file is.

    The database will search the files in the $GDB_HOME/bin path.

    Edit on 24/04/2020:

    GraphDB uses the home directory of the process, which by default will match $GDB_HOME/bin. Still, in the general case, this is not always true so the correct way of converting the relative path into absolute is to check the home directory of the process with sudo lsof -p <pid> | grep cwd.