http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/75b0d8ee/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/HtmlElementRawText.java ---------------------------------------------------------------------- diff --git a/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/HtmlElementRawText.java b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/HtmlElementRawText.java new file mode 100644 index 0000000..02af654 --- /dev/null +++ b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/HtmlElementRawText.java @@ -0,0 +1,72 @@ +// *************************************************************************************************************************** +// * 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.*; +import org.apache.juneau.xml.annotation.*; + +/** + * A subclass of HTML elements that contain <a href="https://www.w3.org/TR/html51/syntax.html#raw-text">raw text</a> + * only. + * + * <h6 class='topic'>Additional Information</h6> + * <ul class='doctree'> + * <li class='link'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs'>Juneau Data Transfer Objects + * (org.apache.juneau.dto)</a> + * <ul> + * <li class='sublink'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs.HTML5'>HTML5</a> + * </ul> + * </li> + * </ul> + */ +@SuppressWarnings("hiding") +public class HtmlElementRawText extends HtmlElement { + + private Object text; + + /** + * Returns the inner text of this element. + * + * @return The inner text of this element, or <jk>null</jk> if no text is set. + */ + @Xml(format=XmlFormat.TEXT_PWS) + @BeanProperty("c") + public Object getText() { + return text; + } + + /** + * Sets the inner text of this element. + * + * @param text The inner text of this element, or <jk>null</jk> if no text is set. + * @return This object (for method chaining). + */ + @BeanProperty("c") + public HtmlElement setText(Object text) { + this.text = text; + return this; + } + + /** + * Sets the text node on this element. + * + * @param text The text node to add to this element. + * @return This object (for method chaining). + */ + public HtmlElement text(Object text) { + this.text = text; + return this; + } +}
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/75b0d8ee/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/HtmlElementText.java ---------------------------------------------------------------------- diff --git a/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/HtmlElementText.java b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/HtmlElementText.java new file mode 100644 index 0000000..cf10aec --- /dev/null +++ b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/HtmlElementText.java @@ -0,0 +1,71 @@ +// *************************************************************************************************************************** +// * 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.*; +import org.apache.juneau.xml.annotation.*; + +/** + * A subclass of HTML elements that contain text only. + * + * <h6 class='topic'>Additional Information</h6> + * <ul class='doctree'> + * <li class='link'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs'>Juneau Data Transfer Objects + * (org.apache.juneau.dto)</a> + * <ul> + * <li class='sublink'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs.HTML5'>HTML5</a> + * </ul> + * </li> + * </ul> + */ +@SuppressWarnings("hiding") +public class HtmlElementText extends HtmlElement { + + private Object text; + + /** + * Returns the inner text of this element. + * + * @return The inner text of this element, or <jk>null</jk> if no text is set. + */ + @Xml(format=XmlFormat.TEXT) + @BeanProperty("c") + public Object getText() { + return text; + } + + /** + * Sets the inner text of this element. + * + * @param text The inner text of this element, or <jk>null</jk> if no text is set. + * @return This object (for method chaining). + */ + @BeanProperty("c") + public HtmlElement setText(Object text) { + this.text = text; + return this; + } + + /** + * Sets the text node on this element. + * + * @param text The text node to add to this element. + * @return This object (for method chaining). + */ + public HtmlElement text(Object text) { + this.text = text; + return this; + } +} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/75b0d8ee/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/HtmlElementVoid.java ---------------------------------------------------------------------- diff --git a/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/HtmlElementVoid.java b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/HtmlElementVoid.java new file mode 100644 index 0000000..25bf964 --- /dev/null +++ b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/HtmlElementVoid.java @@ -0,0 +1,39 @@ +// *************************************************************************************************************************** +// * 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 static org.apache.juneau.xml.annotation.XmlFormat.*; + +import org.apache.juneau.xml.annotation.*; + +/** + * A subclass of HTML elements that have no content or end tags. + * + * <p> + * See <a href="https://www.w3.org/TR/html51/syntax.html#void-elements">void elements</a> + * + * <h6 class='topic'>Additional Information</h6> + * <ul class='doctree'> + * <li class='link'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs'>Juneau Data Transfer Objects + * (org.apache.juneau.dto)</a> + * <ul> + * <li class='sublink'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs.HTML5'>HTML5</a> + * </ul> + * </li> + * </ul> + */ +@Xml(format=VOID) +public class HtmlElementVoid extends HtmlElement { +} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/75b0d8ee/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/I.java ---------------------------------------------------------------------- diff --git a/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/I.java b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/I.java new file mode 100644 index 0000000..fa9399c --- /dev/null +++ b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/I.java @@ -0,0 +1,69 @@ +// *************************************************************************************************************************** +// * 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 class="doclink" href="https://www.w3.org/TR/html5/text-level-semantics.html#the-i-element"><i></a> + * element. + * + * <h6 class='topic'>Additional Information</h6> + * <ul class='doctree'> + * <li class='link'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs'>Juneau Data Transfer Objects + * (org.apache.juneau.dto)</a> + * <ul> + * <li class='sublink'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs.HTML5'>HTML5</a> + * </ul> + * </li> + * </ul> + */ +@Bean(typeName="i") +public class I extends HtmlElementMixed { + + //-------------------------------------------------------------------------------- + // Overridden methods + //-------------------------------------------------------------------------------- + + @Override /* HtmlElement */ + public final I _class(String _class) { + super._class(_class); + return this; + } + + @Override /* HtmlElement */ + public final I id(String id) { + super.id(id); + return this; + } + + @Override /* HtmlElement */ + public final I style(String style) { + super.style(style); + return this; + } + + @Override /* HtmlElementMixed */ + public I children(Object...children) { + super.children(children); + return this; + } + + @Override /* HtmlElementMixed */ + public I child(Object child) { + super.child(child); + return this; + } +} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/75b0d8ee/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Iframe.java ---------------------------------------------------------------------- diff --git a/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Iframe.java b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Iframe.java new file mode 100644 index 0000000..f0add3f --- /dev/null +++ b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Iframe.java @@ -0,0 +1,174 @@ +// *************************************************************************************************************************** +// * 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 java.net.*; +import java.net.URI; + +import org.apache.juneau.*; +import org.apache.juneau.annotation.*; + +/** + * DTO for an HTML <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#the-iframe-element"><iframe></a> + * element. + * + * <h6 class='topic'>Additional Information</h6> + * <ul class='doctree'> + * <li class='link'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs'>Juneau Data Transfer Objects + * (org.apache.juneau.dto)</a> + * <ul> + * <li class='sublink'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs.HTML5'>HTML5</a> + * </ul> + * </li> + * </ul> + */ +@Bean(typeName="iframe") +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. + * + * <p> + * Vertical dimension. + * + * @param height + * The new value for this attribute. + * Typically a {@link Number} or {@link String}. + * @return This object (for method chaining). + */ + public final Iframe height(Object height) { + attr("height", height); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-iframe-name">name</a> attribute. + * + * <p> + * 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) { + attr("name", name); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-iframe-sandbox">sandbox</a> + * attribute. + * + * <p> + * 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) { + attr("sandbox", sandbox); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-iframe-src">src</a> attribute. + * + * <p> + * Address of the resource. + * + * <p> + * The value can be of any of the following types: {@link URI}, {@link URL}, {@link String}. + * Strings must be valid URIs. + * + * <p> + * URIs defined by {@link UriResolver} can be used for values. + * + * @param src + * The new value for this attribute. + * Typically a {@link URL} or {@link String}. + * @return This object (for method chaining). + */ + public final Iframe src(Object src) { + attrUri("src", src); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-iframe-srcdoc">srcdoc</a> + * attribute. + * + * <p> + * 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) { + attr("srcdoc", srcdoc); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-dim-width">width</a> attribute. + * + * <p> + * Horizontal dimension. + * + * @param width + * The new value for this attribute. + * Typically a {@link Number} or {@link String}. + * @return This object (for method chaining). + */ + public final Iframe width(Object width) { + attr("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 /* HtmlElement */ + public final Iframe style(String style) { + super.style(style); + return this; + } + + @Override /* HtmlElementMixed */ + public Iframe children(Object...children) { + super.children(children); + return this; + } + + @Override /* HtmlElementMixed */ + public Iframe child(Object child) { + super.child(child); + return this; + } +} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/75b0d8ee/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Img.java ---------------------------------------------------------------------- diff --git a/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Img.java b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Img.java new file mode 100644 index 0000000..0a78701 --- /dev/null +++ b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Img.java @@ -0,0 +1,178 @@ +// *************************************************************************************************************************** +// * 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 java.net.*; +import java.net.URI; + +import org.apache.juneau.*; +import org.apache.juneau.annotation.*; + +/** + * DTO for an HTML <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#the-img-element"><img></a> + * element. + * + * <h6 class='topic'>Additional Information</h6> + * <ul class='doctree'> + * <li class='link'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs'>Juneau Data Transfer Objects + * (org.apache.juneau.dto)</a> + * <ul> + * <li class='sublink'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs.HTML5'>HTML5</a> + * </ul> + * </li> + * </ul> + */ +@Bean(typeName="img") +public class Img extends HtmlElementVoid { + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-img-alt">alt</a> attribute. + * + * <p> + * 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) { + attr("alt", alt); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-img-crossorigin">crossorigin</a> + * attribute. + * + * <p> + * How the element handles cross-origin requests. + * + * @param crossorigin The new value for this attribute. + * @return This object (for method chaining). + */ + public final Img crossorigin(String crossorigin) { + attr("crossorigin", crossorigin); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-dim-height">height</a> + * attribute. + * + * <p> + * Vertical dimension. + * + * @param height + * The new value for this attribute. + * Typically a {@link Number} or {@link String}. + * @return This object (for method chaining). + */ + public final Img height(Object height) { + attr("height", height); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-img-ismap">ismap</a> attribute. + * + * <p> + * Whether the image is a server-side image map. + * + * @param ismap + * The new value for this attribute. + * Typically a {@link Boolean} or {@link String}. + * @return This object (for method chaining). + */ + public final Img ismap(Object ismap) { + attr("ismap", ismap); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-img-src">src</a> attribute. + * + * <p> + * Address of the resource. + * + * <p> + * The value can be of any of the following types: {@link URI}, {@link URL}, {@link String}. + * Strings must be valid URIs. + * + * <p> + * URIs defined by {@link UriResolver} can be used for values. + * + * @param src + * The new value for this attribute. + * Typically a {@link URL} or {@link String}. + * @return This object (for method chaining). + */ + public final Img src(Object src) { + attrUri("src", src); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-hyperlink-usemap">usemap</a> + * attribute. + * + * <p> + * 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) { + attr("usemap", usemap); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-dim-width">width</a> attribute. + * + * <p> + * Horizontal dimension. + * + * @param width + * The new value for this attribute. + * Typically a {@link Number} or {@link String}. + * @return This object (for method chaining). + */ + public final Img width(Object width) { + attr("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; + } + + @Override /* HtmlElement */ + public final Img style(String style) { + super.style(style); + return this; + } +} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/75b0d8ee/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Input.java ---------------------------------------------------------------------- diff --git a/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Input.java b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Input.java new file mode 100644 index 0000000..1cf0520 --- /dev/null +++ b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Input.java @@ -0,0 +1,550 @@ +// *************************************************************************************************************************** +// * 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 java.net.*; + +import org.apache.juneau.annotation.*; + +/** + * DTO for an HTML <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#the-input-element"><input></a> + * element. + * + * <h6 class='topic'>Additional Information</h6> + * <ul class='doctree'> + * <li class='link'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs'>Juneau Data Transfer Objects + * (org.apache.juneau.dto)</a> + * <ul> + * <li class='sublink'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs.HTML5'>HTML5</a> + * </ul> + * </li> + * </ul> + */ +@Bean(typeName="input") +public class Input extends HtmlElementVoid { + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-input-accept">accept</a> attribute. + * + * <p> + * 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) { + attr("accept", accept); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-input-alt">alt</a> attribute. + * + * <p> + * 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) { + attr("alt", alt); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-fe-autocomplete">autocomplete</a> attribute. + * + * <p> + * Hint for form auto-fill feature. + * + * @param autocomplete The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input autocomplete(String autocomplete) { + attr("autocomplete", autocomplete); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-fe-autofocus">autofocus</a> attribute. + * + * <p> + * 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) { + attr("autofocus", autofocus); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-input-checked">checked</a> attribute. + * + * <p> + * Whether the command or control is checked. + * + * @param checked + * The new value for this attribute. + * Typically a {@link Boolean} or {@link String}. + * @return This object (for method chaining). + */ + public final Input checked(Object checked) { + attr("checked", checked); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-fe-dirname">dirname</a> attribute. + * + * <p> + * 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) { + attr("dirname", dirname); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-fe-disabled">disabled</a> attribute. + * + * <p> + * Whether the form control is disabled. + * + * @param disabled + * The new value for this attribute. + * Typically a {@link Boolean} or {@link String}. + * @return This object (for method chaining). + */ + public final Input disabled(Object disabled) { + attr("disabled", disabled); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-fae-form">form</a> attribute. + * + * <p> + * 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) { + attr("form", form); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-fs-formaction">formaction</a> attribute. + * + * <p> + * 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) { + attr("formaction", formaction); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-fs-formenctype">formenctype</a> attribute. + * + * <p> + * 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) { + attr("formenctype", formenctype); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-fs-formmethod">formmethod</a> attribute. + * + * <p> + * 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) { + attr("formmethod", formmethod); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-fs-formnovalidate">formnovalidate</a> + * attribute. + * + * <p> + * 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) { + attr("formnovalidate", formnovalidate); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-fs-formtarget">formtarget</a> attribute. + * + * <p> + * 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) { + attr("formtarget", formtarget); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-dim-height">height</a> + * attribute. + * + * <p> + * Vertical dimension. + * + * @param height + * The new value for this attribute. + * Typically a {@link Number} or {@link String}. + * @return This object (for method chaining). + */ + public final Input height(Object height) { + attr("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) { + attr("inputmode", inputmode); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-input-list">list</a> attribute. + * + * <p> + * List of auto-complete options. + * + * @param list The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input list(String list) { + attr("list", list); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-input-max">max</a> attribute. + * + * <p> + * Maximum value. + * + * @param max + * The new value for this attribute. + * Typically a {@link Number} or {@link String}. + * @return This object (for method chaining). + */ + public final Input max(Object max) { + attr("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. + * Typically a {@link Number} or {@link String}. + * @return This object (for method chaining). + */ + public final Input maxlength(Object maxlength) { + attr("maxlength", maxlength); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-input-min">min</a> attribute. + * + * <p> + * Minimum value. + * + * @param min + * The new value for this attribute. + * Typically a {@link Number} or {@link String}. + * @return This object (for method chaining). + */ + public final Input min(Object min) { + attr("min", min); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-input-minlength">minlength</a> attribute. + * + * <p> + * Minimum length of value. + * + * @param minlength + * The new value for this attribute. + * Typically a {@link Number} or {@link String}. + * @return This object (for method chaining). + */ + public final Input minlength(Object minlength) { + attr("minlength", minlength); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-input-multiple">multiple</a> attribute. + * + * <p> + * Whether to allow multiple values. + * + * @param multiple + * The new value for this attribute. + * Typically a {@link Boolean} or {@link String}. + * @return This object (for method chaining). + */ + public final Input multiple(Object multiple) { + attr("multiple", multiple); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-fe-name">name</a> attribute. + * + * <p> + * 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) { + attr("name", name); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-input-pattern">pattern</a> attribute. + * + * <p> + * 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) { + attr("pattern", pattern); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-input-placeholder">placeholder</a> attribute. + * + * <p> + * 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) { + attr("placeholder", placeholder); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-input-readonly">readonly</a> attribute. + * + * <p> + * Whether to allow the value to be edited by the user. + * + * @param readonly + * The new value for this attribute. + * Typically a {@link Boolean} or {@link String}. + * @return This object (for method chaining). + */ + public final Input readonly(Object readonly) { + attr("readonly", readonly); + return this; + } + + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-input-readonly">readonly</a> attribute. + * + * <p> + * Whether to allow the value to be edited by the user. + * + * @param readonly If <jk>true</jk>, adds <code>readonly="readonly"</code>. + * @return This object (for method chaining). + */ + public final Input readonly(boolean readonly) { + if (readonly) + readonly("readonly"); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-input-readonly">required</a> attribute. + * + * <p> + * Whether the control is required for form submission. + * + * @param required + * The new value for this attribute. + * Typically a {@link Boolean} or {@link String}. + * @return This object (for method chaining). + */ + public final Input required(Object required) { + attr("required", required); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-input-size">size</a> attribute. + * + * <p> + * Size of the control. + * + * @param size + * The new value for this attribute. + * Typically a {@link Number} or {@link String}. + * @return This object (for method chaining). + */ + public final Input size(Object size) { + attr("size", size); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-input-src">src</a> attribute. + * + * <p> + * Address of the resource. + * + * @param src + * The new value for this attribute. + * Typically a {@link URL} or {@link String}. + * @return This object (for method chaining). + */ + public final Input src(Object src) { + attr("src", src); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-input-step">step</a> attribute. + * + * <p> + * 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) { + attr("step", step); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-input-type">type</a> attribute. + * + * <p> + * Type of form control. + * + * @param type The new value for this attribute. + * @return This object (for method chaining). + */ + public final Input type(String type) { + attr("type", type); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-input-value">value</a> attribute. + * + * <p> + * Value of the form control. + * + * @param value + * The new value for this attribute. + * Typically a {@link Number} or {@link String}. + * @return This object (for method chaining). + */ + public final Input value(Object value) { + attr("value", value); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-dim-width">width</a> attribute. + * + * <p> + * Horizontal dimension. + * + * @param width + * The new value for this attribute. + * Typically a {@link Number} or {@link String}. + * @return This object (for method chaining). + */ + public final Input width(Object width) { + attr("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; + } + + @Override /* HtmlElement */ + public final Input style(String style) { + super.style(style); + return this; + } +} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/75b0d8ee/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Ins.java ---------------------------------------------------------------------- diff --git a/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Ins.java b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Ins.java new file mode 100644 index 0000000..820f303 --- /dev/null +++ b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Ins.java @@ -0,0 +1,98 @@ +// *************************************************************************************************************************** +// * 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 class="doclink" href="https://www.w3.org/TR/html5/edits.html#the-ins-element"><ins></a> + * element. + * + * <h6 class='topic'>Additional Information</h6> + * <ul class='doctree'> + * <li class='link'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs'>Juneau Data Transfer Objects + * (org.apache.juneau.dto)</a> + * <ul> + * <li class='sublink'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs.HTML5'>HTML5</a> + * </ul> + * </li> + * </ul> + */ +@Bean(typeName="ins") +public class Ins extends HtmlElementMixed { + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/edits.html#attr-mod-cite">cite</a> attribute. + * + * <p> + * 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) { + attr("cite", cite); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/edits.html#attr-mod-datetime">datetime</a> attribute. + * + * <p> + * 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) { + attr("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 /* HtmlElement */ + public final Ins style(String style) { + super.style(style); + return this; + } + + @Override /* HtmlElementMixed */ + public Ins children(Object...children) { + super.children(children); + return this; + } + + @Override /* HtmlElementMixed */ + public Ins child(Object child) { + super.child(child); + return this; + } +} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/75b0d8ee/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Kbd.java ---------------------------------------------------------------------- diff --git a/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Kbd.java b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Kbd.java new file mode 100644 index 0000000..1b4b857 --- /dev/null +++ b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Kbd.java @@ -0,0 +1,69 @@ +// *************************************************************************************************************************** +// * 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 class="doclink" href="https://www.w3.org/TR/html5/text-level-semantics.html#the-kbd-element"><kbd></a> + * element. + * + * <h6 class='topic'>Additional Information</h6> + * <ul class='doctree'> + * <li class='link'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs'>Juneau Data Transfer Objects + * (org.apache.juneau.dto)</a> + * <ul> + * <li class='sublink'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs.HTML5'>HTML5</a> + * </ul> + * </li> + * </ul> + */ +@Bean(typeName="kbd") +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 /* HtmlElement */ + public final Kbd style(String style) { + super.style(style); + return this; + } + + @Override /* HtmlElementMixed */ + public Kbd children(Object...children) { + super.children(children); + return this; + } + + @Override /* HtmlElementMixed */ + public Kbd child(Object child) { + super.child(child); + return this; + } +} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/75b0d8ee/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Keygen.java ---------------------------------------------------------------------- diff --git a/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Keygen.java b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Keygen.java new file mode 100644 index 0000000..176cafe --- /dev/null +++ b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Keygen.java @@ -0,0 +1,146 @@ +// *************************************************************************************************************************** +// * 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 class="doclink" href="https://www.w3.org/TR/html5/forms.html#the-keygen-element"><keygen></a> + * element. + * + * <h6 class='topic'>Additional Information</h6> + * <ul class='doctree'> + * <li class='link'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs'>Juneau Data Transfer Objects + * (org.apache.juneau.dto)</a> + * <ul> + * <li class='sublink'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs.HTML5'>HTML5</a> + * </ul> + * </li> + * </ul> + */ +@Bean(typeName="keygen") +public class Keygen extends HtmlElementVoid { + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-fe-autofocus">autofocus</a> attribute. + * + * <p> + * Automatically focus the form control when the page is loaded. + * + * @param autofocus + * The new value for this attribute. + * Typically a {@link Boolean} or {@link String}. + * @return This object (for method chaining). + */ + public final Keygen autofocus(Object autofocus) { + attr("autofocus", autofocus); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-keygen-challenge">challenge</a> attribute. + * + * <p> + * 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) { + attr("challenge", challenge); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-fe-disabled">disabled</a> attribute. + * + * <p> + * Whether the form control is disabled. + * + * @param disabled + * The new value for this attribute. + * Typically a {@link Boolean} or {@link String}. + * @return This object (for method chaining). + */ + public final Keygen disabled(Object disabled) { + attr("disabled", disabled); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-fae-form">form</a> attribute. + * + * <p> + * 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) { + attr("form", form); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-keygen-keytype">keytype</a> attribute. + * + * <p> + * 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) { + attr("keytype", keytype); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-fe-name">name</a> attribute. + * + * <p> + * 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) { + attr("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; + } + + @Override /* HtmlElement */ + public final Keygen style(String style) { + super.style(style); + return this; + } +} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/75b0d8ee/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Label.java ---------------------------------------------------------------------- diff --git a/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Label.java b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Label.java new file mode 100644 index 0000000..d9f366e --- /dev/null +++ b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Label.java @@ -0,0 +1,98 @@ +// *************************************************************************************************************************** +// * 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 class="doclink" href="https://www.w3.org/TR/html5/forms.html#the-label-element"><label></a> + * element. + * + * <h6 class='topic'>Additional Information</h6> + * <ul class='doctree'> + * <li class='link'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs'>Juneau Data Transfer Objects + * (org.apache.juneau.dto)</a> + * <ul> + * <li class='sublink'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs.HTML5'>HTML5</a> + * </ul> + * </li> + * </ul> + */ +@Bean(typeName="label") +public class Label extends HtmlElementMixed { + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-label-for">for</a> attribute. + * + * <p> + * 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) { + attr("for", _for); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-fae-form">form</a> attribute. + * + * <p> + * 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) { + attr("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 /* HtmlElement */ + public final Label style(String style) { + super.style(style); + return this; + } + + @Override /* HtmlElementMixed */ + public Label children(Object...children) { + super.children(children); + return this; + } + + @Override /* HtmlElementMixed */ + public Label child(Object child) { + super.child(child); + return this; + } +} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/75b0d8ee/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Legend.java ---------------------------------------------------------------------- diff --git a/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Legend.java b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Legend.java new file mode 100644 index 0000000..c2a06cf --- /dev/null +++ b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Legend.java @@ -0,0 +1,69 @@ +// *************************************************************************************************************************** +// * 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 class="doclink" href="https://www.w3.org/TR/html5/forms.html#the-legend-element"><legend></a> + * element. + * + * <h6 class='topic'>Additional Information</h6> + * <ul class='doctree'> + * <li class='link'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs'>Juneau Data Transfer Objects + * (org.apache.juneau.dto)</a> + * <ul> + * <li class='sublink'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs.HTML5'>HTML5</a> + * </ul> + * </li> + * </ul> + */ +@Bean(typeName="legend") +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 /* HtmlElement */ + public final Legend style(String style) { + super.style(style); + return this; + } + + @Override /* HtmlElementMixed */ + public Legend children(Object...children) { + super.children(children); + return this; + } + + @Override /* HtmlElementMixed */ + public Legend child(Object child) { + super.child(child); + return this; + } +} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/75b0d8ee/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Li.java ---------------------------------------------------------------------- diff --git a/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Li.java b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Li.java new file mode 100644 index 0000000..8b7debc --- /dev/null +++ b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Li.java @@ -0,0 +1,69 @@ +// *************************************************************************************************************************** +// * 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 class="doclink" href="https://www.w3.org/TR/html5/grouping-content.html#the-li-element"><li></a> + * element. + * + * <h6 class='topic'>Additional Information</h6> + * <ul class='doctree'> + * <li class='link'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs'>Juneau Data Transfer Objects + * (org.apache.juneau.dto)</a> + * <ul> + * <li class='sublink'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs.HTML5'>HTML5</a> + * </ul> + * </li> + * </ul> + */ +@Bean(typeName="li") +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 /* HtmlElement */ + public final Li style(String style) { + super.style(style); + return this; + } + + @Override /* HtmlElementMixed */ + public Li children(Object...children) { + super.children(children); + return this; + } + + @Override /* HtmlElementMixed */ + public Li child(Object child) { + super.child(child); + return this; + } +} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/75b0d8ee/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Link.java ---------------------------------------------------------------------- diff --git a/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Link.java b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Link.java new file mode 100644 index 0000000..48cc15c --- /dev/null +++ b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Link.java @@ -0,0 +1,171 @@ +// *************************************************************************************************************************** +// * 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 java.net.*; +import java.net.URI; + +import org.apache.juneau.*; +import org.apache.juneau.annotation.*; + +/** + * DTO for an HTML <a class="doclink" href="https://www.w3.org/TR/html5/document-metadata.html#the-link-element"><link></a> + * element. + * + * <h6 class='topic'>Additional Information</h6> + * <ul class='doctree'> + * <li class='link'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs'>Juneau Data Transfer Objects + * (org.apache.juneau.dto)</a> + * <ul> + * <li class='sublink'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs.HTML5'>HTML5</a> + * </ul> + * </li> + * </ul> + */ +@Bean(typeName="link") +public class Link extends HtmlElementVoid { + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/document-metadata.html#attr-link-crossorigin">crossorigin</a> + * attribute. + * + * <p> + * How the element handles cross-origin requests. + * + * @param crossorigin The new value for this attribute. + * @return This object (for method chaining). + */ + public final Link crossorigin(String crossorigin) { + attr("crossorigin", crossorigin); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/document-metadata.html#attr-link-href">href</a> attribute. + * + * <p> + * Address of the hyperlink. + * + * <p> + * The value can be of any of the following types: {@link URI}, {@link URL}, {@link String}. + * Strings must be valid URIs. + * + * <p> + * URIs defined by {@link UriResolver} can be used for values. + * + * @param href + * The new value for this attribute. + * Typically a {@link URL} or {@link String}. + * @return This object (for method chaining). + */ + public final Link href(Object href) { + attrUri("href", href); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/document-metadata.html#attr-link-hreflang">hreflang</a> + * attribute. + * + * <p> + * 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) { + attr("hreflang", hreflang); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/document-metadata.html#attr-link-media">media</a> attribute. + * + * <p> + * Applicable media. + * + * @param media The new value for this attribute. + * @return This object (for method chaining). + */ + public final Link media(String media) { + attr("media", media); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/document-metadata.html#attr-link-rel">rel</a> attribute. + * + * <p> + * 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) { + attr("rel", rel); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/links.html#attr-link-sizes">sizes</a> attribute. + * + * <p> + * 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) { + attr("sizes", sizes); + return this; + } + + /** + * <a class="doclink" href="https://www.w3.org/TR/html5/document-metadata.html#attr-link-type">type</a> attribute. + * + * <p> + * 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) { + attr("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; + } + + @Override /* HtmlElement */ + public final Link style(String style) { + super.style(style); + return this; + } +} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/75b0d8ee/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Main.java ---------------------------------------------------------------------- diff --git a/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Main.java b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Main.java new file mode 100644 index 0000000..f34d0a4 --- /dev/null +++ b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Main.java @@ -0,0 +1,69 @@ +// *************************************************************************************************************************** +// * 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 class="doclink" href="https://www.w3.org/TR/html5/grouping-content.html#the-main-element"><main></a> + * element. + * + * <h6 class='topic'>Additional Information</h6> + * <ul class='doctree'> + * <li class='link'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs'>Juneau Data Transfer Objects + * (org.apache.juneau.dto)</a> + * <ul> + * <li class='sublink'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs.HTML5'>HTML5</a> + * </ul> + * </li> + * </ul> + */ +@Bean(typeName="main") +public class Main extends HtmlElementContainer { + + //-------------------------------------------------------------------------------- + // Overridden methods + //-------------------------------------------------------------------------------- + + @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; + } + + @Override /* HtmlElement */ + public final Main style(String style) { + super.style(style); + return this; + } + + @Override /* HtmlElementContainer */ + public final Main children(Object...children) { + super.children(children); + return this; + } + + @Override /* HtmlElementContainer */ + public final Main child(Object child) { + super.child(child); + return this; + } +} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/75b0d8ee/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Map.java ---------------------------------------------------------------------- diff --git a/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Map.java b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Map.java new file mode 100644 index 0000000..b8bcfba --- /dev/null +++ b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Map.java @@ -0,0 +1,84 @@ +// *************************************************************************************************************************** +// * 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 class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#the-map-element"><map></a> + * element. + * + * <h6 class='topic'>Additional Information</h6> + * <ul class='doctree'> + * <li class='link'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs'>Juneau Data Transfer Objects + * (org.apache.juneau.dto)</a> + * <ul> + * <li class='sublink'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs.HTML5'>HTML5</a> + * </ul> + * </li> + * </ul> + */ +@Bean(typeName="map") +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. + * + * <p> + * 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) { + attr("name", name); + return this; + } + + + //-------------------------------------------------------------------------------- + // Overridden methods + //-------------------------------------------------------------------------------- + + @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; + } + + @Override /* HtmlElement */ + public final Map style(String style) { + super.style(style); + return this; + } + + @Override /* HtmlElementContainer */ + public final Map children(Object...children) { + super.children(children); + return this; + } + + @Override /* HtmlElementContainer */ + public final Map child(Object child) { + super.child(child); + return this; + } +} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/75b0d8ee/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Mark.java ---------------------------------------------------------------------- diff --git a/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Mark.java b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Mark.java new file mode 100644 index 0000000..38d70c5 --- /dev/null +++ b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/html5/Mark.java @@ -0,0 +1,69 @@ +// *************************************************************************************************************************** +// * 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 class="doclink" href="https://www.w3.org/TR/html5/text-level-semantics.html#the-mark-element"><mark></a> + * element. + * + * <h6 class='topic'>Additional Information</h6> + * <ul class='doctree'> + * <li class='link'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs'>Juneau Data Transfer Objects + * (org.apache.juneau.dto)</a> + * <ul> + * <li class='sublink'> + * <a class='doclink' href='../../../../../overview-summary.html#DTOs.HTML5'>HTML5</a> + * </ul> + * </li> + * </ul> + */ +@Bean(typeName="mark") +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 /* HtmlElement */ + public final Mark style(String style) { + super.style(style); + return this; + } + + @Override /* HtmlElementMixed */ + public Mark children(Object...children) { + super.children(children); + return this; + } + + @Override /* HtmlElementMixed */ + public Mark child(Object child) { + super.child(child); + return this; + } +}
