开发者

Jena ontology API

I'm new to Jena and Protégé. I did some stuff with these. I have some problems:

  1. Do I need to use SPARQL query to get the ontology classes, subclasses, properties, and values, or can I do it with OWL-api? Can you show me how?
  2. How do I get the da开发者_高级运维ta property values?
  3. How do I load the ontology that is defined in my local machine and access the classes?


The Jena Ontology API is great for getting individual classes, properties, and their details and relationships.

SPARQL queries are great for querying a large number of instances and filter out only the bits of information (including their property values) that you need.

For your other questions, reading a bit of the documentation might help! The answers are in here:

  • Intro to RDF and Jena
  • Ontology API
  • I/O Quick Intro


The jena-examples project on on GitHub demostrates some use cases of the API.


Yup jena-fuseki server can be used to query ontology classes,subclasses,properties and values. Download apache jena-fuseki server Next we import this ontology to Apache’s Jena Fuseki server and run some simple SPARQL queries. Execute the following command in command prompt: $ ./ fuseki −server −−update −−mem / ds If everything goes well, we should have our server running at: http://localhost:3030/ web browser go to http://localhost:3030/ a)Choose control panel then select "/ds" source. b) Upload the file ".owl file” upload it to server c) Now d) To Query triples go to SPARQL query and run it. d) Your database is filled with triples.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜