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 java.util.*; 016 017import org.apache.juneau.internal.*; 018 019/** 020 * Represents an <c>atomSource</c> construct in the RFC4287 specification. 021 * 022 * <h5 class='figure'>Schema</h5> 023 * <p class='bschema'> 024 * atomSource = 025 * element atom:source { 026 * atomCommonAttributes, 027 * (atomAuthor* 028 * & atomCategory* 029 * & atomContributor* 030 * & atomGenerator? 031 * & atomIcon? 032 * & atomId? 033 * & atomLink* 034 * & atomLogo? 035 * & atomRights? 036 * & atomSubtitle? 037 * & atomTitle? 038 * & atomUpdated? 039 * & extensionElement*) 040 * } 041 * </p> 042 * 043 * <h5 class='section'>See Also:</h5><ul> 044 * <li class='link'><a class="doclink" href="../../../../../index.html#jd.Atom">Overview > juneau-dto > Atom</a> 045 * </ul> 046 */ 047@FluentSetters 048public class Source extends CommonEntry { 049 050 private Generator generator; 051 private Icon icon; 052 private Logo logo; 053 private Text subtitle; 054 055 056 //----------------------------------------------------------------------------------------------------------------- 057 // Bean properties 058 //----------------------------------------------------------------------------------------------------------------- 059 060 /** 061 * Bean property getter: <property>generator</property>. 062 * 063 * <p> 064 * The generator info of this source. 065 * 066 * @return The property value, or <jk>null</jk> if it is not set. 067 */ 068 public Generator getGenerator() { 069 return generator; 070 } 071 072 /** 073 * Bean property setter: <property>generator</property>. 074 * 075 * <p> 076 * The generator info of this source. 077 * 078 * @param value 079 * The new value for this property. 080 * <br>Can be <jk>null</jk> to unset the property. 081 * @return This object 082 */ 083 public Source setGenerator(Generator value) { 084 this.generator = value; 085 return this; 086 } 087 088 /** 089 * Bean property getter: <property>icon</property>. 090 * 091 * <p> 092 * The icon of this source. 093 * 094 * @return The property value, or <jk>null</jk> if it is not set. 095 */ 096 public Icon getIcon() { 097 return icon; 098 } 099 100 /** 101 * Bean property setter: <property>icon</property>. 102 * 103 * <p> 104 * The icon of this source. 105 * 106 * @param value 107 * The new value for this property. 108 * <br>Can be <jk>null</jk> to unset the property. 109 * @return This object 110 */ 111 public Source setIcon(Icon value) { 112 this.icon = value; 113 return this; 114 } 115 116 /** 117 * Bean property getter: <property>logo</property>. 118 * 119 * <p> 120 * The logo of this source. 121 * 122 * @return The property value, or <jk>null</jk> if it is not set. 123 */ 124 public Logo getLogo() { 125 return logo; 126 } 127 128 /** 129 * Bean property setter: <property>logo</property>. 130 * 131 * <p> 132 * The logo of this source. 133 * 134 * @param value 135 * The new value for this property. 136 * <br>Can be <jk>null</jk> to unset the property. 137 * @return This object 138 */ 139 public Source setLogo(Logo value) { 140 this.logo = value; 141 return this; 142 } 143 144 /** 145 * Bean property getter: <property>subtitle</property>. 146 * 147 * <p> 148 * The subtitle of this source. 149 * 150 * @return The property value, or <jk>null</jk> if it is not set. 151 */ 152 public Text getSubtitle() { 153 return subtitle; 154 } 155 156 /** 157 * Bean property setter: <property>subtitle</property>. 158 * 159 * <p> 160 * The subtitle of this source. 161 * 162 * @param value 163 * The new value for this property. 164 * <br>Can be <jk>null</jk> to unset the property. 165 * @return This object 166 */ 167 public Source setSubtitle(Text value) { 168 this.subtitle = value; 169 return this; 170 } 171 172 /** 173 * Bean property fluent setter: <property>subtitle</property>. 174 * 175 * <p> 176 * The subtitle of this source. 177 * 178 * @param value 179 * The new value for this property. 180 * <br>Can be <jk>null</jk> to unset the property. 181 * @return This object. 182 */ 183 public Source setSubtitle(String value) { 184 setSubtitle(new Text(value)); 185 return this; 186 } 187 188 189 //----------------------------------------------------------------------------------------------------------------- 190 // Overridden setters (to simplify method chaining) 191 //----------------------------------------------------------------------------------------------------------------- 192 193 // <FluentSetters> 194 195 @Override /* GENERATED - org.apache.juneau.dto.atom.Common */ 196 public Source setBase(Object value) { 197 super.setBase(value); 198 return this; 199 } 200 201 @Override /* GENERATED - org.apache.juneau.dto.atom.Common */ 202 public Source setLang(String value) { 203 super.setLang(value); 204 return this; 205 } 206 207 @Override /* GENERATED - org.apache.juneau.dto.atom.CommonEntry */ 208 public Source setAuthors(Person...value) { 209 super.setAuthors(value); 210 return this; 211 } 212 213 @Override /* GENERATED - org.apache.juneau.dto.atom.CommonEntry */ 214 public Source setCategories(Category...value) { 215 super.setCategories(value); 216 return this; 217 } 218 219 @Override /* GENERATED - org.apache.juneau.dto.atom.CommonEntry */ 220 public Source setContributors(Person...value) { 221 super.setContributors(value); 222 return this; 223 } 224 225 @Override /* GENERATED - org.apache.juneau.dto.atom.CommonEntry */ 226 public Source setId(String value) { 227 super.setId(value); 228 return this; 229 } 230 231 @Override /* GENERATED - org.apache.juneau.dto.atom.CommonEntry */ 232 public Source setId(Id value) { 233 super.setId(value); 234 return this; 235 } 236 237 @Override /* GENERATED - org.apache.juneau.dto.atom.CommonEntry */ 238 public Source setLinks(Link...value) { 239 super.setLinks(value); 240 return this; 241 } 242 243 @Override /* GENERATED - org.apache.juneau.dto.atom.CommonEntry */ 244 public Source setRights(String value) { 245 super.setRights(value); 246 return this; 247 } 248 249 @Override /* GENERATED - org.apache.juneau.dto.atom.CommonEntry */ 250 public Source setRights(Text value) { 251 super.setRights(value); 252 return this; 253 } 254 255 @Override /* GENERATED - org.apache.juneau.dto.atom.CommonEntry */ 256 public Source setTitle(String value) { 257 super.setTitle(value); 258 return this; 259 } 260 261 @Override /* GENERATED - org.apache.juneau.dto.atom.CommonEntry */ 262 public Source setTitle(Text value) { 263 super.setTitle(value); 264 return this; 265 } 266 267 @Override /* GENERATED - org.apache.juneau.dto.atom.CommonEntry */ 268 public Source setUpdated(String value) { 269 super.setUpdated(value); 270 return this; 271 } 272 273 @Override /* GENERATED - org.apache.juneau.dto.atom.CommonEntry */ 274 public Source setUpdated(Calendar value) { 275 super.setUpdated(value); 276 return this; 277 } 278 279 // </FluentSetters> 280}