/// <summary> /// Adds the tag. /// </summary> /// <param name="key">The key.</param> /// <param name="tag">The tag.</param> public void AddTag(String key, BibTexEntryTag tag) { if (!Tags.ContainsKey(Key)) { Tags.Add(key, tag); } }
/// <summary> /// Deploys the specified source. /// </summary> /// <param name="_source">The source.</param> /// <param name="_type">The type.</param> /// <param name="_key">The key.</param> /// <param name="processor">The processor.</param> public void Deploy(String _source, String _type, String _key, translationTextTable processor = null) { type = _type; Key = _key; source = _source; foreach (Match mch in _select_isSelectTags.Matches(source)) { String source = mch.Groups[2].Value.Trim(sourceTrim.ToArray()); BibTexEntryTag tmp = new BibTexEntryTag(mch.Groups[1].Value, source); tmp.source = source; AddTag(tmp.Key, tmp); } ProcessSource(processor); }
/// <summary> /// Gets untyped <see cref="BibTexEntryBase"/> object, consumed for BibTex format export /// </summary> /// <param name="log">The log.</param> /// <returns>BibTex entry with data from this object instance</returns> public BibTexEntryBase GetEntry(translationTextTable process = null, ILogBuilder log = null) { SetDictionary(); BibTexEntryBase entry = new BibTexEntryBase(); entry.type = EntryType; entry.Key = EntryKey; foreach (var pair in propDictionary) { Object vl = this.imbGetPropertySafe(pair.Key, ""); BibTexEntryTag tag = new BibTexEntryTag(pair.Key, vl.toStringSafe()); entry.Tags.Add(tag.Key, tag); } entry.UpdateSource(process); return(entry); }