Beispiel #1
0
        public Node ExprRel()
        {
            Node expressionBitOr = ExprBitOr();

            while (relationshipOperators.Contains(CurrentToken))
            {
                Node expressionRel = new Relationship()
                {
                    AnchorToken = OpRel()
                };
                expressionRel.Add(expressionBitOr);
                expressionRel.Add(ExprBitOr());
                return(expressionRel);
            }
            return(expressionBitOr);
        }
        public OBO_Typedef(List <KeyValuePair <string, string> > data = null)
        {
            if (data != null)
            {
                foreach (var datum in data)
                {
                    switch (datum.Key.ToLower())
                    {
                    case "id":
                        Id = datum.Value;
                        break;

                    case "is_anonymous":
                        IsAnonymous = Convert.ToBoolean(datum.Value);
                        break;

                    case "name":
                        Name = datum.Value;
                        break;

                    case "namespace":
                        Namespace = datum.Value;
                        break;

                    case "alt_id":
                        AltId.Add(datum.Value);
                        break;

                    case "def":
                        Def = datum.Value;
                        break;

                    case "comment":
                        Comment = datum.Value;
                        break;

                    case "subset":
                        Subset.Add(datum.Value);
                        break;

                    case "synonym":
                        Synonym.Add(datum.Value);
                        break;

                    case "xref":
                        XRef.Add(datum.Value);
                        break;

                    case "domain":
                        Domain = datum.Value;
                        break;

                    case "range":
                        Range = datum.Value;
                        break;

                    case "is_anti_symmetric":
                        IsAntiSymmetric = Convert.ToBoolean(datum.Value);
                        break;

                    case "is_cyclic":
                        IsCyclic = Convert.ToBoolean(datum.Value);
                        break;

                    case "is_reflexive":
                        IsReflexive = Convert.ToBoolean(datum.Value);
                        break;

                    case "is_symmetric":
                        IsSymmetric = Convert.ToBoolean(datum.Value);
                        break;

                    case "is_transitive":
                        IsTransitive = Convert.ToBoolean(datum.Value);
                        break;

                    case "is_a":
                        IsA.Add(datum.Value);
                        break;

                    case "inverse_of":
                        InverseOf = datum.Value;
                        break;

                    case "transitive_over":
                        TransitiveOver.Add(datum.Value);
                        break;

                    case "relationship":
                        Relationship.Add(datum.Value);
                        break;

                    case "is_obsolete":
                        IsObsolete = Convert.ToBoolean(datum.Value);
                        break;

                    case "replaced_by":
                        ReplacedBy.Add(datum.Value);
                        break;

                    case "consider":
                        Consider.Add(datum.Value);
                        break;

                    case "created_by":
                        CreatedBy = datum.Value;
                        break;

                    case "creation_date":
                        CreationDate = datum.Value;
                        break;

                    default:
                        break;
                    }
                }
            }
        }
Beispiel #3
0
            public OBO_Term(List <KeyValuePair <string, string> > data = null)
            {
                if (data != null)
                {
                    foreach (var datum in data)
                    {
                        switch (datum.Key.ToLower())
                        {
                        case "id":
                            Id = datum.Value;
                            break;

                        case "is_anonymous":
                            IsAnonymous = Convert.ToBoolean(datum.Value);
                            break;

                        case "name":
                            Name = datum.Value;
                            break;

                        case "namespace":
                            Namespace = datum.Value;
                            break;

                        case "alt_id":
                            AltId.Add(datum.Value);
                            break;

                        case "def":
                            Def = datum.Value;
                            break;

                        case "comment":
                            Comment = datum.Value;
                            break;

                        case "subset":
                            Subset.Add(datum.Value);
                            break;

                        case "synonym":
                            Synonym.Add(datum.Value);
                            break;

                        case "xref":
                            XRef.Add(datum.Value);
                            break;

                        case "is_a":
                            IsA.Add(datum.Value);
                            break;

                        case "intersection_of":
                            IntersectionOf.Add(datum.Value);
                            break;

                        case "union_of":
                            UnionOf.Add(datum.Value);
                            break;

                        case "disjoint_from":
                            DisjointFrom.Add(datum.Value);
                            break;

                        case "relationship":
                            Relationship.Add(datum.Value);
                            break;

                        case "is_obsolete":
                            IsObsolete = Convert.ToBoolean(datum.Value);
                            break;

                        case "replaced_by":
                            ReplacedBy.Add(datum.Value);
                            break;

                        case "consider":
                            Consider.Add(datum.Value);
                            break;

                        case "created_by":
                            CreatedBy = datum.Value;
                            break;

                        case "creation_date":
                            CreationDate = datum.Value;
                            break;

                        default:
                            break;
                        }
                    }
                }
            }