📄 cuberegion.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.Olap.Metadata;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import javax.olap.OLAPException;
/**
* CubeRegion models a sub-unit of a Cube of the same dimensionality as the Cube
* itself, with each Dimension optionally subsetted in its list of members.
*
*
*
* When mapped to its physical source, a CubeRegion contains data cells identified
* by the member combinations of the Cartesian product of the CubeRegion's
* associated Dimensions and Measures.
*
*
*
* The relative ordering of CubeDeployment classes optionally implies a desired
* order of selection of the CubeDeployments, based on implementation-specific
* considerations (e.g., optimized access of aggregate data).
*
*
*
* Synonyms: Sub-Cube, Partition, Slice, Region, Area.
*
*
*
* Misc. notes:
*
* 1. A CubeRegion is not a Cube, and a Cube is not a CubeRegion.
*
* 2. A Cube has a Measure and CubeRegion may have a corresponding measure
* (Measures are Attributes).
*
* 3. A Cube may or may not have CubeRegions.
*
* 4. If a Cube does not have a CubeRegion, then it's not physically mapped (it's
* virtual). All physical mapping is based on the CubeRegion , not the Cube.
*/
public class CubeRegion extends com.prudsys.pdm.Cwm.Core.Class implements javax.olap.serversidemetadata.CubeRegion
{
/**
* If true, then the CubeRegion content is read-only (i.e., may not be written or
* updated through the CubeRegion -- e.g., a CubeRegion implemented via an SQL
* view may not permit updates to the underlying base table).
*/
public com.prudsys.pdm.Cwm.Core.Boolean isReadOnly = new com.prudsys.pdm.Cwm.Core.Boolean();
/**
* If true, then this CubeRegion has a direct physical realization and is not
* bound by any MemberSelections.
*/
public com.prudsys.pdm.Cwm.Core.Boolean isFullyRealized = new com.prudsys.pdm.Cwm.Core.Boolean();
public Cube cube;
public MemberSelectionGroup memberSelectionGroup[];
public CubeDeployment cubeDeployment[];
public CubeRegion()
{
}
public javax.olap.serversidemetadata.Cube getCube() throws OLAPException
{
return cube;
}
public void setCube(javax.olap.serversidemetadata.Cube cube) throws OLAPException
{
this.cube = (Cube) cube;
}
public List getCubeDeployment() throws OLAPException
{
return com.prudsys.pdm.Cwm.Core.CWMTools.ArrayToList(cubeDeployment);
}
public void setCubeDeployment(Collection cubeDeployment) throws OLAPException
{
this.cubeDeployment = new CubeDeployment[ cubeDeployment.size() ];
Iterator it = cubeDeployment.iterator();
for (int i = 0; i < cubeDeployment.size(); i++)
this.cubeDeployment[i] = (CubeDeployment) it.next();
}
public void addCubeDeployment( javax.olap.serversidemetadata.CubeDeployment input) throws OLAPException
{
int size = (cubeDeployment == null) ? 0 : cubeDeployment.length;
CubeDeployment[] oldData = cubeDeployment;
cubeDeployment = new CubeDeployment[size+1];
if (size > 0) System.arraycopy(oldData, 0, cubeDeployment, 0, size);
cubeDeployment[size] = (CubeDeployment) input;
}
public void removeCubeDeployment( javax.olap.serversidemetadata.CubeDeployment input) throws OLAPException
{
int size = (cubeDeployment == null) ? 0 : cubeDeployment.length;
if (size == 0)
return;
int ipos = -1;
for (int i = 0; i < size; i++)
if (cubeDeployment[i].equals(input)) {
ipos = i;
break;
}
if (ipos == -1)
return;
CubeDeployment[] oldData = cubeDeployment;
cubeDeployment = new CubeDeployment[size-1];
for (int i = 0; i < ipos; i++)
cubeDeployment[i] = oldData[i];
for (int i = ipos+1; i < size; i++)
cubeDeployment[i-1] = oldData[i];
}
public java.lang.Boolean getIsFullyRealized() throws OLAPException
{
return isFullyRealized.getBoolean();
}
public void setIsFullyRealized(Boolean isFullyRealized) throws OLAPException
{
com.prudsys.pdm.Cwm.Core.Boolean b = new com.prudsys.pdm.Cwm.Core.Boolean();
b.setBoolean(isFullyRealized);
this.isFullyRealized = b;
}
public boolean isFullyRealizedValue() throws OLAPException
{
return isFullyRealized.isBooleanValue();
}
public void setIsFullyRealized(boolean isFullyRealized) throws OLAPException
{
this.setIsFullyRealized( new Boolean(isFullyRealized) );
}
public Collection getMemberSelectionGroup() throws OLAPException
{
return com.prudsys.pdm.Cwm.Core.CWMTools.ArrayToList(cubeDeployment);
}
public void setMemberSelectionGroup(Collection memberSelectionGroup) throws OLAPException
{
this.memberSelectionGroup = new MemberSelectionGroup[ memberSelectionGroup.size() ];
Iterator it = memberSelectionGroup.iterator();
for (int i = 0; i < memberSelectionGroup.size(); i++)
this.memberSelectionGroup[i] = (MemberSelectionGroup) it.next();
}
public void addMemberSelectionGroup( javax.olap.serversidemetadata.MemberSelectionGroup input) throws OLAPException
{
int size = (memberSelectionGroup == null) ? 0 : memberSelectionGroup.length;
MemberSelectionGroup[] oldData = memberSelectionGroup;
memberSelectionGroup = new MemberSelectionGroup[size+1];
if (size > 0) System.arraycopy(oldData, 0, memberSelectionGroup, 0, size);
memberSelectionGroup[size] = (MemberSelectionGroup) input;
}
public void removeMemberSelectionGroup( javax.olap.serversidemetadata.MemberSelectionGroup input) throws OLAPException
{
int size = (memberSelectionGroup == null) ? 0 : memberSelectionGroup.length;
if (size == 0)
return;
int ipos = -1;
for (int i = 0; i < size; i++)
if (memberSelectionGroup[i].equals(input)) {
ipos = i;
break;
}
if (ipos == -1)
return;
MemberSelectionGroup[] oldData = memberSelectionGroup;
memberSelectionGroup = new MemberSelectionGroup[size-1];
for (int i = 0; i < ipos; i++)
memberSelectionGroup[i] = oldData[i];
for (int i = ipos+1; i < size; i++)
memberSelectionGroup[i-1] = oldData[i];
}
public java.lang.Boolean getIsReadOnly() throws OLAPException
{
return isReadOnly.getBoolean();
}
public void setIsReadOnly(Boolean isReadOnly) throws OLAPException
{
com.prudsys.pdm.Cwm.Core.Boolean b = new com.prudsys.pdm.Cwm.Core.Boolean();
b.setBoolean(isReadOnly);
this.isReadOnly = b;
}
public boolean isReadOnlyValue() throws OLAPException
{
return isReadOnly.isBooleanValue();
}
public void setIsReadOnly(boolean isReadOnly) throws OLAPException
{
this.setIsReadOnly( new Boolean(isReadOnly) );
}
public void moveCubeDeploymentBefore( javax.olap.serversidemetadata.CubeDeployment before, javax.olap.serversidemetadata.CubeDeployment input) throws OLAPException
{
throw new UnsupportedOperationException();
}
public void moveCubeDeploymentAfter( javax.olap.serversidemetadata.CubeDeployment before, javax.olap.serversidemetadata.CubeDeployment input) throws OLAPException
{
throw new UnsupportedOperationException();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -