org.processmining.models.graphbased.directed.petrinet.configurable.impl
Class ConfigurableGraphElementFeature<T extends org.processmining.models.graphbased.directed.DirectedGraphElement>

java.lang.Object
  extended by org.processmining.models.graphbased.directed.petrinet.configurable.ConfigurableParameter<ConfigurableGraphElementOption>
      extended by org.processmining.models.graphbased.directed.petrinet.configurable.impl.ConfigurableParameterGraphElement
          extended by org.processmining.models.graphbased.directed.petrinet.configurable.impl.ConfigurableGraphElementFeature<T>
Type Parameters:
T - the type of Petri net elements to be configured
All Implemented Interfaces:
ConfigurableFeature<T,ConfigurableGraphElementOption>, ParameterizedFeature<ConfigurableParameter<ConfigurableGraphElementOption>>
Direct Known Subclasses:
ConfigurableArc, ConfigurablePlace, ConfigurableTransition

public abstract class ConfigurableGraphElementFeature<T extends org.processmining.models.graphbased.directed.DirectedGraphElement>
extends ConfigurableParameterGraphElement
implements ConfigurableFeature<T,ConfigurableGraphElementOption>

Abstract class to configure elements of a Petri net to be kept, removed, or made invisible. Uses ConfigurableGraphElementOption to configure graph elements.

Author:
dfahland

Field Summary
static ConfigurableGraphElementOption[] ALL
           
 
Constructor Summary
ConfigurableGraphElementFeature(java.lang.String id, T element, ConfigurableGraphElementOption[] values, ConfigurableGraphElementOption defaultValue)
           
 
Method Summary
 void clearElementVisualization()
          Clear visual representation of ConfigurableFeature.getConfiguredElement() back to normal
static java.lang.String generateID(org.processmining.models.graphbased.directed.DirectedGraphElement el)
           
 T getConfiguredElement()
          Graph element being configured
 java.lang.String getId()
           
 java.util.List<ConfigurableParameter<ConfigurableGraphElementOption>> getInputParameters()
           
 java.util.List<ConfigurableParameter<ConfigurableGraphElementOption>> getInputParametersByName()
           
static boolean isValidValue(ConfigurableGraphElementOption o, ConfigurableGraphElementOption[] allowed)
           
static boolean sameOptions(ConfigurableGraphElementOption[] o1, ConfigurableGraphElementOption[] o2)
           
 void setInputParameter(java.lang.String key, java.lang.Object value)
          Set value of an input parameter.
 void updateElementVisualization()
          Change visual representation of ConfigurableFeature.getConfiguredElement()
 void updateValue()
          Update the value of this configurable feature.
 
Methods inherited from class org.processmining.models.graphbased.directed.petrinet.configurable.impl.ConfigurableParameterGraphElement
isValidIntervalValue
 
Methods inherited from class org.processmining.models.graphbased.directed.petrinet.configurable.ConfigurableParameter
getDiscreteDomain, getIntervalMax, getIntervalMin, getValue, isIntervalDomain, isValidValue, setDiscreteDomain, setId, setIntervalDomain, setValue, updateParameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.processmining.models.graphbased.directed.petrinet.configurable.ConfigurableFeature
cloneFor, executeConfiguration, isStillExecutable
 

Field Detail

ALL

public static final ConfigurableGraphElementOption[] ALL
Constructor Detail

ConfigurableGraphElementFeature

public ConfigurableGraphElementFeature(java.lang.String id,
                                       T element,
                                       ConfigurableGraphElementOption[] values,
                                       ConfigurableGraphElementOption defaultValue)
                                throws InvalidConfigurationException
Throws:
InvalidConfigurationException
Method Detail

getId

public java.lang.String getId()
Specified by:
getId in interface ConfigurableFeature<T extends org.processmining.models.graphbased.directed.DirectedGraphElement,ConfigurableGraphElementOption>
Overrides:
getId in class ConfigurableParameter<ConfigurableGraphElementOption>
Returns:
id of the configurable feature

getConfiguredElement

public T getConfiguredElement()
Description copied from interface: ConfigurableFeature
Graph element being configured

Specified by:
getConfiguredElement in interface ConfigurableFeature<T extends org.processmining.models.graphbased.directed.DirectedGraphElement,ConfigurableGraphElementOption>
Returns:

getInputParameters

public java.util.List<ConfigurableParameter<ConfigurableGraphElementOption>> getInputParameters()
Specified by:
getInputParameters in interface ConfigurableFeature<T extends org.processmining.models.graphbased.directed.DirectedGraphElement,ConfigurableGraphElementOption>
Specified by:
getInputParameters in interface ParameterizedFeature<ConfigurableParameter<ConfigurableGraphElementOption>>
Returns:
list of input parameters of this feature

getInputParametersByName

public java.util.List<ConfigurableParameter<ConfigurableGraphElementOption>> getInputParametersByName()
Specified by:
getInputParametersByName in interface ParameterizedFeature<ConfigurableParameter<ConfigurableGraphElementOption>>
Returns:
input parameters that differ by their ConfigurableParameter.getId(), i.e., from two input parameters with same id, only one will be included

updateValue

public void updateValue()
Description copied from interface: ConfigurableFeature
Update the value of this configurable feature. Has to be invoked whenever the value of this feature depends on several input parameters

Specified by:
updateValue in interface ConfigurableFeature<T extends org.processmining.models.graphbased.directed.DirectedGraphElement,ConfigurableGraphElementOption>

setInputParameter

public void setInputParameter(java.lang.String key,
                              java.lang.Object value)
                       throws InvalidConfigurationException
Description copied from interface: ParameterizedFeature
Set value of an input parameter.

Specified by:
setInputParameter in interface ParameterizedFeature<ConfigurableParameter<ConfigurableGraphElementOption>>
Throws:
InvalidConfigurationException

sameOptions

public static boolean sameOptions(ConfigurableGraphElementOption[] o1,
                                  ConfigurableGraphElementOption[] o2)
Parameters:
o1 -
o2 -
Returns:
true iff o1 and o2 contain the same elements (in possibly different ordering)

isValidValue

public static boolean isValidValue(ConfigurableGraphElementOption o,
                                   ConfigurableGraphElementOption[] allowed)
Parameters:
o -
allowed -
Returns:
true iff o is in allowed

updateElementVisualization

public void updateElementVisualization()
Description copied from interface: ConfigurableFeature
Change visual representation of ConfigurableFeature.getConfiguredElement()

Specified by:
updateElementVisualization in interface ConfigurableFeature<T extends org.processmining.models.graphbased.directed.DirectedGraphElement,ConfigurableGraphElementOption>

clearElementVisualization

public void clearElementVisualization()
Description copied from interface: ConfigurableFeature
Clear visual representation of ConfigurableFeature.getConfiguredElement() back to normal

Specified by:
clearElementVisualization in interface ConfigurableFeature<T extends org.processmining.models.graphbased.directed.DirectedGraphElement,ConfigurableGraphElementOption>

generateID

public static java.lang.String generateID(org.processmining.models.graphbased.directed.DirectedGraphElement el)