All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.scudata.ide.spl.etl.element.CsGroup Maven / Gradle / Ivy

Go to download

SPL(Structured Process Language) A programming language specially for structured data computing.

There is a newer version: 20241126
Show newest version
package com.scudata.ide.spl.etl.element;

import java.util.ArrayList;

import com.scudata.chart.Consts;
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;

/**
 * ?????????༭ CS.group()
 * ??????ǰ׺Cs??ʾ?α?
 * 
 * @author Joancy
 *
 */
public class CsGroup extends ObjectElement {
	public ArrayList groupFields;
	
	public boolean i;
	public boolean one;
	public boolean q;
	public boolean s;
	
	/**
	 * ??ȡ???ڽ???༭?IJ?????Ϣ?б?
	 */
	public ParamInfoList getParamInfoList() {
		ParamInfoList paramInfos = new ParamInfoList();
		ParamInfo.setCurrent(CsGroup.class, this);

		paramInfos.add(new ParamInfo("groupFields",EtlConsts.INPUT_STRINGLIST));
		
		String group = "options";
		paramInfos.add(group, new ParamInfo("i", Consts.INPUT_CHECKBOX));
		paramInfos.add(group, new ParamInfo("one", Consts.INPUT_CHECKBOX));
		paramInfos.add(group, new ParamInfo("q", Consts.INPUT_CHECKBOX));
		paramInfos.add(group, new ParamInfo("s", Consts.INPUT_CHECKBOX));

		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(){
		StringBuffer options = new StringBuffer();
		if(i){
			options.append("i");
		}
		if(one){
			options.append("1");
		}
		if(q){
			options.append("q");
			if(s){//?????򣬲????飬????Ҫ??@q???ʹ??
				options.append("s");
			}
		}
		return options.toString();
	}
	
	/**
	 * ??ȡ????????SPL????ʽ?ĺ?????
	 */
	public String getFuncName() {
		return "group";
	}

	/**
	 * ??ȡ????????SPL????ʽ?ĺ?????
	 * ??setFuncBody???溯????Ȼ?????ʽ?ĸ?ֵҲ???ǻ????
	 */
	public String getFuncBody() {
		return getStringListExp(groupFields,",");
	}

	/**
	 * ???ú?????
	 * @param funcBody ??????
	 */
	public boolean setFuncBody(String funcBody) {
		groupFields = getStringList(funcBody,",");
		return true;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy