public class HadoopGraph
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
DELIMITER |
protected java.util.HashMap<java.lang.String,java.lang.Long> |
end |
protected java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.Long>> |
matrix |
protected java.util.HashMap<java.lang.String,java.lang.Long> |
start |
| Constructor and Description |
|---|
HadoopGraph()
Creates data structures to store the graph
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(HadoopGraph graph)
Add data from the parameter graph to the actual graph
|
void |
addNEvents(long n)
Add 'n' to the actual number of events
|
void |
addNTraces(long n)
Add 'n' to the actual number of traces
|
void |
countActivitiesRelation(java.lang.String[] predecessor,
java.lang.String[] successor)
Count the new relation (edge) in the graph.
|
void |
countActivitiesRelation(java.lang.String predecessor,
java.lang.String successor)
Count the new relation (edge) in the graph
|
protected void |
countEdge(java.lang.String[] predecessor,
java.lang.String[] successor,
java.lang.Long n)
Count a new occurrence of the directly follows edge between the two activities
|
protected void |
countEdge(java.lang.String predecessor,
java.lang.String successor,
java.lang.Long n)
Count a new occurrence of the directly follows edge between the two activities
|
protected void |
countEnd(java.lang.String[] activity,
java.lang.Long n)
Count a new occurrence of the activity being the last one in a trace
|
protected void |
countEnd(java.lang.String activity,
java.lang.Long n)
Count a new occurrence of the activity being the last one in a trace
|
protected void |
countStart(java.lang.String[] activity,
java.lang.Long n)
Count a new occurrence of the activity being the first one in a trace
|
protected void |
countStart(java.lang.String activity,
java.lang.Long n)
Count a new occurrence of the activity being the first one in a trace
|
java.util.Set<java.lang.String> |
getAllActivities()
Get all the activities in the DFG
|
java.lang.Long |
getCount(java.lang.String predecessor,
java.lang.String successor)
Return the number of times the predecessor is directly followed by the successor
|
java.util.Set<java.lang.String> |
getEndActivities()
Get end activities in the DFG.
|
java.lang.Long |
getEndCount(java.lang.String activity)
Return the number of times the activity ends a trace
|
long |
getNEvents()
Getter for n_events
|
long |
getNTraces()
Getter for n_traces
|
java.util.Set<java.lang.String> |
getStartActivities()
Get start activities in the DFG.
|
java.lang.Long |
getStartCount(java.lang.String activity)
Return the number of times the activity starts a trace
|
java.lang.Long |
getTotalCount(java.lang.String activity)
Return the total count (number of appearances) of this activity (end+output_edges)
|
boolean |
read(java.lang.String filename)
Read a graph from an input file
|
void |
setNEvents(long n)
Setter for n_events
|
void |
setNTraces(long n)
Setter for n_traces
|
java.lang.String |
toString() |
void |
write()
Write the graph in the standard output
|
void |
write(java.lang.String output_filename)
Write the graph in the specified file
|
protected final java.lang.String DELIMITER
protected java.util.HashMap<java.lang.String,java.lang.Long> start
protected java.util.HashMap<java.lang.String,java.lang.Long> end
protected java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.Long>> matrix
public void add(HadoopGraph graph)
graph - Directly-follows graphpublic void countActivitiesRelation(java.lang.String[] predecessor,
java.lang.String[] successor)
predecessor - predecessor activity (Compose name)successor - successor activity (Compose name)public void countActivitiesRelation(java.lang.String predecessor,
java.lang.String successor)
predecessor - predecessor activitysuccessor - successor activitypublic void setNEvents(long n)
n - Number of eventspublic void addNEvents(long n)
n - Number of events to addpublic long getNEvents()
public void setNTraces(long n)
n - Number of tracespublic void addNTraces(long n)
n - Number of traces to addpublic long getNTraces()
public java.lang.Long getTotalCount(java.lang.String activity)
activity - Activitypublic java.util.Set<java.lang.String> getStartActivities()
public java.util.Set<java.lang.String> getEndActivities()
public java.util.Set<java.lang.String> getAllActivities()
public java.lang.Long getStartCount(java.lang.String activity)
activity - Start activitypublic java.lang.Long getEndCount(java.lang.String activity)
activity - Start activitypublic java.lang.Long getCount(java.lang.String predecessor,
java.lang.String successor)
predecessor - Predecessorsuccessor - Successorprotected void countStart(java.lang.String[] activity,
java.lang.Long n)
activity - Start activity (Compose name)n - Number of occurrencesprotected void countStart(java.lang.String activity,
java.lang.Long n)
activity - Start activityn - Number of occurrencesprotected void countEnd(java.lang.String[] activity,
java.lang.Long n)
activity - End activity (Compose name)n - Number of occurrencesprotected void countEnd(java.lang.String activity,
java.lang.Long n)
activity - End activityn - Number of occurrencesprotected void countEdge(java.lang.String[] predecessor,
java.lang.String[] successor,
java.lang.Long n)
predecessor - Predecessor activity (Compose name)successor - Successor activity (Compose name)n - Number of occurrencesprotected void countEdge(java.lang.String predecessor,
java.lang.String successor,
java.lang.Long n)
predecessor - Predecessor activitysuccessor - Successor activityn - Number of occurrencespublic boolean read(java.lang.String filename)
filename - Input filename with the graphpublic void write(java.lang.String output_filename)
output_filename - Output filepublic void write()
public java.lang.String toString()
toString in class java.lang.Object