如何在耶拿添加词汇? [英] How to add vocabulary in Jena?

查看:69
本文介绍了如何在耶拿添加词汇?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在耶拿(Jena)中,有一些默认的本体,例如RDF,FOAF ...

In Jena there are some default ontologies like RDF, FOAF...

因此我们可以向资源添加属性,例如:

So we can add property to resource like:

resource.addProperty(FOAF.name, person.getMFirstName());

但是我需要耶拿不存在的另一个本体,例如SIOC,我拥有URI的pimo.

But I need another ontology that does not exist in Jena like SIOC, pimo that I have the URI for.

我该怎么做?

推荐答案

Jena有一个用于生成Java类的工具,这些Java类包含来自本体和RDF架构的常量:

Jena has a tool for generating Java classes that contain the constants from ontologies and RDF schemas: schemagen

这篇关于如何在耶拿添加词汇?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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