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.document-metadata#the-meta-element <meta>}
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="meta")
027public class Meta extends HtmlElementVoid {
028
029   /**
030    * {@doc HTML5.document-metadata#attr-meta-charset charset}
031    * attribute.
032    *
033    * <p>
034    * Character encoding declaration.
035    *
036    * @param charset The new value for this attribute.
037    * @return This object (for method chaining).
038    */
039   public final Meta charset(String charset) {
040      attr("charset", charset);
041      return this;
042   }
043
044   /**
045    * {@doc HTML5.document-metadata#attr-meta-content content}
046    * attribute.
047    *
048    * <p>
049    * Value of the element.
050    *
051    * @param content The new value for this attribute.
052    * @return This object (for method chaining).
053    */
054   public final Meta content(String content) {
055      attr("content", content);
056      return this;
057   }
058
059   /**
060    * {@doc HTML5.document-metadata#attr-meta-http-equiv http-equiv}
061    * attribute.
062    *
063    * <p>
064    * Pragma directive.
065    *
066    * @param httpequiv The new value for this attribute.
067    * @return This object (for method chaining).
068    */
069   public final Meta httpequiv(String httpequiv) {
070      attr("http-equiv", httpequiv);
071      return this;
072   }
073
074   /**
075    * {@doc HTML5.document-metadata#attr-meta-name name} attribute.
076    *
077    * <p>
078    * Metadata name.
079    *
080    * @param name The new value for this attribute.
081    * @return This object (for method chaining).
082    */
083   public final Meta name(String name) {
084      attr("name", name);
085      return this;
086   }
087
088
089   //-----------------------------------------------------------------------------------------------------------------
090   // Overridden methods
091   //-----------------------------------------------------------------------------------------------------------------
092
093   @Override /* HtmlElement */
094   public final Meta _class(String _class) {
095      super._class(_class);
096      return this;
097   }
098
099   @Override /* HtmlElement */
100   public final Meta id(String id) {
101      super.id(id);
102      return this;
103   }
104}