rdf在净豆上使用apache jena [英] rdf using apache jena on net beans

查看:114
本文介绍了rdf在净豆上使用apache jena的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个简单的RDF图,然后尝试使用SPARQL进行简单查询.由于我熟悉Java和Net Bean,因此我想在NetBeans上使用Apache Jena.我从 http://www.apache.org/dist/jena/下载了相关文件.

I want to create a simple RDF graph and then try simple querying using SPARQL. Since I'm familiar with java and net beans, I want to use Apache Jena on NetBeans. I downloaded the related files from http://www.apache.org/dist/jena/ .

接下来应该怎么做才能在Net Bean上编写RDF代码?即我应该在某处安装某些东西还是添加lib文件/jar文件?

What should I do next to write RDF codes on net beans? i.e Should I install something or add lib files/jar files somewhere?

推荐答案

(对Ian的回复发表评论的时间太长了)

(Too long for a comment on Ian's reply)

在Netbeans上,Maven很容易,并且是入门所需的一切的好方法(如Ian所说).这是启动耶拿项目的快速指南:

Maven is easy on netbeans, and a good way to get started with everything you need (as Ian says). Here's a quick guide to start a jena project:

  1. File -> New Project.选择Maven然后选择Java Application.
  2. 选择项目名称,位置等,然后选择Finish.
  3. Netbeans将创建一个新的maven项目并打开它.
  4. 右键单击Dependencies,选择Add Dependency....
  5. 使用org.apache.jena作为组ID,使用jena-core(如果需要SPARQL,则使用jena-arq)作为工件ID,并使用2.10.1作为版本.
  6. 打开Dependencies文件夹.它应该有一个数字罐子-这些是jena及其必需的罐子.您可能需要再次右键单击Dependencies,然后选择Download Declared Dependencies以确保可以使用jena.
  7. Source Packages下,您会找到App.java.尝试一些简单的jena api教程,然后尝试运行它们.
  1. File -> New Project. Choose Maven then Java Application.
  2. Pick project name, location, etc., then Finish.
  3. Netbeans will create a new maven project and open it.
  4. Right click on Dependencies, choose Add Dependency....
  5. Use org.apache.jena as the Group ID, jena-core (or jena-arq if you want SPARQL) as the Artifact ID, and 2.10.1 as the Version.
  6. Open the Dependencies folder. It ought to have a number jars present -- these are jena and its required jars. You might need to right-click on Dependencies again and choose Download Declared Dependencies to ensure jena is ready for use.
  7. Under Source Packages you'll find App.java. Try some of the simple jena api tutorials and try running them.

这篇关于rdf在净豆上使用apache jena的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆