org.jwall.web.audit.rules
Class PersistentCollectionExtractor

java.lang.Object
  extended by org.jwall.web.audit.rules.PersistentCollectionExtractor
All Implemented Interfaces:
FeatureExtractor<AuditEvent,String>
Direct Known Subclasses:
PersistentCollectionProcessor

public class PersistentCollectionExtractor
extends Object
implements FeatureExtractor<AuditEvent,String>

This class provides an extractor method for scores to be read from an event's K section.

Author:
Christian Bockermann <chris@jwall.org>

Constructor Summary
PersistentCollectionExtractor()
           
 
Method Summary
 String extract(String feature, AuditEvent event)
          Extract all values for the specified feature from the given event.
static Map<String,String> extractScores(AuditEvent evt)
           This method extracts scores and environment variables from the given event by effectively simulating the actions fired by this event which are included in the K section of the event.
static Map<String,String> extractScores(AuditEvent evt, Map<String,String> env)
          This method extracts scores and environment variables in the same way as the method above, but uses the specified map as an initial start to evaluate initial parameters.
 Set<String> getVariables(AuditEvent event)
          This method extracts all available feature names for the given event.
static Map<String,String> processRuleLog(String ruleLog, Map<String,String> env)
           
static String removeQuotes(String s)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistentCollectionExtractor

public PersistentCollectionExtractor()
Method Detail

extractScores

public static Map<String,String> extractScores(AuditEvent evt)
                                        throws Exception

This method extracts scores and environment variables from the given event by effectively simulating the actions fired by this event which are included in the K section of the event.

If no K section is available, this method simply returns an empty map.

Parameters:
evt -
Returns:
Throws:
Exception

processRuleLog

public static Map<String,String> processRuleLog(String ruleLog,
                                                Map<String,String> env)

extractScores

public static Map<String,String> extractScores(AuditEvent evt,
                                               Map<String,String> env)
                                        throws Exception
This method extracts scores and environment variables in the same way as the method above, but uses the specified map as an initial start to evaluate initial parameters.

Parameters:
s -
Returns:
Throws:
Exception

removeQuotes

public static String removeQuotes(String s)

getVariables

public Set<String> getVariables(AuditEvent event)
Description copied from interface: FeatureExtractor
This method extracts all available feature names for the given event.

Specified by:
getVariables in interface FeatureExtractor<AuditEvent,String>
Returns:

extract

public String extract(String feature,
                      AuditEvent event)
Description copied from interface: FeatureExtractor
Extract all values for the specified feature from the given event.

Specified by:
extract in interface FeatureExtractor<AuditEvent,String>
Returns:


Copyright © 2012 jwall.org. All Rights Reserved.