Changeset 1276 for trunk


Ignore:
Timestamp:
07/26/13 09:20:36 (11 years ago)
Author:
pharms
Message:
  • added some Java Docs
Location:
trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/commands/CMDcompressHTMLLogFiles.java

    r1230 r1276  
    2525/** 
    2626 * <p> 
    27  * TODO comment 
     27 * This command performs a compression of HTML log files. It traverse a directory structure. All 
     28 * files in the same directory are treated as HTML log files. They are parsed and all GUI elements 
     29 * and events contained in them are dumped into a new log file. No GUI element is dumped more than 
     30 * once. Through this, several log files containing duplicates of GUI elements are condensed to  
     31 * only one. The events are put at the end of the new log file and are sorted based on their time 
     32 * stamp.  
    2833 * </p> 
    2934 *  
     
    3338public class CMDcompressHTMLLogFiles implements Command { 
    3439 
    35     /* 
    36      * (non-Javadoc) 
    37      *  
     40    /* (non-Javadoc) 
    3841     * @see de.ugoe.cs.util.console.Command#run(java.util.List) 
    3942     */ 
     
    6063 
    6164    /** 
     65     * <p> 
     66     * convenience method for recursively calling the {@link HTMLLogCompressor} for each directory 
     67     * </p> 
    6268     *  
     69     * @param the directory to be traversed 
    6370     */ 
    6471    private void compressDirectory(File directory) { 
     
    8188    } 
    8289 
    83     /* 
    84      * (non-Javadoc) 
    85      *  
     90    /* (non-Javadoc) 
    8691     * @see de.ugoe.cs.util.console.Command#help() 
    8792     */ 
  • trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/commands/CMDpseudomizeHTMLTextInputs.java

    r1242 r1276  
    2424/** 
    2525 * <p> 
    26  * TODO comment 
     26 * replaces all text inputs in a directory structure with MD5 hashes of the text input. If the 
     27 * text input is already hashed, it stays unchanged. For this, the command traverses the directory 
     28 * structure. In each directory it treats the contained files as HTML log files. It parses them, 
     29 * copies all GUI elements and events and replaces the entered text of text input events. The result 
     30 * is a copy of each treated log file. The origins are deleted. The copies are named as the origins. 
    2731 * </p> 
    2832 *  
     
    3236public class CMDpseudomizeHTMLTextInputs implements Command { 
    3337 
    34     /* 
    35      * (non-Javadoc) 
    36      *  
     38    /* (non-Javadoc) 
    3739     * @see de.ugoe.cs.util.console.Command#run(java.util.List) 
    3840     */ 
     
    5961 
    6062    /** 
     63     * <p> 
     64     * convenience method to traverse the directory structure 
     65     * </p> 
    6166     *  
     67     * @param directory the directory to be treated next 
    6268     */ 
    6369    private void pseudomizeTextInputsInDirectory(File directory) { 
  • trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/eventcore/HTMLEventTypeFactory.java

    r1250 r1276  
    3939/** 
    4040 * <p> 
    41  * TODO comment 
     41 * convenience class to instantiate the correct event type based on an event name, event parameters, 
     42 * and the target GUI element. 
    4243 * </p> 
    4344 *  
     
    4748public class HTMLEventTypeFactory { 
    4849     
    49     /**  */ 
     50    /** 
     51     * <p> 
     52     * single instance 
     53     * </p> 
     54     */ 
    5055    private static HTMLEventTypeFactory instance = new HTMLEventTypeFactory(); 
    5156 
    5257    /** 
    5358     * <p> 
    54      * TODO: comment 
     59     * private constructor to implement correct singleton 
    5560     * </p> 
    56      * 
    5761     */ 
    5862    private HTMLEventTypeFactory() {} 
     
    6064    /** 
    6165     * <p> 
    62      * TODO: comment 
     66     * singleton retrieval 
    6367     * </p> 
    64      * 
    65      * @return 
    6668     */ 
    6769    public static HTMLEventTypeFactory getInstance() { 
     
    7173    /** 
    7274     * <p> 
    73      * TODO: comment 
     75     * returns the event type for the given event name, the parameters as well as the target GUI 
     76     * element 
    7477     * </p> 
    7578     * 
    76      * @param eventName 
    77      * @param eventParameters 
    78      * @return 
     79     * @param eventName       the name of the event, e.g., onscroll 
     80     * @param eventParameters the parameters of the event, e.g., scroll coordinates 
     81     * @param guiElement      the target GUI element of the event (required for some event type 
     82     *                        differentiation 
     83     *                         
     84     * @return the event type matching the proviced parameters 
     85     *  
     86     * @throws IllegalArgumentException if the provided parameters in their combination do not 
     87     *                                  correctly specify an event type  
    7988     */ 
    80     public IEventType getEventType(String eventName, Map<String, String> eventParameters,  
    81                                    IGUIElement guiElement) { 
     89    public IEventType getEventType(String              eventName, 
     90                                   Map<String, String> eventParameters,  
     91                                   IGUIElement         guiElement) 
     92    { 
    8293        IInteraction result = null; 
    8394 
     
    142153    /** 
    143154     * <p> 
    144      * TODO: comment 
     155     * convenience method to retrieve coordinates from the event parameters. 
    145156     * </p> 
    146      *  
    147      * @param eventName 
    148      * @param eventParameters 
    149      * @return 
    150157     */ 
    151158    private int[] getCoordinateParameter(String              xParamName, 
  • trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLButton.java

    r961 r1276  
    1919/** 
    2020 * <p> 
    21  * TODO comment 
     21 *  
    2222 * </p> 
    2323 *  
  • trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLDocument.java

    r1264 r1276  
    1919/** 
    2020 * <p> 
    21  * TODO comment 
     21 * a GUI element representing an HTML document, i.e., a page on an HTML server. This is the 
     22 * element for a GUI model of an HTML web site being always and only the children of servers. It 
     23 * is identified through the server on which it resists, its path, a potential query, and a title. 
     24 * Its children are HTML page elements 
    2225 * </p> 
    2326 *  
     
    2629public class HTMLDocument extends HTMLGUIElement implements IDialog { 
    2730 
    28     /**  */ 
     31    /** 
     32     * <p> 
     33     * default serial version UID 
     34     * </p>  
     35     */ 
    2936    private static final long serialVersionUID = 1L; 
    3037 
    3138    /** 
    3239     * <p> 
    33      * TODO: comment 
     40     * instantiates the document with it specification and its parent, which is always a server 
    3441     * </p> 
    3542     * 
    36      * @param specification 
    37      * @param parent 
     43     * @param specification the specification of the document 
     44     * @param parent        the server on which the document resists 
    3845     */ 
    3946    public HTMLDocument(HTMLDocumentSpec specification, HTMLServer parent) { 
     
    4350    /** 
    4451     * <p> 
    45      * TODO: comment 
     52     * returns the path in the URL of the document 
    4653     * </p> 
    4754     * 
    48      * @return 
     55     * @return the path in the URL of the document 
    4956     */ 
    5057    public String getPath() { 
     
    6471    /** 
    6572     * <p> 
    66      * TODO: comment 
     73     * returns the server on which the document resists 
    6774     * </p> 
    6875     * 
    69      * @return 
     76     * @return the server on which the document resists 
    7077     */ 
    71     HTMLServerSpec getServer() { 
    72         return ((HTMLDocumentSpec) super.getSpecification()).getServer(); 
     78    HTMLServer getServer() { 
     79        return (HTMLServer) super.getParent(); 
    7380    } 
    7481 
    7582    /** 
    7683     * <p> 
    77      * TODO: comment 
     84     * returns the title of the document 
    7885     * </p> 
    7986     * 
    80      * @return 
     87     * @return the title of the document 
    8188     */ 
    8289    String getTitle() { 
  • trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLDocumentSpec.java

    r1264 r1276  
    1919/** 
    2020 * <p> 
    21  * TODO comment 
     21 * a GUI element specification of an HTML document, i.e., a page on an HTML server. This is the 
     22 * element for a GUI model of an HTML web site being always and only the children of servers. It 
     23 * is identified through the server on which it resists, its path, a potential query, and a title. 
     24 * Its children are HTML page elements 
    2225 * </p> 
    2326 *  
     
    2629public class HTMLDocumentSpec extends HTMLGUIElementSpec implements IGUIElementSpec { 
    2730 
    28     /**  */ 
     31    /** 
     32     * <p> 
     33     * default serial version UID 
     34     * </p>  
     35     */ 
    2936    private static final long serialVersionUID = 1L; 
    3037     
    31     /** */ 
     38    /** 
     39     * <p> 
     40     * the server on which the document resists 
     41     * </p> 
     42     */ 
    3243    private HTMLServerSpec server; 
    3344     
    34     /** */ 
     45    /** 
     46     * <p> 
     47     * the path in the URL of the document 
     48     * </p> 
     49     */ 
    3550    private String path; 
    3651     
    37     /** */ 
     52    /** 
     53     * <p> 
     54     * the query in the URL of the document 
     55     * </p> 
     56     */ 
    3857    private String query; 
    3958     
    40     /** */ 
     59    /** 
     60     * <p> 
     61     * the title of the document 
     62     * </p> 
     63     */ 
    4164    private String title; 
    4265     
    4366    /** 
    4467     * <p> 
    45      * TODO: comment 
     68     * initializes the document with its server, path, query, and title 
    4669     * </p> 
    4770     * 
    48      * @param server 
    49      * @param pagePath 
    50      * @param pageTitle 
     71     * @param server the server on which the document resists 
     72     * @param path   the path in the URL of the document 
     73     * @param query  the query in the URL of the document 
     74     * @param title  the title of the document 
     75     *  
     76     * @throws IllegalArgumentException if the server or path are invalid, i.e. null 
    5177     */ 
    5278    public HTMLDocumentSpec(HTMLServerSpec server, String path, String query, String title) { 
     
    104130    /** 
    105131     * <p> 
    106      * TODO: comment 
     132     * returns the server on which the document resists 
    107133     * </p> 
    108134     * 
    109      * @return 
     135     * @return the server on which the document resists 
    110136     */ 
    111137    public HTMLServerSpec getServer() { 
     
    115141    /** 
    116142     * <p> 
    117      * TODO: comment 
     143     * returns the path in the URL of the document 
    118144     * </p> 
    119145     * 
    120      * @return 
     146     * @return the path in the URL of the document 
    121147     */ 
    122148    String getPath() { 
     
    126152    /** 
    127153     * <p> 
    128      * TODO: comment 
     154     * returns the query in the URL of the document 
    129155     * </p> 
    130156     * 
    131      * @return 
     157     * @return the query in the URL of the document 
    132158     */ 
    133159    String getQuery() { 
     
    137163    /** 
    138164     * <p> 
    139      * TODO: comment 
     165     * returns the title of the document 
    140166     * </p> 
    141167     * 
    142      * @return 
     168     * @return the title of the document 
    143169     */ 
    144170    String getTitle() { 
  • trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLGUIElementSpec.java

    r1054 r1276  
    1919/** 
    2020 * <p> 
    21  * TODO comment 
     21 * base class for all GUI element specifications in the context of HTML 
    2222 * </p> 
    2323 *  
     
    2626public class HTMLGUIElementSpec implements IGUIElementSpec { 
    2727 
    28     /**  */ 
     28    /** 
     29     * <p> 
     30     * default serial version UID 
     31     * </p> 
     32     */ 
    2933    private static final long serialVersionUID = 1L; 
    3034     
    31     /** */ 
     35    /** 
     36     * <p> 
     37     * the type of GUI element represented by this specification, which is usually the tag name of 
     38     * the HTML GUI element 
     39     * </p> 
     40     */ 
    3241    private String type; 
    3342     
    3443    /** 
    3544     * <p> 
    36      * TODO: comment 
     45     * instantiated the specification with the type, i.e., tag name of the represented GUI element 
    3746     * </p> 
    3847     * 
    39      * @param type 
    40      * @param index 
    41      * @param id 
     48     * @param type  the type, i.e., tag name of the represented GUI element 
     49     *  
     50     * @throws IllegalArgumentException if the provided type is null 
    4251     */ 
    4352    public HTMLGUIElementSpec(String type) { 
     
    7079    } 
    7180 
    72     /** 
    73      * <p> 
    74      * TODO: comment 
    75      * </p> 
     81    /* (non-Javadoc) 
     82     * @see de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElementSpec#getTypeHierarchy() 
    7683     */ 
    7784    @Override 
  • trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLPageElement.java

    r1264 r1276  
    1717/** 
    1818 * <p> 
    19  * TODO comment 
     19 * This is a GUI element representing tags in HTML documents. Each tag belongs to a certain 
     20 * document. Each page element has a tag name and either an id or at least 
     21 * an index in the list of siblings of the same type. 
    2022 * </p> 
    2123 *  
     
    2426public class HTMLPageElement extends HTMLGUIElement { 
    2527 
    26     /**  */ 
     28    /** 
     29     * <p> 
     30     * default serial version UID 
     31     * </p> 
     32     */ 
    2733    private static final long serialVersionUID = 1L; 
    2834 
    2935    /** 
    3036     * <p> 
    31      * TODO: comment 
     37     * instantiates a page element with it parent (either a document or another page element) 
    3238     * </p> 
    3339     * 
    34      * @param specification 
    35      * @param parent 
     40     * @param specification the specification of the page element 
     41     * @param parent        the parent GUI element 
    3642     */ 
    3743    public HTMLPageElement(HTMLPageElementSpec specification, HTMLGUIElement parent) { 
     
    4147    /** 
    4248     * <p> 
    43      * TODO: comment 
     49     * returns the name of the tag represented by this specification 
    4450     * </p> 
    4551     * 
    46      * @param specification 
    47      * @param parent 
    48      */ 
    49     public HTMLPageElement(HTMLPageElementSpec specification, HTMLDocument parent) { 
    50         super(specification, parent); 
    51     } 
    52  
    53     /** 
    54      * <p> 
    55      * TODO: comment 
    56      * </p> 
    57      * 
    58      * @return 
     52     * @return the name of the tag represented by this specification 
    5953     */ 
    6054    public String getTagName() { 
     
    6458    /** 
    6559     * <p> 
    66      * TODO: comment 
     60     * returns the id of the tag represented by this specification 
    6761     * </p> 
    6862     * 
    69      * @return 
     63     * @return the id of the tag represented by this specification 
    7064     */ 
    7165    public String getHtmlId() { 
     
    7569    /** 
    7670     * <p> 
    77      * TODO: comment 
     71     * returns the index of the tag 
    7872     * </p> 
    7973     * 
    80      * @return 
     74     * @return the index of the tag 
    8175     */ 
    8276    public int getIndex() { 
     
    9488    } 
    9589 
    96     /** 
    97      * <p> 
    98      * TODO: comment 
    99      * </p> 
    100      * 
    101      * @return 
    102      */ 
    103     HTMLDocumentSpec getPage() { 
    104         return ((HTMLPageElementSpec) super.getSpecification()).getPage(); 
    105     } 
    106  
    10790} 
  • trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLPageElementSpec.java

    r1264 r1276  
    1919/** 
    2020 * <p> 
    21  * TODO comment 
     21 * This is a GUI element specification for tags in HTML documents. Each tag belongs to a certain 
     22 * document. However, for similarity comparison, two page elements are similar even if they do 
     23 * not belong to the same document. Each page element has a tag name and either an id or at least 
     24 * an index in the list of siblings of the same type. 
    2225 * </p> 
    2326 *  
     
    2629public class HTMLPageElementSpec extends HTMLGUIElementSpec implements IGUIElementSpec { 
    2730 
    28     /**  */ 
     31    /** 
     32     * <p> 
     33     * default serial version UID 
     34     * </p> 
     35     */ 
    2936    private static final long serialVersionUID = 1L; 
    3037     
    31     /** */ 
     38    /** 
     39     * <p> 
     40     * the page to which the represented tag belongs 
     41     * </p> 
     42     */ 
    3243    private HTMLDocumentSpec page; 
    3344     
    34     /** */ 
     45    /** 
     46     * <p> 
     47     * the name of the tag represented by this specification 
     48     * </p> 
     49     */ 
    3550    private String tagName; 
    3651     
    37     /** */ 
     52    /** 
     53     * <p> 
     54     * the id of the tag represented by this specification, i.e., the value of the id attribute 
     55     * of the tag. May be null in the case the id attribute of the tag is not set.  
     56     * </p> 
     57     */ 
    3858    private String htmlId; 
    3959     
    40     /** */ 
     60    /** 
     61     * <p> 
     62     * the index of the tag (0 based) in the list of siblings in the same parent being of the 
     63     * same type. If, e.g., a parent has three li tags as children, the first will have index 0, 
     64     * the second index 1 and the third index2. The indexes are ignored, if the tag have an 
     65     * assigned id.  
     66     * </p> 
     67     */ 
    4168    private int index; 
    4269 
    4370    /** 
    4471     * <p> 
    45      * TODO: comment 
     72     * initializes the specification with the page to which the represented tag belongs, the tags 
     73     * name, its id or its index. 
    4674     * </p> 
    4775     * 
    48      * @param type 
    49      * @param index 
    50      * @param id 
     76     * @param page    the page to which the represented tag belongs 
     77     * @param tagName the name of the tag represented by this specification 
     78     * @param htmlId  the id of the tag represented by this specification 
     79     * @param index   the index of the tag 
     80     *  
     81     * @throws IllegalArgumentException if page and name are null or if neither an id nor an index 
     82     *                                  are provided correctly 
    5183     */ 
    5284    public HTMLPageElementSpec(HTMLDocumentSpec page, String tagName, String htmlId, int index) { 
     
    118150    /** 
    119151     * <p> 
    120      * TODO: comment 
     152     * returns the page to which the represented tag belongs 
    121153     * </p> 
    122154     * 
    123      * @return 
     155     * @return the page to which the represented tag belongs 
    124156     */ 
    125157    HTMLDocumentSpec getPage() { 
     
    129161    /** 
    130162     * <p> 
    131      * TODO: comment 
     163     * returns the name of the tag represented by this specification 
    132164     * </p> 
    133165     * 
    134      * @return 
     166     * @return the name of the tag represented by this specification 
    135167     */ 
    136168    String getTagName() { 
     
    140172    /** 
    141173     * <p> 
    142      * TODO: comment 
     174     * returns the id of the tag represented by this specification 
    143175     * </p> 
    144176     * 
    145      * @return 
     177     * @return the id of the tag represented by this specification 
    146178     */ 
    147179    String getHtmlId() { 
     
    151183    /** 
    152184     * <p> 
    153      * TODO: comment 
     185     * returns the index of the tag 
    154186     * </p> 
    155187     * 
    156      * @return 
     188     * @return the index of the tag 
    157189     */ 
    158190    int getIndex() { 
  • trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLServer.java

    r1264 r1276  
    1919/** 
    2020 * <p> 
    21  * TODO comment 
     21 * a GUI element representing an HTML server. This is the root element for a GUI model of 
     22 * an HTML web site. It is identified through a host and a port. Its children are documents. 
    2223 * </p> 
    2324 *  
     
    2627public class HTMLServer extends HTMLGUIElement implements IFrame { 
    2728 
    28     /**  */ 
     29    /** 
     30     * <p> 
     31     * default serial version UID 
     32     * </p> 
     33     */ 
    2934    private static final long serialVersionUID = 1L; 
    3035 
    3136    /** 
    3237     * <p> 
    33      * TODO: comment 
     38     * instantiates the server with an appropriate specification 
    3439     * </p> 
    3540     * 
    36      * @param specification 
    37      * @param parent 
     41     * @param specification the server specification 
     42     * @param parent        the parent of the server --> must always be null. Just included as 
     43     *                      required by the automatic instantiation mechanism 
     44     *                       
     45     * @throws IllegalArgumentException if the provided parent is not null 
    3846     */ 
    3947    public HTMLServer(HTMLServerSpec specification, HTMLGUIElement parent) { 
     
    5866    /** 
    5967     * <p> 
    60      * TODO: comment 
     68     * returns the host of the represented server 
    6169     * </p> 
    6270     * 
    63      * @return 
     71     * @return the host 
    6472     */ 
    6573    public String getHost() { 
     
    6977    /** 
    7078     * <p> 
    71      * TODO: comment 
     79     * returns the port of the represented server 
    7280     * </p> 
    7381     * 
    74      * @return 
     82     * @return the port 
    7583     */ 
    7684    public int getPort() { 
  • trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLServerSpec.java

    r1264 r1276  
    1919/** 
    2020 * <p> 
    21  * TODO comment 
     21 * a GUI element specification of an HTML server. This is the root element for a GUI model of 
     22 * an HTML web site. It is identified through a host and a port. Its children are documents. 
    2223 * </p> 
    2324 *  
     
    2627public class HTMLServerSpec extends HTMLGUIElementSpec implements IGUIElementSpec { 
    2728 
    28     /**  */ 
     29    /** 
     30     * <p> 
     31     * default serial version UID 
     32     * </p> 
     33     */ 
    2934    private static final long serialVersionUID = 1L; 
    3035     
    31     /** */ 
     36    /** 
     37     * <p> 
     38     * the host of the server 
     39     * </p> 
     40     */ 
    3241    private String host; 
    3342     
    34     /** */ 
     43    /** 
     44     * <p> 
     45     * the port of the server 
     46     * </p> 
     47     */ 
    3548    private int port; 
    3649 
    3750    /** 
    3851     * <p> 
    39      * TODO: comment 
     52     * initialize the server specification with a host and a port. 
    4053     * </p> 
    4154     * 
    42      * @param serverName 
    43      * @param port 
     55     * @param host the host name of the server 
     56     * @param port the port number of the server 
     57     *  
     58     * @throws IllegalArgumentException if one of the parameters is invalid (e.g. host = null) 
    4459     */ 
    4560    public HTMLServerSpec(String host, int port) { 
     
    97112    /** 
    98113     * <p> 
    99      * TODO: comment 
     114     * returns the host of the represented server 
    100115     * </p> 
    101116     * 
    102      * @return 
     117     * @return the host 
    103118     */ 
    104119    String getHost() { 
     
    108123    /** 
    109124     * <p> 
    110      * TODO: comment 
     125     * returns the port of the represented server 
    111126     * </p> 
    112127     * 
    113      * @return 
     128     * @return the port 
    114129     */ 
    115130    int getPort() { 
Note: See TracChangeset for help on using the changeset viewer.