public Document processRecord(Document record, int position) throws Exception { for (HashMap<String, String> map : check_fields) { String fieldXpath = map.get("Field Name"); String regexp = map.get("Field Value"); Filter.apply(record, new OpDelete(), fieldXpath, new TextMatches(regexp)); } return record; }
@SuppressWarnings("unchecked") public void Initialise( HashMap<String, Object> props, StepLogger logger, ServletContext servletContext) throws Exception { super.Initialise(props, logger, servletContext); check_fields = (LinkedList<HashMap<String, String>>) props.get("Fields"); }