org.processmining.models.graphbased.directed.petrinet.configurable
Class ConfigurableFeatureGroup

java.lang.Object
  extended by org.processmining.models.graphbased.directed.petrinet.configurable.ConfigurableFeatureGroup
All Implemented Interfaces:
ParameterizedFeature<ConfigurableParameter<?>>

public class ConfigurableFeatureGroup
extends java.lang.Object
implements ParameterizedFeature<ConfigurableParameter<?>>

A group of features that shall be configured together. *

Author:
dfahland

Field Summary
static java.util.Comparator<ConfigurableFeatureGroup> comparator
          Default comparator comparing groups by their ids
 
Constructor Summary
ConfigurableFeatureGroup(java.lang.String id)
           
 
Method Summary
 void addFeature(ConfigurableFeature<? extends org.processmining.models.graphbased.directed.DirectedGraphElement,? extends java.lang.Object> feature)
          Add feature to this group.
 ConfigurableFeatureGroup cloneFor(java.util.Map<org.processmining.models.graphbased.directed.DirectedGraphElement,org.processmining.models.graphbased.directed.DirectedGraphElement> copies)
          Clone this feature group and create a new ConfigurableFeature for each feature in this group where the ConfigurableFeature.getConfiguredElement() is updated according to copies.
static ConfigurableFeatureGroup createDefaultFeatureGroup(Place p, Marking m)
          Create a configurable feature group for the presence of a place and its initial marking.
static ConfigurableFeatureGroup createDefaultFeatureGroup(Transition t)
          Create a configurable feature group for the presence of a transition and the weights of its adjacent arcs.
static java.util.List<ConfigurableFeatureGroup> createDefaultFeatureGroups(PetrinetGraph net, Marking m)
          Create default configurable feature groups for all nodes in the net.
 void executeConfiguration(ConfigurablePetrinet<? extends PetrinetGraph> parent)
          Executes the configuration for this feature group.
 java.util.List<ConfigurableFeature<? extends org.processmining.models.graphbased.directed.DirectedGraphElement,? extends java.lang.Object>> getFeatures()
           
 java.util.List<ConfigurableFeature<? extends org.processmining.models.graphbased.directed.DirectedGraphElement,? extends java.lang.Object>> getFeatures(org.processmining.models.graphbased.directed.DirectedGraphElement element)
           
 java.lang.String getId()
           
 java.util.List<ConfigurableParameter<?>> getInputParameters()
           
 java.util.List<ConfigurableParameter<?>> getInputParametersByName()
           
 void setInputParameter(java.lang.String key, java.lang.Object value)
          Set value of an input parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

comparator

public static java.util.Comparator<ConfigurableFeatureGroup> comparator
Default comparator comparing groups by their ids

Constructor Detail

ConfigurableFeatureGroup

public ConfigurableFeatureGroup(java.lang.String id)
Method Detail

addFeature

public void addFeature(ConfigurableFeature<? extends org.processmining.models.graphbased.directed.DirectedGraphElement,? extends java.lang.Object> feature)
                throws InvalidConfigurationException
Add feature to this group.

Parameters:
feature -
Throws:
InvalidConfigurationException - if

getFeatures

public java.util.List<ConfigurableFeature<? extends org.processmining.models.graphbased.directed.DirectedGraphElement,? extends java.lang.Object>> getFeatures()
Returns:
all features of this group

getFeatures

public java.util.List<ConfigurableFeature<? extends org.processmining.models.graphbased.directed.DirectedGraphElement,? extends java.lang.Object>> getFeatures(org.processmining.models.graphbased.directed.DirectedGraphElement element)
Parameters:
element -
Returns:
list of features configuring the given element

executeConfiguration

public void executeConfiguration(ConfigurablePetrinet<? extends PetrinetGraph> parent)
Executes the configuration for this feature group. The configuration may require to change the parent object.

Parameters:
parent -

getId

public java.lang.String getId()
Returns:
ID of this feature

cloneFor

public ConfigurableFeatureGroup cloneFor(java.util.Map<org.processmining.models.graphbased.directed.DirectedGraphElement,org.processmining.models.graphbased.directed.DirectedGraphElement> copies)
                                  throws InvalidConfigurationException
Clone this feature group and create a new ConfigurableFeature for each feature in this group where the ConfigurableFeature.getConfiguredElement() is updated according to copies. Every subclass must override this method for proper cloning behavior.

Parameters:
copies -
Returns:
the clone
Throws:
InvalidConfigurationException

createDefaultFeatureGroup

public static ConfigurableFeatureGroup createDefaultFeatureGroup(Transition t)
                                                          throws InvalidConfigurationException
Create a configurable feature group for the presence of a transition and the weights of its adjacent arcs.

Parameters:
t -
Returns:
Throws:
InvalidConfigurationException

createDefaultFeatureGroup

public static ConfigurableFeatureGroup createDefaultFeatureGroup(Place p,
                                                                 Marking m)
                                                          throws InvalidConfigurationException
Create a configurable feature group for the presence of a place and its initial marking.

Parameters:
p -
m -
Returns:
Throws:
InvalidConfigurationException

createDefaultFeatureGroups

public static java.util.List<ConfigurableFeatureGroup> createDefaultFeatureGroups(PetrinetGraph net,
                                                                                  Marking m)
                                                                           throws InvalidConfigurationException
Create default configurable feature groups for all nodes in the net. Each node gets its own feature group. Arcs are added to the feature groups of their adjacent transitions.

Parameters:
net -
m -
Returns:
list of all default configurable feature groups, first the transition features, then the place features
Throws:
InvalidConfigurationException

getInputParameters

public java.util.List<ConfigurableParameter<?>> getInputParameters()
Specified by:
getInputParameters in interface ParameterizedFeature<ConfigurableParameter<?>>
Returns:
all parameters of this feature together with their chosen value

getInputParametersByName

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

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<?>>
Throws:
InvalidConfigurationException