use of com.amalto.workbench.webservices.WSStringPredicate in project tmdm-studio-se by Talend.
the class Util method convertLine.
public static WSWhereCondition convertLine(String[] values) {
WSWhereCondition wc = new WSWhereCondition();
wc.setLeftPath(values[0]);
WSWhereOperator operator = null;
if (values[1].equals("Contains")) {
// $NON-NLS-1$
operator = WSWhereOperator.CONTAINS;
} else if (values[1].equals("contains the sentence")) {
// $NON-NLS-1$
operator = WSWhereOperator.CONTAINS_SENTENCE;
} else if (values[1].equals("Join With")) {
// $NON-NLS-1$
operator = WSWhereOperator.JOIN;
} else if (values[1].equals("=")) {
// $NON-NLS-1$
operator = WSWhereOperator.EQUALS;
} else if (values[1].equals(">")) {
// $NON-NLS-1$
operator = WSWhereOperator.GREATER_THAN;
} else if (values[1].equals(">=")) {
// $NON-NLS-1$
operator = WSWhereOperator.GREATER_THAN_OR_EQUAL;
} else if (values[1].equals("<")) {
// $NON-NLS-1$
operator = WSWhereOperator.LOWER_THAN;
} else if (values[1].equals("<=")) {
// $NON-NLS-1$
operator = WSWhereOperator.LOWER_THAN_OR_EQUAL;
} else if (values[1].equals("!=")) {
// $NON-NLS-1$
operator = WSWhereOperator.NOT_EQUALS;
} else if (values[1].equals("Starts With")) {
// $NON-NLS-1$
operator = WSWhereOperator.STARTSWITH;
} else if (values[1].equals("Is Empty Or Null")) {
// $NON-NLS-1$
operator = WSWhereOperator.EMPTY_NULL;
} else if (values[1].equals("whole content contains")) {
// $NON-NLS-1$
operator = WSWhereOperator.FULLTEXTSEARCH;
}
wc.setOperator(operator);
wc.setRightValueOrPath(values[2]);
WSStringPredicate predicate = null;
if (values[3].equals("")) {
// $NON-NLS-1$
predicate = WSStringPredicate.NONE;
} else if (values[3].equals("Or")) {
// $NON-NLS-1$
predicate = WSStringPredicate.OR;
}
if (values[3].equals("And")) {
// $NON-NLS-1$
predicate = WSStringPredicate.AND;
}
if (values[3].equals("Not")) {
// $NON-NLS-1$
predicate = WSStringPredicate.NOT;
}
wc.setStringPredicate(predicate);
return wc;
}
Aggregations