OBO-Edit: Intersections in the OBO-Edit datamodel: Difference between revisions

From GO Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
[[Category:Cross Products]] [[Category:OBO-Edit]]
For background reading on this, see [[Logical_Definitions]]
For background reading on this, see [[Logical_Definitions]]


Line 48: Line 49:


(more examples required)
(more examples required)
[[Category:Cross Products]]

Latest revision as of 17:03, 7 April 2014

For background reading on this, see Logical_Definitions

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. (COMMENT: not quite. Better to think of these as OWLAxioms. OE calls the subclass axiom a restriction which is a terminological error)

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 "black cat", defined as any cat that is black:

id: black_cat
name: Black cat
is_a: unlucky_thing
intersection_of: cat
intersection_of: has_color black

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

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

(more examples required)