public override AbstractAttributeStruct getAbstractAttribute(Ice.Current __current)
        {
            ColumnInfo columnInfo = this.getColumnFunctionsPrx().getColumnInfo();
            AbstractAttributeStruct result = new AbstractAttributeStruct();
            Ferda.Modules.Helpers.Data.Column.TestColumnSelectExpression(
                columnInfo.dataMatrix.database.odbcConnectionString,
                columnInfo.dataMatrix.dataMatrixName,
                columnInfo.columnSelectExpression,
                boxModule.StringIceIdentity);
            GeneratedAttribute categoriesInfo = getCategoriesInfo(columnInfo);
            result.column = columnInfo;
            result.categories = categoriesInfo.CategoriesStruct;
            //AttributeFunctionsI.TestCategoriesDisjunctivity(sumOfRowMax.categories, boxIdentity);
            //This test is useless here (vain / effort / wastage)
            result.identifier = boxModule.PersistentIdentity;
            result.countOfCategories = categoriesInfo.CategoriesCount;
            result.includeNullCategory = categoriesInfo.IncludeNullCategoryName;
            result.xCategory = XCategory;
            Ferda.Modules.Helpers.Data.Attribute.TestAreCategoriesInCategories(result.categories, new string[] { result.xCategory, result.includeNullCategory } , boxModule.StringIceIdentity);
            result.nameInLiterals = NameInLiterals;

            return result;
        }
        /// <summary>
        /// Provides functionality of manually prepared attribute box, where is connected
        /// BMI column. There are created basic BMI categories (see below) in the result.
        /// </summary>
        /// <returns></returns>
        /// <remarks>
        /// <list type="table">
        /// <listheader>
        /// <term>[kg/m^2]</term>
        /// <description><b>en-US</b>; cs-CZ</description>
        /// </listheader>
        /// <item>
        /// <term>&lt; 15 </term>
        /// <description><b>Extremely underweight</b>; vyzáblá postava</description>
        /// </item>
        /// <item>
        /// <term>15 - 20</term>
        /// <description><b>Underweight</b>; hubená postava</description>
        /// </item>
        /// <item>
        /// <term>20 - 25</term>
        /// <description><b>Normal</b>; normální postava</description>
        /// </item>
        /// <item>
        /// <term>25 - 30</term>
        /// <description><b>Overweight</b>; postava s nadváhou</description>
        /// </item>
        /// <item>
        /// <term>&gt; 30</term>
        /// <description><b>Obese</b>; obézní postava</description>
        /// </item>
        /// </list>
        /// </remarks>
        public override Ferda.Modules.Boxes.DataMiningCommon.Attributes.AbstractAttributeStruct getAbstractAttribute(Ice.Current current__)
        {
            AbstractAttributeStruct result = new AbstractAttributeStruct();

            Ferda.Modules.CategoriesStruct categories = new Ferda.Modules.CategoriesStruct();
            categories.floatIntervals = new Ferda.Modules.FloatIntervalCategorySeq();
            bool isLocalized;
            categories.floatIntervals.Add(
                boxModule.GetPhrase("ExtremelyUnderweight", out isLocalized),
                new Ferda.Modules.FloatIntervalStruct[] {
                    new Ferda.Modules.FloatIntervalStruct(
                        Ferda.Modules.BoundaryEnum.Infinity,
                        Ferda.Modules.BoundaryEnum.Round,
                        0,
                        15)
                    }
                );
            categories.floatIntervals.Add(
                boxModule.GetPhrase("Underweight", out isLocalized),
                new Ferda.Modules.FloatIntervalStruct[] {
                    new Ferda.Modules.FloatIntervalStruct(
                        Ferda.Modules.BoundaryEnum.Sharp,
                        Ferda.Modules.BoundaryEnum.Round,
                        15,
                        20)
                    }
                );
            categories.floatIntervals.Add(
                boxModule.GetPhrase("Normal", out isLocalized),
                new Ferda.Modules.FloatIntervalStruct[] {
                    new Ferda.Modules.FloatIntervalStruct(
                        Ferda.Modules.BoundaryEnum.Sharp,
                        Ferda.Modules.BoundaryEnum.Round,
                        20,
                        25)
                    }
                );
            categories.floatIntervals.Add(
                boxModule.GetPhrase("Overweight", out isLocalized),
                new Ferda.Modules.FloatIntervalStruct[] {
                    new Ferda.Modules.FloatIntervalStruct(
                        Ferda.Modules.BoundaryEnum.Sharp,
                        Ferda.Modules.BoundaryEnum.Round,
                        25,
                        30)
                    }
                );
            categories.floatIntervals.Add(
                boxModule.GetPhrase("Obese", out isLocalized),
                new Ferda.Modules.FloatIntervalStruct[] {
                    new Ferda.Modules.FloatIntervalStruct(
                        Ferda.Modules.BoundaryEnum.Sharp,
                        Ferda.Modules.BoundaryEnum.Infinity,
                        30,
                        float.MaxValue)
                    }
                );

            result.categories = categories;
            result.column = this.getColumnInfo();
            result.countOfCategories = result.categories.floatIntervals.Count;
            result.identifier = boxModule.PersistentIdentity;
            result.includeNullCategory = "";
            result.nameInLiterals = "BodyMassIndex";
            result.xCategory = "";
            return result;
        }
 public double[] GetNumericValues(AbstractAttributeStruct attribute)
 {
     if (numericValuesCache.ContainsKey(attribute))
         return numericValuesCache[attribute];
     double[] result;
     bool canPass = true;
     List<double> valueList = new List<double>();
     if (
         attribute != null
         && attribute.categories.enums.Count > 0
         && attribute.categories.dateTimeIntervals.Count == 0
         && attribute.categories.floatIntervals.Count == 0
         && attribute.categories.longIntervals.Count == 0
         )
     {
         foreach (DictionaryEntry value in attribute.categories.enums)
         {
             String[] StringSeq = (String[])value.Value;
             if (StringSeq.Length == 1)
             {
                 double doubleResult;
                 if (Double.TryParse(StringSeq[0], out doubleResult))
                 {
                     valueList.Add(doubleResult);
                 }
                 else
                 {
                     canPass = false;
                     break;
                 }
             }
             else
             {
                 canPass = false;
             }
         }
     }
     else
     {
         canPass = false;
     }
     if (canPass)
     {
         result = valueList.ToArray();
     }
     else
     {
         result = null;
     }
     numericValuesCache.Add(attribute, result);
     return result;
 }
        public override AbstractAttributeStruct getAbstractAttribute(Ice.Current __current)
        {
            AbstractAttributeStruct result = new AbstractAttributeStruct();
            result.column = getColumnFunctionsPrx().getColumnInfo();
            result.categories = Categories;
            Ferda.Modules.Helpers.Data.Attribute.TestCategoriesDisjunctivity(result.categories, boxModule.StringIceIdentity);
            result.countOfCategories = Ferda.Modules.Helpers.Data.Attribute.GetCategoriesCount(result.categories);

            //Ferda.Modules.Helpers.Data.Attribute.TestCategoriesCount(result.countOfCategories, boxIdentity);

            result.identifier = boxModule.PersistentIdentity;
            result.includeNullCategory = IncludeNullCategory;
            result.xCategory = XCategory;
            Ferda.Modules.Helpers.Data.Attribute.TestAreCategoriesInCategories(result.categories, new string[] { result.xCategory, result.includeNullCategory } , boxModule.StringIceIdentity);
            result.nameInLiterals = NameInLiterals;
            return result;
        }