📄 xelopestransformaction.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/6
*
* $Author$
* $Date$
* $Revision$
*
* $Author$
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package eti.bi.alphaminer.core.transform;
import com.prudsys.pdm.Core.MiningException;
import com.prudsys.pdm.Input.MiningStoredData;
import com.prudsys.pdm.Transform.MiningStreamTransformer;
import com.prudsys.pdm.Transform.MiningTransformationStep;
import eti.bi.exception.SysException;
/**
* @author kelvinj
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
public class XelopesTransformAction extends DataTransformAction {
private MiningTransformationStep m_TransformStep = null;
private MiningStreamTransformer m_Transformer = null; //modified by dai ---cater xelopes special type transformation
/**
* @param a_CaseID
* @param a_NodeID
*/
public XelopesTransformAction(String a_CaseID, String a_NodeID, MiningTransformationStep a_TransformStep) {
super(a_CaseID, a_NodeID);
m_TransformStep = a_TransformStep;
}
// modified by dai ---cater xelopes special type transformation
public XelopesTransformAction(String a_CaseID, String a_NodeID, MiningStreamTransformer a_Transformer) {
super(a_CaseID, a_NodeID);
m_Transformer = a_Transformer;
}
/* (non-Javadoc)
* @see eti.bi.alphaminer.core.transform.DataTransformAction#transform(com.prudsys.pdm.Input.MiningStoredData)
*/
public MiningStoredData transform(MiningStoredData inputMiningStoredData) throws SysException {
MiningStoredData outputMiningStoredData = new MiningStoredData();
if (m_TransformStep==null)
{
//modified by dai ---cater xelopes special type transformation
if(m_Transformer==null)
throw new SysException("No Transformation Step");
else{
try {
m_Transformer.transform(inputMiningStoredData,outputMiningStoredData);
} catch (MiningException e) {
throw new SysException(e);
}
return outputMiningStoredData;
}
}
try {
m_TransformStep.transform(inputMiningStoredData,outputMiningStoredData);
} catch (MiningException e) {
throw new SysException(e);
}
return outputMiningStoredData;
}
/**
* @return Returns the m_TransformStep.
*/
public MiningTransformationStep getTransformStep() {
return m_TransformStep;
}
/**
* @param transformStep The m_TransformStep to set.
*/
public void setTransformStep(MiningTransformationStep a_TransformStep) {
m_TransformStep = a_TransformStep;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -