001/**
002 * Copyright 2015 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.facebookjazz.reference;
017
018import java.util.ArrayList;
019import java.util.List;
020
021import javax.xml.bind.annotation.XmlAccessType;
022import javax.xml.bind.annotation.XmlAccessorType;
023import javax.xml.bind.annotation.XmlElement;
024import javax.xml.bind.annotation.XmlRootElement;
025
026import service.tut.pori.contentanalysis.AbstractTaskDetails;
027import service.tut.pori.facebookjazz.Definitions;
028import service.tut.pori.facebookjazz.FBFeedbackTaskDetails;
029import service.tut.pori.facebookjazz.FBSummarizationTaskDetails;
030import service.tut.pori.facebookjazz.FBTaskResponse;
031import service.tut.pori.facebookjazz.FacebookComment;
032import service.tut.pori.facebookjazz.FacebookEvent;
033import service.tut.pori.facebookjazz.FacebookGroup;
034import service.tut.pori.facebookjazz.FacebookLike;
035import service.tut.pori.facebookjazz.FacebookLocation;
036import service.tut.pori.facebookjazz.FacebookPhotoDescription;
037import service.tut.pori.facebookjazz.FacebookPhotoTag;
038import service.tut.pori.facebookjazz.FacebookProfile;
039import service.tut.pori.facebookjazz.FacebookRelationship;
040import service.tut.pori.facebookjazz.FacebookStatusMessage;
041import service.tut.pori.facebookjazz.FacebookUserDetails;
042import service.tut.pori.facebookjazz.FacebookVideoDescription;
043import service.tut.pori.facebookjazz.WeightModifier;
044import service.tut.pori.facebookjazz.WeightModifierList;
045import core.tut.pori.http.ResponseData;
046
047/**
048 * Response example
049 * 
050 */
051@XmlRootElement(name=service.tut.pori.facebookjazz.reference.Definitions.ELEMENT_EXAMPLE)
052@XmlAccessorType(XmlAccessType.NONE)
053public class Example extends ResponseData {
054  @XmlElement(name=Definitions.ELEMENT_COMMENT)
055  private FacebookComment _facebookComment = null;
056  @XmlElement(name=Definitions.ELEMENT_EVENT)
057  private FacebookEvent _facebookEvent = null;
058  @XmlElement(name=Definitions.ELEMENT_GROUP)
059  private FacebookGroup _facebookGroup = null;
060  @XmlElement(name=Definitions.ELEMENT_LIKE)
061  private FacebookLike _facebookLike = null;
062  @XmlElement(name=Definitions.ELEMENT_LOCATION)
063  private FacebookLocation _facebookLocation = null;
064  @XmlElement(name=Definitions.ELEMENT_PHOTO_DESCRIPTION)
065  private FacebookPhotoDescription _facebookPhotoDescription = null;
066  @XmlElement(name=Definitions.ELEMENT_FACEBOOK_PROFILE)
067  private FacebookProfile _facebookProfile = null;
068  @XmlElement(name=Definitions.ELEMENT_PHOTO_TAG)
069  private FacebookPhotoTag _facebookPhotoTag = null;
070  @XmlElement(name=Definitions.ELEMENT_RELATIONSHIP)
071  private FacebookRelationship _facebookRelationship = null;
072  @XmlElement(name=Definitions.ELEMENT_STATUS_MESSAGE)
073  private FacebookStatusMessage _facebookStatusMessage = null;
074  @XmlElement(name=Definitions.ELEMENT_USER_DETAILS)
075  private FacebookUserDetails _facebookUserDetails = null;
076  @XmlElement(name=Definitions.ELEMENT_VIDEO_DESCRIPTION)
077  private FacebookVideoDescription _facebookVideoDescription = null;
078  @XmlElement(name=Definitions.ELEMENT_WEIGHT_MODIFIER)
079  private WeightModifier _weightModifier = null;
080  @XmlElement(name=Definitions.ELEMENT_WEIGHT_MODIFIER_LIST)
081  private WeightModifierList _weightModifierList = null;
082  @XmlElement(name=service.tut.pori.contentanalysis.Definitions.ELEMENT_TASK_DETAILS)
083  private AbstractTaskDetails _taskDetails = null;
084  @XmlElement(name=service.tut.pori.contentanalysis.Definitions.ELEMENT_TASK_RESULTS)
085  private FBTaskResponse _taskResponse = null;
086
087  /**
088   * @return the weightModifierList
089   */
090  public WeightModifierList getWeightModifierList() {
091    return _weightModifierList;
092  }
093
094  /**
095   * @param weightModifierList the weightModifierList to set
096   */
097  public void setWeightModifierList(WeightModifierList weightModifierList) {
098    _weightModifierList = weightModifierList;
099  }
100
101  /**
102   * @return the taskDetails
103   */
104  public AbstractTaskDetails getTaskDetails() {
105    return _taskDetails;
106  }
107
108  /**
109   * @param taskDetails the fbSummarizationTaskDetails to set
110   */
111  public void setTaskDetails(FBSummarizationTaskDetails taskDetails) {
112    _taskDetails = taskDetails;
113  }
114  
115  /**
116   * @param taskDetails the FBFeedbackTaskDetails to set
117   */
118  public void setTaskDetails(FBFeedbackTaskDetails taskDetails) {
119    _taskDetails = taskDetails;
120  }
121  
122  /**
123   * @return the taskResponse
124   */
125  public FBTaskResponse getTaskResponse() {
126    return _taskResponse;
127  }
128
129  /**
130   * @param taskResponse the taskResponse to set
131   */
132  public void setTaskResponse(FBTaskResponse taskResponse) {
133    _taskResponse = taskResponse;
134  }
135
136  /**
137   * @return the facebookPhotoTag
138   */
139  public FacebookPhotoTag getFacebookPhotoTag() {
140    return _facebookPhotoTag;
141  }
142
143  /**
144   * @param facebookPhotoTag the facebookPhotoTag to set
145   */
146  public void setFacebookPhotoTag(FacebookPhotoTag facebookPhotoTag) {
147    _facebookPhotoTag = facebookPhotoTag;
148  }
149
150  /**
151   * @return the weightModifier
152   */
153  public WeightModifier getWeightModifier() {
154    return _weightModifier;
155  }
156
157  /**
158   * @param weightModifier the weightModifier to set
159   */
160  public void setWeightModifier(WeightModifier weightModifier) {
161    _weightModifier = weightModifier;
162  }
163
164  /**
165   * @return the facebookComment
166   */
167  public FacebookComment getFacebookComment() {
168    return _facebookComment;
169  }
170
171  /**
172   * @param facebookComment the facebookComment to set
173   */
174  public void setFacebookComment(FacebookComment facebookComment) {
175    _facebookComment = facebookComment;
176  }
177
178  /**
179   * @return the facebookEvent
180   */
181  public FacebookEvent getFacebookEvent() {
182    return _facebookEvent;
183  }
184
185  /**
186   * @param facebookEvent the facebookEvent to set
187   */
188  public void setFacebookEvent(FacebookEvent facebookEvent) {
189    _facebookEvent = facebookEvent;
190  }
191
192  /**
193   * @return the facebookGroup
194   */
195  public FacebookGroup getFacebookGroup() {
196    return _facebookGroup;
197  }
198
199  /**
200   * @param facebookGroup the facebookGroup to set
201   */
202  public void setFacebookGroup(FacebookGroup facebookGroup) {
203    _facebookGroup = facebookGroup;
204  }
205
206  /**
207   * @return the facebookLocation
208   */
209  public FacebookLocation getFacebookLocation() {
210    return _facebookLocation;
211  }
212
213  /**
214   * @param facebookLocation the facebookLocation to set
215   */
216  public void setFacebookLocation(FacebookLocation facebookLocation) {
217    _facebookLocation = facebookLocation;
218  }
219
220  /**
221   * @return the facebookPhotoDescription
222   */
223  public FacebookPhotoDescription getFacebookPhotoDescription() {
224    return _facebookPhotoDescription;
225  }
226
227  /**
228   * @param facebookPhotoDescription the facebookPhotoDescription to set
229   */
230  public void setFacebookPhotoDescription(FacebookPhotoDescription facebookPhotoDescription) {
231    _facebookPhotoDescription = facebookPhotoDescription;
232  }
233
234  /**
235   * @return the facebookProfile
236   */
237  public FacebookProfile getFacebookProfile() {
238    return _facebookProfile;
239  }
240
241  /**
242   * @param facebookProfile the facebookProfile to set
243   */
244  public void setFacebookProfile(FacebookProfile facebookProfile) {
245    _facebookProfile = facebookProfile;
246  }
247
248  /**
249   * @return the facebookRelationship
250   */
251  public FacebookRelationship getFacebookRelationship() {
252    return _facebookRelationship;
253  }
254
255  /**
256   * @param facebookRelationship the facebookRelationship to set
257   */
258  public void setFacebookRelationship(FacebookRelationship facebookRelationship) {
259    _facebookRelationship = facebookRelationship;
260  }
261
262  /**
263   * @return the facebookStatusMessage
264   */
265  public FacebookStatusMessage getFacebookStatusMessage() {
266    return _facebookStatusMessage;
267  }
268
269  /**
270   * @param facebookStatusMessage the facebookStatusMessage to set
271   */
272  public void setFacebookStatusMessage(FacebookStatusMessage facebookStatusMessage) {
273    _facebookStatusMessage = facebookStatusMessage;
274  }
275
276  /**
277   * @return the facebookUserDetails
278   */
279  public FacebookUserDetails getFacebookUserDetails() {
280    return _facebookUserDetails;
281  }
282
283  /**
284   * @param facebookUserDetails the facebookUserDetails to set
285   */
286  public void setFacebookUserDetails(FacebookUserDetails facebookUserDetails) {
287    _facebookUserDetails = facebookUserDetails;
288  }
289
290  /**
291   * @return the facebookVideoDescription
292   */
293  public FacebookVideoDescription getFacebookVideoDescription() {
294    return _facebookVideoDescription;
295  }
296
297  /**
298   * @param facebookVideoDescription the facebookVideoDescription to set
299   */
300  public void setFacebookVideoDescription(FacebookVideoDescription facebookVideoDescription) {
301    _facebookVideoDescription = facebookVideoDescription;
302  }
303
304  /**
305   * @return the facebookLike
306   */
307  public FacebookLike getFacebookLike() {
308    return _facebookLike;
309  }
310
311  /**
312   * @param facebookLike the facebookLike to set
313   */
314  public void setFacebookLike(FacebookLike facebookLike) {
315    _facebookLike = facebookLike;
316  }
317
318  /**
319   * overridden to gather the real classes required for serialization
320   */
321  @Override
322  public Class<?>[] getDataClasses() {
323    List<Class<?>> classes = new ArrayList<>();
324    classes.add(getClass());
325    if(_weightModifierList != null){
326      classes.add(_weightModifierList.getClass());
327    }
328    if(_taskDetails != null){
329      classes.add(_taskDetails.getClass());
330    }
331    if(_taskResponse != null){
332      classes.add(_taskResponse.getClass());
333    }
334    if(_facebookPhotoTag != null){
335      classes.add(_facebookPhotoTag.getClass());
336    }
337    if(_weightModifier != null){
338      classes.add(_weightModifier.getClass());
339    }
340    if(_facebookComment != null){
341      classes.add(_facebookComment.getClass());
342    }
343    if(_facebookEvent != null){
344      classes.add(_facebookEvent.getClass());
345    }
346    if(_facebookGroup != null){
347      classes.add(_facebookGroup.getClass());
348    }
349    if(_facebookLocation != null){
350      classes.add(_facebookLocation.getClass());
351    }
352    if(_facebookPhotoDescription != null){
353      classes.add(_facebookPhotoDescription.getClass());
354    }
355    if(_facebookProfile != null){
356      classes.add(_facebookProfile.getClass());
357    }
358    if(_facebookRelationship != null){
359      classes.add(_facebookRelationship.getClass());
360    }
361    if(_facebookStatusMessage != null){
362      classes.add(_facebookStatusMessage.getClass());
363    }
364    if(_facebookUserDetails != null){
365      classes.add(_facebookUserDetails.getClass());
366    }
367    if(_facebookVideoDescription != null){
368      classes.add(_facebookVideoDescription.getClass());
369    }
370    if(_facebookLike != null){
371      classes.add(_facebookLike.getClass());
372    }
373    return classes.toArray(new Class<?>[classes.size()]);
374  }
375}