If you have a "raw" reference to a SPIN query (or update request) in RDF, you can convert this to a Query object as follows:
Resource raw = ...; org.topbraid.spin.model.Query spinQuery = SPINFactory.asQuery(raw); from this you can produce a parsable string using String str = ARQFactory.get().createCommandString(spinQuery); or directly into a Jena Query using com.hp.hpl.jena.query.Query jenaQuery = ARQFactory.get().createQuery(spinQuery); HTH Holger On 10/24/2013 2:31, [email protected] wrote: > Thank you Holger. > > It helps well. > > And now I also want to convert a SPARQL query in RDF using the SPIN > vocabulary to that in plain text. > The example source code "SPINParsingExample.java" uses > ARQFactory.get().createQuery(spinQuery), but spinQuery holds the query > in plain text. > So, how can I convert if only an RDFized query is given? > > Regards, > Yasunori > > 2013年10月12日土曜日 8時17分35秒 UTC+9 Holger Knublauch: > > Hi Yasunori, > > you can use the following ARQFactory method: > > public Update createUpdate(com.hp.hpl.jena.update.Update arq, > String uri) { > > HTH > Holger > > > On Oct 11, 2013, at 5:27 PM, [email protected] <javascript:> wrote: > >> Hello, >> >> Now I'm trying to convert SPARQL 1.1 queries in plain text to >> those in RDF using the API. >> In org.topbraid.spin.arq, there's ARQ2SPIN class, and it has the >> method of createQuery. >> In the method, there're codes to take care of the SPARQL queries >> of ASK, CONSTRUCT, SELECT, and DESCRIBE. >> However, there isn't codes for DELETE, INSERT, LOAD, etc. >> Could you tell me how to process these SPARQL update keywords? >> SPIN syntax seems to define vocabularies for those keywords. >> http://www.w3.org/Submission/2011/SUBM-spin-sparql-20110222/#sp-Update >> <http://www.w3.org/Submission/2011/SUBM-spin-sparql-20110222/#sp-Update> >> >> Regards, >> Yasunori >> >> -- >> -- You received this message because you are subscribed to the Google >> Group "TopBraid Suite Users", the topics of which include >> Enterprise Vocabulary Network (EVN), TopBraid Composer, TopBraid >> Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN. >> To post to this group, send email to >> [email protected] <javascript:> >> To unsubscribe from this group, send email to >> [email protected] <javascript:> >> For more options, visit this group at >> http://groups.google.com/group/topbraid-users?hl=en >> <http://groups.google.com/group/topbraid-users?hl=en> >> --- >> You received this message because you are subscribed to the >> Google Groups "TopBraid Suite Users" group. >> To unsubscribe from this group and stop receiving emails from it, >> send an email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/groups/opt_out >> <https://groups.google.com/groups/opt_out>. > > -- > -- You received this message because you are subscribed to the Google > Group "TopBraid Suite Users", the topics of which include Enterprise > Vocabulary Network (EVN), TopBraid Composer, TopBraid Live, TopBraid > Insight, SPARQLMotion, SPARQL Web Pages 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 > Groups "TopBraid Suite Users" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), TopBraid Composer, TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages 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 Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
