简体   繁体   中英

Using an implemented ontology(Protege) 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!

That warning you get, it might be you are missing a log4j library in you NetBeans project. You can download it in the link http://logging.apache.org/log4j/1.2/download.html and try to add the log4j*.jar file to your project Libraries.

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