TPTP 4.2.0 Platform Project
Public API Specification

org.eclipse.hyades.analysis.engine
Interface IAnalysisEngine


public interface IAnalysisEngine

Interface intended to be implemented by analysis engines based on an XML symptom database.


Method Summary
 java.lang.Object[] analyze(Incident incident)
          The current symptom database is searched for Incident matches.
 Solution[] analyzeForSolutions(Incident incident)
          The current symptom database is searched for Incident matches.
 java.lang.String getSymptomDatabasePath()
          Returns the XML file path of the base symptom database.
 boolean mergeSymptomDatabase(java.lang.String symptomDbPath)
          Loads a new symptom database XML file denoted by the parameter path and merges any unique records with the base symptom database.
 boolean reloadSymptomDatabase()
          Reloads the base symptom database from the base XML file.
 boolean removeSymptomDatabase()
          Removes the base symptom database.
 boolean replaceSymptomDatabase(java.lang.String symptomDbPath)
          A new symptom database is created denoted by the parameter XML file path.
 

Method Detail

reloadSymptomDatabase

public boolean reloadSymptomDatabase()
Reloads the base symptom database from the base XML file.

Returns:
true if the symptom database has been successfully reloaded

mergeSymptomDatabase

public boolean mergeSymptomDatabase(java.lang.String symptomDbPath)
Loads a new symptom database XML file denoted by the parameter path and merges any unique records with the base symptom database.

Parameters:
symptomDbPath - the path to the merged symptom database XML file
Returns:
true if the new symptom database has been successfully merged

removeSymptomDatabase

public boolean removeSymptomDatabase()
Removes the base symptom database.

NOTE: A base symptom database may be added using replaceSymptomDatabase(symptomDbPath).

Returns:
true if the symptom database has been successfully removed

replaceSymptomDatabase

public boolean replaceSymptomDatabase(java.lang.String symptomDbPath)
A new symptom database is created denoted by the parameter XML file path.

If the new symptom database XML file was successfully loaded, it replaces the base symptom database.

Parameters:
symptomDbPath - the path to the symptom database XML file
Returns:
true if the new symptom database has been successfully replaced

getSymptomDatabasePath

public java.lang.String getSymptomDatabasePath()
Returns the XML file path of the base symptom database.

If no base symptom database XML file is loaded, null is returned.

Returns:
the XML file path of the base symptom database, otherwise null

analyze

public java.lang.Object[] analyze(Incident incident)
The current symptom database is searched for Incident matches.

All Directive(s) from successful Incident matches are returned in an array structure.

Incident matches are based on a lexicographical String comparison between the messageId and rawData array in the parameter Incident and the value attribute of the matchPattern Node in the base symptom database.

Parameters:
incident - the search criteria used for possible matches
Returns:
an array of Directive from successful Incident matches
See Also:
Object, Incident

analyzeForSolutions

public Solution[] analyzeForSolutions(Incident incident)
The current symptom database is searched for Incident matches.

All Solution(s) from successful Incident matches are returned in an array structure.

Incident matches are based on a lexicographical String comparison between the messageId and rawData array in the parameter Incident and the value attribute of the matchPattern Node in the base symptom database.

Parameters:
incident - the search criteria used for possible matches
Returns:
an array of Solution from successful Incident matches
See Also:
Solution, Incident

TPTP 4.2.0 Platform Project
Public API Specification