Hello,

We’re having some difficulties using the OntDocumentManager properly. I’ve put 
together a test app <https://pastebin.com/CUebj548> that exercises several 
usages.

I am running it in eclipse with references to the jena libs from 3.15-SNAPSHOT 
<https://github.com/apache/jena> which I built locally via

>     mvn clean install -Pdev

other than this, the test app is standalone. The

>       private static final String OUT = <local directory path for output ttl 
> files>;
>       private static final String DS = <dataset URL for putting and fetching 
> models/graphs>;


need to be set properly as indicated.

There are several things that don’t seem to work as expected from the docs:

1) The code:

>     OntModel om = odm.getOntology(ontUri, oms); 

returns a model w/ just the contents of the file located via baseURI:

>     http://purl.bdrc.io/shapes/core/PersonShapes/ 
> <http://purl.bdrc.io/shapes/core/PersonShapes/>
from the ont-policy.rdf 
<https://raw.githubusercontent.com/buda-base/editor-templates/master/ont-policy.rdf>,
 regardless of the setting:

>      odm.setProcessImports(true or false);

The javadocs indicate that if true the imports should be processed by 
getOntology, but this isn’t happening at this point?


2) However, when

>       String graphName = BDG+graphLocalName;
>         fuConn.put(graphName, om);


Then the graph is stored on Fuseki with the given graphName and if

>      odm.setProcessImports(true);


then the imported triples appear in the graph on Fuseki even though they don’t 
appear to be present in local OntModel, om, in the app.

It’s almost like the fuConn.put() causes the imports to be loaded on-the-fly.

Why is this?


3) Finally, contrary the javadocs:

>     om.loadImports();

does not lead to loading the imports when:

>      odm.setProcessImports(true or false);

Why?


I’m sure I’ve mucked up something but I don’t see it.

Thanks for help on this,
Chris



Reply via email to