001/*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *      http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.apache.juneau.bean.html5;
018
019import org.apache.juneau.annotation.*;
020import org.apache.juneau.internal.*;
021
022/**
023 * DTO for an HTML <a class="doclink" href="https://www.w3.org/TR/html5/sections.html#the-section-element">&lt;section&gt;</a>
024 * element.
025 *
026 * <p>
027 * The section element represents a generic section of a document or application. It is used
028 * to group related content together and create a logical structure within a document. The
029 * section element should have a heading (h1-h6) to identify the section's topic and is
030 * typically used to divide content into thematic groups. It is important for creating
031 * accessible document structure and helps screen readers understand the organization of content.
032 *
033 * <h5 class='section'>Examples:</h5>
034 * <p class='bcode w800'>
035 *    <jc>// Simple section</jc>
036 *    Section <jv>simple</jv> = <jsm>section</jsm>(
037 *       <jsm>h2</jsm>(<js>"Introduction"</js>),
038 *       <jsm>p</jsm>(<js>"This is the introduction section."</js>)
039 *    );
040 * 
041 *    <jc>// Section with styling</jc>
042 *    Section <jv>styled</jv> = <jsm>section</jsm>(
043 *       <jsm>h2</jsm>(<js>"Features"</js>),
044 *       <jsm>p</jsm>(<js>"Here are the key features of our product."</js>)
045 *    )._class(<js>"content-section"</js>);
046 * 
047 *    <jc>// Section with complex content</jc>
048 *    Section <jv>complex</jv> = <jsm>section</jsm>(
049 *       <jsm>h2</jsm>(<js>"Getting Started"</js>),
050 *       <jsm>p</jsm>(<js>"Follow these steps to get started:"</js>),
051 *       <jsm>ol</jsm>(
052 *          <jsm>li</jsm>(<js>"Step 1: Install the software"</js>),
053 *          <jsm>li</jsm>(<js>"Step 2: Configure settings"</js>),
054 *          <jsm>li</jsm>(<js>"Step 3: Start using the application"</js>)
055 *       )
056 *    );
057 * 
058 *    <jc>// Section with ID</jc>
059 *    Section <jv>withId</jv> = <jsm>section</jsm>(
060 *       <jsm>h2</jsm>(<js>"Main Content"</js>),
061 *       <jsm>p</jsm>(<js>"This is the main content section."</js>)
062 *    ).id(<js>"main-content"</js>);
063 * 
064 *    <jc>// Section with styling</jc>
065 *    Section <jv>styled2</jv> = <jsm>section</jsm>(
066 *       <jsm>h2</jsm>(<js>"Styled Section"</js>),
067 *       <jsm>p</jsm>(<js>"This section has custom styling."</js>)
068 *    ).style(<js>"background-color: #f9f9f9; padding: 20px; margin: 10px 0;"</js>);
069 * 
070 *    <jc>// Section with multiple elements</jc>
071 *    Section <jv>multiple</jv> = <jsm>section</jsm>(
072 *       <jsm>h2</jsm>(<js>"Documentation"</js>),
073 *       <jsm>p</jsm>(<js>"This section contains documentation."</js>),
074 *       <jsm>ul</jsm>(
075 *          <jsm>li</jsm>(<js>"API Reference"</js>),
076 *          <jsm>li</jsm>(<js>"User Guide"</js>),
077 *          <jsm>li</jsm>(<js>"Examples"</js>)
078 *       ),
079 *       <jsm>footer</jsm>(<js>"Last updated: January 2024"</js>)
080 *    );
081 * 
082 *    <jc>// Section with article</jc>
083 *    Section <jv>withArticle</jv> = <jsm>section</jsm>(
084 *       <jsm>h2</jsm>(<js>"Latest News"</js>),
085 *       <jsm>article</jsm>(
086 *          <jsm>h3</jsm>(<js>"News Article Title"</js>),
087 *          <jsm>p</jsm>(<js>"Article content goes here."</js>)
088 *       )
089 *    );
090 * </p>
091 *
092 * <h5 class='section'>See Also:</h5><ul>
093 *    <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
094 * </ul>
095 */
096@Bean(typeName="section")
097public class Section extends HtmlElementMixed {
098
099   /**
100    * Creates an empty {@link Section} element.
101    */
102   public Section() {}
103
104   /**
105    * Creates a {@link Section} element with the specified child nodes.
106    *
107    * @param children The child nodes.
108    */
109   public Section(Object...children) {
110      children(children);
111   }
112
113   //-----------------------------------------------------------------------------------------------------------------
114   // Overridden methods
115   //-----------------------------------------------------------------------------------------------------------------
116   @Override /* Overridden from HtmlElement */
117   public Section _class(String value) {  // NOSONAR - Intentional naming.
118      super._class(value);
119      return this;
120   }
121
122   @Override /* Overridden from HtmlElement */
123   public Section accesskey(String value) {
124      super.accesskey(value);
125      return this;
126   }
127
128   @Override /* Overridden from HtmlElement */
129   public Section contenteditable(Object value) {
130      super.contenteditable(value);
131      return this;
132   }
133
134   @Override /* Overridden from HtmlElement */
135   public Section dir(String value) {
136      super.dir(value);
137      return this;
138   }
139
140   @Override /* Overridden from HtmlElement */
141   public Section hidden(Object value) {
142      super.hidden(value);
143      return this;
144   }
145
146   @Override /* Overridden from HtmlElement */
147   public Section id(String value) {
148      super.id(value);
149      return this;
150   }
151
152   @Override /* Overridden from HtmlElement */
153   public Section lang(String value) {
154      super.lang(value);
155      return this;
156   }
157
158   @Override /* Overridden from HtmlElement */
159   public Section onabort(String value) {
160      super.onabort(value);
161      return this;
162   }
163
164   @Override /* Overridden from HtmlElement */
165   public Section onblur(String value) {
166      super.onblur(value);
167      return this;
168   }
169
170   @Override /* Overridden from HtmlElement */
171   public Section oncancel(String value) {
172      super.oncancel(value);
173      return this;
174   }
175
176   @Override /* Overridden from HtmlElement */
177   public Section oncanplay(String value) {
178      super.oncanplay(value);
179      return this;
180   }
181
182   @Override /* Overridden from HtmlElement */
183   public Section oncanplaythrough(String value) {
184      super.oncanplaythrough(value);
185      return this;
186   }
187
188   @Override /* Overridden from HtmlElement */
189   public Section onchange(String value) {
190      super.onchange(value);
191      return this;
192   }
193
194   @Override /* Overridden from HtmlElement */
195   public Section onclick(String value) {
196      super.onclick(value);
197      return this;
198   }
199
200   @Override /* Overridden from HtmlElement */
201   public Section oncuechange(String value) {
202      super.oncuechange(value);
203      return this;
204   }
205
206   @Override /* Overridden from HtmlElement */
207   public Section ondblclick(String value) {
208      super.ondblclick(value);
209      return this;
210   }
211
212   @Override /* Overridden from HtmlElement */
213   public Section ondurationchange(String value) {
214      super.ondurationchange(value);
215      return this;
216   }
217
218   @Override /* Overridden from HtmlElement */
219   public Section onemptied(String value) {
220      super.onemptied(value);
221      return this;
222   }
223
224   @Override /* Overridden from HtmlElement */
225   public Section onended(String value) {
226      super.onended(value);
227      return this;
228   }
229
230   @Override /* Overridden from HtmlElement */
231   public Section onerror(String value) {
232      super.onerror(value);
233      return this;
234   }
235
236   @Override /* Overridden from HtmlElement */
237   public Section onfocus(String value) {
238      super.onfocus(value);
239      return this;
240   }
241
242   @Override /* Overridden from HtmlElement */
243   public Section oninput(String value) {
244      super.oninput(value);
245      return this;
246   }
247
248   @Override /* Overridden from HtmlElement */
249   public Section oninvalid(String value) {
250      super.oninvalid(value);
251      return this;
252   }
253
254   @Override /* Overridden from HtmlElement */
255   public Section onkeydown(String value) {
256      super.onkeydown(value);
257      return this;
258   }
259
260   @Override /* Overridden from HtmlElement */
261   public Section onkeypress(String value) {
262      super.onkeypress(value);
263      return this;
264   }
265
266   @Override /* Overridden from HtmlElement */
267   public Section onkeyup(String value) {
268      super.onkeyup(value);
269      return this;
270   }
271
272   @Override /* Overridden from HtmlElement */
273   public Section onload(String value) {
274      super.onload(value);
275      return this;
276   }
277
278   @Override /* Overridden from HtmlElement */
279   public Section onloadeddata(String value) {
280      super.onloadeddata(value);
281      return this;
282   }
283
284   @Override /* Overridden from HtmlElement */
285   public Section onloadedmetadata(String value) {
286      super.onloadedmetadata(value);
287      return this;
288   }
289
290   @Override /* Overridden from HtmlElement */
291   public Section onloadstart(String value) {
292      super.onloadstart(value);
293      return this;
294   }
295
296   @Override /* Overridden from HtmlElement */
297   public Section onmousedown(String value) {
298      super.onmousedown(value);
299      return this;
300   }
301
302   @Override /* Overridden from HtmlElement */
303   public Section onmouseenter(String value) {
304      super.onmouseenter(value);
305      return this;
306   }
307
308   @Override /* Overridden from HtmlElement */
309   public Section onmouseleave(String value) {
310      super.onmouseleave(value);
311      return this;
312   }
313
314   @Override /* Overridden from HtmlElement */
315   public Section onmousemove(String value) {
316      super.onmousemove(value);
317      return this;
318   }
319
320   @Override /* Overridden from HtmlElement */
321   public Section onmouseout(String value) {
322      super.onmouseout(value);
323      return this;
324   }
325
326   @Override /* Overridden from HtmlElement */
327   public Section onmouseover(String value) {
328      super.onmouseover(value);
329      return this;
330   }
331
332   @Override /* Overridden from HtmlElement */
333   public Section onmouseup(String value) {
334      super.onmouseup(value);
335      return this;
336   }
337
338   @Override /* Overridden from HtmlElement */
339   public Section onmousewheel(String value) {
340      super.onmousewheel(value);
341      return this;
342   }
343
344   @Override /* Overridden from HtmlElement */
345   public Section onpause(String value) {
346      super.onpause(value);
347      return this;
348   }
349
350   @Override /* Overridden from HtmlElement */
351   public Section onplay(String value) {
352      super.onplay(value);
353      return this;
354   }
355
356   @Override /* Overridden from HtmlElement */
357   public Section onplaying(String value) {
358      super.onplaying(value);
359      return this;
360   }
361
362   @Override /* Overridden from HtmlElement */
363   public Section onprogress(String value) {
364      super.onprogress(value);
365      return this;
366   }
367
368   @Override /* Overridden from HtmlElement */
369   public Section onratechange(String value) {
370      super.onratechange(value);
371      return this;
372   }
373
374   @Override /* Overridden from HtmlElement */
375   public Section onreset(String value) {
376      super.onreset(value);
377      return this;
378   }
379
380   @Override /* Overridden from HtmlElement */
381   public Section onresize(String value) {
382      super.onresize(value);
383      return this;
384   }
385
386   @Override /* Overridden from HtmlElement */
387   public Section onscroll(String value) {
388      super.onscroll(value);
389      return this;
390   }
391
392   @Override /* Overridden from HtmlElement */
393   public Section onseeked(String value) {
394      super.onseeked(value);
395      return this;
396   }
397
398   @Override /* Overridden from HtmlElement */
399   public Section onseeking(String value) {
400      super.onseeking(value);
401      return this;
402   }
403
404   @Override /* Overridden from HtmlElement */
405   public Section onselect(String value) {
406      super.onselect(value);
407      return this;
408   }
409
410   @Override /* Overridden from HtmlElement */
411   public Section onshow(String value) {
412      super.onshow(value);
413      return this;
414   }
415
416   @Override /* Overridden from HtmlElement */
417   public Section onstalled(String value) {
418      super.onstalled(value);
419      return this;
420   }
421
422   @Override /* Overridden from HtmlElement */
423   public Section onsubmit(String value) {
424      super.onsubmit(value);
425      return this;
426   }
427
428   @Override /* Overridden from HtmlElement */
429   public Section onsuspend(String value) {
430      super.onsuspend(value);
431      return this;
432   }
433
434   @Override /* Overridden from HtmlElement */
435   public Section ontimeupdate(String value) {
436      super.ontimeupdate(value);
437      return this;
438   }
439
440   @Override /* Overridden from HtmlElement */
441   public Section ontoggle(String value) {
442      super.ontoggle(value);
443      return this;
444   }
445
446   @Override /* Overridden from HtmlElement */
447   public Section onvolumechange(String value) {
448      super.onvolumechange(value);
449      return this;
450   }
451
452   @Override /* Overridden from HtmlElement */
453   public Section onwaiting(String value) {
454      super.onwaiting(value);
455      return this;
456   }
457
458   @Override /* Overridden from HtmlElement */
459   public Section spellcheck(Object value) {
460      super.spellcheck(value);
461      return this;
462   }
463
464   @Override /* Overridden from HtmlElement */
465   public Section style(String value) {
466      super.style(value);
467      return this;
468   }
469
470   @Override /* Overridden from HtmlElement */
471   public Section tabindex(Object value) {
472      super.tabindex(value);
473      return this;
474   }
475
476   @Override /* Overridden from HtmlElement */
477   public Section title(String value) {
478      super.title(value);
479      return this;
480   }
481
482   @Override /* Overridden from HtmlElement */
483   public Section translate(Object value) {
484      super.translate(value);
485      return this;
486   }
487
488   @Override /* Overridden from HtmlElementMixed */
489   public Section child(Object value) {
490      super.child(value);
491      return this;
492   }
493
494   @Override /* Overridden from HtmlElementMixed */
495   public Section children(Object...value) {
496      super.children(value);
497      return this;
498   }
499}