Jena won't connect to custom online file

51 views Asked by At

I tried to connect Jena to my custom file which I stored on a public directory on Dropbox with the following link https://www.dropbox.com/s/d3gfidqqfwvo4e9/foaf.ttl?dl=1.

I've intentionally changed the link to dl=1 instead of dl=0 so the link would show directly to the file instead of the Dropbox folder.

In Netbeans I have the following code:

    final String url = "https://www.dropbox.com/s/d3gfidqqfwvo4e9/foaf.ttl?dl=1";
    final Model model = ModelFactory.createDefaultModel();
    model.read(url,"TURTLE");
    model.write(System.out);

And on the output the only thing I get is:

    <rdf:RDF
        xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
    </rdf:RDF>

Any help on why I can't get the entire model?

1

There are 1 answers

0
Ivan Janev On BEST ANSWER

The actual problem was the Dropbox. Their servers had a problem during the day of my testing and now the code works perfectly.