简体   繁体   中英

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 data 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:

GitHub上的jena-examples项目演示了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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM