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

📄 insightoperator.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.
 */

package eti.bi.alphaminer.patch.standard.operation.operator;


import java.util.Vector;


import com.prudsys.pdm.Core.MiningException;
import com.prudsys.pdm.Input.MiningStoredData;

import eti.bi.alphaminer.core.handler.ICaseHandler;
import eti.bi.alphaminer.operation.operator.ExploreOperator;
import eti.bi.alphaminer.operation.operator.INodeInfo;
import eti.bi.alphaminer.operation.operator.Operator;
import eti.bi.alphaminer.vo.IBIData;
import eti.bi.alphaminer.vo.IBIObject;
import eti.bi.alphaminer.vo.IOperatorNode;
import eti.bi.exception.AppException;
import eti.bi.exception.SysException;

/**
 * InsightOperator is a kind of Operator
 */
public class InsightOperator extends ExploreOperator {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;


	/**
	 * @param a_CaseID
	 * @param a_CaseWindow
	 * @param aOperatorInfo
	 */
	public InsightOperator(String a_CaseID, INodeInfo aNodeInfo, ICaseHandler aCaseHandler) {
		super(a_CaseID, aNodeInfo, aCaseHandler);
		// TODO Auto-generated constructor stub
	}

	/**
	 * Set node id and update operator text of the DecisionTreeOperator at the same time.
	 * @param a_NodeID ID of the node
	 */
	public void setNodeID(String a_NodeID) {
		setLabel(getDescription() + " [" + a_NodeID + "]");
		super.setNodeID(a_NodeID);
	}
	
	/**
	 * Set node id and update operator text of the DecisionTreeOperator at the same time.
	 * @param a_NodeID ID of the node
	 */
	public void setDescription(String a_Description) {
		m_Description = a_Description;
		setLabel(m_Description + " [" + m_NodeID + "]");
	}
	
	private String m_FilePath; 
	
	
	public String getFilePath()
	{
		return m_FilePath;
	}
	
	public void setFilePath(String a_Path)
	{
		m_FilePath = a_Path;
	}


	/* (non-Javadoc)
	 * @see eti.bi.alphaminer.ui.operator.Operator#hasResult()
	 */
	public boolean hasResult() throws SysException{
		Vector parentOperators = m_CaseHandler.getParentOperators(m_CaseID, m_NodeID);
		if (parentOperators==null)
		{
			throw new SysException("Invalide parent operators.");
		}
		
		if (parentOperators.size()>0)
		{
			// get first operator by default
			Operator operator = (Operator)parentOperators.elementAt(0);
			
			// Check the data avialability
			IBIObject aOutputBIObject = operator.getOutputBIObject();
			if (aOutputBIObject != null)
			{
				IBIData aBIData = aOutputBIObject.getBIData();
				if (aBIData !=null )
				{
					MiningStoredData data = aBIData.getMiningStoredData();
					if (data != null)
					{
						// If there are more than one data, return true.
						if (data.getVectorsNumber()>0)
						{
							return true;
						}
						else
						{
							return false;
						}
					}else
					{
						return false;
					}
				}else
				{
					return false;
				}
			}else
			{
				return false;
			}
		}
		
		return false;
	}

	public void setSucceedMode()
	{
		setSelectMode();
	}

	/* (non-Javadoc)
	 * @see eti.bi.alphaminer.ui.operator.Operator#execute(eti.bi.alphaminer.vo.OperatorNode, java.util.Vector)
	 */
	public void execute(IOperatorNode a_OperatorNode, Vector a_Parents) throws MiningException, AppException {
		// Do nothing for insightOperator
	}
}

⌨️ 快捷键说明

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