/// <summary>Finds the complete field name from a partial name.</summary> /// <param name="name">the complete or partial name</param> /// <returns>the complete name or <CODE>null</CODE> if not found</returns> public virtual String FindFieldName(String name) { if (acroFieldsSom == null && xfaPresent && datasetsSom != null) { IDictionary <String, XNode> name2Node = datasetsSom.GetName2Node(); ICollection <String> keys = name2Node.Keys; acroFieldsSom = new AcroFieldsSearch(keys); } if (acroFieldsSom != null && xfaPresent) { List <string> parts = new List <string>(new Stack <string>(Xml2Som.SplitParts(name))); bool containsKey = acroFieldsSom.GetAcroShort2LongName().ContainsKey(name); string inverse = acroFieldsSom.InverseSearchGlobal(parts); string normal = acroFieldsSom.GetAcroShort2LongName().Get(name); return(containsKey ? normal : inverse); } return(null); }
/// <summary> /// Finds the complete SOM name contained in the datasets section from a /// possibly partial name. /// </summary> /// <param name="name">the complete or partial name</param> /// <returns>the complete name or <CODE>null</CODE> if not found</returns> public virtual String FindDatasetsName(String name) { return(datasetsSom.GetName2Node().ContainsKey(name) ? name : datasetsSom.InverseSearchGlobal (new List <string>(new Stack <string>(Xml2Som.SplitParts(name))))); }
/// <summary>Finds the complete field name from a partial name.</summary> /// <param name="name">the complete or partial name</param> /// <returns>the complete name or <CODE>null</CODE> if not found</returns> public virtual String FindFieldName(String name) { if (acroFieldsSom == null && xfaPresent) { acroFieldsSom = new AcroFieldsSearch(datasetsSom.GetName2Node().Keys); return(acroFieldsSom.GetAcroShort2LongName().ContainsKey(name) ? acroFieldsSom.GetAcroShort2LongName ().Get(name) : acroFieldsSom.InverseSearchGlobal(new List <string>(new Stack <string>(Xml2Som.SplitParts(name))))); } return(null); }