Ignore:
Timestamp:
02/14/13 15:20:07 (11 years ago)
Author:
pharms
Message:
  • support of new HTML logging format
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlEvent.java

    r942 r1069  
    3838 
    3939    /** 
    40      * the path in the HTML DOM to the object on which the event was executed 
    41      */ 
    42     private String path; 
     40     * the HTML element on which the event was executed 
     41     */ 
     42    private HtmlPageElement target; 
     43 
     44    /** 
     45     * the document to which the HTML element on which the event was executed belongs 
     46     */ 
     47    private HtmlDocument targetDocument; 
     48 
     49    /** 
     50     * the targets DOM path through the document to which it belongs 
     51     */ 
     52    private String targetDOMPath; 
    4353 
    4454    /** 
     
    6979    /** 
    7080     * <p> 
    71      * initializes the event with all relevantinfos 
     81     * initializes the event with all relevant infos 
    7282     * </p> 
    7383     * 
    7484     * @param clientInfos    infos about the client that caused the event 
    7585     * @param time           the time stamp of the event 
    76      * @param path           the path in the HTML DOM to the object on which the event was executed 
     86     * @param target         the HTML element on which the event was executed 
    7787     * @param eventType      the type of the event, e.g. onclick 
    7888     * @param coordinates    the coordinates of the event, usually an array with two values 
     
    8696    HtmlEvent(HtmlClientInfos clientInfos, 
    8797              Long            time, 
    88               String          path, 
     98              HtmlPageElement target, 
    8999              String          eventType, 
    90100              Integer[]       coordinates, 
     
    95105        this.clientInfos = clientInfos; 
    96106        this.time = time; 
    97         this.path = path; 
     107        this.target = target; 
     108        this.targetDocument = target.getDocument(); 
     109        this.targetDOMPath = target.getDOMPath(); 
    98110        this.eventType = eventType; 
    99111        this.coordinates = coordinates; 
     
    104116 
    105117    /** 
     118     * <p> 
     119     * initializes the event for which the id of the target is not known yet. In this case 
     120     * the document and DOM path for the target are provided 
     121     * </p> 
     122     * 
     123     * @param clientInfos    infos about the client that caused the event 
     124     * @param time           the time stamp of the event 
     125     * @param targetDocument the document to which the HTML element belongs on which the event was 
     126     *                       executed 
     127     * @param targetDOMPath  the path through the DOM of the document of the HTML element on which 
     128     *                       the event was executed 
     129     * @param eventType      the type of the event, e.g. onclick 
     130     * @param coordinates    the coordinates of the event, usually an array with two values 
     131     *                       (x and y) 
     132     * @param key            if the event is a key event, the key that was pressed or released 
     133     * @param scrollPosition if the event is a scroll event, the resulting position of the 
     134     *                       scrolled element 
     135     * @param selectedValue  if the event is an on change event, the value to which the changed 
     136     *                       element is changed 
     137     */ 
     138    HtmlEvent(HtmlClientInfos clientInfos, 
     139              Long            time, 
     140              HtmlDocument    targetDocument, 
     141              String          targetDOMPath, 
     142              String          eventType, 
     143              Integer[]       coordinates, 
     144              Integer         key, 
     145              Integer[]       scrollPosition, 
     146              String          selectedValue) 
     147    { 
     148        this.clientInfos = clientInfos; 
     149        this.time = time; 
     150        this.targetDocument = targetDocument; 
     151        this.targetDOMPath = targetDOMPath; 
     152        this.eventType = eventType; 
     153        this.coordinates = coordinates; 
     154        this.key = key; 
     155        this.scrollPosition = scrollPosition; 
     156        this.selectedValue = selectedValue; 
     157    } 
     158 
     159    /** 
    106160     * @return the clientInfos 
    107161     */ 
     
    118172 
    119173    /** 
    120      * @return the path 
    121      */ 
    122     String getPath() { 
    123         return path; 
     174     * @return the target 
     175     */ 
     176    HtmlPageElement getTarget() { 
     177        return target; 
     178    } 
     179 
     180    /** 
     181     * @return the targetDocument 
     182     */ 
     183    HtmlDocument getTargetDocument() { 
     184        return targetDocument; 
     185    } 
     186 
     187    /** 
     188     * @return the targetDOMPath 
     189     */ 
     190    String getTargetDOMPath() { 
     191        return targetDOMPath; 
    124192    } 
    125193 
Note: See TracChangeset for help on using the changeset viewer.