Changeset 2132 for trunk/autoquest-ui-core/src
- Timestamp:
- 08/24/16 10:17:41 (8 years ago)
- Location:
- trunk/autoquest-ui-core/src/main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/autoquest/commands/usability/CMDgenerateTaskTree.java
r1844 r2132 45 45 @Override 46 46 public String help() { 47 return "generateTaskTree <sequences> {<tasktree>}"; 47 return "generateTaskTree <sequences> {<tasktree>} {-considerEventEquality} " + 48 "{-minimumSequenceCoverage=<some integer>}"; 48 49 } 49 50 … … 56 57 @Override 57 58 public void run(List<Object> parameters) { 58 String sequencesName; 59 String tasktreeName; 59 String sequencesName = null; 60 String tasktreeName = null; 61 boolean useEventEqualityForTaskComparison = false; 62 int minimumSequenceCoverage = 0; 63 60 64 try { 61 sequencesName = (String) parameters.get(0); 62 if (parameters.size() > 1) { 63 tasktreeName = (String) parameters.get(1); 64 } 65 else { 66 tasktreeName = "tasktree"; 65 for (int i = 0; i < parameters.size(); i++) { 66 String parameter = (String) parameters.get(i); 67 if (!parameter.startsWith("-")) { 68 if (sequencesName == null) { 69 sequencesName = parameter; 70 } 71 else if (tasktreeName == null) { 72 tasktreeName = parameter; 73 } 74 else { 75 throw new IllegalArgumentException("unrecognized parameter: " + parameter); 76 } 77 } 78 else { 79 if ("-considerEventEquality".equals(parameter)) { 80 useEventEqualityForTaskComparison = true; 81 } 82 else if (parameter.startsWith("-minimumSequenceCoverage=")) { 83 try { 84 minimumSequenceCoverage = Integer.parseInt 85 (parameter.substring("-minimumSequenceCoverage=".length())); 86 } 87 catch (Exception e) { 88 throw new IllegalArgumentException 89 ("invalid value for parameter minimumSequenceCoverage: " + 90 parameter.substring("-minimumSequenceCoverage=".length())); 91 } 92 } 93 else { 94 throw new IllegalArgumentException("unrecognized parameter: " + parameter); 95 } 96 } 67 97 } 68 98 } 99 catch (IllegalArgumentException e) { 100 throw e; 101 } 69 102 catch (Exception e) { 103 throw new IllegalArgumentException("could not process parameters", e); 104 } 105 106 if (sequencesName == null) { 70 107 throw new IllegalArgumentException("must provide a sequences name"); 108 } 109 110 if (tasktreeName == null) { 111 tasktreeName = "tasktree"; 71 112 } 72 113 … … 84 125 sequences = (Collection<List<Event>>) dataObject; 85 126 86 ITaskModel taskModel = new TaskTreeManager().createTaskModel(sequences); 127 ITaskModel taskModel = new TaskTreeManager().createTaskModel 128 (sequences, useEventEqualityForTaskComparison, minimumSequenceCoverage); 87 129 88 130 if (GlobalDataContainer.getInstance().addData(tasktreeName, taskModel)) { -
trunk/autoquest-ui-core/src/main/resources/manuals/generateTaskTree
r1877 r2132 5 5 <tasktree> name of the object to store the task model in (defaults to "tasktree") 6 6 7 -considerEventEquality 8 to be provided if the events equal method shall be used for event comparison. This can 9 accelerate the comparison process 10 11 -minimumSequenceCoverage=<some integer> 12 can be used to define a minimum number of events that shall be covered by the detected 13 sequences. This prevents the detection of sequences that mainly represent noise. 14 7 15 Example(s) 8 16 generateTaskTree sequences tasktree 17 generateTaskTree sequences -considerEventEquality 18 generateTaskTree sequences tasktree -considerEventEquality -minimumSequenceCoverage=10
Note: See TracChangeset
for help on using the changeset viewer.