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