Can anyone give me at least one idea to how can I connect java with protoge? how can I access OWL using jena API in java?!
Asked
Active
Viewed 363 times
1 Answers
0
The Jena website has plenty of tutorials available. If you have difficulties getting started, please post the code that does not work and we'll help you along.
First tutorial here
// some definitions
static String personURI = "http://somewhere/JohnSmith";
static String fullName = "John Smith";
// create an empty Model
Model model = ModelFactory.createDefaultModel();
// create the resource
Resource johnSmith = model.createResource(personURI);
// add the property
johnSmith.addProperty(VCARD.FN, fullName);
In order to make this work, you'll need the right imports. Assuming that the Java technicalities are not a problem, this example shows how to create a statement and add it to a model, i.e., an rdf file.
From the same page you can get to more complex material, including OWL tutorials.
You have not mentioned which task you're trying to carry out. Can you describe it?

Ignazio
- 10,504
- 1
- 14
- 25
-
I don't have the point that I'll start from that .. and codes in jena Docs. cannot help me that much ! – Shathaaah Dec 02 '15 at 22:06
-
It is not clear what you mean by start point. What code have you tried? Which part of my example is not clear? – Ignazio Dec 25 '15 at 20:54