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

com.rbmhtechnology.vind.parser.queryparser.UnaryBooleanClause Maven / Gradle / Ivy

There is a newer version: 3.2.0
Show newest version
package com.rbmhtechnology.vind.parser.queryparser;

import com.rbmhtechnology.vind.api.query.filter.Filter;
import com.rbmhtechnology.vind.model.DocumentFactory;

public class UnaryBooleanClause extends BooleanClause{
    private final String op;
    private final Clause clause;

    public UnaryBooleanClause(String op, Clause clause){
        this.op = op;
        this.clause = clause;
    }

    public String getOp() {
        return op;
    }

    public Clause getClause() {
        return clause;
    }

    @Override
    public Filter toVindFilter(DocumentFactory factory) {
        return Filter.not(clause.toVindFilter(factory));
    }

    @Override
    public String toString() {
        return this.op + " " +this.clause.toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy