From: Jean-Marc V. <jea...@gm...> - 2011-09-28 10:51:25
|
BTW I uploaded a snapshot ; you can also load http://graph.facebook.com/jmvanel into EulerGUI :) . I'm having fun with N3 rules triggering Java actions; run project examples/BloodPressure.n3p<https://eulergui.svn.sourceforge.net/svnroot/eulergui/trunk/eulergui/examples/BloodPressure.n3p>. This works nicely : { ?L :alert "true" ; log:uri ?LL . } => { ?F a java:javax-swing-JFrame ; javap:title ?LL ; javam:setSize ( 200 200 ) ; javap:visible true . }. However from a software engineering point of view, this is mixing too much N3 and Java. On the right handside, one has to know too much of Java. And EulerGUI does not have the facilities of eclipse for Java code completion. For EulerGUI framework, the recommended practice is to encapsulate the Java action in a class . Then this class itself will be encapulated in a pure N3 action: { ?L :alert "true" ; log:uri ?LL . } => { :application :displayAlert ?LL . }. { :application :displayAlert ?LL . } => { ?F a java:eulergui-gui-TemporaryFrame ; javap:localizedMessage ?LL . }. In this article, I showed how one can add features to the current project, which become thus a kind of application. In a next article, I'll show how one can add features to EulerGUI itself, expressed by rules, Java classes, or a mixture of both. The snapshots are here : http://eulergui.sourceforge.net/tmp/ -- Jean-Marc Vanel Déductions SARL - Consulting, services, training, Rule-based programming, Semantic Web http://jmvanel.free.fr/ - EulerGUI, a turntable GUI for Semantic Web + rules, XML, UML, eCore, Java bytecode +33 (0)6 89 16 29 52 chat : irc://irc.freenode.net#eulergui |