Paul,

1/
Is this what you are looking for?

https://lists.apache.org/thread.html/ce96d4d873f94f9c547b5cf5df3900a421c96487cde5b90155c9f9fc@%3Cusers.jena.apache.org%3E

Otherwise, get as a string and do a regex replace on it.

The Lang is a hint if all other determination fails, not an override.
If the far end says its XYZ and correct, RIOT believes it. :-)

2/ Or as it is saying.
   http://dbpedia.org/data/David_Bowie.jsonld




DBpedia does not provide NT (application/n-triples in UTF-8 or text/plain in ASCII).

> {"/data/David_Bowie.nt" 0.800000 {type text/rdf+n3}

Looks like a DBpedia configuration bug to me.

It does not deliver N-Triples for David_Bowie.nt

        Andy

Exercise for the reader: contribute a builder pattern for data fetch requests.


On 26/01/17 23:00, Paul Houle wrote:
Hello,

      I am having trouble loading the following URI from dbpedia:

http://dbpedia.org/resource/David_Bowie

     The Turtle returned here is ill-formed (has an en dash in a
     prefixed name) and I want to work around it by getting the result
     in some other language,  such as NT or JSON-LD which will hopefully
     not be so ill-formed.   Dbpedia supports a wide range of formats,
     such as

Alternates: {"/data/David_Bowie.atom" 0.500000 {type
application/atom+xml}}, {"/data/David_Bowie.jrdf" 0.600000 {type
application/rdf+json}}, {"/data/David_Bowie.jsod" 0.500000 {type
application/odata+json}}, {"/data/David_Bowie.json" 0.6
00000 {type application/json}}, {"/data/David_Bowie.jsonld" 0.500000
{type application/ld+json}}, {"/data/David_Bowie.n3
" 0.800000 {type text/n3}}, {"/data/David_Bowie.nt" 0.800000 {type
text/rdf+n3}}, {"/data/David_Bowie.ttl" 0.700000 {type text/turtle}},
{"/data/David_Bowie.xml" 0.950000 {type application/rdf+xml}}

I try the following

        Model world= RDFDataMgr.loadModel(sourceUri,Lang.JSONLD);

which I imagined would work,  but it looks like it still fetches the
Turtle and fails to parse it.  Is there an easy workaround other than
fetching the data myself?

Reply via email to