简体   繁体   中英

Jena won't connect to custom online file

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM