/// ------------------------------------------------------------------------------------ /// <summary> /// Adds another Word to the sequence that constitute the phrase on which this matches. /// This is intended to be /// </summary> /// ------------------------------------------------------------------------------------ internal void AddWord(Word word) { if (word == null) { throw new ArgumentNullException("word"); } m_words.Add(word); m_surrogate = null; }
/// ------------------------------------------------------------------------------------ /// <summary> /// Adds another underlying key term with the same (possibly partial) gloss as the /// other(s) /// </summary> /// ------------------------------------------------------------------------------------ internal void AddTerm(IKeyTerm keyTerm) { if (keyTerm == null) { throw new ArgumentNullException("keyTerm"); } m_terms.Add(keyTerm); m_surrogate = null; }
/// ------------------------------------------------------------------------------------ /// <summary> /// Adds the given match to the existing key terms table if it is nopt already present. /// </summary> /// ------------------------------------------------------------------------------------ internal void AddKeyTermMatch(KeyTermMatchSurrogate matchSuurrogate) { Word firstWord = Word.FirstWord(matchSuurrogate.TermId); List <KeyTerm> termsStartingWithSameFirstWord; if (!m_keyTermsTable.TryGetValue(firstWord, out termsStartingWithSameFirstWord)) { m_keyTermsTable[firstWord] = termsStartingWithSameFirstWord = new List <KeyTerm>(); } termsStartingWithSameFirstWord.Add(new KeyTerm(matchSuurrogate)); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Initializes a new instance of the <see cref="KeyTermMatch"/> class. /// </summary> /// <param name="termSurrogate">The key term match surrogate (which represents one or /// more underlying actual biblical terms).</param> /// ------------------------------------------------------------------------------------ internal KeyTerm(KeyTermMatchSurrogate termSurrogate) { m_words = termSurrogate.TermId.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Select(w => (Word)w).ToList(); m_termSurrogate = termSurrogate; }
internal void AddWords(IEnumerable <Word> words) { m_words.AddRange(words); m_surrogate = null; }
/// ---------------------------------------------------------------------------------------- /// <summary> /// Constructor for a key term part /// </summary> /// ---------------------------------------------------------------------------------------- public ParsedPart(KeyTermMatchSurrogate match) { m_text = match.TermId; Type = PartType.KeyTerm; }