[961] | 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 | |
---|
| 15 | package de.ugoe.cs.autoquest.plugin.html.guimodel; |
---|
| 16 | |
---|
| 17 | /** |
---|
| 18 | * <p> |
---|
| 19 | * TODO comment |
---|
| 20 | * </p> |
---|
| 21 | * |
---|
| 22 | * @author Patrick Harms |
---|
| 23 | */ |
---|
[989] | 24 | public class HTMLPageElement extends HTMLGUIElement { |
---|
[961] | 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 | */ |
---|
[1069] | 49 | public HTMLPageElement(HTMLPageElementSpec specification, HTMLDocument parent) { |
---|
[961] | 50 | super(specification, parent); |
---|
| 51 | } |
---|
| 52 | |
---|
| 53 | /* |
---|
| 54 | * (non-Javadoc) |
---|
| 55 | * |
---|
| 56 | * @see java.lang.Object#toString() |
---|
| 57 | */ |
---|
| 58 | @Override |
---|
| 59 | public String toString() { |
---|
[1069] | 60 | String str = getTagName(); |
---|
[961] | 61 | |
---|
[1069] | 62 | if ((getHtmlId() != null) && (!"".equals(getHtmlId()))) { |
---|
| 63 | str += "(id=\"" + getHtmlId() + "\")"; |
---|
[961] | 64 | } |
---|
| 65 | else { |
---|
[1069] | 66 | str += "[" + getIndex() + "]"; |
---|
[961] | 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() { |
---|
[1069] | 79 | return getTagName(); |
---|
[961] | 80 | } |
---|
| 81 | |
---|
| 82 | /** |
---|
| 83 | * <p> |
---|
| 84 | * TODO: comment |
---|
| 85 | * </p> |
---|
| 86 | * |
---|
| 87 | * @return |
---|
| 88 | */ |
---|
[1069] | 89 | HTMLDocumentSpec getPage() { |
---|
[961] | 90 | return ((HTMLPageElementSpec) super.getSpecification()).getPage(); |
---|
| 91 | } |
---|
| 92 | |
---|
| 93 | /** |
---|
| 94 | * <p> |
---|
| 95 | * TODO: comment |
---|
| 96 | * </p> |
---|
| 97 | * |
---|
| 98 | * @return |
---|
| 99 | */ |
---|
[1069] | 100 | String getTagName() { |
---|
| 101 | return ((HTMLPageElementSpec) super.getSpecification()).getTagName(); |
---|
[961] | 102 | } |
---|
| 103 | |
---|
| 104 | /** |
---|
| 105 | * <p> |
---|
| 106 | * TODO: comment |
---|
| 107 | * </p> |
---|
| 108 | * |
---|
| 109 | * @return |
---|
| 110 | */ |
---|
[1069] | 111 | String getHtmlId() { |
---|
| 112 | return ((HTMLPageElementSpec) super.getSpecification()).getHtmlId(); |
---|
[961] | 113 | } |
---|
| 114 | |
---|
| 115 | /** |
---|
| 116 | * <p> |
---|
| 117 | * TODO: comment |
---|
| 118 | * </p> |
---|
| 119 | * |
---|
| 120 | * @return |
---|
| 121 | */ |
---|
[1069] | 122 | int getIndex() { |
---|
| 123 | return ((HTMLPageElementSpec) super.getSpecification()).getIndex(); |
---|
[961] | 124 | } |
---|
| 125 | |
---|
| 126 | } |
---|