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 org.apache.juneau.annotation.*;
016
017/**
018 * DTO for an HTML {@doc HTML5.sections#the-article-element <article>}
019 * element.
020 *
021 * <h5 class='section'>See Also:</h5>
022 * <ul class='doctree'>
023 *    <li class='link'>{@doc juneau-dto.HTML5}
024 * </ul>
025 */
026@Bean(typeName="article")
027public class Article extends HtmlElementMixed {
028
029   /**
030    * Adds a header node to this element.
031    *
032    * @param children The children inside the header node.
033    * @return This object (for method chaining).
034    */
035   public Article header(Object...children) {
036      super.child(HtmlBuilder.header(children));
037      return this;
038   }
039
040   /**
041    * Adds a footer node to this element.
042    *
043    * @param children The children inside the footer node.
044    * @return This object (for method chaining).
045    */
046   public Article footer(Object...children) {
047      super.child(HtmlBuilder.footer(children));
048      return this;
049   }
050
051   /**
052    * Adds a link node to this element.
053    *
054    * @param link The link node to add to this article.
055    * @return This object (for method chaining).
056    */
057   public Article link(Link link) {
058      super.child(link);
059      return this;
060   }
061
062   /**
063    * Adds a section node to this element.
064    *
065    * @param section The section node to add to this article.
066    * @return This object (for method chaining).
067    */
068   public Article section(Section section) {
069      super.child(section);
070      return this;
071   }
072
073
074   //-----------------------------------------------------------------------------------------------------------------
075   // Overridden methods
076   //-----------------------------------------------------------------------------------------------------------------
077
078   @Override /* HtmlElement */
079   public final Article _class(String _class) {
080      super._class(_class);
081      return this;
082   }
083
084   @Override /* HtmlElement */
085   public final Article id(String id) {
086      super.id(id);
087      return this;
088   }
089
090   @Override /* HtmlElement */
091   public final Article style(String style) {
092      super.style(style);
093      return this;
094   }
095
096   @Override /* HtmlElementMixed */
097   public Article children(Object...children) {
098      super.children(children);
099      return this;
100   }
101
102   @Override /* HtmlElementMixed */
103   public Article child(Object child) {
104      super.child(child);
105      return this;
106   }
107}