org.processmining.models.heuristics.impl
Class ActivitiesMappingStructures

java.lang.Object
  extended by org.processmining.models.heuristics.impl.ActivitiesMappingStructures

public class ActivitiesMappingStructures
extends java.lang.Object

Aids the creation of HeuristicsNets objects. In short, this class guarantees that indexes assigned to activities in HeuristicsNet objects are always the same whenever (i) XEventClasses objects have the same contents and (ii) the same number of activities must be created for a given XEventClass object.

Author:
Ana Karla Alves de Medeiros

Constructor Summary
ActivitiesMappingStructures(org.deckfour.xes.classification.XEventClasses events)
          Builds an ActivitiesMappingStructures object that contains a single activity for each event in the provided XEventClass object.
ActivitiesMappingStructures(org.deckfour.xes.classification.XEventClasses events, java.util.Map<org.deckfour.xes.classification.XEventClass,java.lang.Integer> numberOfActivitiesPerEvent)
          Builds an ActivitiesMappingStructures that may contain duplicate activities for a given XEventClass.
 
Method Summary
 boolean equals(java.lang.Object o)
          Compares another ActivitiesMappingStructure object with this ActivitiesMappingStructure object.
 org.deckfour.xes.classification.XEventClass[] getActivitiesMapping()
          Retrieves the current mapping from activities to XEventClass events.
 java.util.Map<org.deckfour.xes.classification.XEventClass,HNSubSet> getReverseActivitiesMapping()
          Retrieves the current mapping from XEventClass events to activities.
 org.deckfour.xes.classification.XEventClasses getXEventClasses()
          Retrieves the current XEventClasses object used by this ActivitiesMappingStructures object.
 int hashCode()
          Calculates the hash code value of this ActivitiesMappingStructure object.
 java.lang.String toString()
          Creates the string representation of this ActivitiesMappingStructure object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ActivitiesMappingStructures

public ActivitiesMappingStructures(org.deckfour.xes.classification.XEventClasses events)
Builds an ActivitiesMappingStructures object that contains a single activity for each event in the provided XEventClass object.

Parameters:
events - event classes to which the activities mapping should be created.

ActivitiesMappingStructures

public ActivitiesMappingStructures(org.deckfour.xes.classification.XEventClasses events,
                                   java.util.Map<org.deckfour.xes.classification.XEventClass,java.lang.Integer> numberOfActivitiesPerEvent)
                            throws java.lang.IllegalArgumentException
Builds an ActivitiesMappingStructures that may contain duplicate activities for a given XEventClass. The exact number of activities by XEventClass event is provided in a mapping structure from XEventClass to Integer.

Note: Every event should have at least one activity assigned to it.

Parameters:
events - event classes to include in this ActivitiesMappingStructures object.
numberOfActivitiesPerEvent - mapping specifying the number of activities that should be created in this ActivitiesMappingStructures based on the provided XEventClass object.
Throws:
IllegalArgumentException - if (i) the numberOfActivitiesPerEvent does not contain an entry for a given XEventClass object in events or (ii) the numberOfActivitiesPerEvent returns an Integer with value inferior to one 1 for this XEventClass object.
java.lang.IllegalArgumentException
Method Detail

getXEventClasses

public org.deckfour.xes.classification.XEventClasses getXEventClasses()
Retrieves the current XEventClasses object used by this ActivitiesMappingStructures object.

Returns:
XEventClasses event classes used by this ActivitiesMappingStructures object.

getActivitiesMapping

public org.deckfour.xes.classification.XEventClass[] getActivitiesMapping()
Retrieves the current mapping from activities to XEventClass events.

Returns:
array containing the current mapping.

getReverseActivitiesMapping

public java.util.Map<org.deckfour.xes.classification.XEventClass,HNSubSet> getReverseActivitiesMapping()
Retrieves the current mapping from XEventClass events to activities.

Returns:
Map mapping from XEventClass events to activities.

toString

public java.lang.String toString()
Creates the string representation of this ActivitiesMappingStructure object.

Overrides:
toString in class java.lang.Object
Returns:
String string representation of this ActivitiesMappingStructure object.

equals

public boolean equals(java.lang.Object o)
Compares another ActivitiesMappingStructure object with this ActivitiesMappingStructure object.

Overrides:
equals in class java.lang.Object
Parameters:
o - other ActivitiesMappingStructure object
Returns:
boolean true if the two objects are the same, false otherwise.

hashCode

public int hashCode()
Calculates the hash code value of this ActivitiesMappingStructure object. The hash code value is based on the string representation of this object.

Overrides:
hashCode in class java.lang.Object
Returns:
the hash code value for this object