Maven details are:
- groupId: com.github.albaker
- artifactId: GroovySparql
- version: 0.6
This should help folks wanting to try Linked Data a very easy way using all of the usual Groovy tools (GroovyConsole, groovysh (REPL), groovy <script>), etc. Grails plugin is also in the works.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Grab('com.github.albaker:GroovySparql:0.6') | |
import groovy.sparql.* | |
def sparql = new Sparql(endpoint:"http://dbpedia.org/sparql") | |
def query = """ | |
PREFIX foaf: <http://xmlns.com/foaf/0.1/> | |
PREFIX yago: <http://dbpedia.org/class/yago/> | |
SELECT ?president ?name WHERE { | |
?president a yago:PresidentsOfTheUnitedStates ; | |
foaf:name ?name | |
} LIMIT 3 | |
""" | |
sparql.eachRow query, { row -> | |
println "${row.president} is ${row.name}" | |
} | |
ReplyDeleteExcellent Blog very imperative good content, this article is useful to beginners and real time
employees.Thank u for sharing...
Hadoop Training in Hyderabad
JAVA Training in Hyderabad
Great Post,really it was very helpful for us.
ReplyDeleteThanks a lot for sharing!
I found this blog to be very useful!!
JAVA training in Bangalore
An astounding web diary I visit this blog, it's inconceivably magnificent. Strangely, in this current blog's substance made point of fact and sensible. The substance of information is instructive.
ReplyDeleteOracle Fusion Financials Online Training
Oracle Fusion HCM Online Training
Oracle Fusion SCM Online Training
Thanks for sharing useful information.. we have learned so much information from your blog..... keep sharing
ReplyDeleteOracle Fusion HCM Online Training
I really enjoyed this post. I appreciate your work on this gives in-depth information. I am really happy with the quality of learning tips for Beginners in this article. Thanks for sharing.
ReplyDeleteJava Classes in Bangalore
ReplyDeleteThis is best, Explained step by step and in a concise way.
Thank you
buy hyip websites
Great insights! I really enjoyed reading your article. You've provided some valuable information that I'll definitely be sharing with others. Thanks for sharing your expertise
ReplyDeleteExciting news about the Groovy Sparql 0.6 release! The upgrade to the latest Apache Jena versions and the new groupId will definitely make it easier for developers to work with Linked Data. The example code snippet is a great demonstration of how to use Groovy Sparql to query DBpedia. For those interested in exploring more about Groovy and other programming topics, I'd like to share a resource: https://webgurukul.org/. Web Gurukul offers comprehensive IT training and courses to help you stay up-to-date with the latest technologies.
ReplyDelete