⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 namedcolumnset.java

📁 一个数据挖掘软件ALPHAMINERR的整个过程的JAVA版源代码
💻 JAVA
字号:
/*
 *    This program is free software; you can redistribute it and/or modify
 *    it under the terms of the GNU General Public License as published by
 *    the Free Software Foundation; either version 2 of the License, or
 *    (at your option) any later version.
 *
 *    This program is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU General Public License for more details.
 *
 *    You should have received a copy of the GNU General Public License
 *    along with this program; if not, write to the Free Software
 *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

/**
 * Title: XELOPES Data Mining Library
 * Description: The XELOPES library is an open platform-independent and data-source-independent library for Embedded Data Mining.
 * Copyright: Copyright (c) 2002 Prudential Systems Software GmbH
 * Company: ZSoft (www.zsoft.ru), Prudsys (www.prudsys.com)
 * @author Valentine Stepanenko (valentine.stepanenko@zsoft.ru)
 * @version 1.0
 */

package com.prudsys.pdm.Cwm.Relational;

import java.util.Collection;
import java.util.Iterator;


/**
 * A catalogued set of columns, which may be Table or View.
 *
 *
 *
 * Note for typed tables: It is assumed that the typed table will own a set of
 * columns conforming to the type they are OF. This set of columns allows the
 * manipulation of the table by products which ignore this [SQL] extension. It
 * also allows the columns of type REF, to be copied to a column with a SCOPE
 * reference.
 */
public class NamedColumnSet extends ColumnSet implements org.omg.cwm.resource.relational.NamedColumnSet
{
   public Trigger usingTrigger[];
   public SQLStructuredType type;
   public Column optionScopeColumn[];

   public NamedColumnSet()
   {

   }

   public Collection getOptionScopeColumn() {
     return com.prudsys.pdm.Cwm.Core.CWMTools.ArrayToList(optionScopeColumn);
   }

   public void setOptionScopeColumn(Collection optionScopeColumn) {

     this.optionScopeColumn = new Column[ optionScopeColumn.size() ];
     Iterator it = optionScopeColumn.iterator();
     for (int i = 0; i < optionScopeColumn.size(); i++)
       this.optionScopeColumn[i] = (Column) it.next();
   }

   public void addOptionScopeColumn( org.omg.cwm.resource.relational.Column input) {

     int size = (optionScopeColumn == null) ? 0 : optionScopeColumn.length;
     Column[] oldData = optionScopeColumn;
     optionScopeColumn = new Column[size+1];
     if (size > 0) System.arraycopy(oldData, 0, optionScopeColumn, 0, size);
     optionScopeColumn[size] = (Column) input;
   }

   public void removeOptionScopeColumn( org.omg.cwm.resource.relational.Column input) {

     int size = (optionScopeColumn == null) ? 0 : optionScopeColumn.length;
     if (size == 0)
       return;

     int ipos = -1;
     for (int i = 0; i < size; i++)
       if (optionScopeColumn[i].equals(input)) {
         ipos = i;
         break;
       }
     if (ipos == -1)
       return;

     Column[] oldData = optionScopeColumn;
     optionScopeColumn = new Column[size-1];
     for (int i = 0; i < ipos; i++)
       optionScopeColumn[i] = oldData[i];
     for (int i = ipos+1; i < size; i++)
       optionScopeColumn[i-1] = oldData[i];
   }


   public org.omg.cwm.resource.relational.SQLStructuredType getType() {
     return type;
   }

   public void setType(org.omg.cwm.resource.relational.SQLStructuredType type) {
     this.type = (SQLStructuredType) type;
   }

   public Collection getUsingTrigger() {
     return com.prudsys.pdm.Cwm.Core.CWMTools.ArrayToList(usingTrigger);
   }

   public void setUsingTrigger(Collection usingTrigger) {

     this.usingTrigger = new Trigger[ usingTrigger.size() ];
     Iterator it = usingTrigger.iterator();
     for (int i = 0; i < usingTrigger.size(); i++)
       this.usingTrigger[i] = (Trigger) it.next();
   }

   public void addUsingTrigger( org.omg.cwm.resource.relational.Trigger input) {

     int size = (usingTrigger == null) ? 0 : usingTrigger.length;
     Trigger[] oldData = usingTrigger;
     usingTrigger = new Trigger[size+1];
     if (size > 0) System.arraycopy(oldData, 0, usingTrigger, 0, size);
     usingTrigger[size] = (Trigger) input;
   }

   public void removeUsingTrigger( org.omg.cwm.resource.relational.Trigger input) {

     int size = (usingTrigger == null) ? 0 : usingTrigger.length;
     if (size == 0)
       return;

     int ipos = -1;
     for (int i = 0; i < size; i++)
       if (usingTrigger[i].equals(input)) {
         ipos = i;
         break;
       }
     if (ipos == -1)
       return;

     Trigger[] oldData = usingTrigger;
     usingTrigger = new Trigger[size-1];
     for (int i = 0; i < ipos; i++)
       usingTrigger[i] = oldData[i];
     for (int i = ipos+1; i < size; i++)
       usingTrigger[i-1] = oldData[i];
   }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -