Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
479 rajveer 1
/**
2
 * 
3
 */
4
package in.shop2020.metamodel.core;
5
 
6
import in.shop2020.metamodel.util.MetaModelComponent;
7
 
8
import java.io.UnsupportedEncodingException;
9
import java.net.URLEncoder;
10
 
11
/**
12
 * @author naveen
13
 *
14
 */
15
public class Media extends MetaModelComponent {
16
	/**
17
	 * 
18
	 */
19
	private static final long serialVersionUID = 1L;
20
	private String label;
21
	private String title;
22
	private String videoType;
23
	private String type;
24
	private String fileName;
25
	private String contentType;
26
	private String location;
27
 
28
	/**
29
	 * 
30
	 * @param label
31
	 * @param type
32
	 * @param location
33
	 */
34
	public Media(String label, String type, String location) {
35
		this.label = label;
36
		this.type = type;
37
		this.location = location;
38
	}
39
 
40
	/**
41
	 * @param label the label to set
42
	 */
43
	public void setLabel(String label) {
44
		this.label = label;
45
	}
46
	/**
47
	 * @return the label
48
	 */
49
	public String getLabel() {
50
		return label;
51
	}
52
	public void setTitle(String title) {
53
		this.title = title;
54
	}
55
 
56
	public String getTitle() {
57
		return title;
58
	}
59
 
60
	public void setVideoType(String videoType) {
61
		this.videoType = videoType;
62
	}
63
 
64
	public String getVideoType() {
65
		return videoType;
66
	}
67
 
68
	/**
69
	 * @return the label
70
	 */
71
	public String getEncodedLabel() {
72
		try {
73
			return URLEncoder.encode(label, "UTF-8");
74
		} catch (UnsupportedEncodingException e) {
75
			//CreationUtils.getStackTrace(e);
76
			e.printStackTrace();
77
			return "";
78
		}
79
	}
80
	/**
81
	 * @param type the type to set
82
	 */
83
	public void setType(String type) {
84
		this.type = type;
85
	}
86
	/**
87
	 * @return the type
88
	 */
89
	public String getType() {
90
		return type;
91
	}
92
	/**
93
	 * @param location the location to set
94
	 */
95
	public void setLocation(String location) {
96
		this.location = location;
97
	}
98
	/**
99
	 * @return the location
100
	 */
101
	public String getLocation() {
102
		return location;
103
	}
104
 
105
	/**
106
	 * @param fileName the fileName to set
107
	 */
108
	public void setFileName(String fileName) {
109
		this.fileName = fileName;
110
	}
111
 
112
	/**
113
	 * @return the fileName
114
	 */
115
	public String getFileName() {
116
		return fileName;
117
	}
118
 
119
	/**
120
	 * @param contentType the contentType to set
121
	 */
122
	public void setContentType(String contentType) {
123
		this.contentType = contentType;
124
	}
125
 
126
	/**
127
	 * @return the contentType
128
	 */
129
	public String getContentType() {
130
		return contentType;
131
	}
132
 
133
	/* (non-Javadoc)
134
	 * @see java.lang.Object#toString()
135
	 */
136
	@Override
137
	public String toString() {
138
		return "Media [label=" + label + ", location=" + location + ", type="
139
				+ type + "]";
140
	}
141
}