Intersections in the OBO-Edit datamodel

From GO Wiki
Revision as of 17:00, 15 September 2006 by Maria (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

OBO-Edit's view of intersections is quite a bit different from the view in OWL. Here's how it works...

Every LinkedObject in OBO-Edit has a set of parent links (outgoing links) and child links (incoming links). Each link is represented by some implementation of the Link interface. 99% of the time, the links are actually instances of OBORestrictionImpl.

OBORestrictionImpl implements OBORestriction. OBORestriction is an interface that further extends the Link interface. OBORestriction sort of loosely approximates the kinds of things that can be represented by an OWL/DAML+OIL "Restriction" object.

Anyway, OBO-Edit treats an intersection as a collection of specially marked OBORestriction objects. An OBORestriction is part of the intersection definition if the isComplete() method returns "true". (The method name isComplete() is an artifact from the brief period where Chris and I were calling intersections "complete definitions"). When you click the "Cross Products" tab in the OBO-Edit text editor, OBO-Edit looks at the parents of the current term, finds any parent links whose isComplete() method returns true, and displays those links in the Cross Product editor. A complete link whose type equals OBOProperty.IS_A appears as the genus, and everything else appears as a differentia. (If, for some reason, there is more than one is_a link, OBO-Edit will choose one at random as the genus, and show the other as a differentia with type is_a).

Note that a term may have some "complete" parents and some regular parents. The "complete" parents are part of the intersection definition, while the other links are plain links that happen to be true for this term.

For example, let's say that we've got the class "Unlucky cat", defined as any black cat:

id: unlucky_cat
name: Unlucky cat
is_a: unlucky_thing
intersection_of: cat
intersection_of: has_color black

If we called the getParents() method for "unlucky_cat", we'd get 3 links:

unlucky_cat --is_a--> unlucky_thing {is_complete=false}
unlucky_cat --is_a--> cat {is_complete=true}
unlucky_cat --has_color--> black {is_complete=true}