com.scudata.ide.spl.etl.element.CsNews Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of esproc Show documentation
Show all versions of esproc Show documentation
SPL(Structured Process Language) A programming language specially for structured data computing.
package com.scudata.ide.spl.etl.element;
import java.util.ArrayList;
import java.util.StringTokenizer;
import com.scudata.ide.spl.etl.EtlConsts;
import com.scudata.ide.spl.etl.FieldDefine;
import com.scudata.ide.spl.etl.ObjectElement;
import com.scudata.ide.spl.etl.ParamInfo;
import com.scudata.ide.spl.etl.ParamInfoList;
/**
* ?????????༭ CS.news()
* ??????ǰCs??ʾ?α?
*
* @author Joancy
*
*/
public class CsNews extends ObjectElement {
public String bigX;
public ArrayList newFields;//??ʹ?õ????У? ????ʽ???ֶ???
/**
* ??ȡ???ڽ???༭?IJ?????Ϣ?б?
*/
public ParamInfoList getParamInfoList() {
ParamInfoList paramInfos = new ParamInfoList();
ParamInfo.setCurrent(CsNews.class, this);
paramInfos.add(new ParamInfo("bigX",EtlConsts.INPUT_CELLA));
paramInfos.add(new ParamInfo("newFields",EtlConsts.INPUT_FIELDDEFINE_EXP_FIELD));
return paramInfos;
}
/**
* ??ȡ??????
* ???͵ij???????Ϊ
* EtlConsts.TYPE_XXX
* @return EtlConsts.TYPE_CURSOR
*/
public byte getParentType() {
return EtlConsts.TYPE_CURSOR;
}
/**
* ??ȡ?ú????ķ???????
* @return EtlConsts.TYPE_CURSOR
*/
public byte getReturnType() {
return EtlConsts.TYPE_CURSOR;
}
/**
* ??ȡ????????SPL????ʽ??ѡ?
*/
public String optionString() {
return null;
}
/**
* ??ȡ????????SPL????ʽ?ĺ?????
*/
public String getFuncName() {
return "news";
}
/**
* ??ȡ????????SPL????ʽ?ĺ?????
* ??setFuncBody???溯????Ȼ?????ʽ?ĸ?ֵҲ???ǻ????
*/
public String getFuncBody() {
StringBuffer sb = new StringBuffer();
sb.append( getExpressionExp(bigX) );
sb.append(";");
sb.append( getFieldDefineExp(newFields));
return sb.toString();
}
/**
* ???ú?????
* @param funcBody ??????
*/
public boolean setFuncBody(String funcBody) {
StringTokenizer st = new StringTokenizer(funcBody,";");
bigX = getExpression( st.nextToken() );
newFields = getFieldDefine( st.nextToken() );
return true;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy