TPTP 4.2.0 Platform Project
Public API Specification

org.eclipse.tptp.platform.analysis.core.element
Interface IAnalysisElement

All Known Subinterfaces:
IAnalysisCategory, IAnalysisProvider, IAnalysisProviderManager, IAnalysisResult, IAnalysisRule
All Known Implementing Classes:
AbstractAnalysisElement, AbstractAnalysisProvider, AbstractAnalysisResult, AbstractAnalysisRule, AnalysisProviderManager, DefaultAnalysisCategory

public interface IAnalysisElement


Method Summary
 void addDetailProvider(RuleDetailProvider detail)
          Add a new detail provider to this element.
 void addHistoryResultSet(java.lang.String historyId)
          Add this element to the history result set
 void addOwnedElement(IAnalysisElement element)
          Add an IAnalysisElement instance to the list of owned elements
 void addOwnedElements(java.util.Collection c)
          Add a collection of IAnalysisElement instances to the list of owned elements
 void dispose()
          This method is called when the element is about to be disposed.
 java.util.List getDetailProviders()
          This method returns a list of detail provider definitions specified for this element.
 int getElementType()
          Return the element type.
 java.lang.String getHelpID()
           
 java.util.List getHistoryResults(java.lang.String historyId)
          Return the analysis result for a given history
 java.lang.String getIconName()
           
 java.lang.String getId()
           
 java.lang.String getLabel()
           
 java.util.List getOwnedElements()
           
 IAnalysisElement getOwner()
           
 java.lang.String getPluginId()
           
 void preAnalyze()
          Perform any set up required before analysis starts.
 void removeHistoryResultSet(java.lang.String historyId)
          Remove the result data associated with the specified history id
 void setElementType(int elementType)
          Set the element type.
 void setHelpID(java.lang.String id)
          Internal use only.
 void setIconName(java.lang.String newIconName)
          Allows an element to configure its own icon name
 void setId(java.lang.String id)
          Internal use only.
 void setLabel(java.lang.String newLabel)
          Allows an analysis element to configure it own display label
 void setOwner(IAnalysisElement owner)
          Tell this element who its owner is.
 void setPluginId(java.lang.String pluginId)
          Used Internally.
 

Method Detail

dispose

public void dispose()
This method is called when the element is about to be disposed. The element should do any required clean up at this point


getId

public java.lang.String getId()
Returns:
The unique identifier for this element

setId

public void setId(java.lang.String id)
Internal use only. Sets the unique id of this element.

Parameters:
id - The new id for the element

getPluginId

public java.lang.String getPluginId()
Returns:
The unique id of the plugin that defined the analysis element

setPluginId

public void setPluginId(java.lang.String pluginId)
Used Internally. Calling this method will have no effect

Parameters:
pluginId -

setIconName

public void setIconName(java.lang.String newIconName)
Allows an element to configure its own icon name

Parameters:
newIconName - The path name of the icon to use for this element

getIconName

public java.lang.String getIconName()
Returns:
The file name of the icon to use for this element

getLabel

public java.lang.String getLabel()
Returns:
The display name to use for this element

setLabel

public void setLabel(java.lang.String newLabel)
Allows an analysis element to configure it own display label

Parameters:
newLabel - The label

getOwner

public IAnalysisElement getOwner()
Returns:
The category that owns this element

setOwner

public void setOwner(IAnalysisElement owner)
Tell this element who its owner is. Used Internally

Parameters:
owner - The element that owns this element

getOwnedElements

public java.util.List getOwnedElements()
Returns:
A list of IAnalysisElement instances owned by this element

addOwnedElement

public void addOwnedElement(IAnalysisElement element)
Add an IAnalysisElement instance to the list of owned elements

Parameters:
element - THe new element to add

addOwnedElements

public void addOwnedElements(java.util.Collection c)
Add a collection of IAnalysisElement instances to the list of owned elements


addHistoryResultSet

public void addHistoryResultSet(java.lang.String historyId)
Add this element to the history result set

Parameters:
historyId - The id of the history analysis run

removeHistoryResultSet

public void removeHistoryResultSet(java.lang.String historyId)
Remove the result data associated with the specified history id

Parameters:
historyId - The id of the history analysis run being removed

getHistoryResults

public java.util.List getHistoryResults(java.lang.String historyId)
Return the analysis result for a given history

Parameters:
historyId - The id of the history analysis run to return
Returns:
A list of IAnalysisResult elements for the given history

preAnalyze

public void preAnalyze()
Perform any set up required before analysis starts. This action happens only once (e.g. when the user clicks the "analyze" button) per analysis run


getElementType

public int getElementType()
Return the element type. Values returned are: PROVIDER_MANAGER_ELEMENT_TYPE, PROVIDER_ELEMENT_TYPE, CATEGORY_ELEMENT_TYPE, RULE_ELEMENT_TYPE, RESULT_ELEMENT_TYPE

Returns:
The unique element type for this element

setElementType

public void setElementType(int elementType)
Set the element type. This method can be called only once. Subsequent calls are ignored. Valid values for this method are defined in the following constants: PROVIDER_MANAGER_ELEMENT_TYPE, PROVIDER_ELEMENT_TYPE, CATEGORY_ELEMENT_TYPE, RULE_ELEMENT_TYPE, RESULT_ELEMENT_TYPE

Parameters:
elementType - The new element type.

getHelpID

public java.lang.String getHelpID()
Returns:
The unique identifier for this element's context-sensitive help

setHelpID

public void setHelpID(java.lang.String id)
Internal use only. Sets the unique id of this element's context-sensitive help.

Parameters:
id - The new id for the element's context-sensitive help

addDetailProvider

public void addDetailProvider(RuleDetailProvider detail)
Add a new detail provider to this element. A detail provider can display information about the element. For example it might include a detailed description or a possible solution to a problem indicated by the analysis element. Note, the file name specified must exist in the plugin where the rule is defined.

Parameters:
detail - The definition of a detail provider

getDetailProviders

public java.util.List getDetailProviders()
This method returns a list of detail provider definitions specified for this element. The list returned contains instances of RuleDetailProvider, which contains the data needed to show a particular detail.

Returns:
The detail providers defined for this element

TPTP 4.2.0 Platform Project
Public API Specification