Hi Reto,

Let me put it differently. If Clerezza is complient with [1] or [2] what
would the response look like if the query has no results? In particular
the head [3] section.  IMO this section can not be constructed without
meta data as there are no results to derive the information from.
Looking at the code for ResultSetMessageBodyWriter I think it will even
NPE in the method createVariable if a no entries ResultSet is supplied.

On the other hand Apache Jena has a ResultSet with metadata. This class
contains the following method.

    public List<String> getResultVars() ;

Regards,

Minto

[1] http://www.w3.org/TR/rdf-sparql-XMLres/
[2] http://www.w3.org/TR/rdf-sparql-json-res/
[3] http://www.w3.org/TR/rdf-sparql-XMLres/#head

Op 19-3-2013 15:33, Reto Bachmann-Gmür schreef:
> Hi Minto
>
> If I'm not mistaken the situation for SQL is a bit different as the
> metadata of the result cannot be infered from the query. With Sparql I
> don't see how this metadata would be dependent on the actual result.
>
> Maybe Hasan can tell more about this.
>
> Cheers,
> Reto
>
> On Mon, Mar 18, 2013 at 10:19 PM, Minto van der Sluis <[email protected]> wrote:
>
>> Hi folks,
>>
>> Is it feasible to extend the current sparqle ResultSet with an interface
>> to extract metadata without consuming the resultset. I was thinking of
>> something like java.sql.ResultSetMetaData.
>>
>> Why?
>> I've created sort of a decorator to show some metadata of a ResultSet
>> and I had to consume the resultset to find out which columns were there.
>> However the current situation allows to consume the ResultSet only once.
>>
>> It probably is feasible. The question is more like, if I create a patch
>> will it be accepted?
>>
>> Regards,
>>
>> Minto
>>
>> --
>> ir. ing. Minto van der Sluis
>> Software innovator / renovator
>> Xup BV
>>
>>


-- 
ir. ing. Minto van der Sluis
Software innovator / renovator
Xup BV

Mobiel: +31 (0) 626 014541

Reply via email to