Re: JESS: String between jess and java?

View: New views
1 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: JESS: String between jess and java?

by Ernest Friedman-Hill :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On May 29, 2009, at 3:22 AM, hed23 wrote:

>
> hi;
>
> i have a KB in jess format ,each fact is definate like that :
> (MAIN::triple
> (predicate
> "http://www.owl-ontologies.com/unnamed.owl#CODE_PARENT_GEOGRAPHIQUE")
> (subject "http://www.owl-ontologies.com/unnamed.owl#_30M_Instance_70")
> (object "30M"))

Here, the object slot contains a double-quoted Jess string -- an  
RU.STRING.

> QueryResult result1 = engine.runQueryStar("search-by-systeme", new
> ValueVector().add("30M"));

That "add" method is going to add a Jess symbol -- an RU.SYMBOL, which  
is written with no quotes. They are two different data types. Since  
your facts contain RU.STRING, you must ensure that your query asks for  
RU,STRING:.

QueryResult result1 =
     engine.runQueryStar("search-by-systeme", new  
ValueVector().add(new Value("30M", RU.STRING)));

---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences, Sandia National Laboratories
PO Box 969, MS 9012, Livermore, CA 94550
http://www.jessrules.com







--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users you@...'
in the BODY of a message to majordomo@..., NOT to the list
(use your own address!) List problems? Notify owner-jess-users@....
--------------------------------------------------------------------