Ignore:
Timestamp:
01/27/12 14:44:25 (12 years ago)
Author:
sherbold
Message:
  • minor improvements for the handling of broken post/get variables during the parsing of web logs
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/web/WeblogParser.java

    r232 r363  
    287287                        if (values.length == 6) { // post vars found 
    288288                                for (String postVar : values[5].trim().split(" ")) { 
    289                                         // TODO manual filtering of bad variables, should be 
    290                                         // automated 
    291                                         if (!postVar.contains("and")) { 
     289                                        if (!isBrokenVariable(postVar)) { 
    292290                                                postedVars.add(postVar); 
    293291                                        } 
     
    456454                        for (String paramPair : paramPairs) { 
    457455                                String[] paramSplit = paramPair.split("="); 
    458                                 // TODO manual filtering of bad variables, should be automated 
    459                                 if (!paramSplit[0].contains("and")) { 
     456                                if (!isBrokenVariable(paramSplit[0])) { 
    460457                                        getVars.add(paramSplit[0]); 
    461458                                } 
     
    464461                return getVars; 
    465462        } 
     463 
     464        /** 
     465         * <p> 
     466         * Checks if a variable is broken.Currently, the check rather imprecise and 
     467         * checks only if the term &quot;and&quot; is part of the variable name. 
     468         * </p> 
     469         *  
     470         * @param var 
     471         *            variable that is checked 
     472         * @return true if the variable is broken, false otherwise 
     473         */ 
     474        private boolean isBrokenVariable(String var) { 
     475                // TODO improve filtering of broken variables 
     476                return var.contains("and"); 
     477        } 
    466478} 
Note: See TracChangeset for help on using the changeset viewer.