user1965449
user1965449

Reputation: 2931

Apache Jena ARQ string representation

I have a Apache Jena ARQ SPARQL query of the form

SELECT DISTINCT  (count(*) AS ?rowCount) ......

The rowCount value is coming in as 1^^http://www.w3.org/2001/XMLSchema#integer

This is causing problems in parsing the integer value , how do I ensure that only the number in this case 1 is returned?

Thanks.

Upvotes: 0

Views: 71

Answers (1)

AndyS
AndyS

Reputation: 16700

That is the number 1 - an xsd:integer with lexical form "1". You have shown it in full form. Syntaxes like Turle write it a 1 (no quotes) - it's just a short hand abbreviation for "1"^^xsd:integer.

If you want just the lexical part, get the literal then parse the lexical form (Literal.getLexicalForm).

Upvotes: 2

Related Questions