Beispiel #1
0
        public InputSentence(FileStream input)
        {
            var xml = XDocument.Load(input);

            Id = xml.Root.Element(InputSentenceXMLConsts.NodeId).Value.Trim();
            FIPKind = xml.Root.Element(InputSentenceXMLConsts.NodeFIPKind).Value.Trim();
            EnumerationsGroupNr = xml.Root.Element(InputSentenceXMLConsts.NodeEnumerationsGroupNr).Value.Trim();
            SPRBNr = xml.Root.Element(InputSentenceXMLConsts.NodeSPRBNr).Value.Trim();
            InitialText = xml.Root.Element(InputSentenceXMLConsts.NodeInitialText).Value.Trim();

            SentenceIndexInfo = new SentenceIndex(xml.Root.Element(InputSentenceXMLConsts.NodeIndexInfo));
            RemovedTextElementsInfo = new RemovedTextElementsInfo(xml.Root.Element(InputSentenceXMLConsts.NodeTextElements));

            _readTextElements();

            Log.Info(LogInfo());
        }
Beispiel #2
0
        public InputSentence(string input)
        {
            Id = string.Empty;
            FIPKind = string.Empty;
            EnumerationsGroupNr = string.Empty;
            SPRBNr = string.Empty;
            InitialText = input;

            RemovedTextElementsInfo = new RemovedTextElementsInfo();
            SentenceIndexInfo = new SentenceIndex("10000");

            _readTextElements();
            _processInserts();

            if (RemovedTextElementsInfo.Any(x => x.Type == RemovedTextElementType.BeforeInsert))
            {
                SentenceIndexInfo.Info2.Value = IndexInfoInserts.InsertsPresented.Value;
            }

            Log.Info(LogInfo());
        }