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