On 2018/08/13 19:44:57, didac.montero.men...@gmail.com 
<didac.montero.men...@gmail.com> wrote: 
> 
> 
> On 2018/08/13 19:42:52, ajs6f <aj...@apache.org> wrote: 
> > That response to that question is from Jan 10 of this year. RDFParser 
> > didn't even exist until recently. Andy and Rob give a set of pretty 
> > complete answers at that question starting in December, and the information 
> > is completely up-to-date, as far as I can see. 
> > 
> > ajs6f
> > 
> > > On Aug 13, 2018, at 3:36 PM, didac.montero.men...@gmail.com wrote:
> > > 
> > > I'm converting from JSON-LD to Jena using the following:
> > > Model model     = ModelFactory.createDefaultModel()
> > > RDFParser.create.fromString(json).base("").lang(Lang.JSONLD).parse(StreamRDFLib.graph(model.getGraph))
> > > And having the following JSON-LD:
> > > {
> > >  "@id": "http://example.com/id";,
> > >  "@type": "Person",
> > >  "name": "a"
> > > }
> > > It will generate a model with the triple:
> > > http://example.com/id @http://www.w3.org/1999/02/22-rdf-syntax-ns#type 
> > > file:///some/path/Person
> > > 
> > > I want the model to fail, throw an exception when some field is supposed 
> > > to be an @id but it isn't and not to make up an id from my file path (If 
> > > I expose this to the outside world is a big security issue).
> > > 
> > > Is the way to go as described on this StackOverflow response: 
> > > https://stackoverflow.com/questions/47763738/jena-relative-uri-base#answer-48178761
> > > 
> > > or is there a better way (note the response is from 2010)
> > 
> > My bad, I just misread the reply time. Sorry. Then I will do it this way. 
> > Thanks a lot
In any case

I see when the method createURI in FactoryRDFStd gets called, the 
"file:///some/path" fragment has already been prepended to the "Person" string 
(in the JSON-LD example). Is there a way or a place to intercept it before this 
happens? Because now I don't know if the customer really put that or if it got 
prepended by Jena

Reply via email to