Hi Frank,

Using bound="false" when a result variable is unbound (null) is what
the old version of the SPARQL results format[1] required.

The latest version of the specification[2] says to omit the element
altogether, which means doing the null check a bit earlier in the
process so the whole element can be skipped.

- Chris

[1] http://www.w3.org/TR/2004/WD-rdf-sparql-XMLres-20041221/
[2] http://www.w3.org/TR/2008/REC-rdf-sparql-XMLres-20080115/

On Fri, May 11, 2012 at 6:39 AM, frank asseg <frank.as...@congrace.de> wrote:
> Hola guys!
>
> When implementing a SparqleW3CTupleWriter for
> https://jira.duraspace.org/browse/FCREPO-1023 in Trippi, which i
> basically copied from SparqlTupleWriter, i stumbled upon this null check in
> https://github.com/fcrepo/trippi/blob/master/trippi-core/src/main/java/org/trippi/io/SparqlTupleWriter.java
> at line 55:
>
> ...
> Node n = result.get(names[i]);
> if ( n == null ) {
>     m_out.println(" bound=\"false\"/>");
> } else if ( n instanceof URIReference ) {
> ...
>
> Im not quite sure how to handle this null checks in a Tuple Writer
> conforming to the docuemtnation at http://www.w3.org/TR/rdf-sparql-XMLres/
>
>
> Can you give me a hint on how to handle these null nodes?
>
> --
> *frank asseg*
> softwareentwicklung
> feichtmayrstrasse 37
> 76646 bruchsal
> tel.: ++49-7251-322-6073
> fax.: ++49-7251-322-6078
> mail: frank.as...@congrace.de
> web: http://www.congrace.de/

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Fedora-commons-developers mailing list
Fedora-commons-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers

Reply via email to