Ignore:
Timestamp:
08/10/13 10:26:53 (11 years ago)
Author:
adeicke
Message:

Added possibility to consider event target in interaction patterns.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/InteractionPatternBuilder.java

    r1217 r1293  
    2525import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.StartsWithEventVisitor; 
    2626import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.StartsWithInteractionPatternVisitor; 
     27import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTargetFilter; 
    2728import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter; 
    2829import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter; 
     
    3637 */ 
    3738public class InteractionPatternBuilder { 
    38  
    39     /** 
    40      * <p> 
    41      * Type of root task. Determines the order in which sub task appear. 
    42      * </p> 
    43      */ 
    44     protected TaskTypeFilter rootTask; 
    45  
    46     /** 
    47      * <p> 
    48      * Interaction pattern starts with event. 
    49      * </p> 
    50      */ 
    51     protected EventTypeFilter startsWithEvent; 
    52  
    53     /** 
    54      * <p> 
    55      * Interaction pattern starts with interaction pattern. 
    56      * </p> 
    57      */ 
    58     protected InteractionPattern startsWithPattern; 
    59  
    60     /** 
    61      * <p> 
    62      * Interaction pattern ends with event. 
    63      * </p> 
    64      */ 
    65     protected EventTypeFilter endsWithEvent; 
    66  
    67     /** 
    68      * <p> 
    69      * Interaction pattern ends with interaction pattern. 
    70      * </p> 
    71      */ 
    72     protected InteractionPattern endsWithPattern; 
    73  
    74     /** 
    75      * <p> 
    76      * Interaction pattern contains certain event. 
    77      * </p> 
    78      */ 
    79     protected EventTypeFilter containsEvent; 
    80  
    81     /** 
    82      * <p> 
    83      * Interaction pattern contains certain interaction pattern. 
    84      * </p> 
    85      */ 
    86     protected InteractionPattern containsPattern; 
    8739 
    8840    /** 
     
    10759 
    10860        public StartsWithStep startsWithEvent(EventTypeFilter startsWithEventType); 
     61         
     62        public StartsWithStep startsWithEvent(EventTypeFilter startsWithEventType, EventTargetFilter eventTarget); 
    10963 
    11064        public StartsWithStep startsWithPattern(InteractionPattern endsWithPattern); 
    11165 
    11266        public ContainsStep containsEvent(EventTypeFilter containsEventType); 
     67         
     68        public ContainsStep containsEvent(EventTypeFilter containsEventType, EventTargetFilter eventTarget); 
    11369 
    11470        public ContainsStep containsPattern(InteractionPattern containsPattern); 
    11571 
    11672        public EndsWithStep endsWithEvent(EventTypeFilter endsWithEventType); 
     73         
     74        public EndsWithStep endsWithEvent(EventTypeFilter endsWithEventType, EventTargetFilter eventTarget); 
    11775 
    11876        public EndsWithStep endsWithPattern(InteractionPattern endsPattern); 
     
    12583 
    12684        public ContainsStep containsEvent(EventTypeFilter containsEventType); 
     85         
     86        public ContainsStep containsEvent(EventTypeFilter containsEventType, EventTargetFilter eventTarget); 
    12787 
    12888        public ContainsStep containsPattern(InteractionPattern containsPattern); 
    12989 
    13090        public EndsWithStep endsWithEvent(EventTypeFilter endsWithEventType); 
     91         
     92        public EndsWithStep endsWithEvent(EventTypeFilter endsWithEventType, EventTargetFilter eventTarget); 
    13193 
    13294        public EndsWithStep endsWithPattern(InteractionPattern endsPattern); 
     
    138100    public static interface ContainsStep { 
    139101 
    140         public ContainsStep containsEvent(EventTypeFilter containsEventType); 
    141  
    142         public ContainsStep containsPattern(InteractionPattern containsPattern); 
    143  
    144102        public EndsWithStep endsWithEvent(EventTypeFilter endsWithEventType); 
     103         
     104        public EndsWithStep endsWithEvent(EventTypeFilter endsWithEventType, EventTargetFilter eventTarget); 
    145105 
    146106        public EndsWithStep endsWithPattern(InteractionPattern endsPattern); 
     
    180140            return this; 
    181141        } 
     142         
     143                @Override 
     144                public StartsWithStep startsWithEvent( 
     145                                EventTypeFilter startsWithEventType, 
     146                                EventTargetFilter startsWithEventTarget) { 
     147            this.visitors.add(new StartsWithEventVisitor(startsWithEventType, startsWithEventTarget, concernedNode)); 
     148            return this; 
     149                } 
    182150 
    183151        @Override 
     
    194162        } 
    195163 
     164                @Override 
     165                public ContainsStep containsEvent(EventTypeFilter containsEventType, 
     166                                EventTargetFilter containsEventTarget) { 
     167            this.visitors.add(new ContainsEventVisitor(containsEventType, containsEventTarget ,concernedNode)); 
     168            return this; 
     169                } 
     170         
    196171        @Override 
    197172        public ContainsStep containsPattern(InteractionPattern containsPattern) { 
     
    206181            return this; 
    207182        } 
     183         
     184                @Override 
     185                public EndsWithStep endsWithEvent(EventTypeFilter endsWithEventType, 
     186                                EventTargetFilter endsWithEventTarget) { 
     187            this.visitors.add(new EndsWithEventVisitor(endsWithEventType, endsWithEventTarget ,concernedNode)); 
     188            return this; 
     189                } 
    208190 
    209191        @Override 
Note: See TracChangeset for help on using the changeset viewer.