org.processmining.analysis.decisionmining
Class DecisionAttribute

java.lang.Object
  extended by org.processmining.analysis.decisionmining.DecisionAttribute
All Implemented Interfaces:
GuiNotificationTarget

public class DecisionAttribute
extends java.lang.Object
implements GuiNotificationTarget

Represents a case attribute as it has been observed in the log.
Maintains the corresponding GUI panel where the attribute may be included or excluded from analysis, and the proper attribute type may be chosen (such as numeric or nominal).
Furthermore it creates a link to the data mining application (see #getWekaAttribute getWekaAttribute).

Author:
arozinat

Constructor Summary
DecisionAttribute(java.lang.String name, HLPetriNet highLevelPN)
          Default constructor.
 
Method Summary
 void addLogEvent(LogEvent logEvent)
          Adds the given log event to the list of log events held for this attribute.
 void addToRelatedActivities(HighLevelDataAttribute simAtt)
          Adds the given simulation attribute to all high level activities in the associated simulation model that have provided this attribute at least once in the log.
 void addValue(java.lang.String newValue)
          Adds the passed value to the values already held for this attribute.
 HighLevelDataAttribute createSimulationAttribute()
          Creates (and assigns) a new data attribute object that can be used in the simulation model.
 boolean equals(java.lang.Object o)
          Overridden to specify when two DecisionAttribute objects are considered to be equal.
 javax.swing.JPanel getAttributePanel()
          Retrieves the corresponding GUI panel for this attribute.
 java.util.Set<LogEvent> getLogEvents()
          Retrieves the set of log events that have provided this attribute.
 java.lang.String getName()
          Returns the name of this attribute.
 HighLevelDataAttribute getSimulationAttribute()
          Returns currently held simulation attribute.
 weka.core.Attribute getWekaAttribute()
          Retrieves this attribute as a weka attribute (regardless whether it was selected by the user or not).
 boolean hasBeenObservedBy(LogEvent logEvent)
          Determines whether this attribute was attached to audit trail entries which are associated to the given log event.
 int hashCode()
          Overridden to produce the same hash code for equal objects.
 boolean isIncluded()
          Determines the selection state of the belonging check box item (i.e., whether the user has or has not chosen the respective attribute to be included into analysis).
 void updateGUI()
          This method will be called as soon as the associated GUI property has changed.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DecisionAttribute

public DecisionAttribute(java.lang.String name,
                         HLPetriNet highLevelPN)
Default constructor.

Parameters:
name - the name of the attribute
values - the set of values observed in the log
Method Detail

getName

public java.lang.String getName()
Returns the name of this attribute.

Returns:
the name of this attribute

addValue

public void addValue(java.lang.String newValue)
Adds the passed value to the values already held for this attribute. Duplicate values will not be added twice, so the collection of values corresponds to a set semantics.

Parameters:
newValues - the new value to be added

addLogEvent

public void addLogEvent(LogEvent logEvent)
Adds the given log event to the list of log events held for this attribute. This is to keep track on which tasks have written this attribute.

Parameters:
logEvent - the log event to be added

hasBeenObservedBy

public boolean hasBeenObservedBy(LogEvent logEvent)
Determines whether this attribute was attached to audit trail entries which are associated to the given log event.

Parameters:
logEvent - the log event to be checked
Returns:
true if this attribute was observed for at least one audit trail entry associated to the given log event, false otherwise

getLogEvents

public java.util.Set<LogEvent> getLogEvents()
Retrieves the set of log events that have provided this attribute.

Returns:
the set of log events that specified this attribute in the given log

getWekaAttribute

public weka.core.Attribute getWekaAttribute()
Retrieves this attribute as a weka attribute (regardless whether it was selected by the user or not).

Returns:
the weka attribute corresponding to this attribute

createSimulationAttribute

public HighLevelDataAttribute createSimulationAttribute()
Creates (and assigns) a new data attribute object that can be used in the simulation model.

Returns:
the new high level data attribute for this decision attribute

getSimulationAttribute

public HighLevelDataAttribute getSimulationAttribute()
Returns currently held simulation attribute. Note that as soon as the type of the attribute changes, a new simulation attribute object will be created and assigned to this decision attribute.

Returns:
the current simulation attribute object

addToRelatedActivities

public void addToRelatedActivities(HighLevelDataAttribute simAtt)
Adds the given simulation attribute to all high level activities in the associated simulation model that have provided this attribute at least once in the log.

Parameters:
simAtt - the high-level data attribute to be added to relevant high-level activities

getAttributePanel

public javax.swing.JPanel getAttributePanel()
Retrieves the corresponding GUI panel for this attribute. If it has not been built yet, it will be built now.

Returns:
the panel belonging to this attribute

isIncluded

public boolean isIncluded()
Determines the selection state of the belonging check box item (i.e., whether the user has or has not chosen the respective attribute to be included into analysis).


equals

public boolean equals(java.lang.Object o)
Overridden to specify when two DecisionAttribute objects are considered to be equal.

Overrides:
equals in class java.lang.Object
Parameters:
o - the DecisionAttribute to be compared with
Returns:
true if the identifiers are the same, false otherwise.

hashCode

public int hashCode()
Overridden to produce the same hash code for equal objects.

Overrides:
hashCode in class java.lang.Object
Returns:
the hash code calculated

updateGUI

public void updateGUI()
Description copied from interface: GuiNotificationTarget
This method will be called as soon as the associated GUI property has changed.
Using this callback technique the reaction to changes of the GUI property becomes possible in a decoupled way.

Specified by:
updateGUI in interface GuiNotificationTarget