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

📄 table.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.Iterator;
import java.util.List;


/**
 * A materialized NamedColumnSet.
 */
public class Table extends NamedColumnSet implements org.omg.cwm.resource.relational.Table
{

   /**
    * Indicates that the table content is temporary. SQL92 standards provide two
    * types of temporary tables (local Temporary and Global Temporary). However,
    * RDBMS products have implemented variations on this theme. It is recommended
    * that the product manufacturers provide specific temporary information (besides
    * the temporaryScope attribute) in their extensions.
    */
   public com.prudsys.pdm.Cwm.Core.Boolean isTemporary;

   /**
    * This attribute is meaningful only when the isTemporary flag is True [C-1]. The
    * scope indicates when the data of this table are available. "SESSION",
    * "APPLICATION" are examples of possible values. Look at the Scope attribute for
    * Global Temporary tables in the SQL standards for more details.
    */
   public com.prudsys.pdm.Cwm.Core.String temporaryScope;

   /**
    * Indicates that the Table is a System Table (generally part of or view on the
    * system catalog).
    */
   public com.prudsys.pdm.Cwm.Core.Boolean isSystem;
   public Trigger trigger[];

   public Table()
   {

   }

   public java.lang.Boolean getIsSystem() {
     return isSystem.getBoolean();
   }

   public void setIsSystem(java.lang.Boolean isSystem) {
     com.prudsys.pdm.Cwm.Core.Boolean b = new com.prudsys.pdm.Cwm.Core.Boolean();
     b.setBoolean(isSystem);
     this.isSystem = b;
   }

   public boolean isSystemValue() {
     return isSystem.isBooleanValue();
   }

   public void setIsSystem(boolean isSystem) {
     setIsSystem(new java.lang.Boolean(isSystem));
   }

   public java.lang.Boolean getIsTemporary() {
     return isTemporary.getBoolean();
   }

   public void setIsTemporary(Boolean isTemporary) {
     com.prudsys.pdm.Cwm.Core.Boolean b = new com.prudsys.pdm.Cwm.Core.Boolean();
     b.setBoolean(isTemporary);
     this.isTemporary = b;
   }

   public boolean isTemporaryValue() {
     return isTemporary.isBooleanValue();
   }

   public void setIsTemporary(boolean isTemporary) {
     setIsTemporary(new java.lang.Boolean(isTemporary));
   }

   public java.lang.String getTemporaryScope() {
     return temporaryScope.getString();
   }

   public void setTemporaryScope(java.lang.String temporaryScope) {
     com.prudsys.pdm.Cwm.Core.String s = new com.prudsys.pdm.Cwm.Core.String();
     s.setString(temporaryScope);
     this.temporaryScope = s;
   }

   public List getTrigger() {
     return com.prudsys.pdm.Cwm.Core.CWMTools.ArrayToList(trigger);
   }

   public void setTrigger(List trigger) {

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

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

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

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

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

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

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

   public String toString() {

     String s = "Table: " + getName() + "\n";
     if (feature != null)
       for (int i = 0; i < feature.length; i++) {
         if ( !(feature[i] instanceof Column) )
           continue;

         Column column = (Column) feature[i];
         String columnName = column.getName();
         if (columnName == null) columnName = "NULL";
         org.omg.cwm.objectmodel.core.Classifier columnType = column.getType();
         String columnTypeName = "UNKNOWN";
         if (columnType != null)
           columnTypeName = columnType.getName();

         s = s + "column name = " + columnName +
             ", column type = " + columnTypeName +
             ", column length = " + column.getLength() + "\n";
       }

     return s;
   }


}

⌨️ 快捷键说明

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