org.processmining.framework.models.hlprocess
Interface HighLevelDataAttribute

All Known Implementing Classes:
HLAttribute

public interface HighLevelDataAttribute

A data attribute represents a case data attribute that is available to activities in the process (i.e., they can read it and provide new values).
Each data attribute has

Author:
arozinat, rmans
See Also:
HighLevelProcess.addDataAttribute(HighLevelDataAttribute), HighLevelActivity.addDataAttribute(HighLevelDataAttribute)

Nested Class Summary
static class HighLevelDataAttribute.AttributeType
          Defines an enumeration type for a data attribute.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Determines when two highLevelDataAttributes are the same.
 java.lang.String getInitialValueNominal()
          Retrieves the initial value for the associated data attribute.
 int getInitialValueNumeric()
          Retrieves the initial value for the associated data attribute.
 java.lang.String getName()
          Retrieves the name of this data attribute
 java.util.List<java.lang.String> getPossibleValuesNominal()
          Retrieves the possible values for the associated data attribute in the case that it is of a nominal type.
 Distribution getPossibleValuesNumeric()
          Retrieves the possible values for the associated data attribute in the case that it is of a numeric type.
 HighLevelDataAttribute.AttributeType getType()
          Retrieves the attribute type for this data attribute.
 int hashCode()
          Returns the hashcode for a HighLevelDataAttribute object.
 void writeDistributionToDot(java.lang.String boxId, java.lang.String nodeId, java.lang.String addText, java.io.Writer bw)
          Writes the highlevel data attribute to dot.
 

Method Detail

getName

java.lang.String getName()
Retrieves the name of this data attribute

Returns:
String the name of this data attribute

getType

HighLevelDataAttribute.AttributeType getType()
Retrieves the attribute type for this data attribute.

Returns:
the type of this data attribute

getInitialValueNominal

java.lang.String getInitialValueNominal()
Retrieves the initial value for the associated data attribute.
Note that this value only corresponds to the actual initial value if the attribute type is currently "nominal".

Returns:
the nominal default value

getInitialValueNumeric

int getInitialValueNumeric()
Retrieves the initial value for the associated data attribute.
Note that this value only corresponds to the actual initial value if the attribute type is currently "numeric".

Returns:
the numeric default value

getPossibleValuesNominal

java.util.List<java.lang.String> getPossibleValuesNominal()
Retrieves the possible values for the associated data attribute in the case that it is of a nominal type.
Note that these values only corresponds to the actual values if the attribute type is currently "nominal".

Returns:
the nominal possible values for this data attribute. If no possible values are defined an empty list is returned.

getPossibleValuesNumeric

Distribution getPossibleValuesNumeric()
Retrieves the possible values for the associated data attribute in the case that it is of a numeric type.
Note that these values only corresponds to the actual values if the attribute type is currently "numeric".

Returns:
the numeric possible values for this data attribute. If no possible values are defined an empty list is returned.

equals

boolean equals(java.lang.Object obj)
Determines when two highLevelDataAttributes are the same. Two HighLevelDataAttributes are the same when the following items are the same for the two HighLevelDataAttributes: In the case that the attribute type is "Numeric" In the case that the attribute type is "Nominal"

Overrides:
equals in class java.lang.Object
Parameters:
obj - Object object to be compared for equality with this HighLevelDataAttribute
Returns:
boolean true if the specified object is equal to this HighLevelDataAttribute with regard to the above mentioned items. False otherwise.

hashCode

int hashCode()
Returns the hashcode for a HighLevelDataAttribute object. The hashcode value for a HighLevelDataAttribute object is calculated according to the recipe of Josha Bloch in Effective Java (Addison-Wesley 2001). For this recipe, we have to consider the following items:

Overrides:
hashCode in class java.lang.Object
Returns:
int the hashcode value for this highLevelDataAttribute

writeDistributionToDot

void writeDistributionToDot(java.lang.String boxId,
                            java.lang.String nodeId,
                            java.lang.String addText,
                            java.io.Writer bw)
                            throws java.io.IOException
Writes the highlevel data attribute to dot. The general idea is that the relevant information of the highlevel data attribute is written in a box and if needed can be connected to another node in the dot file. In that case the connection has to be an undirected line.

Parameters:
boxId - the identifier of the box (in the DOT file) in which the relevant information of the highlevel data attribute will be written.
nodeId - the identifier of the node (in the DOT file) to which the box that will be created has to be connected. "" has to be provided if the box that will be created does not need to be connected to another node in the DOT file.
addText - additional text that needs to be filled in at the beginning of the box
bw - Writer the BufferedWriter used to stream the data to the file
Throws:
java.io.IOException