Yes, of course.
Thanks. Paul On Fri, April 3, 2009 2:14 pm, Jody wrote: > > I believe you need to use the ?this variable instead of ?city in the > constraint. This should give you the OO behavior that you expected. > > On Apr 3, 3:03 am, PaulZ <[email protected]> wrote: >> I'm trying a few things out and I'm puzzled by following behaviour. >> >> I have >> 1 class :City with two subclasses :Actual_City, Historic_City. >> >> On :City i have two spin rules >> >> # Infer actual city >> CONSTRUCT { >> ?city a :Actual_City .} >> >> WHERE { >> ?city a :City . >> ?city dct:temporal ?Period . >> OPTIONAL { >> ?Period :endDate ?enddate . >> } . >> FILTER (!bound(?enddate)) . >> >> } >> >> and a similar one for infering a :Historic_City >> (Trying to 'templatize' those is left for another exercise.) >> >> Now running the spin inference and the city instances show up in the >> correct subclass. >> >> Now on the subclasses I add some spin constraints. >> e.g. on :Actual_City >> >> ASK WHERE { >> ?city dct:temporal ?period . >> ?period :endDate ?enddate . >> >> } >> >> This constraint doesn't work. >> I need to add the line >> ?city a :Actual_City . >> >> ASK WHERE { >> ?city a :Actual_City . >> ?city dct:temporal ?period . >> ?period :endDate ?enddate . >> >> } >> >> to get it up, >> which seems a little bit odd since one is working in a OO oriented >> way >> and the constraint is set on the class itself. >> >> I suppose the previous inference done, which has not been persisted, >> is not taken into account. > > > > -- Paul Hermans --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TopBraid Composer Users" group. 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-composer-users?hl=en -~----------~----~----~----~------~----~------~--~---
