eu.xenit.apix.search.nodes.OperatorSearchNode Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of apix-interface Show documentation
Show all versions of apix-interface Show documentation
Xenit API-X Java interface
package eu.xenit.apix.search.nodes;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import eu.xenit.apix.search.json.IJsonTyped;
import eu.xenit.apix.search.json.OperatorSearchNodeDeserializer;
import eu.xenit.apix.search.visitors.ISearchSyntaxVisitor;
import java.util.List;
/**
* Represents an AND or OR search node.
*/
@JsonDeserialize(using = OperatorSearchNodeDeserializer.class)
public class OperatorSearchNode implements SearchSyntaxNode, IJsonTyped {
private Operator operator;
private List children;
public OperatorSearchNode(Operator operator, List children) {
this.operator = operator;
this.children = children;
}
public Operator getOperator() {
return operator;
}
public void setOperator(Operator operator) {
this.operator = operator;
}
public List getChildren() {
return children;
}
public void setChildren(List children) {
this.children = children;
}
@Override
public T accept(ISearchSyntaxVisitor visitor) {
return visitor.visit(this);
}
@Override
public void setTypeId(String id) {
operator = OperatorSearchNode.Operator.valueOf(id.toUpperCase());
}
public enum Operator {
AND, OR
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy