Hello,
I am quite newbie in Jess and I hava some questions on embedding
jess in java applications.
I have one java class called Ontology where I manipulate an OWL ontology.
I have implemented methods for get/set properties and classes of the
ontology.
I need to apply rules of the form:
If (Mode == "string value" && activity == 'int value) call a java
userdefined class
Can you help me of how I am supposed to write a suitable rule?
What Mode needs to be? How?
How can I declare the equality of objects (== is true?)
How can I declare the equality of int values?
If you find it easier here is the sample rule to be filled:
The LHS is surely true, but I don't know how to write the RHS
of the rule
(import owl.*)
(deftemplate Ontology (declare (from-class Ontology )))
(load-function JessCaller)
(defrule testRule
"Testing the rule."
(Ontology { Mode == "Indoor_MainRoom_AmbientPresentation" && mode_actice
== 0 } () )=> (printout t "Reactive Rule ReportsLock: " ?value
crlf)(calling MyUserFunction)
)
Thanks in advance!
-----------------------------------------------------
John Chrysakis
R&D Engineer,
Institute of Computer Science (ICS),
Foundation for Research and Technology-Hellas (FORTH)
Heraklion, Crete, Greece.
-----------------------------------------------------
On Tue, 1 Apr 2008, John Chrysakis wrote:
>
> Continuing my 1st question it should be preferable to have my owl ontology
> (knowledge base) updated. Thus in each triggered event which fires some
> rules the changes in knowledge base must be appeared without running again
> the jess engine. Could you provide me an example of doing this (I guess by
> using runUntilHalt and Threads)?
>
> Also following my 2nd question I would like to share your experience about
> using Jess in practice. Is it preferable all the control logic which does
> the required jobs to be in Jess facts and rules or in programming java
> methods? In which way we gain better performance?
>
> Thanks for your support.
>
> -----------------------------------------------------
> John Chrysakis
> R&D Engineer,
> Institute of Computer Science (ICS),
> Foundation for Research and Technology-Hellas (FORTH)
> Heraklion, Crete, Greece.
> -----------------------------------------------------
>
>
> On Mon, 31 Mar 2008, Ernest Friedman-Hill wrote:
>
> >
> > On Mar 31, 2008, at 9:15 AM, John Chrysakis wrote:
> >
> > >
> > > Hello to all jess users,
> > >
> > > I am developing an semantic web application where we have a
> > > knowledge base
> > > (ontology) in OWL.
> > >
> > > I am interested in using rules such that, when they are activated our
> > > knowledge base changes accordingly (add, remove statements, triples
> > > etc).
> > >
> > > My questions:
> > >
> > > 1. Do you thing jess can support this type of rules?
> >
> >
> > Yes.
> >
> > >
> > > 2. Is it preferable to transform all the OWL ontology in jess like
> > > http://www.cs.cmu.edu/~sadeh/MyCampusMirror/OWLEngine.html or to use
> > > an API like protege-owl to load and manipulate the ontology and just
> > > having jess only for the rules? Of course the performance and the
> > > flexible
> > > programming use are surely two critical parameters to this question...
> > >
> >
> > Depends on what the long-term goal is; either approach works.
> >
> >
> > > 3. I think that it could be possible that some jess rules by
> > > adding/removing statements in the OWL ontology would cause
> > > incosistency.
> > > To prevent this problem, I have to create rules which are not making
> > > conficts or other incosistent situations, or to use a special
> > > reasoner like Pellet for this purpose. Any ideas,suggestions to this?
> > >
> >
> > Generally you use a separate reasoner to post-process additions to
> > the knowledge base. Your other choice is to write rules which are
> > themselves consistent with the knowledge base, but that pretty much
> > defeats the whole purpose of using OWL in the first place, doesn't it?
> >
> > If you're using something like the "OwlEngine" above, I think (not
> > sure, but I *think*) that pretty much takes care of it; i.e., Jess
> > itself is the reasoner.
> >
> >
> > > Thanks in advance,
> > >
> > > -----------------------------------------------------
> > > John Chrysakis
> > > R&D Engineer,
> > > Institute of Computer Science (ICS),
> > > Foundation for Research and Technology-Hellas (FORTH)
> > > Heraklion, Crete, Greece.
> > > -----------------------------------------------------
> > >
> > >
> > >
> > > --------------------------------------------------------------------
> > > To unsubscribe, send the words 'unsubscribe jess-users
> > > [EMAIL PROTECTED]'
> > > in the BODY of a message to [EMAIL PROTECTED], NOT to the list
> > > (use your own address!) List problems? Notify owner-jess-
> > > [EMAIL PROTECTED]
> > > --------------------------------------------------------------------
> >
> > ---------------------------------------------------------
> > Ernest Friedman-Hill
> > Informatics & Decision Sciences Phone: (925) 294-2154
> > Sandia National Labs FAX: (925) 294-2234
> > PO Box 969, MS 9012 [EMAIL PROTECTED]
> > Livermore, CA 94550 http://www.jessrules.com
> >
> >
> >
> >
> > --------------------------------------------------------------------
> > To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
> > in the BODY of a message to [EMAIL PROTECTED], NOT to the list
> > (use your own address!) List problems? Notify [EMAIL PROTECTED]
> > --------------------------------------------------------------------
> >
> >
>
--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------