/* Generated By:JJTree: Do not edit this line. ASTMyAssign.java Version 4.3 */
/* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=false,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
package eu.dnetlib.data.collective.transformation.rulelanguage.parser;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class ASTMyAssign extends AbstractNode {
	private static final Log log = LogFactory.getLog(ASTMyAssign.class);
	String value = "";
	String field = "";
	boolean isField = false;
	boolean isAttribute = false;

	public ASTMyAssign(int id) {
		super(id);
	}

	public ASTMyAssign(FtScript p, int id) {
		super(p, id);
	}


	/** Accept the visitor. **/
	public Object jjtAccept(FtScriptVisitor visitor, Object data) {
		return visitor.visit(this, data);
	}

	public void setAttribute(String value) {
		// unquote
		if (value.length() > 0){
			this.value = value.substring(1, value.length() - 1);
			log.debug("attribute unquoted: " + this.value);
		}
		this.isAttribute = true;
	}

	public void setFieldExpression(String field){
		this.field = field;
		this.isField = true;
	}

	public boolean isFieldExpression(){
		return isField;
	}

	public boolean isAttribute(){
		return isAttribute;
	}

	public String getFieldExpression(){
		return this.field;
	}

	public String getValue() {
		return value;
	}
}
/* JavaCC - OriginalChecksum=f78d0265ec643fa70ae75afa6b875501 (do not edit this line) */
