TPTP 4.5.0 Platform Project
Public API Specification

org.eclipse.tptp.platform.analysis.core.element
Class AbstractAnalysisElement

java.lang.Object
  extended by org.eclipse.tptp.platform.analysis.core.element.AbstractAnalysisElement
Direct Known Subclasses:
AbstractAnalysisProvider, AbstractAnalysisResult, AbstractAnalysisRule, AnalysisProviderManager, DefaultAnalysisCategory

public abstract class AbstractAnalysisElement
extends java.lang.Object

This class handles code common to all analysis elements. Under normal circumstances this class will never be used directly by user code


Field Summary
static int CATEGORY_ELEMENT_TYPE
          The type identifier for category elements
static java.lang.String COMBO_VALUE
          The name of the combo value extension point for rule parameters
static java.lang.String DETAIL_PROVIDER
          The name of the extension point used to specify detail providers for a rule
static int PROVIDER_ELEMENT_TYPE
          The type identifier for provider elements
static int PROVIDER_MANAGER_ELEMENT_TYPE
          The type identifier for provider manager elements
static int RESULT_ELEMENT_TYPE
          The type identifier for result elements
static int RULE_ELEMENT_TYPE
          The type identifier for rule elements
 
Constructor Summary
AbstractAnalysisElement(int newElementType)
          Constructor
 
Method Summary
 void addDetailProvider(RuleDetailProvider details)
          Add a new detail provider to this element.
 void addHistoryResultSet(java.lang.String historyId)
          Add this element to the history result set
 void addOwnedElement(AbstractAnalysisElement 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 addParameter(AnalysisParameter parameter)
          Add a new analysis parameter
 void addParameters(java.util.List parameters)
          Add a list of parameters
 void deleteHistoryResults(java.lang.String historyId)
          Delete the results from a given history
 void dispose()
          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.util.Map getExecutionHistory()
           
 java.util.Map getExternalDataMap()
           
 java.lang.String getHelpID()
           
 java.util.List getHistoryResults(java.lang.String historyId)
          Return an unmodifiable copy of the analysis results for a given history Clients should not try to modify the returned list otherwise an exception will be thrown
 java.lang.String getIconName()
           
 java.lang.String getId()
           
 java.lang.String getLabel()
           
 java.util.List getOwnedElements()
           
 AbstractAnalysisElement getOwner()
           
 java.lang.String getOwnerId()
          Returns the unique id of the analysis element that owns this element
 AnalysisParameter getParameter(java.lang.String name)
           
 int getParameterCount()
          Returns the number of parameters associated with the current analysis element
 java.util.List getParameterList()
           
 java.lang.String getPluginId()
           
 AbstractAnalysisProvider getProvider()
           
 AnalysisProviderManager getProviderManager()
           
 java.lang.String getViewerID()
           
 int getVisibleParameterCount()
          Returns the number of parameters that are displayable for the current analysis element
 void postAnalyze()
          Perform any tear down required after analysis ends.
 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 removeHistoryResultSet(java.lang.String historyId, AbstractAnalysisResult result)
          Do not use.
 void setElementType(int newElementType)
          Set the element type.
 void setExternalDataMap(java.util.Map externalMap)
          INTERNAL USE ONLY Set the map of ExternalMap instances.
 void setHelpID(java.lang.String newHelpID)
          Internal use only.
 void setIconName(java.lang.String newIconName)
          Allows an element to configure its own icon name
 void setId(java.lang.String newId)
          Internal use only.
 void setInitializationData(org.eclipse.core.runtime.IConfigurationElement config)
           
 void setLabel(java.lang.String newLabel)
           
 void setOwner(AbstractAnalysisElement newOwner)
          Tell this element who its owner is.
 void setOwnerId(java.lang.String ownerId)
          Internal Use.
 void setPluginId(java.lang.String newPluginId)
          Used Internally.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROVIDER_MANAGER_ELEMENT_TYPE

public static final int PROVIDER_MANAGER_ELEMENT_TYPE
The type identifier for provider manager elements

See Also:
Constant Field Values

PROVIDER_ELEMENT_TYPE

public static final int PROVIDER_ELEMENT_TYPE
The type identifier for provider elements

See Also:
Constant Field Values

CATEGORY_ELEMENT_TYPE

public static final int CATEGORY_ELEMENT_TYPE
The type identifier for category elements

See Also:
Constant Field Values

RULE_ELEMENT_TYPE

public static final int RULE_ELEMENT_TYPE
The type identifier for rule elements

See Also:
Constant Field Values

RESULT_ELEMENT_TYPE

public static final int RESULT_ELEMENT_TYPE
The type identifier for result elements

See Also:
Constant Field Values

COMBO_VALUE

public static final java.lang.String COMBO_VALUE
The name of the combo value extension point for rule parameters

See Also:
Constant Field Values

DETAIL_PROVIDER

public static final java.lang.String DETAIL_PROVIDER
The name of the extension point used to specify detail providers for a rule

See Also:
Constant Field Values
Constructor Detail

AbstractAnalysisElement

public AbstractAnalysisElement(int newElementType)
Constructor

Parameters:
newElementType - The type of element being created, must be one of: PROVIDER_MANAGER_ELEMENT_TYPE, PROVIDER_ELEMENT_TYPE, CATEGORY_ELEMENT_TYPE, RULE_ELEMENT_TYPE, RESULT_ELEMENT_TYPE
Method Detail

setInitializationData

public final void setInitializationData(org.eclipse.core.runtime.IConfigurationElement config)
See Also:
IExecutableExtension.setInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)

dispose

public void dispose()
Called when the element is about to be disposed. This can be overridden by derived class to perform and special object teardown.


getOwner

public final AbstractAnalysisElement getOwner()
Returns:
The parent element that owns this analysis element

setOwner

public final void setOwner(AbstractAnalysisElement newOwner)
Tell this element who its owner is. Used Internally

Parameters:
owner - The element that owns this element

getOwnerId

public java.lang.String getOwnerId()
Returns the unique id of the analysis element that owns this element

Returns:
A string containing the unique identifier of the owner

setOwnerId

public void setOwnerId(java.lang.String ownerId)
Internal Use. Sets the unique identifier of the owning analysis element. This method can be called only once.

Parameters:
ownerId - The unique identifier of the owner

getOwnedElements

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

addOwnedElement

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

Parameters:
element - THe new element to add

addOwnedElements

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

Parameters:
c - The collection of elements to add

addHistoryResultSet

public final 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 final void removeHistoryResultSet(java.lang.String historyId,
                                         AbstractAnalysisResult result)
Do not use. This method will be deprecated in TPTP 4.5 and later.

Parameters:
historyId -
result -

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 final java.util.List getHistoryResults(java.lang.String historyId)
Return an unmodifiable copy of the analysis results for a given history Clients should not try to modify the returned list otherwise an exception will be thrown

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

deleteHistoryResults

public final void deleteHistoryResults(java.lang.String historyId)
Delete the results from a given history

Parameters:
historyId - The id of the history whose results will be removes

getLabel

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

setLabel

public final void setLabel(java.lang.String newLabel)

setIconName

public final 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()
See Also:
IAnalysisElement.getIconName()

getPluginId

public final java.lang.String getPluginId()
Returns:
The unique id of the plug-in that defined the analysis element

setPluginId

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

Parameters:
pluginId -

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, ApplicationAnalysisElement derivatives should override this method if they need to do special work before analysis starts


postAnalyze

public void postAnalyze()
Perform any tear down required after analysis ends. This action happens only once per analysis run. ApplicationAnalysisElement derivatives should override this method if they need to do special work after analysis completes


getElementType

public final 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 final void setElementType(int newElementType)
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.

getId

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

setId

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

Parameters:
id - The new id for the element

getHelpID

public final java.lang.String getHelpID()
Returns:
A string containing the unique identifier of the help page for this element

setHelpID

public final void setHelpID(java.lang.String newHelpID)
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

getViewerID

public final java.lang.String getViewerID()
Returns:
The viewer ID for the viewer attached to this element

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
the String version of the analysis element

getExecutionHistory

public final java.util.Map getExecutionHistory()
Returns:
A hashtable of execution history instances.

addDetailProvider

public final void addDetailProvider(RuleDetailProvider details)
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.

Parameters:
detail - The definition of a detail provider

getDetailProviders

public final 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

setExternalDataMap

public void setExternalDataMap(java.util.Map externalMap)
INTERNAL USE ONLY Set the map of ExternalMap instances.

Parameters:
externalMap - The map of ExternalData to store for this element

getExternalDataMap

public final java.util.Map getExternalDataMap()
Returns:
The map of ExternalData object for this element

addParameter

public final void addParameter(AnalysisParameter parameter)
Add a new analysis parameter

Parameters:
parameter - The AnalysisParameter to add

addParameters

public final void addParameters(java.util.List parameters)
Add a list of parameters

Parameters:
parameters - The list of AnalysisParameters to add

getParameter

public final AnalysisParameter getParameter(java.lang.String name)

getParameterList

public final java.util.List getParameterList()

getParameterCount

public final int getParameterCount()
Returns the number of parameters associated with the current analysis element

Returns:
The total number of analysis parameters

getVisibleParameterCount

public final int getVisibleParameterCount()
Returns the number of parameters that are displayable for the current analysis element

Returns:
The number of parameters that are visible in the user interface (i.e. They have a label)

getProviderManager

public final AnalysisProviderManager getProviderManager()
Returns:
the provider manager, which is top-most owner of all elements

getProvider

public final AbstractAnalysisProvider getProvider()
Returns:
the analysis provider that owns this element

TPTP 4.5.0 Platform Project
Public API Specification