http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/4fb01038/juneau-core/src/main/java/org/apache/juneau/dto/html5/Iframe.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/html5/Iframe.java b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Iframe.java new file mode 100644 index 0000000..5afcaee --- /dev/null +++ b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Iframe.java @@ -0,0 +1,118 @@ +// *************************************************************************************************************************** +// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * +// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * +// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * +// * with the License. You may obtain a copy of the License at * +// * * +// * http://www.apache.org/licenses/LICENSE-2.0 * +// * * +// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * +// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * +// * specific language governing permissions and limitations under the License. * +// *************************************************************************************************************************** +package org.apache.juneau.dto.html5; + +import org.apache.juneau.annotation.*; + +/** + * DTO for an HTML <a href='https://www.w3.org/TR/html5/embedded-content-0.html#the-iframe-element'><iframe></a> element. + * <p> + */ +@Bean(typeName="iframe") +@SuppressWarnings("hiding") +public class Iframe extends HtmlElementMixed { + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/embedded-content-0.html#attr-dim-height'>height</a> attribute. + * Vertical dimension. + * @param height - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Iframe height(String height) { + attrs.put("height", height); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/embedded-content-0.html#attr-iframe-name'>name</a> attribute. + * Name of nested browsing context. + * @param name - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Iframe name(String name) { + attrs.put("name", name); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/embedded-content-0.html#attr-iframe-sandbox'>sandbox</a> attribute. + * Security rules for nested content. + * @param sandbox - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Iframe sandbox(String sandbox) { + attrs.put("sandbox", sandbox); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/embedded-content-0.html#attr-iframe-src'>src</a> attribute. + * Address of the resource. + * @param src - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Iframe src(String src) { + attrs.put("src", src); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/embedded-content-0.html#attr-iframe-srcdoc'>srcdoc</a> attribute. + * A document to render in the iframe. + * @param srcdoc - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Iframe srcdoc(String srcdoc) { + attrs.put("srcdoc", srcdoc); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/embedded-content-0.html#attr-dim-width'>width</a> attribute. + * Horizontal dimension. + * @param width - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Iframe width(String width) { + attrs.put("width", width); + return this; + } + + //-------------------------------------------------------------------------------- + // Overridden methods + //-------------------------------------------------------------------------------- + + @Override /* HtmlElement */ + public final Iframe _class(String _class) { + super._class(_class); + return this; + } + + @Override /* HtmlElement */ + public final Iframe id(String id) { + super.id(id); + return this; + } + + @Override /* HtmlElementMixed */ + public Iframe children(Object...children) { + super.children(children); + return this; + } + + @Override /* HtmlElementMixed */ + public Iframe child(Object child) { + this.children.add(child); + return this; + } +}
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/4fb01038/juneau-core/src/main/java/org/apache/juneau/dto/html5/Img.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/html5/Img.java b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Img.java new file mode 100644 index 0000000..a0e05a4 --- /dev/null +++ b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Img.java @@ -0,0 +1,115 @@ +// *************************************************************************************************************************** +// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * +// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * +// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * +// * with the License. You may obtain a copy of the License at * +// * * +// * http://www.apache.org/licenses/LICENSE-2.0 * +// * * +// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * +// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * +// * specific language governing permissions and limitations under the License. * +// *************************************************************************************************************************** +package org.apache.juneau.dto.html5; + +import org.apache.juneau.annotation.*; + +/** + * DTO for an HTML <a href='https://www.w3.org/TR/html5/embedded-content-0.html#the-img-element'><img></a> element. + */ +@Bean(typeName="img") +public class Img extends HtmlElementEmpty { + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/embedded-content-0.html#attr-img-alt'>alt</a> attribute. + * Replacement text for use when images are not available. + * @param alt - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Img alt(String alt) { + attrs.put("alt", alt); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/embedded-content-0.html#attr-img-crossorigin'>crossorigin</a> attribute. + * How the element handles crossorigin requests. + * @param crossorigin - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Img crossorigin(String crossorigin) { + attrs.put("crossorigin", crossorigin); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/embedded-content-0.html#attr-dim-height'>height</a> attribute. + * Vertical dimension. + * @param height - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Img height(String height) { + attrs.put("height", height); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/embedded-content-0.html#attr-img-ismap'>ismap</a> attribute. + * Whether the image is a server-side image map. + * @param ismap - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Img ismap(String ismap) { + attrs.put("ismap", ismap); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/embedded-content-0.html#attr-img-src'>src</a> attribute. + * Address of the resource. + * @param src - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Img src(String src) { + attrs.put("src", src); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/embedded-content-0.html#attr-hyperlink-usemap'>usemap</a> attribute. + * Name of image map to use. + * @param usemap - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Img usemap(String usemap) { + attrs.put("usemap", usemap); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/embedded-content-0.html#attr-dim-width'>width</a> attribute. + * Horizontal dimension. + * @param width - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Img width(String width) { + attrs.put("width", width); + return this; + } + + //-------------------------------------------------------------------------------- + // Overridden methods + //-------------------------------------------------------------------------------- + + @Override /* HtmlElement */ + public final Img _class(String _class) { + super._class(_class); + return this; + } + + @Override /* HtmlElement */ + public final Img id(String id) { + super.id(id); + return this; + } +} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/4fb01038/juneau-core/src/main/java/org/apache/juneau/dto/html5/Input.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/html5/Input.java b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Input.java new file mode 100644 index 0000000..3f8831d --- /dev/null +++ b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Input.java @@ -0,0 +1,391 @@ +// *************************************************************************************************************************** +// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * +// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * +// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * +// * with the License. You may obtain a copy of the License at * +// * * +// * http://www.apache.org/licenses/LICENSE-2.0 * +// * * +// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * +// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * +// * specific language governing permissions and limitations under the License. * +// *************************************************************************************************************************** +package org.apache.juneau.dto.html5; + +import org.apache.juneau.annotation.*; + +/** + * DTO for an HTML <a href='https://www.w3.org/TR/html5/forms.html#the-input-element'><input></a> element. + * <p> + */ +@Bean(typeName="input") +public class Input extends HtmlElementEmpty { + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-input-accept'>accept</a> attribute. + * Hint for expected file type in file upload controls. + * @param accept - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input accept(String accept) { + attrs.put("accept", accept); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-input-alt'>alt</a> attribute. + * Replacement text for use when images are not available. + * @param alt - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input alt(String alt) { + attrs.put("alt", alt); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-fe-autocomplete'>autocomplete</a> attribute. + * Hint for form autofill feature. + * @param autocomplete - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input autocomplete(String autocomplete) { + attrs.put("autocomplete", autocomplete); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-fe-autofocus'>autofocus</a> attribute. + * Automatically focus the form control when the page is loaded. + * @param autofocus - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input autofocus(String autofocus) { + attrs.put("autofocus", autofocus); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-input-checked'>checked</a> attribute. + * Whether the command or control is checked. + * @param checked - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input checked(String checked) { + attrs.put("checked", checked); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-fe-dirname'>dirname</a> attribute. + * Name of form field to use for sending the element's directionality in form submission. + * @param dirname - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input dirname(String dirname) { + attrs.put("dirname", dirname); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-fe-disabled'>disabled</a> attribute. + * Whether the form control is disabled. + * @param disabled - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input disabled(String disabled) { + attrs.put("disabled", disabled); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-fae-form'>form</a> attribute. + * Associates the control with a form element. + * @param form - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input form(String form) { + attrs.put("form", form); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-fs-formaction'>formaction</a> attribute. + * URL to use for form submission. + * @param formaction - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input formaction(String formaction) { + attrs.put("formaction", formaction); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-fs-formenctype'>formenctype</a> attribute. + * Form data set encoding type to use for form submission. + * @param formenctype - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input formenctype(String formenctype) { + attrs.put("formenctype", formenctype); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-fs-formmethod'>formmethod</a> attribute. + * HTTP method to use for form submission. + * @param formmethod - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input formmethod(String formmethod) { + attrs.put("formmethod", formmethod); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-fs-formnovalidate'>formnovalidate</a> attribute. + * Bypass form control validation for form submission. + * @param formnovalidate - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input formnovalidate(String formnovalidate) { + attrs.put("formnovalidate", formnovalidate); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-fs-formtarget'>formtarget</a> attribute. + * Browsing context for form submission. + * @param formtarget - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input formtarget(String formtarget) { + attrs.put("formtarget", formtarget); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/embedded-content-0.html#attr-dim-height'>height</a> attribute. + * Vertical dimension. + * @param height - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input height(String height) { + attrs.put("height", height); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/embedded-content-0.html#attr-input-inputmode'>inputmode</a> attribute. + * Hint for selecting an input modality. + * @param inputmode - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input inputmode(String inputmode) { + attrs.put("inputmode", inputmode); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-input-list'>list</a> attribute. + * List of autocomplete options. + * @param list - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input list(String list) { + attrs.put("list", list); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-input-max'>max</a> attribute. + * Maximum value. + * @param max - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input max(String max) { + attrs.put("max", max); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-input-maxlength'>maxlength</a> attribute. + * Maximum length of value. + * @param maxlength - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input maxlength(String maxlength) { + attrs.put("maxlength", maxlength); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-input-min'>min</a> attribute. + * Minimum value. + * @param min - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input min(String min) { + attrs.put("min", min); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-input-minlength'>minlength</a> attribute. + * Minimum length of value. + * @param minlength - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input minlength(String minlength) { + attrs.put("minlength", minlength); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-input-multiple'>multiple</a> attribute. + * Whether to allow multiple values. + * @param multiple - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input multiple(String multiple) { + attrs.put("multiple", multiple); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-fe-name'>name</a> attribute. + * Name of form control to use for form submission and in the form.elements API. + * @param name - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input name(String name) { + attrs.put("name", name); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-input-pattern'>pattern</a> attribute. + * Pattern to be matched by the form control's value. + * @param pattern - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input pattern(String pattern) { + attrs.put("pattern", pattern); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-input-placeholder'>placeholder</a> attribute. + * User-visible label to be placed within the form control. + * @param placeholder - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input placeholder(String placeholder) { + attrs.put("placeholder", placeholder); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-input-readonly'>readonly</a> attribute. + * Whether to allow the value to be edited by the user. + * @param readonly - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input readonly(String readonly) { + attrs.put("readonly", readonly); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-input-readonly'>required</a> attribute. + * Whether the control is required for form submission. + * @param required - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input required(String required) { + attrs.put("required", required); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-input-size'>size</a> attribute. + * Size of the control. + * @param size - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input size(String size) { + attrs.put("size", size); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-input-src'>src</a> attribute. + * Address of the resource. + * @param src - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input src(String src) { + attrs.put("src", src); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-input-step'>step</a> attribute. + * Granularity to be matched by the form control's value. + * @param step - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input step(String step) { + attrs.put("step", step); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-input-type'>type</a> attribute. + * Type of form control. + * @param type - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input type(String type) { + attrs.put("type", type); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-input-value'>value</a> attribute. + * Value of the form control. + * @param value - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input value(String value) { + attrs.put("value", value); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/embedded-content-0.html#attr-dim-width'>width</a> attribute. + * Horizontal dimension. + * @param width - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input width(String width) { + attrs.put("width", width); + return this; + } + + //-------------------------------------------------------------------------------- + // Overridden methods + //-------------------------------------------------------------------------------- + + @Override /* HtmlElement */ + public final Input _class(String _class) { + super._class(_class); + return this; + } + + @Override /* HtmlElement */ + public final Input id(String id) { + super.id(id); + return this; + } +} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/4fb01038/juneau-core/src/main/java/org/apache/juneau/dto/html5/Ins.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/html5/Ins.java b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Ins.java new file mode 100644 index 0000000..a2bc4a3 --- /dev/null +++ b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Ins.java @@ -0,0 +1,74 @@ +// *************************************************************************************************************************** +// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * +// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * +// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * +// * with the License. You may obtain a copy of the License at * +// * * +// * http://www.apache.org/licenses/LICENSE-2.0 * +// * * +// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * +// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * +// * specific language governing permissions and limitations under the License. * +// *************************************************************************************************************************** +package org.apache.juneau.dto.html5; + +import org.apache.juneau.annotation.*; + +/** + * DTO for an HTML <a href='https://www.w3.org/TR/html5/edits.html#the-ins-element'><ins></a> element. + * <p> + */ +@Bean(typeName="ins") +@SuppressWarnings("hiding") +public class Ins extends HtmlElementMixed { + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/edits.html#attr-mod-cite'>cite</a> attribute. + * Link to the source of the quotation or more information about the edit. + * @param cite - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Ins cite(String cite) { + attrs.put("cite", cite); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/edits.html#attr-mod-datetime'>datetime</a> attribute. + * Date and (optionally) time of the change. + * @param datetime - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Ins datetime(String datetime) { + attrs.put("datetime", datetime); + return this; + } + + //-------------------------------------------------------------------------------- + // Overridden methods + //-------------------------------------------------------------------------------- + + @Override /* HtmlElement */ + public final Ins _class(String _class) { + super._class(_class); + return this; + } + + @Override /* HtmlElement */ + public final Ins id(String id) { + super.id(id); + return this; + } + + @Override /* HtmlElementMixed */ + public Ins children(Object...children) { + super.children(children); + return this; + } + + @Override /* HtmlElementMixed */ + public Ins child(Object child) { + this.children.add(child); + return this; + } +} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/4fb01038/juneau-core/src/main/java/org/apache/juneau/dto/html5/Kbd.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/html5/Kbd.java b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Kbd.java new file mode 100644 index 0000000..07f34b1 --- /dev/null +++ b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Kbd.java @@ -0,0 +1,52 @@ +// *************************************************************************************************************************** +// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * +// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * +// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * +// * with the License. You may obtain a copy of the License at * +// * * +// * http://www.apache.org/licenses/LICENSE-2.0 * +// * * +// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * +// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * +// * specific language governing permissions and limitations under the License. * +// *************************************************************************************************************************** +package org.apache.juneau.dto.html5; + +import org.apache.juneau.annotation.*; + +/** + * DTO for an HTML <a href='https://www.w3.org/TR/html5/text-level-semantics.html#the-kbd-element'><kbd></a> element. + * <p> + */ +@Bean(typeName="kbd") +@SuppressWarnings("hiding") +public class Kbd extends HtmlElementMixed { + + //-------------------------------------------------------------------------------- + // Overridden methods + //-------------------------------------------------------------------------------- + + @Override /* HtmlElement */ + public final Kbd _class(String _class) { + super._class(_class); + return this; + } + + @Override /* HtmlElement */ + public final Kbd id(String id) { + super.id(id); + return this; + } + + @Override /* HtmlElementMixed */ + public Kbd children(Object...children) { + super.children(children); + return this; + } + + @Override /* HtmlElementMixed */ + public Kbd child(Object child) { + this.children.add(child); + return this; + } +} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/4fb01038/juneau-core/src/main/java/org/apache/juneau/dto/html5/Keygen.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/html5/Keygen.java b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Keygen.java new file mode 100644 index 0000000..57e0129 --- /dev/null +++ b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Keygen.java @@ -0,0 +1,105 @@ +// *************************************************************************************************************************** +// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * +// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * +// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * +// * with the License. You may obtain a copy of the License at * +// * * +// * http://www.apache.org/licenses/LICENSE-2.0 * +// * * +// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * +// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * +// * specific language governing permissions and limitations under the License. * +// *************************************************************************************************************************** +package org.apache.juneau.dto.html5; + +import org.apache.juneau.annotation.*; + +/** + * DTO for an HTML <a href='https://www.w3.org/TR/html5/forms.html#the-keygen-element'><keygen></a> element. + * <p> + */ +@Bean(typeName="keygen") +public class Keygen extends HtmlElementEmpty { + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-fe-autofocus'>autofocus</a> attribute. + * Automatically focus the form control when the page is loaded. + * @param autofocus - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Keygen autofocus(String autofocus) { + attrs.put("autofocus", autofocus); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-keygen-challenge'>challenge</a> attribute. + * String to package with the generated and signed public key. + * @param challenge - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Keygen challenge(String challenge) { + attrs.put("challenge", challenge); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-fe-disabled'>disabled</a> attribute. + * Whether the form control is disabled. + * @param disabled - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Keygen disabled(String disabled) { + attrs.put("disabled", disabled); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-fae-form'>form</a> attribute. + * Associates the control with a form element. + * @param form - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Keygen form(String form) { + attrs.put("form", form); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-keygen-keytype'>keytype</a> attribute. + * The type of cryptographic key to generate. + * @param keytype - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Keygen keytype(String keytype) { + attrs.put("keytype", keytype); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-fe-name'>name</a> attribute. + * Name of form control to use for form submission and in the form.elements API. + * @param name - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Keygen name(String name) { + attrs.put("name", name); + return this; + } + + //-------------------------------------------------------------------------------- + // Overridden methods + //-------------------------------------------------------------------------------- + + @Override /* HtmlElement */ + public final Keygen _class(String _class) { + super._class(_class); + return this; + } + + @Override /* HtmlElement */ + public final Keygen id(String id) { + super.id(id); + return this; + } +} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/4fb01038/juneau-core/src/main/java/org/apache/juneau/dto/html5/Label.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/html5/Label.java b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Label.java new file mode 100644 index 0000000..16d0bc6 --- /dev/null +++ b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Label.java @@ -0,0 +1,74 @@ +// *************************************************************************************************************************** +// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * +// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * +// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * +// * with the License. You may obtain a copy of the License at * +// * * +// * http://www.apache.org/licenses/LICENSE-2.0 * +// * * +// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * +// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * +// * specific language governing permissions and limitations under the License. * +// *************************************************************************************************************************** +package org.apache.juneau.dto.html5; + +import org.apache.juneau.annotation.*; + +/** + * DTO for an HTML <a href='https://www.w3.org/TR/html5/forms.html#the-label-element'><label></a> element. + * <p> + */ +@Bean(typeName="label") +@SuppressWarnings("hiding") +public class Label extends HtmlElementMixed { + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-label-for'>for</a> attribute. + * Associate the label with form control. + * @param _for - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Label _for(String _for) { + attrs.put("for", _for); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-fae-form'>form</a> attribute. + * Associates the control with a form element. + * @param form - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Label form(String form) { + attrs.put("form", form); + return this; + } + + //-------------------------------------------------------------------------------- + // Overridden methods + //-------------------------------------------------------------------------------- + + @Override /* HtmlElement */ + public final Label _class(String _class) { + super._class(_class); + return this; + } + + @Override /* HtmlElement */ + public final Label id(String id) { + super.id(id); + return this; + } + + @Override /* HtmlElementMixed */ + public Label children(Object...children) { + super.children(children); + return this; + } + + @Override /* HtmlElementMixed */ + public Label child(Object child) { + this.children.add(child); + return this; + } +} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/4fb01038/juneau-core/src/main/java/org/apache/juneau/dto/html5/Legend.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/html5/Legend.java b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Legend.java new file mode 100644 index 0000000..92b29d4 --- /dev/null +++ b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Legend.java @@ -0,0 +1,52 @@ +// *************************************************************************************************************************** +// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * +// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * +// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * +// * with the License. You may obtain a copy of the License at * +// * * +// * http://www.apache.org/licenses/LICENSE-2.0 * +// * * +// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * +// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * +// * specific language governing permissions and limitations under the License. * +// *************************************************************************************************************************** +package org.apache.juneau.dto.html5; + +import org.apache.juneau.annotation.*; + +/** + * DTO for an HTML <a href='https://www.w3.org/TR/html5/forms.html#the-legend-element'><legend></a> element. + * <p> + */ +@Bean(typeName="legend") +@SuppressWarnings("hiding") +public class Legend extends HtmlElementMixed { + + //-------------------------------------------------------------------------------- + // Overridden methods + //-------------------------------------------------------------------------------- + + @Override /* HtmlElement */ + public final Legend _class(String _class) { + super._class(_class); + return this; + } + + @Override /* HtmlElement */ + public final Legend id(String id) { + super.id(id); + return this; + } + + @Override /* HtmlElementMixed */ + public Legend children(Object...children) { + super.children(children); + return this; + } + + @Override /* HtmlElementMixed */ + public Legend child(Object child) { + this.children.add(child); + return this; + } +} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/4fb01038/juneau-core/src/main/java/org/apache/juneau/dto/html5/Li.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/html5/Li.java b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Li.java new file mode 100644 index 0000000..8a5b387 --- /dev/null +++ b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Li.java @@ -0,0 +1,52 @@ +// *************************************************************************************************************************** +// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * +// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * +// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * +// * with the License. You may obtain a copy of the License at * +// * * +// * http://www.apache.org/licenses/LICENSE-2.0 * +// * * +// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * +// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * +// * specific language governing permissions and limitations under the License. * +// *************************************************************************************************************************** +package org.apache.juneau.dto.html5; + +import org.apache.juneau.annotation.*; + +/** + * DTO for an HTML <a href='https://www.w3.org/TR/html5/grouping-content.html#the-li-element'><li></a> element. + * <p> + */ +@Bean(typeName="li") +@SuppressWarnings("hiding") +public class Li extends HtmlElementMixed { + + //-------------------------------------------------------------------------------- + // Overridden methods + //-------------------------------------------------------------------------------- + + @Override /* HtmlElement */ + public final Li _class(String _class) { + super._class(_class); + return this; + } + + @Override /* HtmlElement */ + public final Li id(String id) { + super.id(id); + return this; + } + + @Override /* HtmlElementMixed */ + public Li children(Object...children) { + super.children(children); + return this; + } + + @Override /* HtmlElementMixed */ + public Li child(Object child) { + this.children.add(child); + return this; + } +} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/4fb01038/juneau-core/src/main/java/org/apache/juneau/dto/html5/Link.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/html5/Link.java b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Link.java new file mode 100644 index 0000000..d28f40b --- /dev/null +++ b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Link.java @@ -0,0 +1,116 @@ +// *************************************************************************************************************************** +// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * +// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * +// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * +// * with the License. You may obtain a copy of the License at * +// * * +// * http://www.apache.org/licenses/LICENSE-2.0 * +// * * +// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * +// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * +// * specific language governing permissions and limitations under the License. * +// *************************************************************************************************************************** +package org.apache.juneau.dto.html5; + +import org.apache.juneau.annotation.*; + +/** + * DTO for an HTML <a href='https://www.w3.org/TR/html5/document-metadata.html#the-link-element'><link></a> element. + * <p> + */ +@Bean(typeName="link") +public class Link extends HtmlElementEmpty { + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/document-metadata.html#attr-link-crossorigin'>crossorigin</a> attribute. + * How the element handles crossorigin requests. + * @param crossorigin - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Link crossorigin(String crossorigin) { + attrs.put("crossorigin", crossorigin); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/document-metadata.html#attr-link-href'>href</a> attribute. + * Address of the hyperlink. + * @param href - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Link href(String href) { + attrs.put("href", href); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/document-metadata.html#attr-link-hreflang'>hreflang</a> attribute. + * Language of the linked resource. + * @param hreflang - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Link hreflang(String hreflang) { + attrs.put("hreflang", hreflang); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/document-metadata.html#attr-link-media'>media</a> attribute. + * Applicable media. + * @param media - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Link media(String media) { + attrs.put("media", media); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/document-metadata.html#attr-link-rel'>rel</a> attribute. + * Relationship between the document containing the hyperlink and the destination resource. + * @param rel - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Link rel(String rel) { + attrs.put("rel", rel); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/links.html#attr-link-sizes'>sizes</a> attribute. + * Sizes of the icons (for rel="icon"). + * @param sizes - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Link sizes(String sizes) { + attrs.put("sizes", sizes); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/document-metadata.html#attr-link-type'>type</a> attribute. + * Hint for the type of the referenced resource. + * @param type - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Link type(String type) { + attrs.put("type", type); + return this; + } + + //-------------------------------------------------------------------------------- + // Overridden methods + //-------------------------------------------------------------------------------- + + @Override /* HtmlElement */ + public final Link _class(String _class) { + super._class(_class); + return this; + } + + @Override /* HtmlElement */ + public final Link id(String id) { + super.id(id); + return this; + } +} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/4fb01038/juneau-core/src/main/java/org/apache/juneau/dto/html5/Main.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/html5/Main.java b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Main.java new file mode 100644 index 0000000..7605126 --- /dev/null +++ b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Main.java @@ -0,0 +1,46 @@ +// *************************************************************************************************************************** +// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * +// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * +// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * +// * with the License. You may obtain a copy of the License at * +// * * +// * http://www.apache.org/licenses/LICENSE-2.0 * +// * * +// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * +// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * +// * specific language governing permissions and limitations under the License. * +// *************************************************************************************************************************** +package org.apache.juneau.dto.html5; + +import org.apache.juneau.annotation.*; + +/** + * DTO for an HTML <a href='https://www.w3.org/TR/html5/grouping-content.html#the-main-element'><main></a> element. + * <p> + */ +@Bean(typeName="main") +@SuppressWarnings("hiding") +public class Main extends HtmlElementContainer { + + //-------------------------------------------------------------------------------- + // Overridden methods + //-------------------------------------------------------------------------------- + + @Override /* HtmlElement */ + public Main children(Object...children) { + super.children(children); + return this; + } + + @Override /* HtmlElement */ + public final Main _class(String _class) { + super._class(_class); + return this; + } + + @Override /* HtmlElement */ + public final Main id(String id) { + super.id(id); + return this; + } +} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/4fb01038/juneau-core/src/main/java/org/apache/juneau/dto/html5/Map.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/html5/Map.java b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Map.java new file mode 100644 index 0000000..10e4261 --- /dev/null +++ b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Map.java @@ -0,0 +1,57 @@ +// *************************************************************************************************************************** +// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * +// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * +// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * +// * with the License. You may obtain a copy of the License at * +// * * +// * http://www.apache.org/licenses/LICENSE-2.0 * +// * * +// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * +// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * +// * specific language governing permissions and limitations under the License. * +// *************************************************************************************************************************** +package org.apache.juneau.dto.html5; + +import org.apache.juneau.annotation.*; + +/** + * DTO for an HTML <a href='https://www.w3.org/TR/html5/embedded-content-0.html#the-map-element'><map></a> element. + * <p> + */ +@Bean(typeName="map") +@SuppressWarnings("hiding") +public class Map extends HtmlElementContainer { + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/embedded-content-0.html#attr-map-name'>name</a> attribute. + * Name of image map to reference from the usemap attribute. + * @param name - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Map name(String name) { + attrs.put("name", name); + return this; + } + + //-------------------------------------------------------------------------------- + // Overridden methods + //-------------------------------------------------------------------------------- + + @Override /* HtmlElement */ + public Map children(Object...children) { + super.children(children); + return this; + } + + @Override /* HtmlElement */ + public final Map _class(String _class) { + super._class(_class); + return this; + } + + @Override /* HtmlElement */ + public final Map id(String id) { + super.id(id); + return this; + } +} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/4fb01038/juneau-core/src/main/java/org/apache/juneau/dto/html5/Mark.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/html5/Mark.java b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Mark.java new file mode 100644 index 0000000..5d6407e --- /dev/null +++ b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Mark.java @@ -0,0 +1,52 @@ +// *************************************************************************************************************************** +// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * +// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * +// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * +// * with the License. You may obtain a copy of the License at * +// * * +// * http://www.apache.org/licenses/LICENSE-2.0 * +// * * +// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * +// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * +// * specific language governing permissions and limitations under the License. * +// *************************************************************************************************************************** +package org.apache.juneau.dto.html5; + +import org.apache.juneau.annotation.*; + +/** + * DTO for an HTML <a href='https://www.w3.org/TR/html5/text-level-semantics.html#the-mark-element'><mark></a> element. + * <p> + */ +@Bean(typeName="mark") +@SuppressWarnings("hiding") +public class Mark extends HtmlElementMixed { + + //-------------------------------------------------------------------------------- + // Overridden methods + //-------------------------------------------------------------------------------- + + @Override /* HtmlElement */ + public final Mark _class(String _class) { + super._class(_class); + return this; + } + + @Override /* HtmlElement */ + public final Mark id(String id) { + super.id(id); + return this; + } + + @Override /* HtmlElementMixed */ + public Mark children(Object...children) { + super.children(children); + return this; + } + + @Override /* HtmlElementMixed */ + public Mark child(Object child) { + this.children.add(child); + return this; + } +} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/4fb01038/juneau-core/src/main/java/org/apache/juneau/dto/html5/Meta.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/html5/Meta.java b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Meta.java new file mode 100644 index 0000000..0f4975a --- /dev/null +++ b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Meta.java @@ -0,0 +1,83 @@ +// *************************************************************************************************************************** +// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * +// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * +// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * +// * with the License. You may obtain a copy of the License at * +// * * +// * http://www.apache.org/licenses/LICENSE-2.0 * +// * * +// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * +// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * +// * specific language governing permissions and limitations under the License. * +// *************************************************************************************************************************** +package org.apache.juneau.dto.html5; + +import org.apache.juneau.annotation.*; + +/** + * DTO for an HTML <a href='https://www.w3.org/TR/html5/document-metadata.html#the-meta-element'><meta></a> element. + * <p> + */ +@Bean(typeName="meta") +public class Meta extends HtmlElementEmpty { + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/document-metadata.html#attr-meta-charset'>charset</a> attribute. + * Character encoding declaration. + * @param charset - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Meta charset(String charset) { + attrs.put("charset", charset); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/document-metadata.html#attr-meta-content'>content</a> attribute. + * Value of the element. + * @param content - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Meta content(String content) { + attrs.put("content", content); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/document-metadata.html#attr-meta-http-equiv'>http-equiv</a> attribute. + * Pragma directive. + * @param httpequiv - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Meta httpequiv(String httpequiv) { + attrs.put("http-equiv", httpequiv); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/document-metadata.html#attr-meta-name'>name</a> attribute. + * Metadata name. + * @param name - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Meta name(String name) { + attrs.put("name", name); + return this; + } + + //-------------------------------------------------------------------------------- + // Overridden methods + //-------------------------------------------------------------------------------- + + @Override /* HtmlElement */ + public final Meta _class(String _class) { + super._class(_class); + return this; + } + + @Override /* HtmlElement */ + public final Meta id(String id) { + super.id(id); + return this; + } +} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/4fb01038/juneau-core/src/main/java/org/apache/juneau/dto/html5/Meter.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/html5/Meter.java b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Meter.java new file mode 100644 index 0000000..d42186c --- /dev/null +++ b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Meter.java @@ -0,0 +1,118 @@ +// *************************************************************************************************************************** +// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * +// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * +// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * +// * with the License. You may obtain a copy of the License at * +// * * +// * http://www.apache.org/licenses/LICENSE-2.0 * +// * * +// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * +// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * +// * specific language governing permissions and limitations under the License. * +// *************************************************************************************************************************** +package org.apache.juneau.dto.html5; + +import org.apache.juneau.annotation.*; + +/** + * DTO for an HTML <a href='https://www.w3.org/TR/html5/forms.html#the-meter-element'><meter></a> element. + * <p> + */ +@Bean(typeName="meter") +@SuppressWarnings("hiding") +public class Meter extends HtmlElementMixed { + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-meter-high'>high</a> attribute. + * Low limit of high range. + * @param high - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Meter high(String high) { + attrs.put("high", high); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-meter-low'>low</a> attribute. + * High limit of low range. + * @param low - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Meter low(String low) { + attrs.put("low", low); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-meter-max'>max</a> attribute. + * Upper bound of range. + * @param max - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Meter max(String max) { + attrs.put("max", max); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-meter-min'>min</a> attribute. + * Lower bound of range. + * @param min - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Meter min(String min) { + attrs.put("min", min); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-meter-optimum'>optimum</a> attribute. + * Optimum value in gauge. + * @param optimum - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Meter optimum(String optimum) { + attrs.put("optimum", optimum); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-meter-value'>value</a> attribute. + * Current value of the element. + * @param value - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Meter value(String value) { + attrs.put("value", value); + return this; + } + + //-------------------------------------------------------------------------------- + // Overridden methods + //-------------------------------------------------------------------------------- + + @Override /* HtmlElement */ + public final Meter _class(String _class) { + super._class(_class); + return this; + } + + @Override /* HtmlElement */ + public final Meter id(String id) { + super.id(id); + return this; + } + + @Override /* HtmlElementMixed */ + public Meter children(Object...children) { + super.children(children); + return this; + } + + @Override /* HtmlElementMixed */ + public Meter child(Object child) { + this.children.add(child); + return this; + } +} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/4fb01038/juneau-core/src/main/java/org/apache/juneau/dto/html5/Nav.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/html5/Nav.java b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Nav.java new file mode 100644 index 0000000..dffebd1 --- /dev/null +++ b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Nav.java @@ -0,0 +1,52 @@ +// *************************************************************************************************************************** +// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * +// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * +// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * +// * with the License. You may obtain a copy of the License at * +// * * +// * http://www.apache.org/licenses/LICENSE-2.0 * +// * * +// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * +// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * +// * specific language governing permissions and limitations under the License. * +// *************************************************************************************************************************** +package org.apache.juneau.dto.html5; + +import org.apache.juneau.annotation.*; + +/** + * DTO for an HTML <a href='https://www.w3.org/TR/html5/sections.html#the-nav-element'><nav></a> element. + * <p> + */ +@Bean(typeName="nav") +@SuppressWarnings("hiding") +public class Nav extends HtmlElementMixed { + + //-------------------------------------------------------------------------------- + // Overridden methods + //-------------------------------------------------------------------------------- + + @Override /* HtmlElement */ + public final Nav _class(String _class) { + super._class(_class); + return this; + } + + @Override /* HtmlElement */ + public final Nav id(String id) { + super.id(id); + return this; + } + + @Override /* HtmlElementMixed */ + public Nav children(Object...children) { + super.children(children); + return this; + } + + @Override /* HtmlElementMixed */ + public Nav child(Object child) { + this.children.add(child); + return this; + } +} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/4fb01038/juneau-core/src/main/java/org/apache/juneau/dto/html5/Noscript.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/html5/Noscript.java b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Noscript.java new file mode 100644 index 0000000..3d83738 --- /dev/null +++ b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Noscript.java @@ -0,0 +1,53 @@ +// *************************************************************************************************************************** +// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * +// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * +// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * +// * with the License. You may obtain a copy of the License at * +// * * +// * http://www.apache.org/licenses/LICENSE-2.0 * +// * * +// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * +// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * +// * specific language governing permissions and limitations under the License. * +// *************************************************************************************************************************** +package org.apache.juneau.dto.html5; + +import org.apache.juneau.annotation.*; + +/** + * DTO for an HTML <a href='https://www.w3.org/TR/html5/scripting-1.html#the-noscript-element'><noscript></a> element. + * <p> + */ +@Bean(typeName="noscript") +@SuppressWarnings("hiding") +public class Noscript extends HtmlElementMixed { + + //-------------------------------------------------------------------------------- + // Overridden methods + //-------------------------------------------------------------------------------- + + + @Override /* HtmlElement */ + public final Noscript _class(String _class) { + super._class(_class); + return this; + } + + @Override /* HtmlElement */ + public final Noscript id(String id) { + super.id(id); + return this; + } + + @Override /* HtmlElementMixed */ + public Noscript children(Object...children) { + super.children(children); + return this; + } + + @Override /* HtmlElementMixed */ + public Noscript child(Object child) { + this.children.add(child); + return this; + } +} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/4fb01038/juneau-core/src/main/java/org/apache/juneau/dto/html5/Object2.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/html5/Object2.java b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Object2.java new file mode 100644 index 0000000..b4c2094 --- /dev/null +++ b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Object2.java @@ -0,0 +1,140 @@ +// *************************************************************************************************************************** +// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * +// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * +// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * +// * with the License. You may obtain a copy of the License at * +// * * +// * http://www.apache.org/licenses/LICENSE-2.0 * +// * * +// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * +// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * +// * specific language governing permissions and limitations under the License. * +// *************************************************************************************************************************** +package org.apache.juneau.dto.html5; + +import org.apache.juneau.annotation.*; + +/** + * DTO for an HTML <a href='https://www.w3.org/TR/html5/embedded-content-0.html#the-object-element'><object></a> element. + * <p> + */ +@Bean(typeName="object") +@SuppressWarnings("hiding") +public class Object2 extends HtmlElementMixed { + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/embedded-content-0.html#attr-object-data'>data</a> attribute. + * Address of the resource. + * @param data - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Object2 data(String data) { + attrs.put("data", data); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/forms.html#attr-fae-form'>form</a> attribute. + * Associates the control with a form element. + * @param form - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Object2 form(String form) { + attrs.put("form", form); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/embedded-content-0.html#attr-dim-height'>height</a> attribute. + * Vertical dimension. + * @param height - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Object2 height(String height) { + attrs.put("height", height); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/embedded-content-0.html#attr-object-name'>name</a> attribute. + * Name of nested browsing context. + * @param name - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Object2 name(String name) { + attrs.put("name", name); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/embedded-content-0.html#attr-object-type'>type</a> attribute. + * Type of embedded resource. + * @param type - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Object2 type(String type) { + attrs.put("type", type); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/embedded-content-0.html#attr-object-typemustmatch'>typemustmatch</a> attribute. + * Whether the type attribute and the Content-Type value need to match for the resource to be used. + * @param typemustmatch - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Object2 typemustmatch(String typemustmatch) { + attrs.put("typemustmatch", typemustmatch); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/embedded-content-0.html#attr-hyperlink-usemap'>usemap</a> attribute. + * Name of image map to use. + * @param usemap - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Object2 usemap(String usemap) { + attrs.put("usemap", usemap); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/embedded-content-0.html#attr-dim-width'>width</a> attribute. + * Horizontal dimension. + * @param width - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Object2 width(String width) { + attrs.put("width", width); + return this; + } + + //-------------------------------------------------------------------------------- + // Overridden methods + //-------------------------------------------------------------------------------- + + @Override /* HtmlElement */ + public final Object2 _class(String _class) { + super._class(_class); + return this; + } + + @Override /* HtmlElement */ + public final Object2 id(String id) { + super.id(id); + return this; + } + + @Override /* HtmlElementMixed */ + public Object2 children(Object...children) { + super.children(children); + return this; + } + + @Override /* HtmlElementMixed */ + public Object2 child(Object child) { + this.children.add(child); + return this; + } +} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/4fb01038/juneau-core/src/main/java/org/apache/juneau/dto/html5/Ol.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/html5/Ol.java b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Ol.java new file mode 100644 index 0000000..626e3a9 --- /dev/null +++ b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Ol.java @@ -0,0 +1,79 @@ +// *************************************************************************************************************************** +// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * +// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * +// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * +// * with the License. You may obtain a copy of the License at * +// * * +// * http://www.apache.org/licenses/LICENSE-2.0 * +// * * +// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * +// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * +// * specific language governing permissions and limitations under the License. * +// *************************************************************************************************************************** +package org.apache.juneau.dto.html5; + +import org.apache.juneau.annotation.*; + +/** + * DTO for an HTML <a href='https://www.w3.org/TR/html5/grouping-content.html#the-ol-element'><ol></a> element. + * <p> + */ +@Bean(typeName="ol") +@SuppressWarnings("hiding") +public class Ol extends HtmlElementContainer { + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/grouping-content.html#attr-ol-reversed'>reversed</a> attribute. + * Number the list backwards.. + * @param reversed - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Ol reversed(String reversed) { + attrs.put("reversed", reversed); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/grouping-content.html#attr-ol-start'>start</a> attribute. + * Ordinal value of the first item. + * @param start - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Ol start(String start) { + attrs.put("start", start); + return this; + } + + /** + * <a class='doclink' href='https://www.w3.org/TR/html5/grouping-content.html#attr-ol-type'>type</a> attribute. + * Kind of list marker.. + * @param type - The new value for this attribute. + * @return This object (for method chaining). + */ + public final Ol type(String type) { + attrs.put("type", type); + return this; + } + + //-------------------------------------------------------------------------------- + // Overridden methods + //-------------------------------------------------------------------------------- + + @Override /* HtmlElement */ + public Ol children(Object...children) { + super.children(children); + return this; + } + + @Override /* HtmlElement */ + public final Ol _class(String _class) { + super._class(_class); + return this; + } + + @Override /* HtmlElement */ + public final Ol id(String id) { + super.id(id); + return this; + } +}