internal MiningModelColumnCollectionInternal(AdomdConnection connection, MiningModel parentModel) : base(connection)
        {
            string name = parentModel.Name;

            this.parentObject = parentModel;
            this.InternalConstructor(connection, name);
        }
 internal MiningContentNode(AdomdConnection connection, DataRow miningContentNodeRow, MiningModel parentMiningModel, string catalog, string sessionId)
 {
     this.connection           = connection;
     this.miningContentNodeRow = miningContentNodeRow;
     this.parentMiningModel    = parentMiningModel;
     this.propertiesCollection = null;
     this.catalog   = catalog;
     this.sessionId = sessionId;
 }
Ejemplo n.º 3
0
 internal MiningAttribute(MiningModel parentModel)
 {
     this.attributeID      = -1;
     this.parentModel      = parentModel;
     this.name             = "";
     this.shortName        = "";
     this.valueColumn      = null;
     this.keyColumn        = null;
     this.featureSelection = MiningFeatureSelection.NotSelected;
 }
Ejemplo n.º 4
0
        internal MiningContentNodeCollectionInternal(AdomdConnection connection, MiningModel parentMiningModel, string nodeUniqueName) : base(connection)
        {
            this.parentMiningModel = parentMiningModel;
            ListDictionary listDictionary = new ListDictionary();

            listDictionary.Add(MiningContentNodeCollectionInternal.modelNameRest, parentMiningModel.Name);
            listDictionary.Add(MiningContentNodeCollectionInternal.nodeUniqueNameRest, nodeUniqueName);
            ObjectMetadataCache objectCache = new ObjectMetadataCache(connection, InternalObjectType.InternalTypeMiningContentNode, MiningContentNodeCollectionInternal.schemaName, listDictionary, true);

            base.Initialize(objectCache);
        }
 public MiningModel this[string index]
 {
     get
     {
         MiningModel miningModel = this.Find(index);
         if (null == miningModel)
         {
             throw new ArgumentException(SR.Indexer_ObjectNotFound(index), "index");
         }
         return(miningModel);
     }
 }
        private void PopulateCollection(MiningModel parentModel)
        {
            this.hashAttrIDs = new Hashtable();
            AdomdCommand adomdCommand = new AdomdCommand();

            adomdCommand.Connection = parentModel.ParentConnection;
            int num = 0;

            MiningModelColumnCollection.Enumerator enumerator = parentModel.Columns.GetEnumerator();
            while (enumerator.MoveNext())
            {
                MiningModelColumn current = enumerator.Current;
                if (current.IsTable)
                {
                    MiningModelColumnCollection.Enumerator enumerator2 = current.Columns.GetEnumerator();
                    while (enumerator2.MoveNext())
                    {
                        MiningModelColumn arg_54_0 = enumerator2.Current;
                        num++;
                    }
                }
            }
            adomdCommand.CommandText = string.Format(CultureInfo.InvariantCulture, MiningAttributeCollection.attribQueryStmt, new object[]
            {
                parentModel.Name
            });
            AdomdDataReader adomdDataReader = adomdCommand.ExecuteReader(CommandBehavior.SequentialAccess);

            while (adomdDataReader.Read())
            {
                int             @int            = adomdDataReader.GetInt32(MiningAttributeCollection.attIdIndex);
                string          @string         = adomdDataReader.GetString(MiningAttributeCollection.nameIndex);
                string          string2         = adomdDataReader.GetString(MiningAttributeCollection.shortNameIndex);
                bool            boolean         = adomdDataReader.GetBoolean(MiningAttributeCollection.isInputIndex);
                bool            boolean2        = adomdDataReader.GetBoolean(MiningAttributeCollection.isPredictableIndex);
                int             int2            = adomdDataReader.GetInt32(MiningAttributeCollection.featureSelectionIndex);
                string          string3         = adomdDataReader.GetString(MiningAttributeCollection.keyColumnIndex);
                string          string4         = adomdDataReader.GetString(MiningAttributeCollection.valueColumnIndex);
                MiningAttribute miningAttribute = new MiningAttribute(parentModel);
                miningAttribute.attributeID      = @int;
                miningAttribute.name             = @string;
                miningAttribute.shortName        = string2;
                miningAttribute.isInput          = boolean;
                miningAttribute.isPredictable    = boolean2;
                miningAttribute.featureSelection = (MiningFeatureSelection)int2;
                miningAttribute.keyColumn        = this.ModelColumnFromName(string3, parentModel);
                miningAttribute.valueColumn      = this.ModelColumnFromName(string4, parentModel);
                this.hashAttrIDs.Add(miningAttribute.name, miningAttribute.attributeID);
                this.arAttributesInternal.Add(miningAttribute);
            }
            adomdDataReader.Close();
            adomdCommand.Dispose();
        }
Ejemplo n.º 7
0
        internal MiningContentNodeCollectionInternal(AdomdConnection connection, MiningContentNode parentNode, MiningNodeTreeOpType operation) : base(connection)
        {
            this.parentNode        = parentNode;
            this.parentMiningModel = parentNode.ParentMiningModel;
            this.operation         = operation;
            ListDictionary listDictionary = new ListDictionary();

            listDictionary.Add(MiningContentNodeCollectionInternal.modelNameRest, this.parentMiningModel.Name);
            listDictionary.Add(MiningContentNodeCollectionInternal.nodeUniqueNameRest, parentNode.UniqueName);
            listDictionary.Add(MiningContentNodeCollectionInternal.treeOperationRest, (int)operation);
            ObjectMetadataCache objectCache = new ObjectMetadataCache(connection, InternalObjectType.InternalTypeMiningContentNode, MiningContentNodeCollectionInternal.schemaName, listDictionary, true);

            base.Initialize(objectCache);
        }
        private MiningModel GetMiningModelByRow(DataRow row)
        {
            MiningModel miningModel;

            if (row[0] is DBNull)
            {
                miningModel = new MiningModel(row, base.Connection, this.populatedTime, base.Catalog, base.SessionId, this.parentObject);
                row[0]      = miningModel;
            }
            else
            {
                miningModel = (MiningModel)row[0];
            }
            return(miningModel);
        }
        private MiningModelColumn ModelColumnFromName(string colName, MiningModel parentModel)
        {
            MiningModelColumn result = null;

            if (colName == null || colName.Length == 0)
            {
                return(result);
            }
            int    num   = colName.IndexOf(".", StringComparison.OrdinalIgnoreCase);
            string text  = string.Empty;
            string text2 = string.Empty;

            if (num < 0)
            {
                text = colName;
                if (text.IndexOf("[", StringComparison.OrdinalIgnoreCase) == 0)
                {
                    text = text.Substring(1, text.Length - 2);
                }
                result = parentModel.Columns[text];
            }
            else
            {
                text  = colName.Substring(0, num);
                text2 = colName.Substring(num + 1, colName.Length - num - 1);
                if (text.IndexOf("[", StringComparison.OrdinalIgnoreCase) == 0)
                {
                    text = text.Substring(1, text.Length - 2);
                }
                MiningModelColumn miningModelColumn = parentModel.Columns[text];
                if (text2.IndexOf("[", StringComparison.OrdinalIgnoreCase) == 0)
                {
                    text2 = text2.Substring(1, text2.Length - 2);
                }
                result = miningModelColumn.Columns[text2];
            }
            return(result);
        }
Ejemplo n.º 10
0
 internal MiningAttribute(MiningModel parentModel, string attributeDisplayName)
 {
     this.attributeID      = -1;
     this.parentModel      = parentModel;
     this.name             = attributeDisplayName;
     this.shortName        = "";
     this.valueColumn      = null;
     this.keyColumn        = null;
     this.featureSelection = MiningFeatureSelection.NotSelected;
     this.isInput          = false;
     this.isPredictable    = false;
     this.ParseAttributeName();
     if (this.valueColumn != null)
     {
         this.isInput       = this.valueColumn.IsInput;
         this.isPredictable = this.valueColumn.IsPredictable;
         return;
     }
     if (this.parentColumn != null)
     {
         this.isInput       = this.parentColumn.IsInput;
         this.isPredictable = this.parentColumn.IsPredictable;
     }
 }
 internal MiningContentNodeCollection(AdomdConnection connection, MiningModel parentMiningModel, string nodeUniqueName)
 {
     this.miningContentNodeCollectionInternal = new MiningContentNodeCollectionInternal(connection, parentMiningModel, nodeUniqueName);
 }
 internal MiningContentNodeCollection(AdomdConnection connection, MiningModel parentMiningModel)
 {
     this.miningContentNodeCollectionInternal = new MiningContentNodeCollectionInternal(connection, parentMiningModel);
 }
Ejemplo n.º 13
0
        internal static MiningContentNode GetMiningContentNodeByRow(DataSet dataSet, AdomdConnection connection, DataRow row, MiningModel parentMiningModel, string catalog, string sessionId)
        {
            MiningContentNode miningContentNode;

            if (row[0] is DBNull)
            {
                DataTable         dataTable = dataSet.Tables[0];
                DataRowCollection rows      = dataTable.Rows;
                int     index = (int)row[1];
                DataRow miningContentNodeRow = rows[index];
                miningContentNode = new MiningContentNode(connection, miningContentNodeRow, parentMiningModel, catalog, sessionId);
                row[0]            = miningContentNode;
            }
            else
            {
                miningContentNode = (MiningContentNode)row[0];
            }
            return(miningContentNode);
        }
 internal MiningAttributeCollection(MiningModel parentModel, MiningFeatureSelection filter)
 {
     this.arAttributesInternal = new ArrayList();
     this.FilterCollection(parentModel.Attributes, filter);
 }
 internal MiningAttributeCollection(MiningModel parentModel)
 {
     this.arAttributesInternal = new ArrayList();
     this.PopulateCollection(parentModel);
 }