Skip to content

Commit

Permalink
Add TermRelation type
Browse files Browse the repository at this point in the history
  • Loading branch information
omaus committed Aug 21, 2023
1 parent b8acba0 commit 45fb8b5
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/FsOboParser/OboTerm.fs
Original file line number Diff line number Diff line change
Expand Up @@ -538,4 +538,14 @@ type OboTerm =

/// Takes an OboTerm and returns its relationships as a triple consisting of the input term's ID, the name of the relationship, and the related term's ID.
static member getRelatedTermIds (term : OboTerm) =
term.GetRelatedTermIds()
term.GetRelatedTermIds()


/// Representation of a the relation an OboTerm can have with other OboTerms.
type TermRelation<'a> =
/// No Relation with other OboTerms.
| Empty of SourceTerm : OboTerm
/// Relation between one OboTerm with another in the form of generic relation `'a` * source OboTerm * target OboTerm.
| Target of Relation :'a * SourceTerm : OboTerm * TargetTerm : OboTerm
/// Relation between one OboTerm with another OboTerm that is not defined in the OboOntology in the form of generic relation `'a` * source OboTerm.
| TargetMissing of Relation :'a * SourceTerm : OboTerm

0 comments on commit 45fb8b5

Please sign in to comment.