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.embedded-content-0#the-object-element <object>}
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="object")
027public class Object2 extends HtmlElementMixed {
028
029   /**
030    * {@doc HTML5.embedded-content-0#attr-object-data data} attribute.
031    *
032    * <p>
033    * Address of the resource.
034    *
035    * @param data The new value for this attribute.
036    * @return This object (for method chaining).
037    */
038   public final Object2 data(String data) {
039      attr("data", data);
040      return this;
041   }
042
043   /**
044    * {@doc HTML5.forms#attr-fae-form form} attribute.
045    *
046    * <p>
047    * Associates the control with a form element.
048    *
049    * @param form The new value for this attribute.
050    * @return This object (for method chaining).
051    */
052   public final Object2 form(String form) {
053      attr("form", form);
054      return this;
055   }
056
057   /**
058    * {@doc HTML5.embedded-content-0#attr-dim-height height}
059    * attribute.
060    *
061    * <p>
062    * Vertical dimension.
063    *
064    * @param height
065    *    The new value for this attribute.
066    *    Typically a {@link Number} or {@link String}.
067    * @return This object (for method chaining).
068    */
069   public final Object2 height(Object height) {
070      attr("height", height);
071      return this;
072   }
073
074   /**
075    * {@doc HTML5.embedded-content-0#attr-object-name name} attribute.
076    *
077    * <p>
078    * Name of nested browsing context.
079    *
080    * @param name The new value for this attribute.
081    * @return This object (for method chaining).
082    */
083   public final Object2 name(String name) {
084      attr("name", name);
085      return this;
086   }
087
088   /**
089    * {@doc HTML5.embedded-content-0#attr-object-type type} attribute.
090    *
091    * <p>
092    * Type of embedded resource.
093    *
094    * @param type The new value for this attribute.
095    * @return This object (for method chaining).
096    */
097   public final Object2 type(String type) {
098      attr("type", type);
099      return this;
100   }
101
102   /**
103    * {@doc HTML5.embedded-content-0#attr-object-typemustmatch typemustmatch}
104    * attribute.
105    *
106    * <p>
107    * Whether the type attribute and the Content-Type value need to match for the resource to be used.
108    *
109    * @param typemustmatch
110    *    The new value for this attribute.
111    *    Typically a {@link Boolean} or {@link String}.
112    * @return This object (for method chaining).
113    */
114   public final Object2 typemustmatch(Object typemustmatch) {
115      attr("typemustmatch", typemustmatch);
116      return this;
117   }
118
119   /**
120    * {@doc HTML5.embedded-content-0#attr-hyperlink-usemap usemap}
121    * attribute.
122    *
123    * <p>
124    * Name of image map to use.
125    *
126    * @param usemap The new value for this attribute.
127    * @return This object (for method chaining).
128    */
129   public final Object2 usemap(String usemap) {
130      attr("usemap", usemap);
131      return this;
132   }
133
134   /**
135    * {@doc HTML5.embedded-content-0#attr-dim-width width} attribute.
136    *
137    * <p>
138    * Horizontal dimension.
139    *
140    * @param width
141    *    The new value for this attribute.
142    *    Typically a {@link Number} or {@link String}.
143    * @return This object (for method chaining).
144    */
145   public final Object2 width(Object width) {
146      attr("width", width);
147      return this;
148   }
149
150
151   //-----------------------------------------------------------------------------------------------------------------
152   // Overridden methods
153   //-----------------------------------------------------------------------------------------------------------------
154
155   @Override /* HtmlElement */
156   public final Object2 _class(String _class) {
157      super._class(_class);
158      return this;
159   }
160
161   @Override /* HtmlElement */
162   public final Object2 id(String id) {
163      super.id(id);
164      return this;
165   }
166
167   @Override /* HtmlElement */
168   public final Object2 style(String style) {
169      super.style(style);
170      return this;
171   }
172
173   @Override /* HtmlElementMixed */
174   public Object2 children(Object...children) {
175      super.children(children);
176      return this;
177   }
178
179   @Override /* HtmlElementMixed */
180   public Object2 child(Object child) {
181      super.child(child);
182      return this;
183   }
184}