Hi Olga,

that is exactly what I was looking for! Thanks a lot!

Best regards,
Johannes

Am Freitag, 15. April 2005 17:15 schrieb Medvedeva, Olga:
> Johannes,
>
> What you're getting via (slot-get Street1 hasSegment) is a list of OBJECTs.
> Here is a simple query to retrieve a fact:
>
> (defquery fact-by-object-query
>   (declare (variables ?obj))
>   (object (OBJECT ?obj))
> )
>
> Olga.
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of Johannes Ehrl
> Sent: Thursday, April 14, 2005 12:57 PM
> To: [email protected]
> Subject: JESS: Fwd: Re: JessTab Information
>
>
> Hi all,
>
> I am not sure, if I my question fits perfectly to this maillist, because it
> is connected with working on ontologies with JessTab.
>
> What I want to do is extracting instances from the Protege knowledgebase,
> which are mutually associated, like a join operation in SQL.
>
> Let me show this with a small example: I have defined two classes: Street
> and Segment. A Street consists of several Segments. This is expressed via
> the property "hasSegment" (Street has one or more Segments, a 1-n
> relation):
>
> Street     (1) ---hasSegment---> (n)      Segment
>
> Moreover, I have defined the instances, Street1 as instance of Street,
> which consists of Segment1 and Segment2, which both are instances of
> Segment.
>
> The knowledgebase looks something like this:
>
> Street1-Fact:
> (MAIN::object (is-a Street) (is-a-name "Street") (:NAME "Street1") (OBJECT
> <External-Address:edu.stanford.smi.protegex.owl.model.impl.DefaultSimpleOWL
>In stance>) (rdfs:label ) ... (bestehtAus
> <External-Address:edu.stanford.smi.protegex.owl.model.impl.DefaultSimpleOWL
>In stance>
> 
> <External-Address:edu.stanford.smi.protegex.owl.model.impl.DefaultSimpleOWL
>I nstance>) )
>
> Segment1-Fact:
> (MAIN::object (is-a Segment) (is-a-name "Segment") (:NAME "Segment1")
> (OBJECT
> <External-Address:edu.stanford.smi.protegex.owl.model.impl.DefaultSimpleOWL
>In stance>) (rdfs:label ) ... )
>
> Segment2-Fact:
> (MAIN::object (is-a Segment) (is-a-name "Segment") (:NAME "Segment1")
> (OBJECT
> <External-Address:edu.stanford.smi.protegex.owl.model.impl.DefaultSimpleOWL
>In stance>) (rdfs:label ) ... )
>
>
> So my problem is getting the two Segments Street1 consists of. I tried to
> retrieve them via (slot-get Street1 hasSegment).
> Jess's return looks something like this:
> (<External-Address:edu.stanford.smi.protegex.owl.model.impl.DefaultSimpleOW
>LI nstance>
> 
> <External-Address:edu.stanford.smi.protegex.owl.model.impl.DefaultSimpleOWL
>I nstance>)
>
> My question is, if it is possible to extract the facts "behind" the
> hasSegments slot, or match them otherwise. All facts seem to be present.
> Or do you know another method to find out, which Segments belong to one
>  Street instance?
>
> Thanks a lot for your effort.
>
> Best regards,
> Johannes Ehrl
>
> -----------------------------------------
> Johannes Ehrl
> BMW Research and Technology
> Munich
>
> --------------------------------------------------------------------
> 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]
> --------------------------------------------------------------------

--------------------------------------------------------------------
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]
--------------------------------------------------------------------

Reply via email to