Class PluginDescriptorImpl
java.lang.Object
org.processmining.framework.plugin.impl.AbstractPluginDescriptor
org.processmining.framework.plugin.impl.PluginDescriptorImpl
- All Implemented Interfaces:
Comparable<PluginDescriptor>
,PluginDescriptor
-
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(PluginDescriptor plugin) Compares this plugin with another plugins.boolean
return equality of plugins.protected Object[]
execute
(PluginContext context, int methodIndex, Object... allArgs) In this method, the pluginDescriptor should do the actual work of concstructing the result.protected Method
findMethod
(Object[] allArgs) <T extends Annotation>
TgetAnnotation
(Class<T> annotationClass) Return the annotation of the given class carried by this plugin.<T extends Annotation>
TgetAnnotation
(Class<T> annotationClass, int methodIndex) Return the annotation of the method at the given index.String[]
Return the set of categories.Class<? extends PluginContext>
getContextType
(int methodIndex) Returns the context type required by the method at index methodIndex.getHelp()
Return the help / description of the plugin.getIcon()
getID()
returns the ID of this Plugin.int
getIndexInMethod
(int methodIndex, int parameterIndex) Returns the index of the global parameter to the index of that parameter in the given method.int
getIndexInParameterNames
(int methodIndex, int methodParameterIndex) Returns the index of the method parameter of the given method in the list of global parameters.String[]
Return the set of keywords.getMethodHelp
(int methodIndex) Return the help / description of the given method, if specified.getMethodLabel
(int methodIndex) Return the label of the given method, if specified.int
Returns the index in the result array of the most significant result for this plugingetName()
Return the name of the plugin.int
Return the number of methods in this plugin.Return the package where the plug-in resides.Returns a list of labels that represent the possible parameters of this plugin.getParameterNames
(int methodIndex) Returns a list of labels that represent the required parameters of the method at the given index.returns a list of sizegetNumberOfMethods()
, such that element at indexi
of the list equalsgetParameterTypes(i)
getParameterTypes
(int methodIndex) Returns a list of types that represent the required parameters of the method at the given index.getPluginParameterName
(int methodIndex, int parameterIndex) Return the label of the parameter at indexparameterIndex
of the method atmethodIndex
.Class<?>
getPluginParameterType
(int methodIndex, int parameterIndex) Return the type of the parameter at indexparameterIndex
of the method atmethodIndex
.returns the types of the objects returned if this plugin is invoked, in the order in which they are returnedreturns the labels of the objects returned if this plugin is invoked, in the order in which they are returnedgetTypesAtParameterIndex
(int index) Returns a list of types that can be accepted for the parameter at indexglobalParameterIndex
.getURL()
boolean
Returns whether the plugin handles termination itself.boolean
hasAnnotation
(Class<? extends Annotation> annotationClass) Check if this plugin carries the given annotation.boolean
hasAnnotation
(Class<? extends Annotation> annotationClass, int methodIndex) Check if the method at the given index carries the given annotation.int
hashCode()
return hashcodeboolean
Returns true if this plugin can be used by the end-users.boolean
Return whether this plug-in meets the level threshold.boolean
Return whether this plug-in meets the quality threshold.toString()
Returns a String representation of the pluginMethods inherited from class org.processmining.framework.plugin.impl.AbstractPluginDescriptor
invoke
-
Method Details
-
getPackage
Description copied from interface:PluginDescriptor
Return the package where the plug-in resides.- Returns:
-
getMostSignificantResult
public int getMostSignificantResult()Description copied from interface:PluginDescriptor
Returns the index in the result array of the most significant result for this plugin- Returns:
- the index in the result array of the most significant result. If no results are returned by this plugin, anything can be returned.
-
hasAnnotation
Description copied from interface:PluginDescriptor
Check if this plugin carries the given annotation. Implementing classes can return false at their discretion, i.e. they are not required to return true for all annotations carried by the plugin.- Returns:
-
getAnnotation
Description copied from interface:PluginDescriptor
Return the annotation of the given class carried by this plugin. Note that hasAnnotationClass(annotationClass) is assumed. This method should not be used to access any annotation elements carried by Plugin.class. Implementing classes are allows to return null when called with Plugin.class.- Returns:
-
getName
Description copied from interface:PluginDescriptor
Return the name of the plugin. This name is not unique within ProM.- Returns:
-
hashCode
public int hashCode()Description copied from interface:PluginDescriptor
return hashcode- Specified by:
hashCode
in interfacePluginDescriptor
- Overrides:
hashCode
in classObject
-
equals
Description copied from interface:PluginDescriptor
return equality of plugins. The ID is used for equality.- Specified by:
equals
in interfacePluginDescriptor
- Overrides:
equals
in classObject
-
toString
Description copied from interface:PluginDescriptor
Returns a String representation of the plugin- Specified by:
toString
in interfacePluginDescriptor
- Overrides:
toString
in classObject
-
execute
protected Object[] execute(PluginContext context, int methodIndex, Object... allArgs) throws Exception Description copied from class:AbstractPluginDescriptor
In this method, the pluginDescriptor should do the actual work of concstructing the result. Note that no objects passed in the allArgs argument are futures anymore.- Specified by:
execute
in classAbstractPluginDescriptor
- Returns:
- Throws:
Exception
-
findMethod
-
getReturnTypes
returns the labels of the objects returned if this plugin is invoked, in the order in which they are returned- Returns:
-
getParameterTypes
Description copied from interface:PluginDescriptor
Returns a list of types that represent the required parameters of the method at the given index. In other words, the method at indexmethodIndex
requires exectly the parameter types as provided in the returned list, in that order.- Returns:
-
getPluginParameterType
Description copied from interface:PluginDescriptor
Return the type of the parameter at indexparameterIndex
of the method atmethodIndex
.- Parameters:
methodIndex
-0 <= methodIndex < getNumberOfMethods()
parameterIndex
-0 <= parameterIndex < getParameterTypes().size()
- Returns:
- may return null if the parameter is not used by the given method
-
getParameterTypes
Description copied from interface:PluginDescriptor
returns a list of sizegetNumberOfMethods()
, such that element at indexi
of the list equalsgetParameterTypes(i)
- Returns:
-
getParameterNames
Description copied from interface:PluginDescriptor
Returns a list of labels that represent the possible parameters of this plugin. Each method required a subset of these labels, while preserving their order.- Returns:
-
getTypesAtParameterIndex
Description copied from interface:PluginDescriptor
Returns a list of types that can be accepted for the parameter at indexglobalParameterIndex
. The parameter index is global, i.e. not method specific. Instead, for each typet
in the set returned by this method it is guaranteed that there is at least one method (suppose at indexi
), such thatgetParameterType(i, getIndexInMethod(i, globalParameterIndex)) == t
- Parameters:
index
-0 <= globalParameterIndex < getParameterNames().size()
- Returns:
-
getNumberOfMethods
public int getNumberOfMethods()Return the number of methods in this plugin.- Returns:
-
getParameterNames
Description copied from interface:PluginDescriptor
Returns a list of labels that represent the required parameters of the method at the given index. In other words, the method at indexmethodIndex
requires exactly the parameter labels as provided in the returned list, in that order.- Returns:
-
getPluginParameterName
Description copied from interface:PluginDescriptor
Return the label of the parameter at indexparameterIndex
of the method atmethodIndex
.- Parameters:
methodIndex
-0 <= methodIndex < getNumberOfMethods()
parameterIndex
-0 <= parameterIndex < getParameterTypes(methodIndex).size()
- Returns:
- may return null if the parameter is not used by the given method
-
getReturnNames
returns the types of the objects returned if this plugin is invoked, in the order in which they are returned- Returns:
-
getID
Description copied from interface:PluginDescriptor
returns the ID of this Plugin. Provided that the code of a plugin does not change, these IDs are persistent between executions of ProM.- Returns:
-
getContextType
Description copied from interface:PluginDescriptor
Returns the context type required by the method at index methodIndex.- Parameters:
methodIndex
-0 <= methodIndex < getNumberOfMethods()
- Returns:
-
compareTo
Description copied from interface:PluginDescriptor
Compares this plugin with another plugins. Uses thegetName().toLowerCase()
for comparing. Only if names are equal, then the IDs are used for comparison. Comparison should be name-based between different implementing classes. -
getIndexInParameterNames
public int getIndexInParameterNames(int methodIndex, int methodParameterIndex) Description copied from interface:PluginDescriptor
Returns the index of the method parameter of the given method in the list of global parameters. Each method of a plugin requires a subset of the global set of parameters that the plugin defines. This method can be used to map the index of each method parameter to the index of the global parameter.- Parameters:
methodIndex
-0 <= methodIndex < getNumberOfMethods()
methodParameterIndex
-0 <= methodParameterIndex < getParameterNames(methodIndex).size()
- Returns:
0 <= return < getParameterNames().size()
-
getIndexInMethod
public int getIndexInMethod(int methodIndex, int parameterIndex) Description copied from interface:PluginDescriptor
Returns the index of the global parameter to the index of that parameter in the given method. Each method of a plugin requires a subset of the global set of parameters that the plugin defines. This method can be used to map the index of each global parameter to the index of the method parameter. Note that if the given method does not require the global parameter, -1 is returned.- Parameters:
methodIndex
-0 <= methodIndex < getNumberOfMethods()
parameterIndex
-0 <= globalParameterIndex < getParameterNames().size()
- Returns:
-1 <= return < getParameterNames(methodIndex).size()
-
getMethodLabel
Description copied from interface:PluginDescriptor
Return the label of the given method, if specified. If no label was specified, the name of the plugin is returned.- Returns:
-
isUserAccessible
public boolean isUserAccessible()Description copied from interface:PluginDescriptor
Returns true if this plugin can be used by the end-users. If this is set to false, such a plugin should not be presented to the end user by any context.- Returns:
-
handlesCancel
public boolean handlesCancel()Description copied from interface:PluginDescriptor
Returns whether the plugin handles termination itself.- Returns:
-
getAnnotation
Description copied from interface:PluginDescriptor
Return the annotation of the method at the given index. Note that hasAnnotationClass(annotationClass, methodIndex) is assumed. This method should not be used to access any annotation elements carried by Plugin.class. Implementing classes are allows to return null when called with Plugin.class.- Returns:
-
hasAnnotation
Description copied from interface:PluginDescriptor
Check if the method at the given index carries the given annotation. Implementing classes can return false at their discretion, i.e. they are not required to return true for all annotations carried by the plugin.- Returns:
-
getHelp
Description copied from interface:PluginDescriptor
Return the help / description of the plugin.- Returns:
-
getMethodHelp
Description copied from interface:PluginDescriptor
Return the help / description of the given method, if specified.- Returns:
-
getKeywords
Description copied from interface:PluginDescriptor
Return the set of keywords.- Returns:
- a set of keywords
-
getCategories
Description copied from interface:PluginDescriptor
Return the set of categories.- Returns:
- a set of categories
-
meetsQualityThreshold
public boolean meetsQualityThreshold()Description copied from interface:PluginDescriptor
Return whether this plug-in meets the quality threshold.- Returns:
- whether this plug-in meets the quality threshold
-
meetsLevelThreshold
public boolean meetsLevelThreshold()Description copied from interface:PluginDescriptor
Return whether this plug-in meets the level threshold.- Returns:
- whether this plug-in meets the level threshold
-
getIcon
-
getURL
-