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.marshall.*;
020
021/**
022 * DTO for an HTML <a class="doclink" href="https://www.w3.org/TR/html5/sections.html#the-address-element">&lt;address&gt;</a>
023 * element.
024 *
025 * <p>
026 * The address element represents the contact information for its nearest article or body element
027 * ancestor. It is used to provide contact details such as physical addresses, email addresses,
028 * phone numbers, or other contact information. The address element should not be used for arbitrary
029 * addresses, but specifically for contact information related to the document or article.
030 *
031 * <h5 class='section'>Examples:</h5>
032 * <p class='bcode w800'>
033 *    <jk>import static</jk> org.apache.juneau.bean.html5.HtmlBuilder.*;
034 *
035 *    <jc>// Simple contact address</jc>
036 *    Address <jv>simple</jv> = <jsm>address</jsm>(<js>"123 Main Street, Anytown, ST 12345"</js>);
037 *
038 *    <jc>// Contact information with multiple elements</jc>
039 *    Address <jv>contact</jv> = <jsm>address</jsm>(
040 *       <js>"John Doe"</js>,
041 *       <jsm>br</jsm>(),
042 *       <js>"123 Main Street"</js>,
043 *       <jsm>br</jsm>(),
044 *       <js>"Anytown, ST 12345"</js>,
045 *       <jsm>br</jsm>(),
046 *       <jsm>a</jsm>(<js>"mailto:john@example.com"</js>, <js>"john@example.com"</js>)
047 *    );
048 *
049 *    <jc>// Company address</jc>
050 *    Address <jv>company</jv> = <jsm>address</jsm>(
051 *       <js>"Acme Corporation"</js>,
052 *       <jsm>br</jsm>(),
053 *       <js>"456 Business Ave"</js>,
054 *       <jsm>br</jsm>(),
055 *       <js>"Suite 100"</js>,
056 *       <jsm>br</jsm>(),
057 *       <js>"Business City, BC 67890"</js>,
058 *       <jsm>br</jsm>(),
059 *       <js>"Phone: (555) 123-4567"</js>
060 *    );
061 *
062 *    <jc>// Styled address</jc>
063 *    Address <jv>styled</jv> = <jsm>address</jsm>(
064 *       <js>"Contact us at:"</js>,
065 *       <jsm>br</jsm>(),
066 *       <jsm>a</jsm>(<js>"mailto:info@company.com"</js>, <js>"info@company.com"</js>)
067 *    ).class_(<js>"contact-info"</js>);
068 *
069 *    <jc>// Address with multiple contact methods</jc>
070 *    Address <jv>multiple</jv> = <jsm>address</jsm>(
071 *       <js>"Support Team"</js>,
072 *       <jsm>br</jsm>(),
073 *       <js>"Email: "</js>,
074 *       <jsm>a</jsm>(<js>"mailto:support@example.com"</js>, <js>"support@example.com"</js>),
075 *       <jsm>br</jsm>(),
076 *       <js>"Phone: "</js>,
077 *       <jsm>a</jsm>(<js>"tel:+1-555-123-4567"</js>, <js>"(555) 123-4567"</js>),
078 *       <jsm>br</jsm>(),
079 *       <js>"Address: 789 Support St, Help City, HC 54321"</js>
080 *    );
081 * </p>
082 *
083 * <p>
084 * The following convenience methods are provided for constructing instances of this bean:
085 * <ul class='javatree'>
086 *    <li class='jc'>{@link HtmlBuilder}
087 *    <ul class='javatree'>
088 *       <li class='jm'>{@link HtmlBuilder#address() address()}
089 *       <li class='jm'>{@link HtmlBuilder#address(Object...) address(Object...)}
090 *    </ul>
091 * </ul>
092 * </p>
093 *
094 * <h5 class='section'>See Also:</h5><ul>
095 *    <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
096 * </ul>
097 */
098@Marshalled(typeName = "address")
099public class Address extends HtmlElementMixed<Address> {
100
101   /**
102    * Creates an empty {@link Address} element.
103    */
104   public Address() {}
105
106   /**
107    * Creates an {@link Address} element with the specified child nodes.
108    *
109    * @param children The child nodes.
110    */
111   public Address(Object...children) {
112      children(children);
113   }
114
115}