/// <summary>
 /// Gets the box modules asking for creation.
 /// </summary>
 /// <param name="localePrefs">The localization preferences.</param>
 /// <param name="boxModule">The box module.</param>
 /// <returns>
 /// Array of <see cref="T:Ferda.Modules.ModuleAskingForCreation">
 /// Modules Asking For Creation</see>.
 /// </returns>
 public override ModulesAskingForCreation[] GetModulesAskingForCreation(string[] localePrefs, BoxModuleI boxModule)
 {
     Dictionary<string, ModulesAskingForCreation> modulesAFC = this.getModulesAskingForCreationNonDynamic(localePrefs);
     List<ModulesAskingForCreation> result = new List<ModulesAskingForCreation>();
     ModulesAskingForCreation moduleAFC;
     ModulesConnection moduleConnection;
     ModuleAskingForCreation singleModuleAFC;
     //PropertySetting propertySetting;
     //Ferda.ModulesManager.BoxModuleProjectInformationPrx projectInfoPrx = boxModule.Manager.getProjectInformation();
     //string label = projectInfoPrx.getUserLabel(boxModule.StringIceIdentity);
     foreach (string moduleAFCName in modulesAFC.Keys)
     {
         moduleAFC = modulesAFC[moduleAFCName];
         moduleConnection = new ModulesConnection();
         singleModuleAFC = new ModuleAskingForCreation();
         switch (moduleAFCName)
         {
             case "SDKLTask":
                 moduleConnection.socketName = "SDKLQuantifier";
                 singleModuleAFC.newBoxModuleIdentifier =
                     Ferda.Modules.Boxes.LISpMinerTasks.SDKLTask.SDKLTaskBoxInfo.typeIdentifier;
                 break;
             default:
                 throw Ferda.Modules.Exceptions.SwitchCaseNotImplementedError(moduleAFCName);
         }
         moduleConnection.boxModuleParam = boxModule.MyProxy;
         singleModuleAFC.modulesConnection = new ModulesConnection[] { moduleConnection };
         moduleAFC.newModules = new ModuleAskingForCreation[] { singleModuleAFC };
         result.Add(moduleAFC);
     }
     return result.ToArray();
 }
 /// <summary>
 /// Gets the box modules asking for creation.
 /// </summary>
 /// <param name="localePrefs">The localization preferences.</param>
 /// <param name="boxModule">The box module.</param>
 /// <returns>
 /// Array of <see cref="T:Ferda.Modules.ModuleAskingForCreation">
 /// Modules Asking For Creation</see>.
 /// </returns>
 public override ModulesAskingForCreation[] GetModulesAskingForCreation(string[] localePrefs, BoxModuleI boxModule)
 {
     Dictionary<string, ModulesAskingForCreation> modulesAFC = this.getModulesAskingForCreationNonDynamic(localePrefs);
     List<ModulesAskingForCreation> result = new List<ModulesAskingForCreation>();
     ModulesAskingForCreation moduleAFC;
     ModulesConnection moduleConnection;
     ModuleAskingForCreation singleModuleAFC;
     foreach (string moduleAFCName in modulesAFC.Keys)
     {
         moduleAFC = modulesAFC[moduleAFCName];
         moduleConnection = new ModulesConnection();
         singleModuleAFC = new ModuleAskingForCreation();
         switch (moduleAFCName)
         {
             case "AtomSetting":
                 moduleConnection.socketName = "Attribute";
                 moduleConnection.boxModuleParam = boxModule.MyProxy;
                 singleModuleAFC.newBoxModuleIdentifier =
                     Ferda.Modules.Boxes.DataMiningCommon.AtomSetting.AtomSettingBoxInfo.typeIdentifier;
                 break;
             case "EquivalenceClass":
                 moduleConnection.socketName = "LiteralSettingOrAttribute";
                 moduleConnection.boxModuleParam = boxModule.MyProxy;
                 singleModuleAFC.newBoxModuleIdentifier =
                     Ferda.Modules.Boxes.DataMiningCommon.EquivalenceClass.EquivalenceClassBoxInfo.typeIdentifier;
                 break;
             case "CategorialPartialCedentSetting":
                 moduleConnection.socketName = "Attribute";
                 moduleConnection.boxModuleParam = boxModule.MyProxy;
                 singleModuleAFC.newBoxModuleIdentifier =
                     Ferda.Modules.Boxes.DataMiningCommon.CategorialPartialCedentSetting.CategorialPartialCedentSettingBoxInfo.typeIdentifier;
                 break;
             default:
                 throw Ferda.Modules.Exceptions.SwitchCaseNotImplementedError(moduleAFCName);
         }
         singleModuleAFC.modulesConnection = new ModulesConnection[] { moduleConnection };
         moduleAFC.newModules = new ModuleAskingForCreation[] { singleModuleAFC };
         result.Add(moduleAFC);
     }
     return result.ToArray();
 }
 /// <summary>
 /// Gets the box modules asking for creation.
 /// </summary>
 /// <param name="localePrefs">The localization preferences.</param>
 /// <param name="boxModule">The box module.</param>
 /// <returns>
 /// Array of <see cref="T:Ferda.Modules.ModuleAskingForCreation">
 /// Modules Asking For Creation</see>.
 /// </returns>
 public override ModulesAskingForCreation[] GetModulesAskingForCreation(string[] localePrefs, BoxModuleI boxModule)
 {
     Dictionary<string, ModulesAskingForCreation> modulesAFC = this.getModulesAskingForCreationNonDynamic(localePrefs);
     List<ModulesAskingForCreation> result = new List<ModulesAskingForCreation>();
     ModulesAskingForCreation moduleAFC;
     ModulesConnection moduleConnection;
     ModuleAskingForCreation singleModuleAFC;
     List<ModuleAskingForCreation> allColumnModulesAFC = new List<ModuleAskingForCreation>();
     // I presuppose that item with key "Column" is before item with key "AllColumns"
     foreach (string moduleAFCName in modulesAFC.Keys)
     {
         moduleAFC = modulesAFC[moduleAFCName];
         switch (moduleAFCName)
         {
             case "Column":
                 DataMatrixFunctionsI Func = (DataMatrixFunctionsI)boxModule.FunctionsIObj;
                 string[] columnsNames = null;
                 try
                 {
                     columnsNames = Func.getColumnsNames();
                 }
                 catch (Ferda.Modules.BoxRuntimeError) { }
                 if (columnsNames != null && columnsNames.Length > 0)
                 {
                     moduleConnection = new ModulesConnection();
                     moduleConnection.socketName = "DataMatrixOrMultiColumn";
                     moduleConnection.boxModuleParam = boxModule.MyProxy;
                     foreach (string columnName in columnsNames)
                     {
                         ModulesAskingForCreation newMAFC = new ModulesAskingForCreation();
                         newMAFC.label = moduleAFC.label.Replace("@Name", columnName);
                         newMAFC.hint = moduleAFC.hint.Replace("@Name", columnName);
                         newMAFC.help = moduleAFC.help;
                         singleModuleAFC = new ModuleAskingForCreation();
                         singleModuleAFC.modulesConnection = new ModulesConnection[] { moduleConnection }; ;
                         singleModuleAFC.newBoxModuleIdentifier =
                             Ferda.Modules.Boxes.DataMiningCommon.Column.ColumnBoxInfo.typeIdentifier;
                         PropertySetting propertySetting = new PropertySetting();
                         propertySetting.propertyName = "Name";
                         propertySetting.value = new Ferda.Modules.StringTI(columnName);
                         singleModuleAFC.propertySetting = new PropertySetting[] { propertySetting };
                         allColumnModulesAFC.Add(singleModuleAFC);
                         newMAFC.newModules = new ModuleAskingForCreation[] { singleModuleAFC };
                         result.Add(newMAFC);
                     }
                 }
                 break;
             case "DerivedColumn":
                 moduleConnection = new ModulesConnection();
                 singleModuleAFC = new ModuleAskingForCreation();
                 moduleConnection.socketName = "DataMatrix";
                 moduleConnection.boxModuleParam = boxModule.MyProxy;
                 singleModuleAFC.modulesConnection = new ModulesConnection[] { moduleConnection };
                 singleModuleAFC.newBoxModuleIdentifier =
                     Ferda.Modules.Boxes.DataMiningCommon.DerivedColumn.DerivedColumnBoxInfo.typeIdentifier;
                 moduleAFC.newModules = new ModuleAskingForCreation[] { singleModuleAFC };
                 result.Add(moduleAFC);
                 break;
             case "AllColumns":
                 if (allColumnModulesAFC.Count <= 1)
                     continue;
                 moduleConnection = new ModulesConnection();
                 moduleConnection.socketName = "DataMatrixOrMultiColumn";
                 moduleConnection.boxModuleParam = boxModule.MyProxy;
                 moduleAFC.newModules = allColumnModulesAFC.ToArray();
                 result.Add(moduleAFC);
                 break;
             default:
                 throw Ferda.Modules.Exceptions.SwitchCaseNotImplementedError(moduleAFCName);
         }
     }
     return result.ToArray();
 }
 //EachValueOneCategoryAttributeFunctionsI Func = (EachValueOneCategoryAttributeFunctionsI)boxModule.FunctionsIObj;
 /// <summary>
 /// Gets the box modules asking for creation.
 /// </summary>
 /// <param name="localePrefs">The localization preferences.</param>
 /// <param name="boxModule">The box module.</param>
 /// <returns>
 /// Array of <see cref="T:Ferda.Modules.ModuleAskingForCreation">
 /// Modules Asking For Creation</see>.
 /// </returns>
 public override ModulesAskingForCreation[] GetModulesAskingForCreation(string[] localePrefs, BoxModuleI boxModule)
 {
     Dictionary<string, ModulesAskingForCreation> modulesAFC = this.getModulesAskingForCreationNonDynamic(localePrefs);
     List<ModulesAskingForCreation> result = new List<ModulesAskingForCreation>();
     ModulesAskingForCreation moduleAFC;
     ModulesConnection moduleConnection;
     ModuleAskingForCreation singleModuleAFC;
     //Ferda.ModulesManager.BoxModuleProjectInformationPrx projectInfoPrx = boxModule.Manager.getProjectInformation();
     foreach (string moduleAFCName in modulesAFC.Keys)
     {
         moduleAFC = modulesAFC[moduleAFCName];
         moduleConnection = new ModulesConnection();
         singleModuleAFC = new ModuleAskingForCreation();
         switch (moduleAFCName)
         {
             case "AtomSetting":
                 moduleConnection.socketName = "Attribute";
                 //moduleAFC.newBoxModuleUserLabel = new string[] { projectInfoPrx.getUserLabel(boxModule.StringIceIdentity) };
                 moduleConnection.boxModuleParam = boxModule.MyProxy;
                 singleModuleAFC.newBoxModuleIdentifier =
                     Ferda.Modules.Boxes.DataMiningCommon.AtomSetting.AtomSettingBoxInfo.typeIdentifier;
                 break;
             case "EquivalenceClass":
                 moduleConnection.socketName = "LiteralSettingOrAttribute";
                 moduleConnection.boxModuleParam = boxModule.MyProxy;
                 singleModuleAFC.newBoxModuleIdentifier =
                     Ferda.Modules.Boxes.DataMiningCommon.EquivalenceClass.EquivalenceClassBoxInfo.typeIdentifier;
                 break;
             case "CategorialPartialCedentSetting":
                 moduleConnection.socketName = "Attribute";
                 //moduleAFC.newBoxModuleUserLabel = new string[] { projectInfoPrx.getUserLabel(boxModule.StringIceIdentity) };
                 moduleConnection.boxModuleParam = boxModule.MyProxy;
                 singleModuleAFC.newBoxModuleIdentifier =
                     Ferda.Modules.Boxes.DataMiningCommon.CategorialPartialCedentSetting.CategorialPartialCedentSettingBoxInfo.typeIdentifier;
                 break;
             case "Attribute":
                 moduleConnection.socketName = "ColumnOrDerivedColumn";
                 //moduleAFC.newBoxModuleUserLabel = new string[] { projectInfoPrx.getUserLabel(boxModule.StringIceIdentity) };
                 singleModuleAFC.newBoxModuleIdentifier =
                     Ferda.Modules.Boxes.DataMiningCommon.Attributes.Attribute.AttributeBoxInfo.typeIdentifier;
                 try
                 {
                     IAbstractDynamicAttribute func = this.getFuncIAbstractDynamicAttribute(boxModule);
                     moduleConnection.boxModuleParam = func.GetColumnBoxModulePrx();
                     singleModuleAFC.propertySetting = func.GetSettingForNewAttributeBox();
                 }
                 catch (Ferda.Modules.BoxRuntimeError) { continue; }
                 break;
             default:
                 throw Ferda.Modules.Exceptions.SwitchCaseNotImplementedError(moduleAFCName);
         }
         singleModuleAFC.modulesConnection = new ModulesConnection[] { moduleConnection };
         moduleAFC.newModules = new ModuleAskingForCreation[] { singleModuleAFC };
         result.Add(moduleAFC);
     }
     return result.ToArray();
 }
 /// <summary>
 /// Gets the box modules asking for creation.
 /// </summary>
 /// <param name="localePrefs">The localization preferences.</param>
 /// <param name="boxModule">The box module.</param>
 /// <returns>
 /// Array of <see cref="T:Ferda.Modules.ModuleAskingForCreation">
 /// Modules Asking For Creation</see>.
 /// </returns>
 public override ModulesAskingForCreation[] GetModulesAskingForCreation(string[] localePrefs, BoxModuleI boxModule)
 {
     Dictionary<string, ModulesAskingForCreation> modulesAFC = this.getModulesAskingForCreationNonDynamic(localePrefs);
     List<ModulesAskingForCreation> result = new List<ModulesAskingForCreation>();
     ModulesAskingForCreation moduleAFC;
     ModulesConnection moduleConnection;
     ModuleAskingForCreation singleModuleAFC;
     //PropertySetting propertySetting;
     //Ferda.ModulesManager.BoxModuleProjectInformationPrx projectInfoPrx = boxModule.Manager.getProjectInformation();
     //string label = projectInfoPrx.getUserLabel(boxModule.StringIceIdentity);
     foreach (string moduleAFCName in modulesAFC.Keys)
     {
         moduleAFC = modulesAFC[moduleAFCName];
         moduleConnection = new ModulesConnection();
         singleModuleAFC = new ModuleAskingForCreation();
         switch (moduleAFCName)
         {
             case "BooleanPartialCedentSetting":
                 moduleConnection.socketName = "LiteralSetting";
                 singleModuleAFC.newBoxModuleIdentifier =
                     Ferda.Modules.Boxes.DataMiningCommon.BooleanPartialCedentSetting.BooleanPartialCedentSettingBoxInfo.typeIdentifier;
                 break;
             case "EquivalenceClass":
                 moduleConnection.socketName = "LiteralSettingOrAttribute";
                 singleModuleAFC.newBoxModuleIdentifier =
                     Ferda.Modules.Boxes.DataMiningCommon.EquivalenceClass.EquivalenceClassBoxInfo.typeIdentifier;
                 break;
             default:
                 throw Ferda.Modules.Exceptions.SwitchCaseNotImplementedError(moduleAFCName);
         }
         moduleConnection.boxModuleParam = boxModule.MyProxy;
         singleModuleAFC.modulesConnection = new ModulesConnection[] { moduleConnection };
         moduleAFC.newModules = new ModuleAskingForCreation[] { singleModuleAFC };
         result.Add(moduleAFC);
     }
     return result.ToArray();
 }
        /// <summary>
        /// Gets the box modules asking for creation.
        /// </summary>
        /// <param name="localePrefs">The localization preferences.</param>
        /// <param name="boxModule">The box module.</param>
        /// <returns>
        /// Array of <see cref="T:Ferda.Modules.ModuleAskingForCreation">
        /// Modules Asking For Creation</see>.
        /// </returns>
        public override ModulesAskingForCreation[] GetModulesAskingForCreation(string[] localePrefs, BoxModuleI boxModule)
        {
            Dictionary<string, ModulesAskingForCreation> modulesAFC = this.getModulesAskingForCreationNonDynamic(localePrefs);
            List<ModulesAskingForCreation> result = new List<ModulesAskingForCreation>();
            ModulesAskingForCreation moduleAFC;
            ModulesConnection moduleConnection;
            ModuleAskingForCreation singleModuleAFC;
            PropertySetting propertySetting;
            Ferda.ModulesManager.BoxModuleProjectInformationPrx projectInfoPrx = boxModule.Manager.getProjectInformation();
            string label = projectInfoPrx.getUserLabel(boxModule.StringIceIdentity);

            //TODO switch column type:
            ValueSubTypeEnum columnValueSubType = ((ColumnFunctionsI)boxModule.FunctionsIObj).GetColumnSubType();
            //ValueSubTypeEnum columnValueSubType = (ValueSubTypeEnum)(Enum.Parse(typeof(ValueSubTypeEnum), boxModule.GetPropertyString("ValueSubType")));

            foreach (string moduleAFCName in modulesAFC.Keys)
            {
                moduleAFC = modulesAFC[moduleAFCName];
                moduleConnection = new ModulesConnection();
                singleModuleAFC = new ModuleAskingForCreation();
                switch (moduleAFCName)
                {
                    case "MultiColumn":
                        //TODO MultiColumn is not implemented yet.

                        //moduleConnection.socketName = "Column";
                        //singleModuleAFC.newBoxModuleIdentifier =
                        //	Ferda.Modules.Boxes.DataMiningCommon.MultiColumn.MultiColumnBoxInfo.typeIdentifier;
                        continue;
                    case "Attribute":
                    case "EachValueOneCategoryAttribute":
                    case "EquifrequencyIntervalsAttribute":
                    case "EquidistantIntervalsAttribute":
                        if (moduleAFCName == "Attribute")
                        {
                            singleModuleAFC.newBoxModuleIdentifier =
                                Ferda.Modules.Boxes.DataMiningCommon.Attributes.Attribute.AttributeBoxInfo.typeIdentifier;
                        }
                        if (moduleAFCName == "EachValueOneCategoryAttribute")
                        {
                            singleModuleAFC.newBoxModuleIdentifier =
                                Ferda.Modules.Boxes.DataMiningCommon.Attributes.EachValueOneCategoryAttribute.EachValueOneCategoryAttributeBoxInfo.typeIdentifier;
                        }
                        if (moduleAFCName == "EquifrequencyIntervalsAttribute")
                        {
                            if (!Ferda.Modules.Helpers.Data.Column.IsColumSubTypeCardinal(columnValueSubType)
                                || columnValueSubType == ValueSubTypeEnum.DateTimeType)
                                continue;
                            singleModuleAFC.newBoxModuleIdentifier =
                                Ferda.Modules.Boxes.DataMiningCommon.Attributes.EquifrequencyIntervalsAttribute.EquifrequencyIntervalsAttributeBoxInfo.typeIdentifier;
                        }
                        if (moduleAFCName == "EquidistantIntervalsAttribute")
                        {
                            if ((columnValueSubType == ValueSubTypeEnum.Unknown)
                                || (columnValueSubType == ValueSubTypeEnum.DateTimeType)
                                //|| (columnValueSubType == ValueSubTypeEnum.TimeType)
                                || (columnValueSubType == ValueSubTypeEnum.BooleanType))
                                continue;
                            singleModuleAFC.newBoxModuleIdentifier =
                                Ferda.Modules.Boxes.DataMiningCommon.Attributes.EquidistantIntervalsAttribute.EquidistantIntervalsAttributeBoxInfo.typeIdentifier;
                        }
                        moduleConnection.socketName = "ColumnOrDerivedColumn";
                        propertySetting = new PropertySetting();
                        propertySetting.propertyName = "NameInLiterals";
                        propertySetting.value = new Ferda.Modules.StringTI(label);
                        singleModuleAFC.propertySetting = new PropertySetting[] { propertySetting };
                        break;
                    default:
                        throw Ferda.Modules.Exceptions.SwitchCaseNotImplementedError(moduleAFCName);
                }
                moduleConnection.boxModuleParam = boxModule.MyProxy;
                singleModuleAFC.modulesConnection = new ModulesConnection[] { moduleConnection };
                singleModuleAFC.newBoxModuleUserLabel = new string[] { label };
                moduleAFC.newModules = new ModuleAskingForCreation[] { singleModuleAFC };
                result.Add(moduleAFC);
            }
            return result.ToArray();
        }