webprotege
webprotege copied to clipboard
Extension for WebProtege
Hi,
I'm developing an extension for WebProtege that consists of a reasoner that answer queries over hybrid theories composed of an OWL ontology and a set of non-monotonic rules (there already exists a corresponding plugin for the desktop version - the NoHR reasoner), and I would like to ask two questions.
-
I have created two tabs and two portlets for the user interface of the extension. Now I'm trying to figure out the remote procedure calls that WebProtege uses to communicate with the server. More specifically, I am trying to use some of the NoHR classes on the client-side of WebProtege but it seems that the GWT framework does not allow me to use some classes that import libraries from external sources. Is there anything I can do about this?
-
I have created a new type of object - the rules - but I can't simply use some WebProtege classes because rules do not extend an owlEntity. I want to ask you for some tips on the best way to create a new type of object (in this case rules) that is integrated with WebProtege's existing structure.
Thanks in advance for your help/support.
Hi,
I'm doing a similar extension for web protege. Did you solve your questions? By the way, how did you create the new portlets? I noticed that webprotege-maven-plugin and dagger will automatically generate the porletFactory classes, but have no idea how does it work.
Hi,
Yes, I solved the questions that I mentioned in my post.
To create new portlets you must first create a few classes for your portlet.
- PortletPresenter.java
- Presenter.java
- View (interface)
- ViewImpl.java
- ViewImpl.ui.xml
You can check the existing portlets and open these classes to see what is contained inside and make your own changes.
Next, you have to provide an instance of your portlet to the application. In class "ClientApplicationModule.java", you have to add a provide annotation (@Provides) to your created portlet.
After compiling and deploying server, you can add your view (portlet) in "Add View" menu in any tab menu.
I hope this information can help you.
Hi, Thanks for reply. But it does not work for me. I created a new portlet "Debugger" according to Individualslist portlet and added View provide into "ClientApplicationModule.java".
But nothing changed after compiling and deploying. Should I do something for PortletPresenter? I notice that in "PortletFactoryGenerateded.java" all presenters of the portlet are instanced, except my new portlet.
Hi,
You have to create your own portletPresenter for your new portlet.
If everything is ok, the GWT should automatically generate all needed factory classes.
For compile, I personally use mvn clean compile and to create the .war file I use mvn package
In mvn clean compile all classes should be generated
Hi @titoferreira , would you please share your code? We need the same reasoner for our ontology.
Hi @laotao, my code is in this repository: https://github.com/NoHRReasoner/WebNoHR
there is also a running application using this version of webprotege: https://web.nohr.di.fct.unl.pt/
Thanks, I'll try.
Hi @laotao, my code is in this repository: https://github.com/NoHRReasoner/WebNoHR
there is also a running application using this version of webprotege: https://web.nohr.di.fct.unl.pt/
Hi @titoferreira , I've tried the application and created a project in it. But I don't know how to add rules. The NoHR Rule tab seems only a text editor. And I don't know how to create SWRL rules. Would you please share an example project with me? My accout is tao.
Hi @laotao, sorry for the delay but I'm not working in this project anymore. I suggest you to talk to Matthias Knorr who was my master degree advisor and is a contributor to the project in github as well
@titoferreira Sure. Thanks.