Ejemplo n.º 1
0
        /**
         * Finds the complete field name contained in the "classic" forms from a partial
         * name.
         * @param name the complete or partial name
         * @param af the fields
         * @return the complete name or <CODE>null</CODE> if not found
         */
        virtual public String FindFieldName(String name, AcroFields af)
        {
            IDictionary <String, AcroFields.Item> items = af.Fields;

            if (items.ContainsKey(name))
            {
                return(name);
            }
            if (acroFieldsSom == null)
            {
                if (items.Count == 0 && xfaPresent)
                {
                    acroFieldsSom = new AcroFieldsSearch(datasetsSom.Name2Node.Keys);
                }
                else
                {
                    acroFieldsSom = new AcroFieldsSearch(items.Keys);
                }
            }
            if (acroFieldsSom.AcroShort2LongName.ContainsKey(name))
            {
                return(acroFieldsSom.AcroShort2LongName[name]);
            }
            return(acroFieldsSom.InverseSearchGlobal(Xml2Som.SplitParts(name)));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Finds the complete field name contained in the "classic" forms from a partial
        /// name.
        /// </summary>
        /// <param name="name">the complete or partial name</param>
        /// <param name="af">the fields</param>
        /// <returns>the complete name or  null  if not found</returns>
        public string FindFieldName(string name, AcroFields af)
        {
            Hashtable items = af.Fields;

            if (items.ContainsKey(name))
            {
                return(name);
            }
            if (AcroFieldsSom == null)
            {
                if (items.Count == 0 && XfaPresent)
                {
                    AcroFieldsSom = new AcroFieldsSearch(DatasetsSom.Name2Node.Keys);
                }
                else
                {
                    AcroFieldsSom = new AcroFieldsSearch(items.Keys);
                }
            }
            if (AcroFieldsSom.AcroShort2LongName.ContainsKey(name))
            {
                return((string)AcroFieldsSom.AcroShort2LongName[name]);
            }
            return(AcroFieldsSom.InverseSearchGlobal(Xml2Som.SplitParts(name)));
        }
Ejemplo n.º 3
0
 /**
  * Finds the complete SOM name contained in the datasets section from a
  * possibly partial name.
  * @param name the complete or partial name
  * @return the complete name or <CODE>null</CODE> if not found
  */
 virtual public String FindDatasetsName(String name)
 {
     if (datasetsSom.Name2Node.ContainsKey(name))
     {
         return(name);
     }
     return(datasetsSom.InverseSearchGlobal(Xml2Som.SplitParts(name)));
 }
Ejemplo n.º 4
0
        /**
         * Finds the complete field name contained in the "classic" forms from a partial
         * name.
         * @param name the complete or partial name
         * @param af the fields
         * @return the complete name or <CODE>null</CODE> if not found
         */
        public String FindFieldName(String name, AcroFields af)
        {
            Hashtable items = af.Fields;

            if (items.ContainsKey(name))
            {
                return(name);
            }
            if (acroFieldsSom == null)
            {
                acroFieldsSom = new AcroFieldsSearch(items.Keys);
            }
            if (acroFieldsSom.AcroShort2LongName.ContainsKey(name))
            {
                return((String)acroFieldsSom.AcroShort2LongName[name]);
            }
            return(acroFieldsSom.InverseSearchGlobal(Xml2Som.SplitParts(name)));
        }