source: trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLPageElement.java @ 1069

Last change on this file since 1069 was 1069, checked in by pharms, 11 years ago
  • support of new HTML logging format
File size: 2.7 KB
Line 
1//   Copyright 2012 Georg-August-Universität Göttingen, Germany
2//
3//   Licensed under the Apache License, Version 2.0 (the "License");
4//   you may not use this file except in compliance with the License.
5//   You may obtain a copy of the License at
6//
7//       http://www.apache.org/licenses/LICENSE-2.0
8//
9//   Unless required by applicable law or agreed to in writing, software
10//   distributed under the License is distributed on an "AS IS" BASIS,
11//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12//   See the License for the specific language governing permissions and
13//   limitations under the License.
14
15package de.ugoe.cs.autoquest.plugin.html.guimodel;
16
17/**
18 * <p>
19 * TODO comment
20 * </p>
21 *
22 * @author Patrick Harms
23 */
24public class HTMLPageElement extends HTMLGUIElement {
25
26    /**  */
27    private static final long serialVersionUID = 1L;
28
29    /**
30     * <p>
31     * TODO: comment
32     * </p>
33     *
34     * @param specification
35     * @param parent
36     */
37    public HTMLPageElement(HTMLPageElementSpec specification, HTMLGUIElement parent) {
38        super(specification, parent);
39    }
40
41    /**
42     * <p>
43     * TODO: comment
44     * </p>
45     *
46     * @param specification
47     * @param parent
48     */
49    public HTMLPageElement(HTMLPageElementSpec specification, HTMLDocument parent) {
50        super(specification, parent);
51    }
52
53    /*
54     * (non-Javadoc)
55     *
56     * @see java.lang.Object#toString()
57     */
58    @Override
59    public String toString() {
60        String str = getTagName();
61       
62        if ((getHtmlId() != null) && (!"".equals(getHtmlId()))) {
63            str += "(id=\"" + getHtmlId() + "\")";
64        }
65        else {
66            str += "[" + getIndex() + "]";
67        }
68       
69        return str;
70    }
71
72    /*
73     * (non-Javadoc)
74     *
75     * @see de.ugoe.cs.autoquest.plugin.html.guimodel.HTMLGUIElement#getElementDescriptor()
76     */
77    @Override
78    protected String getElementDescriptor() {
79        return getTagName();
80    }
81
82    /**
83     * <p>
84     * TODO: comment
85     * </p>
86     *
87     * @return
88     */
89    HTMLDocumentSpec getPage() {
90        return ((HTMLPageElementSpec) super.getSpecification()).getPage();
91    }
92
93    /**
94     * <p>
95     * TODO: comment
96     * </p>
97     *
98     * @return
99     */
100    String getTagName() {
101        return ((HTMLPageElementSpec) super.getSpecification()).getTagName();
102    }
103
104    /**
105     * <p>
106     * TODO: comment
107     * </p>
108     *
109     * @return
110     */
111    String getHtmlId() {
112        return ((HTMLPageElementSpec) super.getSpecification()).getHtmlId();
113    }
114
115    /**
116     * <p>
117     * TODO: comment
118     * </p>
119     *
120     * @return
121     */
122    int getIndex() {
123        return ((HTMLPageElementSpec) super.getSpecification()).getIndex();
124    }
125
126}
Note: See TracBrowser for help on using the repository browser.