Hi,

I'm trying to understand what the purpose/usage of StreamRDF.base() is.

Isn't it supposed to set the base URI that relative URIs in the stream
resolve against?

I've made a simple test:

    StreamRDF rdfStream = StreamRDFLib.writer(new BufferedWriter(new
OutputStreamWriter(System.out)));
    rdfStream.start();
    rdfStream.base("http://localhost/";);
    rdfStream.triple(new Triple(NodeFactory.createBlankNode(),
NodeFactory.createURI("relative"), NodeFactory.createBlankNode()));
    rdfStream.finish();

The output I get:

_:Bf410fc50X2De0baX2D464eX2D996eX2Dbb3207090baa <relative>
_:B4b65b796X2D3561X2D4bf3X2Dbf31X2D1154aac0c816 .

Why is the property URI <relative> and not <http://localhost/relative>?
Doesn't that make the output invalid N-Triples? Or am I writing it wrong?

Martynas
atomgraph.com

Reply via email to