@Override
    public boolean isVariableNullable(IntermediateQuery query, Variable variable) {
        if (getVariables().contains(variable))
            return false;
        else
            throw new IllegalArgumentException("The variable" + variable + " is not projected by " + this);
    }
@ Override public boolean isVariableNullable ( IntermediateQuery query , Variable variable ) { if ( getVariables ( ) . contains ( variable ) ) return false ; else throw new IllegalArgumentException ( "The variable" + variable + " is not projected by " + this ) ; }
We assume all the variables are non-null. Ok for triple patterns.
TODO: what about quads and default graphs?