X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=crawler%2Fkiss%2Fsrc%2Forg%2Fwamblee%2Fcrawler%2Fkiss%2FProgramConfigurationParser.java;h=5d9f578d6e596d2912de5149017fcd6600b61588;hb=a641296cc35afce34a55bab521150446ea896798;hp=b8d5c67863adcd9406c3bae2fc76d6f11f86b829;hpb=45954ad938187b0c16d18c763ccfd43a349cb862;p=utils diff --git a/crawler/kiss/src/org/wamblee/crawler/kiss/ProgramConfigurationParser.java b/crawler/kiss/src/org/wamblee/crawler/kiss/ProgramConfigurationParser.java index b8d5c678..5d9f578d 100644 --- a/crawler/kiss/src/org/wamblee/crawler/kiss/ProgramConfigurationParser.java +++ b/crawler/kiss/src/org/wamblee/crawler/kiss/ProgramConfigurationParser.java @@ -29,7 +29,6 @@ import org.dom4j.io.SAXReader; import org.wamblee.conditions.AndCondition; import org.wamblee.conditions.Condition; import org.wamblee.conditions.PropertyRegexCondition; -import org.wamblee.crawler.kiss.ProgramFilter.ProgramAction; /** * Parse the configuration of desired programs. @@ -63,10 +62,10 @@ class ProgramConfigurationParser { Element program = (Element) i.next(); Element actionElem = program.element(ELEM_ACTION); - ProgramAction action = ProgramAction.RECORD; + ProgramAction action = new RecordProgramAction(); if (actionElem != null) { if (actionElem.getText().equals(ACTION_NOTIFY)) { - action = ProgramAction.NOTIFY; + action = new InterestingProgramAction(""); } } List> regexConditions = @@ -78,8 +77,8 @@ class ProgramConfigurationParser { if ( fieldAttribute != null ) { fieldName = fieldAttribute.getText(); } - String pattern = ".*" + patternElem.getText() - + ".*"; + String pattern = ".*(" + patternElem.getText() + + ").*"; regexConditions.add(new PropertyRegexCondition(fieldName, pattern, true)); } Condition condition = new AndCondition(regexConditions);