com.scudata.ide.spl.etl.element.FXlsOpen 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 com.scudata.chart.Consts;
import com.scudata.common.StringUtils;
import com.scudata.ide.spl.etl.EtlConsts;
import com.scudata.ide.spl.etl.ObjectElement;
import com.scudata.ide.spl.etl.ParamInfo;
import com.scudata.ide.spl.etl.ParamInfoList;
/**
* ?????????༭ f.xlsopen()
* ??????ǰF??ʾ?ļ?????
*
* @author Joancy
*
*/
public class FXlsOpen extends ObjectElement {
public String password;
public boolean r;
public boolean w;
/**
* ??ȡ???ڽ???༭?IJ?????Ϣ?б?
*/
public ParamInfoList getParamInfoList() {
ParamInfoList paramInfos = new ParamInfoList();
ParamInfo.setCurrent(FXlsOpen.class, this);
paramInfos.add(new ParamInfo("password"));
String group = "options";
paramInfos.add(group, new ParamInfo("r", Consts.INPUT_CHECKBOX));
paramInfos.add(group, new ParamInfo("w", Consts.INPUT_CHECKBOX));
return paramInfos;
}
/**
* ??ȡ??????
* ???͵ij???????Ϊ
* EtlConsts.TYPE_XXX
* @return EtlConsts.TYPE_FILE
*/
public byte getParentType() {
return EtlConsts.TYPE_FILE;
}
/**
* ??ȡ?ú????ķ???????
* @return EtlConsts.TYPE_XLS
*/
public byte getReturnType() {
return EtlConsts.TYPE_XLS;
}
/**
* ??ȡ????????SPL????ʽ?ĺ?????
*/
public String getFuncName(){
return "xlsopen";
}
/**
* ??ȡ????????SPL????ʽ??ѡ?
*/
public String optionString(){
StringBuffer options = new StringBuffer();
if(r){//r,w????
options.append("r");
}else if(w){
options.append("w");
}
return options.toString();
}
/**
* ??ȡ????????SPL????ʽ?ĺ?????
* ??setFuncBody???溯????Ȼ?????ʽ?ĸ?ֵҲ???ǻ????
*/
public String getFuncBody() {
StringBuffer sb = new StringBuffer();
if(StringUtils.isValidString(password)){
sb.append( getParamExp(password) );
}
return sb.toString();
}
/**
* ???ú?????
* @param funcBody ??????
*/
public boolean setFuncBody(String funcBody) {
password = getParam( funcBody );
return true;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy