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;
019import java.util.Map;
020
021import javax.xml.bind.annotation.XmlAccessType;
022import javax.xml.bind.annotation.XmlAccessorType;
023import javax.xml.bind.annotation.XmlElement;
024import javax.xml.bind.annotation.XmlElementWrapper;
025import javax.xml.bind.annotation.XmlRootElement;
026import javax.xml.bind.annotation.XmlSeeAlso;
027
028import service.tut.pori.contentanalysis.AbstractTaskDetails;
029
030/**
031 * Minimal implementation of Task Details for Fuzzy Visuals
032 *
033 */
034@XmlRootElement(name=service.tut.pori.contentanalysis.Definitions.ELEMENT_TASK_DETAILS)
035@XmlAccessorType(XmlAccessType.NONE)
036@XmlSeeAlso(TaskDetails.FuzzyTaskParameters.class)
037public class TaskDetails extends AbstractTaskDetails {
038  @XmlElement(name = Definitions.ELEMENT_MEDIA)
039  @XmlElementWrapper(name = Definitions.ELEMENT_MEDIA_LIST)
040  private List<FuzzyMedia> _media = null;
041
042  @Override
043  public TaskParameters getTaskParameters() {
044    return null; // don't care about the parameters
045  }
046
047  @Override
048  public void setTaskParameters(TaskParameters parameters) {
049    // don't care about the parameters
050  }
051  
052  /**
053   * 
054   * @param parameters
055   * @see #setTaskParameters(TaskParameters)
056   */
057  public void setTaskParameters(FuzzyTaskParameters parameters) {
058    // don't care about the parameters
059  }
060
061  /**
062   * @return the media
063   * @see #setMedia(List)
064   */
065  public List<FuzzyMedia> getMedia() {
066    return _media;
067  }
068
069  /**
070   * @param media the media to set
071   * @see #getMedia()
072   */
073  public void setMedia(List<FuzzyMedia> media) {
074    _media = media;
075  }
076  
077  /**
078   * minimal implementation required for serialization
079   *
080   */
081  @XmlRootElement(name=service.tut.pori.contentanalysis.Definitions.ELEMENT_TASK_PARAMETERS)
082  @XmlAccessorType(value=XmlAccessType.NONE)
083  public static class FuzzyTaskParameters extends TaskParameters{
084
085    @Override
086    public void initialize(Map<String, String> metadata) throws IllegalArgumentException {
087      // nothing needed
088    }
089
090    @Override
091    public Map<String, String> toMetadata() {
092      return null;
093    }
094    
095  } // class FuzzyTaskParameters
096}