001/**
002 * Copyright 2014 Tampere University of Technology, Pori Department
003 * 
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 * 
008 *   http://www.apache.org/licenses/LICENSE-2.0
009 * 
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package service.tut.pori.twitterjazz;
017
018import java.util.List;
019
020import javax.xml.bind.annotation.XmlAccessType;
021import javax.xml.bind.annotation.XmlAccessorType;
022import javax.xml.bind.annotation.XmlElement;
023import javax.xml.bind.annotation.XmlElementWrapper;
024import javax.xml.bind.annotation.XmlRootElement;
025
026import core.tut.pori.http.ResponseData;
027
028/**
029 * Details of a Twitter profile usable with Response.
030 * 
031 * <h2>Optional Elements</h2>
032 * <ul>
033 *  <li>{@value service.tut.pori.twitterjazz.Definitions#ELEMENT_PHOTO_DESCRIPTION_LIST}</li>
034 *  <li>{@value service.tut.pori.twitterjazz.Definitions#ELEMENT_STATUS_MESSAGE_LIST}</li>
035 *  <li>{@value service.tut.pori.twitterjazz.Definitions#ELEMENT_VIDEO_DESCRIPTION_LIST}</li>
036 * </ul>
037 * 
038 * <h3>XML Example</h3>
039 * 
040 * {@doc.restlet service="[service.tut.pori.twitterjazz.reference.Definitions#SERVICE_TJ_REFERENCE_EXAMPLE]" method="[service.tut.pori.twitterjazz.Definitions#ELEMENT_TWITTER_PROFILE]" type="GET" query="" body_uri=""}
041 * 
042 * @see service.tut.pori.twitterjazz.TwitterUserDetails
043 * @see service.tut.pori.twitterjazz.TwitterStatusMessage
044 * @see service.tut.pori.twitterjazz.TwitterPhotoDescription
045 * @see service.tut.pori.twitterjazz.TwitterVideoDescription
046 */
047@XmlRootElement(name=Definitions.ELEMENT_TWITTER_PROFILE)
048@XmlAccessorType(XmlAccessType.NONE)
049public class TwitterProfile extends ResponseData {
050  @XmlElement(name = Definitions.ELEMENT_USER_DETAILS)
051  private TwitterUserDetails _user = null;
052  @XmlElementWrapper(name = Definitions.ELEMENT_STATUS_MESSAGE_LIST)
053  @XmlElement(name = Definitions.ELEMENT_STATUS_MESSAGE)
054  private List<TwitterStatusMessage> _statusMessages = null;
055  @XmlElementWrapper(name = Definitions.ELEMENT_PHOTO_DESCRIPTION_LIST)
056  @XmlElement(name = Definitions.ELEMENT_PHOTO_DESCRIPTION)
057  private List<TwitterPhotoDescription> _photoDescriptions = null;
058  @XmlElementWrapper(name = Definitions.ELEMENT_VIDEO_DESCRIPTION_LIST)
059  @XmlElement(name = Definitions.ELEMENT_VIDEO_DESCRIPTION)
060  private List<TwitterVideoDescription> _videoDescriptions = null;
061  
062  /**
063   * 
064   * @param user
065   */
066  public TwitterProfile(TwitterUserDetails user){
067    _user = user;
068  }
069  
070  /**
071   * for serialization
072   */
073  protected TwitterProfile(){
074    // nothing needed
075  }
076
077  /**
078   * @return the user
079   */ 
080  public TwitterUserDetails getUser() {
081    return _user;
082  }
083
084  /**
085   * @return the statusMessages
086   * @see #setStatusMessages(List)
087   */
088  public List<TwitterStatusMessage> getStatusMessages() {
089    return _statusMessages;
090  }
091
092  /**
093   * @param statusMessages the statusMessages to set
094   * @see #getStatusMessages()
095   */
096  public void setStatusMessages(List<TwitterStatusMessage> statusMessages) {
097    _statusMessages = statusMessages;
098  }
099
100  /**
101   * @return the photoDescriptions
102   * @see #setPhotoDescriptions(List)
103   */
104  public List<TwitterPhotoDescription> getPhotoDescriptions() {
105    return _photoDescriptions;
106  }
107
108  /**
109   * @param photoDescriptions the photoDescriptions to set
110   * @see #getPhotoDescriptions()
111   */
112  public void setPhotoDescriptions(List<TwitterPhotoDescription> photoDescriptions) {
113    _photoDescriptions = photoDescriptions;
114  }
115
116  /**
117   * @return the videoDescriptions
118   * @see #setVideoDescriptions(List)
119   */
120  public List<TwitterVideoDescription> getVideoDescriptions() {
121    return _videoDescriptions;
122  }
123
124  /**
125   * @param videoDescriptions the videoDescriptions to set
126   * @see #getVideoDescriptions()
127   */
128  public void setVideoDescriptions(List<TwitterVideoDescription> videoDescriptions) {
129    _videoDescriptions = videoDescriptions;
130  }
131}