use of edu.uci.ics.textdb.exp.regexmatcher.RegexPredicate in project textdb by TextDB.
the class PredicateBaseTest method testRegexMatcher.
@Test
public void testRegexMatcher() throws Exception {
RegexPredicate regexPredicate = new RegexPredicate("regex", attributeNames, "spanListName");
testPredicate(regexPredicate);
RegexSourcePredicate regexSourcePredicate = new RegexSourcePredicate("regex", attributeNames, "tableName", "spanListName");
testPredicate(regexSourcePredicate);
}
use of edu.uci.ics.textdb.exp.regexmatcher.RegexPredicate in project textdb by TextDB.
the class JoinTestHelper method getRegexMatcher.
public static RegexMatcher getRegexMatcher(String tableName, String query, String attrName) {
try {
ScanBasedSourceOperator scanBasedSourceOperator = new ScanBasedSourceOperator(new ScanSourcePredicate(tableName));
RegexMatcher regexMatcher = new RegexMatcher(new RegexPredicate(query, Arrays.asList(attrName), SchemaConstants.SPAN_LIST));
regexMatcher.setInputOperator(scanBasedSourceOperator);
return regexMatcher;
} catch (DataFlowException e) {
e.printStackTrace();
return null;
}
}
Aggregations