-1

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?
Joshua Taylor
  • 84,998
  • 9
  • 154
  • 353
LaknathR
  • 195
  • 1
  • 6
  • 17

3 Answers3

2

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:

AndyS
  • 16,345
  • 17
  • 21
cygri
  • 9,412
  • 1
  • 25
  • 47
  • thanks for your reply::: i do some stuff with protege and got the RDFS file, not owl file.. which file will be best for query with sparql.how do i read the property values? i faced lot of problems with getting the property values... can u show me the way:: in my rdf file there is no URI...how can i query with it or are there any way to get the URI ? thanks – LaknathR Jun 08 '10 at 20:17
0

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

Bengt
  • 14,011
  • 7
  • 48
  • 66
0

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.