org.apache.james.management
Interface BayesianAnalyzerManagementService

All Known Implementing Classes:
BayesianAnalyzerManagement

public interface BayesianAnalyzerManagementService


Field Summary
static java.lang.String ROLE
           
 
Method Summary
 int addHamFromDir(java.lang.String dir)
          Feed the BayesianAnalyzer with ham.
 int addHamFromMbox(java.lang.String file)
          Feed the BayesianAnalyzer with ham.
 int addSpamFromDir(java.lang.String dir)
          Feed the BayesianAnalyter with spam.
 int addSpamFromMbox(java.lang.String file)
          Feed the BayesianAnalyzer with ham.
 void exportData(java.lang.String file)
          Export the data to a xml file
 void importData(java.lang.String file)
          Import the data from a xml file
 void resetData()
          Reset the trained data
 

Field Detail

ROLE

static final java.lang.String ROLE
See Also:
Constant Field Values
Method Detail

addSpamFromDir

int addSpamFromDir(java.lang.String dir)
                   throws BayesianAnalyzerManagementException
Feed the BayesianAnalyter with spam. The given directory contain the mail files

Parameters:
dir - The directory in which the spam is located
Returns:
count The count of added spam
Throws:
java.lang.IllegalArgumentException - If the provided directory is not valid
BayesianAnalyzerManagementException - If the service is not configured

addHamFromDir

int addHamFromDir(java.lang.String dir)
                  throws BayesianAnalyzerManagementException
Feed the BayesianAnalyzer with ham. The given directory contain the mail files

Parameters:
dir - The directory in which the ham is located
Returns:
count The count of added ham
Throws:
java.lang.IllegalArgumentException - If the provided directory is not valid
BayesianAnalyzerManagementException - If the service is not configured

addSpamFromMbox

int addSpamFromMbox(java.lang.String file)
                    throws BayesianAnalyzerManagementException
Feed the BayesianAnalyzer with ham. The given file must be a valid mbox file

Parameters:
file - The mbox file
Returns:
count The count of added ham
Throws:
java.lang.IllegalArgumentException - If the provided file is not a valid mbox file
BayesianAnalyzerManagementException - If the service is not configured

addHamFromMbox

int addHamFromMbox(java.lang.String file)
                   throws BayesianAnalyzerManagementException
Feed the BayesianAnalyzer with ham. The given file must be a valid mbox file

Parameters:
file - The mbox file
Returns:
count The count of added ham
Throws:
java.lang.IllegalArgumentException - If the provided file is not a valid mbox file
BayesianAnalyzerManagementException - If the service is not configured

exportData

void exportData(java.lang.String file)
                throws BayesianAnalyzerManagementException
Export the data to a xml file

Parameters:
file - The filename to store the data
Throws:
BayesianAnalyzerManagementException - If the service is not configured

importData

void importData(java.lang.String file)
                throws BayesianAnalyzerManagementException
Import the data from a xml file

Parameters:
file - The filename to export data from
Throws:
BayesianAnalyzerManagementException - IF the service is not configured

resetData

void resetData()
               throws BayesianAnalyzerManagementException
Reset the trained data

Throws:
BayesianAnalyzerManagementException


Copyright ? 2002-2009 The Apache Software Foundation. All Rights Reserved.