예제 #1
0
        private static void GetLexRecord(Node node, LexRecord lexRecord, CatEntry catEntry)


        {
            if (node.NodeType == XmlNodeType.Element)

            {
                if (node.Name.Equals("base"))

                {
                    lexRecord.SetBase(getValue(node));
                }
                else if (node.Name.Equals("eui"))

                {
                    lexRecord.SetEui(getValue(node));
                }
                else if (node.Name.Equals("cat"))
                {
                    lexRecord.SetCat(getValue(node));
                }
                else if (node.Name.Equals("spellingVars"))

                {
                    lexRecord.SetSpellingVar(getValue(node));
                }
                else if (node.Name.Equals("acronyms"))

                {
                    lexRecord.GetAcronyms().Add(getValue(node));
                }
                else if (node.Name.Equals("abbreviations"))

                {
                    lexRecord.GetAbbreviations().Add(getValue(node));
                }
                else if (node.Name.Equals("annotations"))

                {
                    lexRecord.GetAnnotations().Add(getValue(node));
                }
                else if (node.Name.Equals("signature"))

                {
                    lexRecord.SetSignature(getValue(node));
                }
                else if (node.Name.Equals("verbEntry"))

                {
                    catEntry = getVerbValues(node);
                    lexRecord.SetCatEntry(catEntry);
                }
                else if (node.Name.Equals("auxEntry"))

                {
                    catEntry = getAuxValues(node);
                    lexRecord.SetCatEntry(catEntry);
                }
                else if (node.Name.Equals("modalEntry"))

                {
                    catEntry = getModalValues(node);
                    lexRecord.SetCatEntry(catEntry);
                }
                else if (node.Name.Equals("nounEntry"))

                {
                    catEntry = getNounValues(node);
                    lexRecord.SetCatEntry(catEntry);
                }
                else if (node.Name.Equals("pronEntry"))

                {
                    catEntry = getPronValues(node);
                    lexRecord.SetCatEntry(catEntry);
                }
                else if (node.Name.Equals("adjEntry"))

                {
                    catEntry = getAdjValues(node);
                    lexRecord.SetCatEntry(catEntry);
                }
                else if (node.Name.Equals("advEntry"))

                {
                    catEntry = getAdvValues(node);
                    lexRecord.SetCatEntry(catEntry);
                }
                else if (node.Name.Equals("detEntry"))

                {
                    catEntry = getDetValues(node);
                    lexRecord.SetCatEntry(catEntry);
                }
            }

            for (Node child = node.FirstChild; child != null; child = child.NextSibling)


            {
                GetLexRecord(child, lexRecord, catEntry);
            }
        }