001// *************************************************************************************************************************** 002// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * 003// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * 004// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * 005// * with the License. You may obtain a copy of the License at * 006// * * 007// * http://www.apache.org/licenses/LICENSE-2.0 * 008// * * 009// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * 010// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * 011// * specific language governing permissions and limitations under the License. * 012// *************************************************************************************************************************** 013package org.apache.juneau.dto.html5; 014 015import java.net.*; 016 017import org.apache.juneau.*; 018import org.apache.juneau.annotation.*; 019import org.apache.juneau.internal.*; 020 021/** 022 * DTO for an HTML <a class="doclink" href="https://www.w3.org/TR/html5/text-level-semantics.html#the-a-element"><a></a> 023 * element. 024 * 025 * <h5 class='section'>See Also:</h5><ul> 026 * <li class='link'><a class="doclink" href="../../../../../index.html#jd.Html5">Overview > juneau-dto > HTML5</a> 027 * </ul> 028 */ 029@Bean(typeName="a") 030@FluentSetters 031public class A extends HtmlElementMixed { 032 033 /** 034 * Creates an empty {@link A} element. 035 */ 036 public A() {} 037 038 /** 039 * Creates an {@link A} element with the specified {@link A#href(Object)} attribute and {@link A#children(Object[])} 040 * nodes. 041 * 042 * @param href The {@link A#href(Object)} attribute. 043 * @param children The {@link A#children(Object[])} nodes. 044 */ 045 public A(Object href, Object[] children) { 046 href(href).children(children); 047 } 048 049 /** 050 * <a class="doclink" href="https://www.w3.org/TR/html5/links.html#attr-hyperlink-download">download</a> attribute. 051 * 052 * <p> 053 * Whether to download the resource instead of navigating to it, and its file name if so. 054 * 055 * @param download 056 * The new value for this attribute. 057 * Typically a {@link Boolean} or {@link String}. 058 * @return This object. 059 */ 060 public final A download(Object download) { 061 attr("download", download); 062 return this; 063 } 064 065 /** 066 * <a class="doclink" href="https://www.w3.org/TR/html5/links.html#attr-hyperlink-href">href</a> attribute. 067 * 068 * <p> 069 * Address of the hyperlink. 070 * 071 * <p> 072 * The value can be of any of the following types: {@link URI}, {@link URL}, {@link String}. 073 * Strings must be valid URIs. 074 * 075 * <p> 076 * URIs defined by {@link UriResolver} can be used for values. 077 * 078 * @param href 079 * The new value for this attribute. 080 * Typically a {@link URL} or {@link String}. 081 * @return This object. 082 */ 083 public final A href(Object href) { 084 attrUri("href", href); 085 return this; 086 } 087 088 /** 089 * <a class="doclink" href="https://www.w3.org/TR/html5/links.html#attr-hyperlink-hreflang">hreflang</a> attribute. 090 * 091 * <p> 092 * Language of the linked resource. 093 * 094 * @param hreflang The new value for this attribute. 095 * @return This object. 096 */ 097 public final A hreflang(String hreflang) { 098 attr("hreflang", hreflang); 099 return this; 100 } 101 102 /** 103 * <a class="doclink" href="https://www.w3.org/TR/html5/links.html#attr-hyperlink-rel">rel</a> attribute. 104 * 105 * <p> 106 * Relationship between the document containing the hyperlink and the destination resource. 107 * 108 * @param rel The new value for this attribute. 109 * @return This object. 110 */ 111 public final A rel(String rel) { 112 attr("rel", rel); 113 return this; 114 } 115 116 /** 117 * <a class="doclink" href="https://www.w3.org/TR/html5/links.html#attr-hyperlink-target">target</a> attribute. 118 * 119 * <p> 120 * Default browsing context for hyperlink navigation and form submission. 121 * 122 * @param target The new value for this attribute. 123 * @return This object. 124 */ 125 public final A target(String target) { 126 attr("target", target); 127 return this; 128 } 129 130 /** 131 * <a class="doclink" href="https://www.w3.org/TR/html5/links.html#attr-hyperlink-type">type</a> attribute. 132 * 133 * <p> 134 * Hint for the type of the referenced resource. 135 * 136 * @param type The new value for this attribute. 137 * @return This object. 138 */ 139 public final A type(String type) { 140 attr("type", type); 141 return this; 142 } 143 144 145 //----------------------------------------------------------------------------------------------------------------- 146 // Overridden methods 147 //----------------------------------------------------------------------------------------------------------------- 148 149 // <FluentSetters> 150 151 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 152 public A _class(String _class) { 153 super._class(_class); 154 return this; 155 } 156 157 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 158 public A accesskey(String accesskey) { 159 super.accesskey(accesskey); 160 return this; 161 } 162 163 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 164 public A contenteditable(Object contenteditable) { 165 super.contenteditable(contenteditable); 166 return this; 167 } 168 169 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 170 public A dir(String dir) { 171 super.dir(dir); 172 return this; 173 } 174 175 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 176 public A hidden(Object hidden) { 177 super.hidden(hidden); 178 return this; 179 } 180 181 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 182 public A id(String id) { 183 super.id(id); 184 return this; 185 } 186 187 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 188 public A lang(String lang) { 189 super.lang(lang); 190 return this; 191 } 192 193 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 194 public A onabort(String onabort) { 195 super.onabort(onabort); 196 return this; 197 } 198 199 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 200 public A onblur(String onblur) { 201 super.onblur(onblur); 202 return this; 203 } 204 205 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 206 public A oncancel(String oncancel) { 207 super.oncancel(oncancel); 208 return this; 209 } 210 211 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 212 public A oncanplay(String oncanplay) { 213 super.oncanplay(oncanplay); 214 return this; 215 } 216 217 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 218 public A oncanplaythrough(String oncanplaythrough) { 219 super.oncanplaythrough(oncanplaythrough); 220 return this; 221 } 222 223 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 224 public A onchange(String onchange) { 225 super.onchange(onchange); 226 return this; 227 } 228 229 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 230 public A onclick(String onclick) { 231 super.onclick(onclick); 232 return this; 233 } 234 235 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 236 public A oncuechange(String oncuechange) { 237 super.oncuechange(oncuechange); 238 return this; 239 } 240 241 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 242 public A ondblclick(String ondblclick) { 243 super.ondblclick(ondblclick); 244 return this; 245 } 246 247 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 248 public A ondurationchange(String ondurationchange) { 249 super.ondurationchange(ondurationchange); 250 return this; 251 } 252 253 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 254 public A onemptied(String onemptied) { 255 super.onemptied(onemptied); 256 return this; 257 } 258 259 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 260 public A onended(String onended) { 261 super.onended(onended); 262 return this; 263 } 264 265 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 266 public A onerror(String onerror) { 267 super.onerror(onerror); 268 return this; 269 } 270 271 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 272 public A onfocus(String onfocus) { 273 super.onfocus(onfocus); 274 return this; 275 } 276 277 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 278 public A oninput(String oninput) { 279 super.oninput(oninput); 280 return this; 281 } 282 283 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 284 public A oninvalid(String oninvalid) { 285 super.oninvalid(oninvalid); 286 return this; 287 } 288 289 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 290 public A onkeydown(String onkeydown) { 291 super.onkeydown(onkeydown); 292 return this; 293 } 294 295 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 296 public A onkeypress(String onkeypress) { 297 super.onkeypress(onkeypress); 298 return this; 299 } 300 301 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 302 public A onkeyup(String onkeyup) { 303 super.onkeyup(onkeyup); 304 return this; 305 } 306 307 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 308 public A onload(String onload) { 309 super.onload(onload); 310 return this; 311 } 312 313 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 314 public A onloadeddata(String onloadeddata) { 315 super.onloadeddata(onloadeddata); 316 return this; 317 } 318 319 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 320 public A onloadedmetadata(String onloadedmetadata) { 321 super.onloadedmetadata(onloadedmetadata); 322 return this; 323 } 324 325 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 326 public A onloadstart(String onloadstart) { 327 super.onloadstart(onloadstart); 328 return this; 329 } 330 331 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 332 public A onmousedown(String onmousedown) { 333 super.onmousedown(onmousedown); 334 return this; 335 } 336 337 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 338 public A onmouseenter(String onmouseenter) { 339 super.onmouseenter(onmouseenter); 340 return this; 341 } 342 343 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 344 public A onmouseleave(String onmouseleave) { 345 super.onmouseleave(onmouseleave); 346 return this; 347 } 348 349 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 350 public A onmousemove(String onmousemove) { 351 super.onmousemove(onmousemove); 352 return this; 353 } 354 355 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 356 public A onmouseout(String onmouseout) { 357 super.onmouseout(onmouseout); 358 return this; 359 } 360 361 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 362 public A onmouseover(String onmouseover) { 363 super.onmouseover(onmouseover); 364 return this; 365 } 366 367 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 368 public A onmouseup(String onmouseup) { 369 super.onmouseup(onmouseup); 370 return this; 371 } 372 373 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 374 public A onmousewheel(String onmousewheel) { 375 super.onmousewheel(onmousewheel); 376 return this; 377 } 378 379 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 380 public A onpause(String onpause) { 381 super.onpause(onpause); 382 return this; 383 } 384 385 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 386 public A onplay(String onplay) { 387 super.onplay(onplay); 388 return this; 389 } 390 391 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 392 public A onplaying(String onplaying) { 393 super.onplaying(onplaying); 394 return this; 395 } 396 397 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 398 public A onprogress(String onprogress) { 399 super.onprogress(onprogress); 400 return this; 401 } 402 403 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 404 public A onratechange(String onratechange) { 405 super.onratechange(onratechange); 406 return this; 407 } 408 409 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 410 public A onreset(String onreset) { 411 super.onreset(onreset); 412 return this; 413 } 414 415 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 416 public A onresize(String onresize) { 417 super.onresize(onresize); 418 return this; 419 } 420 421 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 422 public A onscroll(String onscroll) { 423 super.onscroll(onscroll); 424 return this; 425 } 426 427 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 428 public A onseeked(String onseeked) { 429 super.onseeked(onseeked); 430 return this; 431 } 432 433 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 434 public A onseeking(String onseeking) { 435 super.onseeking(onseeking); 436 return this; 437 } 438 439 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 440 public A onselect(String onselect) { 441 super.onselect(onselect); 442 return this; 443 } 444 445 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 446 public A onshow(String onshow) { 447 super.onshow(onshow); 448 return this; 449 } 450 451 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 452 public A onstalled(String onstalled) { 453 super.onstalled(onstalled); 454 return this; 455 } 456 457 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 458 public A onsubmit(String onsubmit) { 459 super.onsubmit(onsubmit); 460 return this; 461 } 462 463 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 464 public A onsuspend(String onsuspend) { 465 super.onsuspend(onsuspend); 466 return this; 467 } 468 469 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 470 public A ontimeupdate(String ontimeupdate) { 471 super.ontimeupdate(ontimeupdate); 472 return this; 473 } 474 475 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 476 public A ontoggle(String ontoggle) { 477 super.ontoggle(ontoggle); 478 return this; 479 } 480 481 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 482 public A onvolumechange(String onvolumechange) { 483 super.onvolumechange(onvolumechange); 484 return this; 485 } 486 487 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 488 public A onwaiting(String onwaiting) { 489 super.onwaiting(onwaiting); 490 return this; 491 } 492 493 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 494 public A spellcheck(Object spellcheck) { 495 super.spellcheck(spellcheck); 496 return this; 497 } 498 499 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 500 public A style(String style) { 501 super.style(style); 502 return this; 503 } 504 505 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 506 public A tabindex(Object tabindex) { 507 super.tabindex(tabindex); 508 return this; 509 } 510 511 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 512 public A title(String title) { 513 super.title(title); 514 return this; 515 } 516 517 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */ 518 public A translate(Object translate) { 519 super.translate(translate); 520 return this; 521 } 522 523 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElementMixed */ 524 public A child(Object child) { 525 super.child(child); 526 return this; 527 } 528 529 @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElementMixed */ 530 public A children(Object...children) { 531 super.children(children); 532 return this; 533 } 534 535 // </FluentSetters> 536}