Amit, you are referring to the SPIN RDF form?  This is an RDF format and is independent of Jena.

The easiest way to get the string form is to open the query in Composer ;-)  If the SPIN RDF sub-graph is the value for a spin:command or any subproperty of (including spin:rule and spin:query), then it will appear in the Composer form as a query.

You can convert queries from SPIN RDF format to a string through the online service at http://spinservices.org/spinrdfconverter.html.  Also, the function spif:convertSPINRDFToString( will return a string representation of a SPARQL query.  For example:

SELECT ?sparqlString
{  ?queryProp rdfs:subPropertyOf* spin:command .
   ?s ?queryProp ?query .
   BIND (spif:convertSPINRDFToString(?query) AS ?sparqlString)
}

-- Scott

On 9/15/11 4:15 AM, Amit Jain wrote:
Hi
I am trying to get the query back in text format from a SPIN query model which is in a Jena Model form. But not able to figure it out? I know there is a sp:text property that allows to store the original query along with the model but i am trying to avoid it and would like to create the textual representation on the fly from the stored model.
thanks
-amit
--
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

--
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

Reply via email to