Thank you for your reply Gokhan,

however this is not what I am trying to achieve. I already know the
rdf:type of all individuals A but I want to further infer that they
belong to one of the four aforementioned categories based on the
values of their properties using spin. I hope that it is clearer now.

Thanks,
Sofia

On May 17, 8:24 pm, Gokhan Soydan <[email protected]> wrote:
> Sofia,
>
> The simplest solution to your question would be:
>
> SELECT ?type ?input
> WHERE {
>      ?input a ?type .
>
> }
>
> This is how you would get the type of an instance. What is your intended
> result?
>
> Gokhan
>
> On 5/17/2011 6:47 AM, sofiangeletou wrote:
>
>
>
>
>
>
>
> > Hello there,
> > I have an instance A for which I want to decide if it is of one of the
> > following types E, T, G, J. At the moment I have created boolean
> > functions that tell me if A is one of these types or not. Yet I want
> > to have one function e.g., getType(A) that based on the boolean result
> > of each of the partial functions returns a type. Something like the
> > switch function of java or multiple-clause if-then-else.
>
> > The maximum I have reached is the following:
>
> > select ?e ?t ?g ?j ?input
> > where {
> > LET (?e:= ns:fn_isE(?input)).
> > LET (?t:= ns:fn_isT(?input)).
> > LET (?g:= ns:fn_isG(?input)).
> > LET (?j:= ns:fn_isJ(?input)).
> > }
>
> > which returns
> > true false false false ?input1
> > false true false false ?input2
> > ........
>
> > I would greatly appreciate your help,
> > Many thanks in advance,
> > Sofia

-- 
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

Reply via email to