de.cau.cs.kieler.kiml.grana
Class AnalysisServices

java.lang.Object
  extended by de.cau.cs.kieler.kiml.grana.AnalysisServices
All Implemented Interfaces:
IBundleChangedListener

public final class AnalysisServices
extends Object
implements IBundleChangedListener

Singleton class for global access to the KIML graph analysis services.

Rating red

Field Summary
static String ATTRIBUTE_ABBREVIATION
          name of the 'abbreviation' attribute in the extension points.
static String ATTRIBUTE_ANALYSIS
          name of the 'analysis' attribute in the extension points.
static String ATTRIBUTE_CATEGORY
          name of the 'category' attribute in the extension points.
static String ATTRIBUTE_CLASS
          name of the 'class' attribute in the extension points.
static String ATTRIBUTE_DESCRIPTION
          name of the 'description' attribute in the extension points.
static String ATTRIBUTE_ID
          name of the 'id' attribute in the extension points.
static String ATTRIBUTE_NAME
          name of the 'name' attribute in the extension points.
static String DEFAULT_CATEGORY_ID
          id of the default category.
static String ELEMENT_ANALYSIS_BUNDLE
          name of the 'bundle' element.
static String ELEMENT_ANALYSIS_CATEGORY
          name of the 'category' element.
static String ELEMENT_ANALYSIS_COMPONENT
          name of the 'component' element.
static String ELEMENT_ANALYSIS_DEPENDENCY
          name of the 'dependency' element.
static String ELEMENT_ANALYSIS_PROVIDER
          name of the 'provider' element.
static String EXTP_ID_ANALYSIS_PROVIDERS
          identifier of the extension point for analysis providers.
 
Method Summary
 void analysisAdded(AbstractInfoAnalysis analysis)
          Called when an analysis is added to a bundle.
 void analysisRemoved(AbstractInfoAnalysis analysis)
          Called when an analysis is removed from a bundle.
 Collection<AbstractInfoAnalysis> getAnalyses()
          Returns the analyses.
 AbstractInfoAnalysis getAnalysisById(String id)
          Returns the analysis specified by id or null if no such analysis exists.
 List<AnalysisCategory> getCategories()
          Returns the categories.
 AnalysisCategory getCategoryById(String id)
          Returns the category specified by id or null if no such category exists.
 List<AbstractInfoAnalysis> getExecutionOrder(List<AbstractInfoAnalysis> analyses)
          Takes a list of analyses and returns a list that includes the given analysis and their dependencies in an order so that all dependencies of an analysis are listed before it.
static AnalysisServices getInstance()
          Returns the singleton instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXTP_ID_ANALYSIS_PROVIDERS

public static final String EXTP_ID_ANALYSIS_PROVIDERS
identifier of the extension point for analysis providers.

See Also:
Constant Field Values

ELEMENT_ANALYSIS_PROVIDER

public static final String ELEMENT_ANALYSIS_PROVIDER
name of the 'provider' element.

See Also:
Constant Field Values

ELEMENT_ANALYSIS_BUNDLE

public static final String ELEMENT_ANALYSIS_BUNDLE
name of the 'bundle' element.

See Also:
Constant Field Values

ELEMENT_ANALYSIS_CATEGORY

public static final String ELEMENT_ANALYSIS_CATEGORY
name of the 'category' element.

See Also:
Constant Field Values

ELEMENT_ANALYSIS_DEPENDENCY

public static final String ELEMENT_ANALYSIS_DEPENDENCY
name of the 'dependency' element.

See Also:
Constant Field Values

ELEMENT_ANALYSIS_COMPONENT

public static final String ELEMENT_ANALYSIS_COMPONENT
name of the 'component' element.

See Also:
Constant Field Values

ATTRIBUTE_ANALYSIS

public static final String ATTRIBUTE_ANALYSIS
name of the 'analysis' attribute in the extension points.

See Also:
Constant Field Values

ATTRIBUTE_CATEGORY

public static final String ATTRIBUTE_CATEGORY
name of the 'category' attribute in the extension points.

See Also:
Constant Field Values

ATTRIBUTE_CLASS

public static final String ATTRIBUTE_CLASS
name of the 'class' attribute in the extension points.

See Also:
Constant Field Values

ATTRIBUTE_DESCRIPTION

public static final String ATTRIBUTE_DESCRIPTION
name of the 'description' attribute in the extension points.

See Also:
Constant Field Values

ATTRIBUTE_ID

public static final String ATTRIBUTE_ID
name of the 'id' attribute in the extension points.

See Also:
Constant Field Values

ATTRIBUTE_NAME

public static final String ATTRIBUTE_NAME
name of the 'name' attribute in the extension points.

See Also:
Constant Field Values

ATTRIBUTE_ABBREVIATION

public static final String ATTRIBUTE_ABBREVIATION
name of the 'abbreviation' attribute in the extension points.

See Also:
Constant Field Values

DEFAULT_CATEGORY_ID

public static final String DEFAULT_CATEGORY_ID
id of the default category.

See Also:
Constant Field Values
Method Detail

getInstance

public static AnalysisServices getInstance()
Returns the singleton instance.

Returns:
the singleton

getCategories

public List<AnalysisCategory> getCategories()
Returns the categories.

Returns:
the categories

getAnalyses

public Collection<AbstractInfoAnalysis> getAnalyses()
Returns the analyses.

Returns:
the analyses

getCategoryById

public AnalysisCategory getCategoryById(String id)
Returns the category specified by id or null if no such category exists.

Parameters:
id - the id
Returns:
the category or null if it does not exist

getAnalysisById

public AbstractInfoAnalysis getAnalysisById(String id)
Returns the analysis specified by id or null if no such analysis exists.

Parameters:
id - the id
Returns:
the analysis or null if it does not exist

getExecutionOrder

public List<AbstractInfoAnalysis> getExecutionOrder(List<AbstractInfoAnalysis> analyses)
Takes a list of analyses and returns a list that includes the given analysis and their dependencies in an order so that all dependencies of an analysis are listed before it.

Parameters:
analyses - the analyses
Returns:
the modified and sorted list of analyses

analysisAdded

public void analysisAdded(AbstractInfoAnalysis analysis)
Called when an analysis is added to a bundle.

Specified by:
analysisAdded in interface IBundleChangedListener
Parameters:
analysis - the analysis

analysisRemoved

public void analysisRemoved(AbstractInfoAnalysis analysis)
Called when an analysis is removed from a bundle.

Specified by:
analysisRemoved in interface IBundleChangedListener
Parameters:
analysis - the analysis