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.fuzzyvisuals;
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 service.tut.pori.contentanalysis.AsyncTask.TaskStatus;
027import service.tut.pori.contentanalysis.AsyncTask.TaskType;
028import service.tut.pori.contentanalysis.TaskResponse;
029
030/**
031 * Minimal implementation of TaskResults for Fuzzy Visuals
032 *
033 */
034@XmlRootElement(name=service.tut.pori.contentanalysis.Definitions.ELEMENT_TASK_RESULTS)
035@XmlAccessorType(XmlAccessType.NONE)
036public class TaskResults extends TaskResponse {
037  @XmlElement(name = Definitions.ELEMENT_MEDIA)
038  @XmlElementWrapper(name = Definitions.ELEMENT_MEDIA_LIST)
039  private List<FuzzyMedia> _media = null;
040
041  /**
042   * @return the media
043   * @see #setMedia(List)
044   */
045  public List<FuzzyMedia> getMedia() {
046    return _media;
047  }
048
049  /**
050   * @param media the media to set
051   * @see #getMedia()
052   */
053  public void setMedia(List<FuzzyMedia> media) {
054    _media = media;
055  }
056  
057  /**
058   * for serialization
059   */
060  public TaskResults(){
061    // nothing needed
062  }
063  
064  /**
065   * 
066   * @param backendId
067   * @param taskId 
068   * @param taskStatus
069   * @param taskType
070   */
071  public TaskResults(Integer backendId, Long taskId, TaskStatus taskStatus, TaskType taskType){
072    setBackendId(backendId);
073    setTaskId(taskId);
074    setStatus(taskStatus);
075    setTaskType(taskType);
076  }
077}