コード例 #1
0
  /**
   * Methods to create a {@link Function} starting from a {@link IsNullExpression}
   *
   * @param pred IsNullExpression
   * @param lookupTable
   * @return a function from the OBDADataFactory
   */
  private Function getFunction(IsNullExpression pred, LookupTable lookupTable) {

    Expression column = pred.getLeftExpression();
    String columnName = column.toString();
    String variableName = lookupTable.lookup(columnName);
    if (variableName == null) {
      throw new RuntimeException("Unable to find column name for variable: " + columnName);
    }
    Term var = dfac.getVariable(variableName);

    if (!pred.isNot()) {
      return dfac.getFunctionIsNull(var);
    } else {
      return dfac.getFunctionIsNotNull(var);
    }
  }
コード例 #2
0
ファイル: TableVisitor.java プロジェクト: pronoydebnath/DDF
 public void visit(IsNullExpression isNullExpression) throws Exception {
   isNullExpression.getLeftExpression().accept(this);
 }