📄 associationoperatorresult.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.
*/
/*
* Created on 2005-1-19
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package eti.bi.alphaminer.patch.standard.operation.result;
import com.prudsys.pdm.Core.MiningException;
import com.prudsys.pdm.Models.AssociationRules.AssociationRulesMiningModel;
import eti.bi.alphaminer.core.handler.ICaseHandler;
import eti.bi.alphaminer.operation.operator.INodeInfo;
import eti.bi.alphaminer.operation.result.OperatorResult;
import eti.bi.alphaminer.operation.result.view.PmmlView;
import eti.bi.alphaminer.patch.standard.operation.result.view.AssoicationRulesView;
import eti.bi.alphaminer.vo.IBIModel;
import eti.bi.alphaminer.vo.IBIObject;
import eti.bi.exception.SysException;
import eti.bi.common.Locale.Resource;
/**
* Create the result JPanle for the Association Rule Operator. It contains the
* Rules View and PMML View.
*
* @author TWang Jan 21, 2005
*/
public class AssociationOperatorResult extends OperatorResult {
/**
*
*/
private static final long serialVersionUID = 1L;
private AssociationRulesMiningModel m_AssociationModel;
private AssoicationRulesView m_RuleView = null;
private PmmlView m_PmmlView = null;
private String m_ModelPMMLPath = null;
/**
* @param caseID
* @param nodeID
* @param operatorText
* @param currentPanel
* @throws Exception
*/
public AssociationOperatorResult(String a_CaseID, String a_NodeID, String a_Name, INodeInfo a_NodeInfo,
ICaseHandler a_CaseHandler) throws Exception {
super(a_Name + Resource.srcStr("Result"), a_CaseID, a_NodeID, a_NodeInfo, a_CaseHandler);
// m_AssociationResultMenuBarHandler = new
// AssociationResultMenuBarHandler(this,m_CaseHandler);
// setJMenuBar(m_AssociationResultMenuBarHandler.getMenuBar());
enableAdvanceMenu();
}
protected void getContent() {
IBIObject aBIObject = m_Operator.getOutputBIObject();
if (aBIObject == null || aBIObject.getBIModel() == null || aBIObject.getBIData() == null) {
return;
}
IBIModel aBIModel = aBIObject.getBIModel();
m_AssociationModel = (AssociationRulesMiningModel) m_Operator.getOutputBIObject().getBIModel().getMiningModel();
try {
// to create pmml view
m_Operator.writeTempModelFile();
m_ModelPMMLPath = aBIModel.getTempBIModelPath();
} catch (SysException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
protected void createResult() throws SysException, MiningException {
m_RuleView = new AssoicationRulesView(m_AssociationModel, this);
addView(m_RuleView);
m_PmmlView = new PmmlView(m_ModelPMMLPath, this);
try {
m_PmmlView.preparePmml();
m_PmmlView.showPmml();
addView(m_PmmlView);
} catch (SysException e) {
e.printStackTrace();
m_SystemMessageHandler.appendMessage(e.getMessage());
}
this.setClosable(true);
this.setMaximizable(true);
this.setResizable(true);
this.setSize(700, 400);
}
public void enableAdvanceResults() {
m_RuleView.showAdvance();
}
public void disableAdvanceResults() {
m_RuleView.showSimple();
}
@Override
protected void init() throws Exception {
// TODO Auto-generated method stub
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -