001/* 002 * (C) Copyright 2015 Nuxeo SA (http://nuxeo.com/) and contributors. 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the GNU Lesser General Public License 006 * (LGPL) version 2.1 which accompanies this distribution, and is available at 007 * http://www.gnu.org/licenses/lgpl-2.1.html 008 * 009 * This library is distributed in the hope that it will be useful, 010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 012 * Lesser General Public License for more details. 013 * 014 * Contributors: 015 * André Justo 016 */ 017 018package org.nuxeo.ecm.media.publishing.wistia.model; 019 020import org.codehaus.jackson.annotate.JsonIgnoreProperties; 021import org.codehaus.jackson.annotate.JsonProperty; 022 023import java.util.ArrayList; 024import java.util.Date; 025import java.util.List; 026 027@JsonIgnoreProperties(ignoreUnknown = true) 028public class Media { 029 030 protected String name; 031 032 protected String type; 033 034 @JsonProperty("created") 035 protected Date createdAt; 036 037 @JsonProperty("updated") 038 protected Date updatedAt; 039 040 protected float duration; 041 042 @JsonProperty("hashed_id") 043 protected String hashedId; 044 045 protected String description; 046 047 protected float progress; 048 049 protected String status; 050 051 protected Thumbnail thumbnail; 052 053 protected Project project; 054 055 protected Stats stats; 056 057 @JsonProperty("assets") 058 protected List<Assets> assets = new ArrayList<Assets>(); 059 060 public String getName() { 061 return name; 062 } 063 064 public void setName(String name) { 065 this.name = name; 066 } 067 068 public String getType() { 069 return type; 070 } 071 072 public void setType(String type) { 073 this.type = type; 074 } 075 076 public Date getCreatedAt() { 077 return createdAt; 078 } 079 080 public void setCreatedAt(Date createdAt) { 081 this.createdAt = createdAt; 082 } 083 084 public Date getUpdatedAt() { 085 return updatedAt; 086 } 087 088 public void setUpdatedAt(Date updatedAt) { 089 this.updatedAt = updatedAt; 090 } 091 092 public float getDuration() { 093 return duration; 094 } 095 096 public void setDuration(float duration) { 097 this.duration = duration; 098 } 099 100 public String getHashedId() { 101 return hashedId; 102 } 103 104 public void setHashedId(String hashedId) { 105 this.hashedId = hashedId; 106 } 107 108 public String getDescription() { 109 return description; 110 } 111 112 public void setDescription(String description) { 113 this.description = description; 114 } 115 116 public float getProgress() { 117 return progress; 118 } 119 120 public void setProgress(float progress) { 121 this.progress = progress; 122 } 123 124 public String getStatus() { 125 return status; 126 } 127 128 public void setStatus(String status) { 129 this.status = status; 130 } 131 132 public Thumbnail getThumbnail() { 133 return thumbnail; 134 } 135 136 public void setThumbnail(Thumbnail thumbnail) { 137 this.thumbnail = thumbnail; 138 } 139 140 public Project getProject() { 141 return project; 142 } 143 144 public void setProject(Project project) { 145 this.project = project; 146 } 147 148 public Stats getStats() { 149 return stats; 150 } 151 152 public void setStats(Stats stats) { 153 this.stats = stats; 154 } 155 156 public List<Assets> getAssets() { 157 return this.assets; 158 } 159 160 @Override 161 public String toString() { 162 return "--- Media info ---" + 163 "\nname: \t" + getName() + 164 "\ntype: \t" + getType() + 165 "\nduration: \t" + getDuration() + 166 "\ndescription: \t" + getDescription() + 167 "\nstatus: \t" + getStatus() + 168 "\nhashedId: \t" + getHashedId() + "\n"; 169 } 170}