Exemple #1
0
        public override void Extract()
        {
            //Extract Covers
            object JSONCovers;

            jsonParseResult.TryGetValue("Covers", out JSONCovers);
            object[] Coverlist = JSONCovers as object[];

            foreach (object Obj in Coverlist)
            {
                Dictionary <string, object> Dict = Obj as Dictionary <string, object>;
                Cover   cover   = TermParser.GetCoverForTerm(Dict);
                Subject subject = GetSubjectForCover(Dict);
                if (CoverComponent.ContainsKey(subject))
                {
                    CoverComponent[subject].Add(cover.CoverName, cover);
                }
                else
                {
                    CoverComponent.Add(subject, new Dictionary <string, Cover>()
                    {
                        { cover.CoverName, cover }
                    });
                }
            }
        }
Exemple #2
0
        public override void Extract()
        {
            //Extract Deductibles
            object JSONDeductibles;

            jsonParseResult.TryGetValue("Deductibles", out JSONDeductibles);
            object[] Dedlist = JSONDeductibles as object[];

            foreach (object Obj in Dedlist)
            {
                Dictionary <string, object> Dict = Obj as Dictionary <string, object>;
                Deductible ded = TermParser.GetDedForTerm(Dict, Declarations);
                foreach (PrimarySubject priSub in GetSubjectForTerm(Dict))
                {
                    if (DedComponent.ContainsKey(priSub))
                    {
                        DedComponent[priSub].Add(ded);
                    }
                    else
                    {
                        DedComponent.Add(priSub, new DeductibleCollection(ded));
                    }
                }
            }

            //Extract Sublimits
            object JSONLimits;

            jsonParseResult.TryGetValue("Sublimits", out JSONLimits);
            object[] Limlist = JSONLimits as object[];

            foreach (object Obj in Limlist)
            {
                Dictionary <string, object> Dict = Obj as Dictionary <string, object>;
                Limit ded = TermParser.GetLimitForTerm(Dict, Declarations);
                foreach (PrimarySubject priSub in GetSubjectForTerm(Dict))
                {
                    if (LimComponent.ContainsKey(priSub))
                    {
                        LimComponent[priSub].Add(ded);
                    }
                    else
                    {
                        LimComponent.Add(priSub, new LimitCollection(ded));
                    }
                }
            }

            //Extract Covers
            object JSONCovers;

            jsonParseResult.TryGetValue("Covers", out JSONCovers);
            object[] Coverlist = JSONCovers as object[];

            foreach (object Obj in Coverlist)
            {
                Dictionary <string, object> Dict = Obj as Dictionary <string, object>;
                Cover   cover   = TermParser.GetCoverForTerm(Dict);
                Subject subject = GetSubjectForCover(Dict);
                if (CoverComponent.ContainsKey(subject))
                {
                    CoverComponent[subject].Add(cover.CoverName, cover);
                }
                else
                {
                    CoverComponent.Add(subject, new Dictionary <string, Cover>()
                    {
                        { cover.CoverName, cover }
                    });
                }
            }
        }