Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-discussion] Constraint - compare instances

Daniel Domazer danieldomazer at googlemail.com
Fri Nov 11 04:20:38 PST 2011


Hello,

I have a problem concerning constraints again. I have the class
:MULTI-LING-TEXT, which has slots of string for each language,
and an abstract base class from which others derive. This base
class has a slot named Description of :MULTI-LING-TEXT instances.

What I want to check with the constraint is that for every instance
of :MULTI-LING-TEXT should exist an instance of a subclass of
AbstractBaseClass which uses this :MULTI-LING-TEXT instance.



This is what I got so far:

(defrange ?multitext :FRAME :MULTI-LING-TEXT)
(defrange ?base :FRAME AbstractBaseClass)

(forall ?multitext
  (exists ?base
    (= (Description ?base) ?multitext)))

This iterates over all subclasses of AbstractBaseClass, right?
Do I understand it right that (Description ?base) returns the
instance and that this is compared to ?multitext if they are the
same instance (not the content)? The documentation is not really
clear to me.

Thanks in advance!

Best regards,
Daniel Domazer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-discussion/attachments/20111111/08370cee/attachment-0001.html>


More information about the protege-discussion mailing list