From: sridevi p. <spo...@gm...> - 2015-06-04 18:42:48
|
Thank you Simon and Ignazio for your useful comments. I am taking baby steps for now and haven't yet adopted any build tool. Changing the topic, i need help with a specific parsing ability using owlapi. I am looking for a code example of a search functionality in protege (see the attached image). I would like to search the class name and values of properties given a string input and my ontology format is in OWL/XML. so far browsing around the api, I think the example has to use the following method in the OWLXMLParser. I believe there has to be something out there that i can use since it is very similar to what protege does. Do you know of any? OWLDocumentFormat <http://owlcs.github.io/owlapi/apidocs_4_0_2/org/semanticweb/owlapi/model/OWLDocumentFormat.html> parse(OWLOntologyDocumentSource <http://owlcs.github.io/owlapi/apidocs_4_0_2/org/semanticweb/owlapi/io/OWLOntologyDocumentSource.html> documentSource, OWLOntology <http://owlcs.github.io/owlapi/apidocs_4_0_2/org/semanticweb/owlapi/model/OWLOntology.html> ontology, OWLOntologyLoaderConfiguration <http://owlcs.github.io/owlapi/apidocs_4_0_2/org/semanticweb/owlapi/model/OWLOntologyLoaderConfiguration.html> configuration) On Thu, Jun 4, 2015 at 2:05 PM, Ignazio Palmisano < ipa...@gm...> wrote: > > On 4 Jun 2015 18:49, "Simon Spero" <ses...@gm...> wrote: > > > > If you are using the OSGI distribution, you might want to load it as an > OSGI bundle; embedded dependencies are not available otherwise. You will > also need to set up your application as a bundle, so that OSGI can sort > out the wiring. The owlapi OSGI jar should not be in your jvm's classpath > unless you enjoy that sort of thing. > > > > If you use the regular distribution and manage dependencies using maven, > ivy, or gradle (or use an ide that can use maven dependencies), the > requisite dependencies should be taken care of for you. > > > > Found out last week that the jackson dependencies need to be added > manually when using 4.0.2 - managed is not enough for a client library to > figure out the right version. > Ah well, live and learn. > I. > > > Simon > > > > On Jun 4, 2015 12:59 PM, "sridevi polavaram" <spo...@gm...> wrote: > >> > >> Hi Ignazio and other users, > >> I am running into NoClassDefFound error when i try to test this > example shared on owlap documentationi. I believe it is due to some missing > dependency library, but i am not sure what it is. I am running this > application in eclipse which i have already configured to use the two jars: > owlapi-osgidistribution-4.0.2 and owlapi-osgidistribution-4.0.2-javadoc > >> > >> In addition, I figured out that i needed guava-18.0.jar because of the > way owlapi handles null values. > >> > >> When i run the code. It gives me the following error, which i have > tried to fix by adding the javax.inject.jar but of no use. For now, i am > kind of lost here... > >> > >> Thanks > >> Sridevi > >> > >> Exception in thread "main" java.lang.NoClassDefFoundError: > com/google/inject/Provider > >> at java.lang.ClassLoader.defineClass1(Native Method) > >> at java.lang.ClassLoader.defineClass(Unknown Source) > >> at java.security.SecureClassLoader.defineClass(Unknown Source) > >> at java.net.URLClassLoader.defineClass(Unknown Source) > >> at java.net.URLClassLoader.access$100(Unknown Source) > >> at java.net.URLClassLoader$1.run(Unknown Source) > >> at java.net.URLClassLoader$1.run(Unknown Source) > >> at java.security.AccessController.doPrivileged(Native Method) > >> at java.net.URLClassLoader.findClass(Unknown Source) > >> at java.lang.ClassLoader.loadClass(Unknown Source) > >> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) > >> at java.lang.ClassLoader.loadClass(Unknown Source) > >> at java.lang.ClassLoader.defineClass1(Native Method) > >> at java.lang.ClassLoader.defineClass(Unknown Source) > >> at java.security.SecureClassLoader.defineClass(Unknown Source) > >> at java.net.URLClassLoader.defineClass(Unknown Source) > >> at java.net.URLClassLoader.access$100(Unknown Source) > >> at java.net.URLClassLoader$1.run(Unknown Source) > >> at java.net.URLClassLoader$1.run(Unknown Source) > >> at java.security.AccessController.doPrivileged(Native Method) > >> at java.net.URLClassLoader.findClass(Unknown Source) > >> at java.lang.ClassLoader.loadClass(Unknown Source) > >> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) > >> at java.lang.ClassLoader.loadClass(Unknown Source) > >> at examples.HelloOWLWorld.main(HelloOWLWorld.java:67) > >> Caused by: java.lang.ClassNotFoundException: com.google.inject.Provider > >> at java.net.URLClassLoader.findClass(Unknown Source) > >> at java.lang.ClassLoader.loadClass(Unknown Source) > >> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) > >> at java.lang.ClassLoader.loadClass(Unknown Source) > >> ... 25 more > >> > >> > >> > >> > ------------------------------------------------------------------------------ > >> > >> _______________________________________________ > >> Owlapi-developer mailing list > >> Owl...@li... > >> https://lists.sourceforge.net/lists/listinfo/owlapi-developer > >> > > > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > > Owlapi-developer mailing list > > Owl...@li... > > https://lists.sourceforge.net/lists/listinfo/owlapi-developer > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Owlapi-developer mailing list > Owl...@li... > https://lists.sourceforge.net/lists/listinfo/owlapi-developer > > |