001// ***************************************************************************************************************************
002// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file *
003// * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file        *
004// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance            *
005// * with the License.  You may obtain a copy of the License at                                                              *
006// *                                                                                                                         *
007// *  http://www.apache.org/licenses/LICENSE-2.0                                                                             *
008// *                                                                                                                         *
009// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an  *
010// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the        *
011// * specific language governing permissions and limitations under the License.                                              *
012// ***************************************************************************************************************************
013package org.apache.juneau.dto.atom;
014
015import static org.apache.juneau.common.internal.StringUtils.*;
016import static org.apache.juneau.xml.annotation.XmlFormat.*;
017
018import java.net.*;
019
020import org.apache.juneau.*;
021import org.apache.juneau.annotation.*;
022import org.apache.juneau.internal.*;
023import org.apache.juneau.xml.annotation.*;
024
025/**
026 * Represents an <c>atomLogo</c> construct in the RFC4287 specification.
027 *
028 * <h5 class='figure'>Schema</h5>
029 * <p class='bschema'>
030 *    atomLogo = element atom:logo {
031 *       atomCommonAttributes,
032 *       (atomUri)
033 *    }
034 * </p>
035 *
036 * <h5 class='section'>See Also:</h5><ul>
037 *    <li class='link'><a class="doclink" href="../../../../../index.html#jd.Atom">Overview &gt; juneau-dto &gt; Atom</a>
038 * </ul>
039 */
040@Bean(typeName="logo")
041@FluentSetters
042public class Logo extends Common {
043
044   private URI uri;
045
046
047   /**
048    * Normal constructor.
049    *
050    * <p>
051    * The value can be of any of the following types: {@link URI}, {@link URL}, {@link String}.
052    * <br>Strings must be valid URIs.
053    *
054    * <p>
055    * URIs defined by {@link UriResolver} can be used for values.
056    *
057    * @param uri The URI of the logo.
058    */
059   public Logo(Object uri) {
060      setUri(uri);
061   }
062
063   /** Bean constructor. */
064   public Logo() {}
065
066
067   //-----------------------------------------------------------------------------------------------------------------
068   // Bean properties
069   //-----------------------------------------------------------------------------------------------------------------
070
071   /**
072    * Bean property getter:  <property>uri</property>.
073    *
074    * <p>
075    * The URI of the logo.
076    *
077    * @return The property value, or <jk>null</jk> if it is not set.
078    */
079   @Xml(format=ELEMENTS)
080   public URI getUri() {
081      return uri;
082   }
083
084   /**
085    * Bean property setter:  <property>uri</property>.
086    *
087    * <p>
088    * The URI of the logo.
089    *
090    * <p>
091    * The value can be of any of the following types: {@link URI}, {@link URL}, {@link String}.
092    * <br>Strings must be valid URIs.
093    *
094    * <p>
095    * URIs defined by {@link UriResolver} can be used for values.
096    *
097    * @param value
098    *    The new value for this property.
099    *    <br>Can be <jk>null</jk> to unset the property.
100    * @return This object
101    */
102   public Logo setUri(Object value) {
103      this.uri = toURI(value);
104      return this;
105   }
106
107   //-----------------------------------------------------------------------------------------------------------------
108   // Overridden setters (to simplify method chaining)
109   //-----------------------------------------------------------------------------------------------------------------
110
111   // <FluentSetters>
112
113   @Override /* GENERATED - org.apache.juneau.dto.atom.Common */
114   public Logo setBase(Object value) {
115      super.setBase(value);
116      return this;
117   }
118
119   @Override /* GENERATED - org.apache.juneau.dto.atom.Common */
120   public Logo setLang(String value) {
121      super.setLang(value);
122      return this;
123   }
124
125   // </FluentSetters>
126}