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.xml.annotation.XmlFormat.*;
016
017import org.apache.juneau.annotation.*;
018import org.apache.juneau.internal.*;
019import org.apache.juneau.xml.annotation.*;
020
021/**
022 * Represents an <c>atomId</c> construct in the RFC4287 specification.
023 *
024 * <h5 class='figure'>Schema</h5>
025 * <p class='bschema'>
026 *    atomId = element atom:id {
027 *       atomCommonAttributes,
028 *       (atomUri)
029 *    }
030 * </p>
031 *
032 * <h5 class='section'>See Also:</h5><ul>
033 *    <li class='link'><a class="doclink" href="../../../../../index.html#jd.Atom">Overview &gt; juneau-dto &gt; Atom</a>
034 * </ul>
035 */
036@Bean(typeName="id")
037@FluentSetters
038public class Id extends Common {
039
040   private String text;
041
042   /**
043    * Normal constructor.
044    *
045    * @param text The id element contents.
046    */
047   public Id(String text) {
048      setText(text);
049   }
050
051   /** Bean constructor. */
052   public Id() {}
053
054
055   //-----------------------------------------------------------------------------------------------------------------
056   // Bean properties
057   //-----------------------------------------------------------------------------------------------------------------
058
059   /**
060    * Bean property getter:  <property>text</property>.
061    *
062    * <p>
063    * The content of this identifier.
064    *
065    * @return The property value, or <jk>null</jk> if it is not set.
066    */
067   @Xml(format=TEXT)
068   public String getText() {
069      return text;
070   }
071
072   /**
073    * Bean property setter:  <property>text</property>.
074    *
075    * <p>
076    * The content of this identifier.
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 Id setText(String value) {
084      this.text = value;
085      return this;
086   }
087
088   //-----------------------------------------------------------------------------------------------------------------
089   // Overridden setters (to simplify method chaining)
090   //-----------------------------------------------------------------------------------------------------------------
091
092   // <FluentSetters>
093
094   @Override /* GENERATED - org.apache.juneau.dto.atom.Common */
095   public Id setBase(Object value) {
096      super.setBase(value);
097      return this;
098   }
099
100   @Override /* GENERATED - org.apache.juneau.dto.atom.Common */
101   public Id setLang(String value) {
102      super.setLang(value);
103      return this;
104   }
105
106   // </FluentSetters>
107}