Ejemplo n.º 1
0
        public WordAsm(AssemblyBase srcAsm) : base(srcAsm)
        {
            var store = Session.Instance().Store;

            this.srcAsm = srcAsm;
            this.Order  = srcAsm.Order;
            this.lx_id  = Convert.ToInt64(srcAsm.GetValue("lx_id"));
            var asmlex = store.GetAssembly(lx_id);

            this.id_partofspeech = Convert.ToInt32(asmlex.GetValue("GrenPart"));
            this.EntryName       = (string)asmlex.GetValue("Lemma");

            this.rcind = Convert.ToInt32(srcAsm.GetValue("rcind"));
            //wasm.xPart = wmap.xPart;
            this.RealWord = (string)srcAsm.GetValue("RealWord");
            var gramIDs = (List <long>)srcAsm.GetValue("Grammems");

            if (gramIDs != null)
            {
                foreach (var ID in gramIDs)
                {
                    var asm  = store.GetAssembly(ID);
                    var gram = new GrammemAsm(asm);
                    grammems.Add(gram);
                }
            }
        }
Ejemplo n.º 2
0
        public SentenceAsm(AssemblyBase srcAsm) : base(srcAsm)
        {
            this.srcAsm = srcAsm;
            var store   = Session.Instance().Store;
            var wordIDs = (List <long>)srcAsm.GetValue("Words");
            int i       = 0;

            if (wordIDs != null)
            {
                foreach (var ID in wordIDs)
                {
                    var asm  = store.GetAssembly(ID, false);
                    var word = new WordAsm(asm);
                    word.Order = i++;
                    words.Add((int)word.Order, word);
                }
            }
            var syntIDs = (List <long>)srcAsm.GetValue("SyntNodes");

            if (syntIDs != null)
            {
                foreach (var ID in syntIDs)
                {
                    var asm      = store.GetAssembly(ID, false);
                    var syntNode = new SyntNodeAsm(asm);
                    treeList.Add(syntNode);
                }
            }

            this.sentence = RestorePhrase();
            this.IsActual = true;
        }
Ejemplo n.º 3
0
 public SyntNodeAsm(AssemblyBase srcAsm) : base(srcAsm)
 {
     this.srcAsm = srcAsm;
     c_id        = Convert.ToInt64(srcAsm.GetValue("c_id"));
     grenLink    = Convert.ToInt64(srcAsm.GetValue("GrenLink"));
     level       = Convert.ToInt64(srcAsm.GetValue("level"));
     pс_id       = Convert.ToInt64(srcAsm.GetValue("pс_id"));
 }
Ejemplo n.º 4
0
        public DocumentAsm(AssemblyBase srcAsm) : base(srcAsm)
        {
            this.srcAsm = srcAsm;
            var attrval = (List <BlockAddress>)srcAsm.GetValue("ParagraphLinks");

            if (attrval == null)
            {
                return;
            }
            ParagraphLinks.AddRange(attrval);
        }
Ejemplo n.º 5
0
        public ParagraphAsm(AssemblyBase srcAsm) : base(srcAsm)
        {
            IsDirty     = false;
            this.srcAsm = srcAsm;
            var store   = Session.Instance().Store;
            var sentIDs = (List <long>)srcAsm.GetValue("Phrases");

            if (sentIDs != null)
            {
                foreach (var sentID in sentIDs)
                {
                    var asm  = store.GetAssembly(sentID, false);
                    var sent = new SentenceAsm(asm);
                    innerPara.Add(sent);
                }
            }
        }
Ejemplo n.º 6
0
 /// <summary>
 /// Конструктор объекта из данных БД.
 /// </summary>
 public LexemaAsm(AssemblyBase srcAsm) : base(srcAsm)
 {
     this.srcAsm   = srcAsm;
     this.grenPart = Convert.ToInt32(srcAsm.GetValue("GrenPart"));
     this.lemma    = (string)srcAsm.GetValue("Lemma");
 }
Ejemplo n.º 7
0
 public GrammemAsm(AssemblyBase srcAsm) : base(srcAsm)
 {
     this.srcAsm       = srcAsm;
     this.grenProperty = (long)srcAsm.GetValue("GrenProperty");
     this.value        = (long)srcAsm.GetValue("Value");
 }