Wednesday, 7 August 2013

Using an implemented ontology in Netbeans through Java

Using an implemented ontology in Netbeans through Java

Step 1 : I have created an ontology using Protege. I store it as an
RDF/XML file.
Step 2: I have created a user interface using Netbeans & Java.
i want now to import my ontology in my Netbeans project and interact with it.
How can i do that? It was suggested to me that i should use Jena. I have
already installed latest Jena version in my Netbeans project. However im
not sure if i have done this correctly.
After adding the jena libraries i tried to do that:
Ont m = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, null);
and i get this when i try to run my program:
log4j:WARN No appenders could be found for logger
(com.hp.hpl.jena.util.FileManager). log4j:WARN Please initialize the log4j
system properly. log4j:WARN See
http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
I have a good knowledge of java but i have to say that im very new to
ontologies and i have never done this before.
Please help me to understand what im doing wrong or what i should do to
make things right. Thank you!

No comments:

Post a Comment