Re: StreamRDF.base()

2019-08-15 Thread Andy Seaborne
On 15/08/2019 13:02, Claude Warren wrote: Learn something new every day... On Wed, Aug 14, 2019 at 5:44 PM Andy Seaborne wrote: (and it is technically wrong to have a # in the base) so as a base "http://example.com/myfile.txt#; is incorrect but " http://example.com/myfile.txt/; is

Re: StreamRDF.base()

2019-08-15 Thread Claude Warren
Learn something new every day... On Wed, Aug 14, 2019 at 5:44 PM Andy Seaborne wrote: > > > > (and it is technically wrong to have a # in the base) > > so as a base "http://example.com/myfile.txt#; is incorrect but " http://example.com/myfile.txt/; is correct? or technically does the last

Re: StreamRDF.base()

2019-08-14 Thread Andy Seaborne
On 14/08/2019 12:30, Martynas Jusevičius wrote: And if I want hash URIs such as then I need to do IRIResolver.create("https://localhost/ontology;).resolve("#term") IRIResolver resolver = IRIResolver.create("https://localhost/ontology;); ...

Re: StreamRDF.base()

2019-08-14 Thread Martynas Jusevičius
And if I want hash URIs such as then I need to do IRIResolver.create("https://localhost/ontology;).resolve("#term") rather than IRIResolver.create("https://localhost/ontology#;).resolve("term") which would produce instead,

Re: StreamRDF.base()

2019-08-14 Thread Andy Seaborne
Yes. More efficient is to create a resolver with IRIResolver.create and use that. Includes caching of resolved strings. See the turtle parser. Andy On 14/08/2019 11:28, Martynas Jusevičius wrote: OK, more or less what I suspected. And IRIResolver.resolve(String relStr, String baseStr)

Re: StreamRDF.base()

2019-08-14 Thread Martynas Jusevičius
OK, more or less what I suspected. And IRIResolver.resolve(String relStr, String baseStr) can be used by the parser for said URI resolution? https://jena.apache.org/documentation/javadoc/arq/org/apache/jena/riot/system/IRIResolver.html#resolve-java.lang.String-java.lang.String- So far I'm not

Re: StreamRDF.base()

2019-08-14 Thread Andy Seaborne
StreamRDF is an interface called by parsers (and other things) based on what it sees. If in, say Turtle, teh pasrer sees a "BASE" then base(...) is called. StreamRDF (it is an interface) does not do anything - its a stream of incoming RDF for the implementation to deal with.

Re: StreamRDF.base()

2019-08-14 Thread Claude Warren
The StreamRDF just passed the base() argument on to the sink so that the sink would have the base in order to set create the FQ URI from local URIs. StreamRDFLib simply ignores the base() call. I assume this is because it is intended to process fully qualified RDF. I think the assumption is