Changeset 1276 for trunk/autoquest-plugin-html/src
- Timestamp:
- 07/26/13 09:20:36 (11 years ago)
- 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 25 25 /** 26 26 * <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. 28 33 * </p> 29 34 * … … 33 38 public class CMDcompressHTMLLogFiles implements Command { 34 39 35 /* 36 * (non-Javadoc) 37 * 40 /* (non-Javadoc) 38 41 * @see de.ugoe.cs.util.console.Command#run(java.util.List) 39 42 */ … … 60 63 61 64 /** 65 * <p> 66 * convenience method for recursively calling the {@link HTMLLogCompressor} for each directory 67 * </p> 62 68 * 69 * @param the directory to be traversed 63 70 */ 64 71 private void compressDirectory(File directory) { … … 81 88 } 82 89 83 /* 84 * (non-Javadoc) 85 * 90 /* (non-Javadoc) 86 91 * @see de.ugoe.cs.util.console.Command#help() 87 92 */ -
trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/commands/CMDpseudomizeHTMLTextInputs.java
r1242 r1276 24 24 /** 25 25 * <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. 27 31 * </p> 28 32 * … … 32 36 public class CMDpseudomizeHTMLTextInputs implements Command { 33 37 34 /* 35 * (non-Javadoc) 36 * 38 /* (non-Javadoc) 37 39 * @see de.ugoe.cs.util.console.Command#run(java.util.List) 38 40 */ … … 59 61 60 62 /** 63 * <p> 64 * convenience method to traverse the directory structure 65 * </p> 61 66 * 67 * @param directory the directory to be treated next 62 68 */ 63 69 private void pseudomizeTextInputsInDirectory(File directory) { -
trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/eventcore/HTMLEventTypeFactory.java
r1250 r1276 39 39 /** 40 40 * <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. 42 43 * </p> 43 44 * … … 47 48 public class HTMLEventTypeFactory { 48 49 49 /** */ 50 /** 51 * <p> 52 * single instance 53 * </p> 54 */ 50 55 private static HTMLEventTypeFactory instance = new HTMLEventTypeFactory(); 51 56 52 57 /** 53 58 * <p> 54 * TODO: comment59 * private constructor to implement correct singleton 55 60 * </p> 56 *57 61 */ 58 62 private HTMLEventTypeFactory() {} … … 60 64 /** 61 65 * <p> 62 * TODO: comment66 * singleton retrieval 63 67 * </p> 64 *65 * @return66 68 */ 67 69 public static HTMLEventTypeFactory getInstance() { … … 71 73 /** 72 74 * <p> 73 * TODO: comment 75 * returns the event type for the given event name, the parameters as well as the target GUI 76 * element 74 77 * </p> 75 78 * 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 79 88 */ 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 { 82 93 IInteraction result = null; 83 94 … … 142 153 /** 143 154 * <p> 144 * TODO: comment155 * convenience method to retrieve coordinates from the event parameters. 145 156 * </p> 146 *147 * @param eventName148 * @param eventParameters149 * @return150 157 */ 151 158 private int[] getCoordinateParameter(String xParamName, -
trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLButton.java
r961 r1276 19 19 /** 20 20 * <p> 21 * TODO comment21 * 22 22 * </p> 23 23 * -
trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLDocument.java
r1264 r1276 19 19 /** 20 20 * <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 22 25 * </p> 23 26 * … … 26 29 public class HTMLDocument extends HTMLGUIElement implements IDialog { 27 30 28 /** */ 31 /** 32 * <p> 33 * default serial version UID 34 * </p> 35 */ 29 36 private static final long serialVersionUID = 1L; 30 37 31 38 /** 32 39 * <p> 33 * TODO: comment40 * instantiates the document with it specification and its parent, which is always a server 34 41 * </p> 35 42 * 36 * @param specification 37 * @param parent 43 * @param specification the specification of the document 44 * @param parent the server on which the document resists 38 45 */ 39 46 public HTMLDocument(HTMLDocumentSpec specification, HTMLServer parent) { … … 43 50 /** 44 51 * <p> 45 * TODO: comment52 * returns the path in the URL of the document 46 53 * </p> 47 54 * 48 * @return 55 * @return the path in the URL of the document 49 56 */ 50 57 public String getPath() { … … 64 71 /** 65 72 * <p> 66 * TODO: comment73 * returns the server on which the document resists 67 74 * </p> 68 75 * 69 * @return 76 * @return the server on which the document resists 70 77 */ 71 HTMLServer SpecgetServer() {72 return ( (HTMLDocumentSpec) super.getSpecification()).getServer();78 HTMLServer getServer() { 79 return (HTMLServer) super.getParent(); 73 80 } 74 81 75 82 /** 76 83 * <p> 77 * TODO: comment84 * returns the title of the document 78 85 * </p> 79 86 * 80 * @return 87 * @return the title of the document 81 88 */ 82 89 String getTitle() { -
trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLDocumentSpec.java
r1264 r1276 19 19 /** 20 20 * <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 22 25 * </p> 23 26 * … … 26 29 public class HTMLDocumentSpec extends HTMLGUIElementSpec implements IGUIElementSpec { 27 30 28 /** */ 31 /** 32 * <p> 33 * default serial version UID 34 * </p> 35 */ 29 36 private static final long serialVersionUID = 1L; 30 37 31 /** */ 38 /** 39 * <p> 40 * the server on which the document resists 41 * </p> 42 */ 32 43 private HTMLServerSpec server; 33 44 34 /** */ 45 /** 46 * <p> 47 * the path in the URL of the document 48 * </p> 49 */ 35 50 private String path; 36 51 37 /** */ 52 /** 53 * <p> 54 * the query in the URL of the document 55 * </p> 56 */ 38 57 private String query; 39 58 40 /** */ 59 /** 60 * <p> 61 * the title of the document 62 * </p> 63 */ 41 64 private String title; 42 65 43 66 /** 44 67 * <p> 45 * TODO: comment68 * initializes the document with its server, path, query, and title 46 69 * </p> 47 70 * 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 51 77 */ 52 78 public HTMLDocumentSpec(HTMLServerSpec server, String path, String query, String title) { … … 104 130 /** 105 131 * <p> 106 * TODO: comment132 * returns the server on which the document resists 107 133 * </p> 108 134 * 109 * @return 135 * @return the server on which the document resists 110 136 */ 111 137 public HTMLServerSpec getServer() { … … 115 141 /** 116 142 * <p> 117 * TODO: comment143 * returns the path in the URL of the document 118 144 * </p> 119 145 * 120 * @return 146 * @return the path in the URL of the document 121 147 */ 122 148 String getPath() { … … 126 152 /** 127 153 * <p> 128 * TODO: comment154 * returns the query in the URL of the document 129 155 * </p> 130 156 * 131 * @return 157 * @return the query in the URL of the document 132 158 */ 133 159 String getQuery() { … … 137 163 /** 138 164 * <p> 139 * TODO: comment165 * returns the title of the document 140 166 * </p> 141 167 * 142 * @return 168 * @return the title of the document 143 169 */ 144 170 String getTitle() { -
trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLGUIElementSpec.java
r1054 r1276 19 19 /** 20 20 * <p> 21 * TODO comment21 * base class for all GUI element specifications in the context of HTML 22 22 * </p> 23 23 * … … 26 26 public class HTMLGUIElementSpec implements IGUIElementSpec { 27 27 28 /** */ 28 /** 29 * <p> 30 * default serial version UID 31 * </p> 32 */ 29 33 private static final long serialVersionUID = 1L; 30 34 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 */ 32 41 private String type; 33 42 34 43 /** 35 44 * <p> 36 * TODO: comment45 * instantiated the specification with the type, i.e., tag name of the represented GUI element 37 46 * </p> 38 47 * 39 * @param type 40 * @param index41 * @ param id48 * @param type the type, i.e., tag name of the represented GUI element 49 * 50 * @throws IllegalArgumentException if the provided type is null 42 51 */ 43 52 public HTMLGUIElementSpec(String type) { … … 70 79 } 71 80 72 /** 73 * <p> 74 * TODO: comment 75 * </p> 81 /* (non-Javadoc) 82 * @see de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElementSpec#getTypeHierarchy() 76 83 */ 77 84 @Override -
trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLPageElement.java
r1264 r1276 17 17 /** 18 18 * <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. 20 22 * </p> 21 23 * … … 24 26 public class HTMLPageElement extends HTMLGUIElement { 25 27 26 /** */ 28 /** 29 * <p> 30 * default serial version UID 31 * </p> 32 */ 27 33 private static final long serialVersionUID = 1L; 28 34 29 35 /** 30 36 * <p> 31 * TODO: comment37 * instantiates a page element with it parent (either a document or another page element) 32 38 * </p> 33 39 * 34 * @param specification 35 * @param parent 40 * @param specification the specification of the page element 41 * @param parent the parent GUI element 36 42 */ 37 43 public HTMLPageElement(HTMLPageElementSpec specification, HTMLGUIElement parent) { … … 41 47 /** 42 48 * <p> 43 * TODO: comment49 * returns the name of the tag represented by this specification 44 50 * </p> 45 51 * 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 59 53 */ 60 54 public String getTagName() { … … 64 58 /** 65 59 * <p> 66 * TODO: comment60 * returns the id of the tag represented by this specification 67 61 * </p> 68 62 * 69 * @return 63 * @return the id of the tag represented by this specification 70 64 */ 71 65 public String getHtmlId() { … … 75 69 /** 76 70 * <p> 77 * TODO: comment71 * returns the index of the tag 78 72 * </p> 79 73 * 80 * @return 74 * @return the index of the tag 81 75 */ 82 76 public int getIndex() { … … 94 88 } 95 89 96 /**97 * <p>98 * TODO: comment99 * </p>100 *101 * @return102 */103 HTMLDocumentSpec getPage() {104 return ((HTMLPageElementSpec) super.getSpecification()).getPage();105 }106 107 90 } -
trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLPageElementSpec.java
r1264 r1276 19 19 /** 20 20 * <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. 22 25 * </p> 23 26 * … … 26 29 public class HTMLPageElementSpec extends HTMLGUIElementSpec implements IGUIElementSpec { 27 30 28 /** */ 31 /** 32 * <p> 33 * default serial version UID 34 * </p> 35 */ 29 36 private static final long serialVersionUID = 1L; 30 37 31 /** */ 38 /** 39 * <p> 40 * the page to which the represented tag belongs 41 * </p> 42 */ 32 43 private HTMLDocumentSpec page; 33 44 34 /** */ 45 /** 46 * <p> 47 * the name of the tag represented by this specification 48 * </p> 49 */ 35 50 private String tagName; 36 51 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 */ 38 58 private String htmlId; 39 59 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 */ 41 68 private int index; 42 69 43 70 /** 44 71 * <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. 46 74 * </p> 47 75 * 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 51 83 */ 52 84 public HTMLPageElementSpec(HTMLDocumentSpec page, String tagName, String htmlId, int index) { … … 118 150 /** 119 151 * <p> 120 * TODO: comment152 * returns the page to which the represented tag belongs 121 153 * </p> 122 154 * 123 * @return 155 * @return the page to which the represented tag belongs 124 156 */ 125 157 HTMLDocumentSpec getPage() { … … 129 161 /** 130 162 * <p> 131 * TODO: comment163 * returns the name of the tag represented by this specification 132 164 * </p> 133 165 * 134 * @return 166 * @return the name of the tag represented by this specification 135 167 */ 136 168 String getTagName() { … … 140 172 /** 141 173 * <p> 142 * TODO: comment174 * returns the id of the tag represented by this specification 143 175 * </p> 144 176 * 145 * @return 177 * @return the id of the tag represented by this specification 146 178 */ 147 179 String getHtmlId() { … … 151 183 /** 152 184 * <p> 153 * TODO: comment185 * returns the index of the tag 154 186 * </p> 155 187 * 156 * @return 188 * @return the index of the tag 157 189 */ 158 190 int getIndex() { -
trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLServer.java
r1264 r1276 19 19 /** 20 20 * <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. 22 23 * </p> 23 24 * … … 26 27 public class HTMLServer extends HTMLGUIElement implements IFrame { 27 28 28 /** */ 29 /** 30 * <p> 31 * default serial version UID 32 * </p> 33 */ 29 34 private static final long serialVersionUID = 1L; 30 35 31 36 /** 32 37 * <p> 33 * TODO: comment38 * instantiates the server with an appropriate specification 34 39 * </p> 35 40 * 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 38 46 */ 39 47 public HTMLServer(HTMLServerSpec specification, HTMLGUIElement parent) { … … 58 66 /** 59 67 * <p> 60 * TODO: comment68 * returns the host of the represented server 61 69 * </p> 62 70 * 63 * @return 71 * @return the host 64 72 */ 65 73 public String getHost() { … … 69 77 /** 70 78 * <p> 71 * TODO: comment79 * returns the port of the represented server 72 80 * </p> 73 81 * 74 * @return 82 * @return the port 75 83 */ 76 84 public int getPort() { -
trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLServerSpec.java
r1264 r1276 19 19 /** 20 20 * <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. 22 23 * </p> 23 24 * … … 26 27 public class HTMLServerSpec extends HTMLGUIElementSpec implements IGUIElementSpec { 27 28 28 /** */ 29 /** 30 * <p> 31 * default serial version UID 32 * </p> 33 */ 29 34 private static final long serialVersionUID = 1L; 30 35 31 /** */ 36 /** 37 * <p> 38 * the host of the server 39 * </p> 40 */ 32 41 private String host; 33 42 34 /** */ 43 /** 44 * <p> 45 * the port of the server 46 * </p> 47 */ 35 48 private int port; 36 49 37 50 /** 38 51 * <p> 39 * TODO: comment52 * initialize the server specification with a host and a port. 40 53 * </p> 41 54 * 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) 44 59 */ 45 60 public HTMLServerSpec(String host, int port) { … … 97 112 /** 98 113 * <p> 99 * TODO: comment114 * returns the host of the represented server 100 115 * </p> 101 116 * 102 * @return 117 * @return the host 103 118 */ 104 119 String getHost() { … … 108 123 /** 109 124 * <p> 110 * TODO: comment125 * returns the port of the represented server 111 126 * </p> 112 127 * 113 * @return 128 * @return the port 114 129 */ 115 130 int getPort() {
Note: See TracChangeset
for help on using the changeset viewer.