AttributeTagEnhancer.java from Tea Stats at Krugle
Show AttributeTagEnhancer.java syntax highlighted
/*
* This file is distributed under the GPL v2 as part of teastats site statistics package
* http://teastats.sourceforge.net
*/
package net.time4tea.webstats.enhancer.attribute;
import net.time4tea.webstats.jms.EnvironmentException;
import net.time4tea.webstats.process.Processor;
import net.time4tea.webstats.record.Attribute;
import net.time4tea.webstats.record.Record;
import net.time4tea.webstats.record.StringAttribute;
import org.hamcrest.Matcher;
/**
* Originally richja Apr 2, 2006
*/
public class AttributeTagEnhancer<T extends Record> implements Processor<T> {
private Matcher<T> filter;
private Attribute attribute;
public AttributeTagEnhancer(String attributeName, Matcher<T> filter) {
this.attribute = new StringAttribute(attributeName, "set");
this.filter = filter;
}
public boolean process(T session) throws EnvironmentException {
if (filter.matches(session)) {
session.setAttribute(attribute);
}
return true;
}
}
See more files for this project here
Web log analyzer... Written in OO Perl, provides the usual host / page analysis. Can also do site graphing using graphviz, browser, os, worm and search engine identification, and country and session tracking.
Project homepage:
http://sourceforge.net/projects/teastats
Programming language(s): Java
License: other
AttributeTagEnhancer.java