use of water.parser.ParserProvider in project h2o-3 by h2oai.
the class ParseSetupV3 method fillImpl.
@Override
public ParseSetup fillImpl(ParseSetup impl) {
ParseSetup parseSetup = fillImpl(impl, new String[] { "parse_type" });
// Transform the field parse_type
ParserInfo pi = GUESS_INFO;
if (this.parse_type != null) {
ParserProvider pp = ParserService.INSTANCE.getByName(this.parse_type);
if (pp != null) {
pi = pp.info();
} else
throw new H2OIllegalValueException("Cannot find right parser for specified parser type!", this.parse_type);
}
parseSetup.setParseType(pi);
return parseSetup;
}
Aggregations