📄 index.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.KeysIndexes;
import java.util.Iterator;
import java.util.Collection;
import java.util.List;
import com.prudsys.pdm.Cwm.Core.*;
/**
* Instances of the Index class represent the ordering of the instances of some
* other Class, and the Index is said to "span" the Class. Indexes normally have
* an ordered set of attributes of the Class instance they span that make up the
* "key" of the index; this set of relationships is represented by the
* IndexedFeature class that indicates how the attributes are used by the Index
* instance.
*
*
*
* The Index class is intended primarily as a starting point for tools that
* require the notion
*
* of an index.
*/
public class Index extends ModelElement implements org.omg.cwm.foundation.keysindexes.Index
{
/**
* If True, this Index instance is used as a partitioning index.
*/
public com.prudsys.pdm.Cwm.Core.Boolean isPartitioning;
/**
* If True, the Index instance is maintained in a sorted order.
*/
public com.prudsys.pdm.Cwm.Core.Boolean isSorted;
/**
* The isUnique attribute is True if the Index instance guarantees all of its
* instances have a unique key value.
*/
public com.prudsys.pdm.Cwm.Core.Boolean isUnique;
public IndexedFeature indexedFeature[];
public com.prudsys.pdm.Cwm.Core.Class spannedClass;
public Index()
{
}
public List getIndexedFeature() {
return CWMTools.ArrayToList(indexedFeature);
}
public void setIndexedFeature(Collection indexedFeature) {
this.indexedFeature = new IndexedFeature[ indexedFeature.size() ];
Iterator it = indexedFeature.iterator();
for (int i = 0; i < indexedFeature.size(); i++)
this.indexedFeature[i] = (IndexedFeature) it.next();
}
public void addIndexedFeature( org.omg.cwm.foundation.keysindexes.IndexedFeature input){
int size = (indexedFeature == null) ? 0 : indexedFeature.length;
IndexedFeature[] oldData = indexedFeature;
indexedFeature = new IndexedFeature[size+1];
if (size > 0) System.arraycopy(oldData, 0, indexedFeature, 0, size);
indexedFeature[size] = (IndexedFeature) input;
}
public void removeIndexedFeature( org.omg.cwm.foundation.keysindexes.IndexedFeature input) {
int size = (indexedFeature == null) ? 0 : indexedFeature.length;
if (size == 0)
return;
int ipos = -1;
for (int i = 0; i < size; i++)
if (indexedFeature[i].equals(input)) {
ipos = i;
break;
}
if (ipos == -1)
return;
IndexedFeature[] oldData = indexedFeature;
indexedFeature = new IndexedFeature[size-1];
for (int i = 0; i < ipos; i++)
indexedFeature[i] = oldData[i];
for (int i = ipos+1; i < size; i++)
indexedFeature[i-1] = oldData[i];
}
public void moveIndexedFeatureBefore( org.omg.cwm.foundation.keysindexes.IndexedFeature before, org.omg.cwm.foundation.keysindexes.IndexedFeature input) {
}
public void moveIndexedFeatureAfter( org.omg.cwm.foundation.keysindexes.IndexedFeature before, org.omg.cwm.foundation.keysindexes.IndexedFeature input) {
}
public java.lang.Boolean getIsPartitioning() {
return isPartitioning.getBoolean();
}
public void setIsPartitioning(java.lang.Boolean isPartitioning) {
com.prudsys.pdm.Cwm.Core.Boolean b = new com.prudsys.pdm.Cwm.Core.Boolean();
b.setBoolean(isPartitioning);
this.isPartitioning = b;
}
public boolean isPartitioningValue() {
return isPartitioning.isBooleanValue();
}
public void setIsPartitioning(boolean isPartitioning) {
setIsPartitioning(new java.lang.Boolean(isPartitioning));
}
public java.lang.Boolean getIsSorted() {
return isSorted.getBoolean();
}
public void setIsSorted(java.lang.Boolean isSorted) {
com.prudsys.pdm.Cwm.Core.Boolean b = new com.prudsys.pdm.Cwm.Core.Boolean();
b.setBoolean(isSorted);
this.isSorted = b;
}
public boolean isSortedValue() {
return isSorted.isBooleanValue();
}
public void setIsSorted(boolean isSorted) {
setIsSorted(new java.lang.Boolean(isSorted));
}
public java.lang.Boolean getIsUnique() {
return isUnique.getBoolean();
}
public void setIsUnique(java.lang.Boolean isUnique) {
com.prudsys.pdm.Cwm.Core.Boolean b = new com.prudsys.pdm.Cwm.Core.Boolean();
b.setBoolean(isUnique);
this.isUnique = b;
}
public boolean isUniqueValue() {
return isUnique.isBooleanValue();
}
public void setIsUnique(boolean isUnique) {
setIsUnique(new java.lang.Boolean(isUnique));
}
public org.omg.cwm.objectmodel.core.Class getSpannedClass() {
return spannedClass;
}
public void setSpannedClass(org.omg.cwm.objectmodel.core.Class spannedClass) {
this.spannedClass = (com.prudsys.pdm.Cwm.Core.Class) spannedClass;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -