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