001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.apache.juneau.bean.html5; 018 019import org.apache.juneau.annotation.*; 020import org.apache.juneau.internal.*; 021 022/** 023 * DTO for an HTML <a class="doclink" href="https://www.w3.org/TR/html5/edits.html#the-ins-element"><ins></a> 024 * element. 025 * 026 * <p> 027 * The ins element represents a range of text that has been added to a document. It is used to 028 * mark up content that has been inserted or added to the document, typically in the context of 029 * document editing or version control. The ins element can contain any flow content and is 030 * commonly used with the del element to show document changes. It is typically rendered with 031 * an underline or other visual indication to show that the content has been added. 032 * 033 * <h5 class='section'>Examples:</h5> 034 * <p class='bcode w800'> 035 * <jk>import static</jk> org.apache.juneau.bean.html5.HtmlBuilder.*; 036 * 037 * <jc>// Simple inserted text</jc> 038 * Ins <jv>simple</jv> = <jsm>ins</jsm>(<js>"This text was added"</js>); 039 * 040 * <jc>// Ins with styling</jc> 041 * Ins <jv>styled</jv> = <jsm>ins</jsm>(<js>"Styled inserted text"</js>) 042 * ._class(<js>"insertion"</js>); 043 * 044 * <jc>// Ins with complex content</jc> 045 * Ins <jv>complex</jv> = <jsm>ins</jsm>( 046 * <js>"The "</js>, 047 * <jsm>strong</jsm>(<js>"new feature"</js>), 048 * <js>" has been added to the system."</js> 049 * ); 050 * 051 * <jc>// Ins with ID</jc> 052 * Ins <jv>withId</jv> = <jsm>ins</jsm>(<js>"Text with ID"</js>) 053 * .id(<js>"inserted-text"</js>); 054 * 055 * <jc>// Ins with styling</jc> 056 * Ins <jv>styled2</jv> = <jsm>ins</jsm>(<js>"Custom styled inserted text"</js>) 057 * .style(<js>"background-color: #d4edda; color: #155724; text-decoration: underline;"</js>); 058 * 059 * <jc>// Ins with multiple elements</jc> 060 * Ins <jv>multiple</jv> = <jsm>ins</jsm>( 061 * <js>"The "</js>, 062 * <jsm>ins</jsm>(<js>"new section"</js>), 063 * <js>" has been "</js>, 064 * <jsm>ins</jsm>(<js>"added"</js>), 065 * <js>" to the document."</js> 066 * ); 067 * 068 * <jc>// Ins with links</jc> 069 * Ins <jv>withLinks</jv> = <jsm>ins</jsm>( 070 * <js>"See "</js>, 071 * <jsm>a</jsm>(<js>"/changes"</js>, <js>"change log"</js>), 072 * <js>" for more details."</js> 073 * ); 074 * </p> 075 * 076 * <p> 077 * The following convenience methods are provided for constructing instances of this bean: 078 * <ul class='javatree'> 079 * <li class='jc'>{@link HtmlBuilder} 080 * <ul class='javatree'> 081 * <li class='jm'>{@link HtmlBuilder#ins() ins()} 082 * <li class='jm'>{@link HtmlBuilder#ins(Object, Object...) ins(Object, Object...)} 083 * </ul> 084 * </ul> 085 * </p> 086 * 087 * <h5 class='section'>See Also:</h5><ul> 088 * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a> 089 * </ul> 090 */ 091@Bean(typeName="ins") 092public class Ins extends HtmlElementMixed { 093 094 /** 095 * Creates an empty {@link Ins} element. 096 */ 097 public Ins() {} 098 099 /** 100 * Creates an {@link Ins} element with the specified child nodes. 101 * 102 * @param children The child nodes. 103 */ 104 public Ins(Object...children) { 105 children(children); 106 } 107 108 /** 109 * <a class="doclink" href="https://www.w3.org/TR/html5/edits.html#attr-mod-cite">cite</a> attribute. 110 * 111 * <p> 112 * Link to the source of the quotation or more information about the edit. 113 * 114 * @param cite The new value for this attribute. 115 * @return This object. 116 */ 117 public Ins cite(String value) { 118 attr("cite", value); 119 return this; 120 } 121 122 /** 123 * <a class="doclink" href="https://www.w3.org/TR/html5/edits.html#attr-mod-datetime">datetime</a> attribute. 124 * 125 * <p> 126 * Date and (optionally) time of the change. 127 * 128 * @param datetime The new value for this attribute. 129 * @return This object. 130 */ 131 public Ins datetime(String value) { 132 attr("datetime", value); 133 return this; 134 } 135 136 //----------------------------------------------------------------------------------------------------------------- 137 // Overridden methods 138 //----------------------------------------------------------------------------------------------------------------- 139 @Override /* Overridden from HtmlElement */ 140 public Ins _class(String value) { // NOSONAR - Intentional naming. 141 super._class(value); 142 return this; 143 } 144 145 @Override /* Overridden from HtmlElement */ 146 public Ins accesskey(String value) { 147 super.accesskey(value); 148 return this; 149 } 150 151 @Override /* Overridden from HtmlElement */ 152 public Ins contenteditable(Object value) { 153 super.contenteditable(value); 154 return this; 155 } 156 157 @Override /* Overridden from HtmlElement */ 158 public Ins dir(String value) { 159 super.dir(value); 160 return this; 161 } 162 163 @Override /* Overridden from HtmlElement */ 164 public Ins hidden(Object value) { 165 super.hidden(value); 166 return this; 167 } 168 169 @Override /* Overridden from HtmlElement */ 170 public Ins id(String value) { 171 super.id(value); 172 return this; 173 } 174 175 @Override /* Overridden from HtmlElement */ 176 public Ins lang(String value) { 177 super.lang(value); 178 return this; 179 } 180 181 @Override /* Overridden from HtmlElement */ 182 public Ins onabort(String value) { 183 super.onabort(value); 184 return this; 185 } 186 187 @Override /* Overridden from HtmlElement */ 188 public Ins onblur(String value) { 189 super.onblur(value); 190 return this; 191 } 192 193 @Override /* Overridden from HtmlElement */ 194 public Ins oncancel(String value) { 195 super.oncancel(value); 196 return this; 197 } 198 199 @Override /* Overridden from HtmlElement */ 200 public Ins oncanplay(String value) { 201 super.oncanplay(value); 202 return this; 203 } 204 205 @Override /* Overridden from HtmlElement */ 206 public Ins oncanplaythrough(String value) { 207 super.oncanplaythrough(value); 208 return this; 209 } 210 211 @Override /* Overridden from HtmlElement */ 212 public Ins onchange(String value) { 213 super.onchange(value); 214 return this; 215 } 216 217 @Override /* Overridden from HtmlElement */ 218 public Ins onclick(String value) { 219 super.onclick(value); 220 return this; 221 } 222 223 @Override /* Overridden from HtmlElement */ 224 public Ins oncuechange(String value) { 225 super.oncuechange(value); 226 return this; 227 } 228 229 @Override /* Overridden from HtmlElement */ 230 public Ins ondblclick(String value) { 231 super.ondblclick(value); 232 return this; 233 } 234 235 @Override /* Overridden from HtmlElement */ 236 public Ins ondurationchange(String value) { 237 super.ondurationchange(value); 238 return this; 239 } 240 241 @Override /* Overridden from HtmlElement */ 242 public Ins onemptied(String value) { 243 super.onemptied(value); 244 return this; 245 } 246 247 @Override /* Overridden from HtmlElement */ 248 public Ins onended(String value) { 249 super.onended(value); 250 return this; 251 } 252 253 @Override /* Overridden from HtmlElement */ 254 public Ins onerror(String value) { 255 super.onerror(value); 256 return this; 257 } 258 259 @Override /* Overridden from HtmlElement */ 260 public Ins onfocus(String value) { 261 super.onfocus(value); 262 return this; 263 } 264 265 @Override /* Overridden from HtmlElement */ 266 public Ins oninput(String value) { 267 super.oninput(value); 268 return this; 269 } 270 271 @Override /* Overridden from HtmlElement */ 272 public Ins oninvalid(String value) { 273 super.oninvalid(value); 274 return this; 275 } 276 277 @Override /* Overridden from HtmlElement */ 278 public Ins onkeydown(String value) { 279 super.onkeydown(value); 280 return this; 281 } 282 283 @Override /* Overridden from HtmlElement */ 284 public Ins onkeypress(String value) { 285 super.onkeypress(value); 286 return this; 287 } 288 289 @Override /* Overridden from HtmlElement */ 290 public Ins onkeyup(String value) { 291 super.onkeyup(value); 292 return this; 293 } 294 295 @Override /* Overridden from HtmlElement */ 296 public Ins onload(String value) { 297 super.onload(value); 298 return this; 299 } 300 301 @Override /* Overridden from HtmlElement */ 302 public Ins onloadeddata(String value) { 303 super.onloadeddata(value); 304 return this; 305 } 306 307 @Override /* Overridden from HtmlElement */ 308 public Ins onloadedmetadata(String value) { 309 super.onloadedmetadata(value); 310 return this; 311 } 312 313 @Override /* Overridden from HtmlElement */ 314 public Ins onloadstart(String value) { 315 super.onloadstart(value); 316 return this; 317 } 318 319 @Override /* Overridden from HtmlElement */ 320 public Ins onmousedown(String value) { 321 super.onmousedown(value); 322 return this; 323 } 324 325 @Override /* Overridden from HtmlElement */ 326 public Ins onmouseenter(String value) { 327 super.onmouseenter(value); 328 return this; 329 } 330 331 @Override /* Overridden from HtmlElement */ 332 public Ins onmouseleave(String value) { 333 super.onmouseleave(value); 334 return this; 335 } 336 337 @Override /* Overridden from HtmlElement */ 338 public Ins onmousemove(String value) { 339 super.onmousemove(value); 340 return this; 341 } 342 343 @Override /* Overridden from HtmlElement */ 344 public Ins onmouseout(String value) { 345 super.onmouseout(value); 346 return this; 347 } 348 349 @Override /* Overridden from HtmlElement */ 350 public Ins onmouseover(String value) { 351 super.onmouseover(value); 352 return this; 353 } 354 355 @Override /* Overridden from HtmlElement */ 356 public Ins onmouseup(String value) { 357 super.onmouseup(value); 358 return this; 359 } 360 361 @Override /* Overridden from HtmlElement */ 362 public Ins onmousewheel(String value) { 363 super.onmousewheel(value); 364 return this; 365 } 366 367 @Override /* Overridden from HtmlElement */ 368 public Ins onpause(String value) { 369 super.onpause(value); 370 return this; 371 } 372 373 @Override /* Overridden from HtmlElement */ 374 public Ins onplay(String value) { 375 super.onplay(value); 376 return this; 377 } 378 379 @Override /* Overridden from HtmlElement */ 380 public Ins onplaying(String value) { 381 super.onplaying(value); 382 return this; 383 } 384 385 @Override /* Overridden from HtmlElement */ 386 public Ins onprogress(String value) { 387 super.onprogress(value); 388 return this; 389 } 390 391 @Override /* Overridden from HtmlElement */ 392 public Ins onratechange(String value) { 393 super.onratechange(value); 394 return this; 395 } 396 397 @Override /* Overridden from HtmlElement */ 398 public Ins onreset(String value) { 399 super.onreset(value); 400 return this; 401 } 402 403 @Override /* Overridden from HtmlElement */ 404 public Ins onresize(String value) { 405 super.onresize(value); 406 return this; 407 } 408 409 @Override /* Overridden from HtmlElement */ 410 public Ins onscroll(String value) { 411 super.onscroll(value); 412 return this; 413 } 414 415 @Override /* Overridden from HtmlElement */ 416 public Ins onseeked(String value) { 417 super.onseeked(value); 418 return this; 419 } 420 421 @Override /* Overridden from HtmlElement */ 422 public Ins onseeking(String value) { 423 super.onseeking(value); 424 return this; 425 } 426 427 @Override /* Overridden from HtmlElement */ 428 public Ins onselect(String value) { 429 super.onselect(value); 430 return this; 431 } 432 433 @Override /* Overridden from HtmlElement */ 434 public Ins onshow(String value) { 435 super.onshow(value); 436 return this; 437 } 438 439 @Override /* Overridden from HtmlElement */ 440 public Ins onstalled(String value) { 441 super.onstalled(value); 442 return this; 443 } 444 445 @Override /* Overridden from HtmlElement */ 446 public Ins onsubmit(String value) { 447 super.onsubmit(value); 448 return this; 449 } 450 451 @Override /* Overridden from HtmlElement */ 452 public Ins onsuspend(String value) { 453 super.onsuspend(value); 454 return this; 455 } 456 457 @Override /* Overridden from HtmlElement */ 458 public Ins ontimeupdate(String value) { 459 super.ontimeupdate(value); 460 return this; 461 } 462 463 @Override /* Overridden from HtmlElement */ 464 public Ins ontoggle(String value) { 465 super.ontoggle(value); 466 return this; 467 } 468 469 @Override /* Overridden from HtmlElement */ 470 public Ins onvolumechange(String value) { 471 super.onvolumechange(value); 472 return this; 473 } 474 475 @Override /* Overridden from HtmlElement */ 476 public Ins onwaiting(String value) { 477 super.onwaiting(value); 478 return this; 479 } 480 481 @Override /* Overridden from HtmlElement */ 482 public Ins spellcheck(Object value) { 483 super.spellcheck(value); 484 return this; 485 } 486 487 @Override /* Overridden from HtmlElement */ 488 public Ins style(String value) { 489 super.style(value); 490 return this; 491 } 492 493 @Override /* Overridden from HtmlElement */ 494 public Ins tabindex(Object value) { 495 super.tabindex(value); 496 return this; 497 } 498 499 @Override /* Overridden from HtmlElement */ 500 public Ins title(String value) { 501 super.title(value); 502 return this; 503 } 504 505 @Override /* Overridden from HtmlElement */ 506 public Ins translate(Object value) { 507 super.translate(value); 508 return this; 509 } 510 511 @Override /* Overridden from HtmlElementMixed */ 512 public Ins child(Object value) { 513 super.child(value); 514 return this; 515 } 516 517 @Override /* Overridden from HtmlElementMixed */ 518 public Ins children(Object...value) { 519 super.children(value); 520 return this; 521 } 522}