Added Android code
[wl-app.git] / Android / r2-streamer / r2-parser / src / main / java / org / readium / r2_streamer / model / publication / Encryption.java
1 package org.readium.r2_streamer.model.publication;
2
3 import java.io.Serializable;
4 import java.util.List;
5
6 /**
7  * Created by gautam chibde on 18/5/17.
8  */
9
10 public class Encryption implements Serializable {
11     private static final long serialVersionUID = 333647343242776147L;
12
13     private String scheme;
14     private String profile;
15     private String algorithm;
16     private String compression;
17     private int originalLength;
18
19     public Encryption() {
20     }
21
22     @Override
23     public String toString() {
24         return "Encryption{" +
25                 "scheme='" + scheme + '\'' +
26                 ", profile='" + profile + '\'' +
27                 ", algorithm='" + algorithm + '\'' +
28                 ", compression='" + compression + '\'' +
29                 ", originalLength=" + originalLength +
30                 '}';
31     }
32
33     public static Encryption getEncryptionFormFontFilePath(
34             String path,
35             List<Encryption> encryptions) {
36         for (Encryption encryption : encryptions) {
37             if (encryption.getProfile().equalsIgnoreCase(path)) {
38                 return encryption;
39             }
40         }
41         return null;
42     }
43
44     public String getScheme() {
45         return scheme;
46     }
47
48     public void setScheme(String scheme) {
49         this.scheme = scheme;
50     }
51
52     public String getProfile() {
53         return profile;
54     }
55
56     public void setProfile(String profile) {
57         this.profile = profile;
58     }
59
60     public String getAlgorithm() {
61         return algorithm;
62     }
63
64     public void setAlgorithm(String algorithm) {
65         this.algorithm = algorithm;
66     }
67
68     public String getCompression() {
69         return compression;
70     }
71
72     public void setCompression(String compression) {
73         this.compression = compression;
74     }
75
76     public int getOriginalLength() {
77         return originalLength;
78     }
79
80     public void setOriginalLength(int originalLength) {
81         this.originalLength = originalLength;
82     }
83 }