Added Android code
[wl-app.git] / Android / r2-streamer / r2-parser / src / main / java / org / readium / r2_streamer / model / publication / link / Link.java
1 package org.readium.r2_streamer.model.publication.link;
2
3 import org.readium.r2_streamer.model.publication.SMIL.MediaOverlays;
4
5 import java.io.Serializable;
6 import java.util.ArrayList;
7 import java.util.List;
8
9 /**
10  * Created by Shrikant Badwaik on 25-Jan-17.
11  */
12
13 public class Link implements Serializable {
14     private static final long serialVersionUID = 7612342295622776147L;
15     public String id;
16     public String href;
17     public List<String> rel = new ArrayList<>();
18     public String typeLink;
19     public int height;
20     public int width;
21     public String bookTitle;
22     public String chapterTitle;
23     public String type;
24     public List<String> properties;
25     public String duration;
26     public boolean templated;
27     public MediaOverlays mediaOverlay;
28
29     public Link() {
30         this.properties = new ArrayList<>();
31         this.mediaOverlay = new MediaOverlays();
32     }
33
34     public Link(String href, String rel, String typeLink) {
35         this.href = href;
36         this.rel.add(rel);
37         this.typeLink = typeLink;
38     }
39
40     @Override
41     public String toString() {
42         return "Link{" +
43                 "id='" + id + '\'' +
44                 ", mediaOverlay=" + mediaOverlay +
45                 ", href='" + href + '\'' +
46                 ", rel=" + rel +
47                 ", typeLink='" + typeLink + '\'' +
48                 ", height=" + height +
49                 ", width=" + width +
50                 ", bookTitle='" + bookTitle + '\'' +
51                 ", chapterTitle='" + chapterTitle + '\'' +
52                 ", type='" + type + '\'' +
53                 ", properties=" + properties +
54                 ", duration='" + duration + '\'' +
55                 ", templated=" + templated +
56                 '}';
57     }
58
59     public String getId() {
60         return id;
61     }
62
63     public void setId(String id) {
64         this.id = id;
65     }
66
67     public String getHref() {
68         return href;
69     }
70
71     public void setHref(String href) {
72         this.href = href;
73     }
74
75     public List<String> getRel() {
76         return rel;
77     }
78
79     public void setRel(List<String> rel) {
80         this.rel = rel;
81     }
82
83     public String getTypeLink() {
84         return typeLink;
85     }
86
87     public void setTypeLink(String typeLink) {
88         this.typeLink = typeLink;
89     }
90
91     public int getHeight() {
92         return height;
93     }
94
95     public void setHeight(int height) {
96         this.height = height;
97     }
98
99     public int getWidth() {
100         return width;
101     }
102
103     public void setWidth(int width) {
104         this.width = width;
105     }
106
107     public String getBookTitle() {
108         return bookTitle;
109     }
110
111     public void setBookTitle(String bookTitle) {
112         this.bookTitle = bookTitle;
113     }
114
115     public String getChapterTitle() {
116         return chapterTitle;
117     }
118
119     public void setChapterTitle(String chapterTitle) {
120         this.chapterTitle = chapterTitle;
121     }
122
123     public String getType() {
124         return type;
125     }
126
127     public void setType(String type) {
128         this.type = type;
129     }
130
131     public List<String> getProperties() {
132         return properties;
133     }
134
135     public void setProperties(List<String> properties) {
136         this.properties = properties;
137     }
138
139     public String getDuration() {
140         return duration;
141     }
142
143     public void setDuration(String duration) {
144         this.duration = duration;
145     }
146
147     public boolean isTemplated() {
148         return templated;
149     }
150
151     public void setTemplated(boolean templated) {
152         this.templated = templated;
153     }
154 }