@@ -43,11 +43,9 @@ public class Media implements Parcelable {
43
43
private String caption ;
44
44
public String description ; // monolingual description on input...
45
45
public String discussion ;
46
- long dataLength ;
46
+ private long dataLength ;
47
47
public Date dateCreated ;
48
48
@ Nullable public Date dateUploaded ;
49
- public int width ;
50
- public int height ;
51
49
public String license ;
52
50
public String licenseUrl ;
53
51
public String creator ;
@@ -61,11 +59,6 @@ public class Media implements Parcelable {
61
59
* However unlike categories depictions is multi-lingual
62
60
*/
63
61
public ArrayList <Map <String , String >> depictionList ;
64
- /**
65
- * The above hashmap is fetched from API and to diplay in Explore
66
- * However this list of depictions is for storing and retrieving depictions from local storage or cache
67
- */
68
- public ArrayList <String > depictions ;
69
62
public boolean requestedDeletion ;
70
63
public HashMap <String , String > descriptions ; // multilingual descriptions as loaded
71
64
/**
@@ -75,15 +68,13 @@ public class Media implements Parcelable {
75
68
* key = "de" , value: "<caption in german>"
76
69
*/
77
70
public Map <String , String > captions ;
78
- public HashMap <String , String > tags = new HashMap <>();
79
71
@ Nullable public LatLng coordinates ;
80
72
81
73
/**
82
74
* Provides local constructor
83
75
*/
84
76
protected Media () {
85
77
this .categories = new ArrayList <>();
86
- this .depictions = new ArrayList <>();
87
78
this .descriptions = new HashMap <>();
88
79
this .captions = new HashMap <>();
89
80
}
@@ -124,7 +115,6 @@ public Media(Uri localUri, String imageUrl, String filename, Map<String, String>
124
115
this .dateUploaded = dateUploaded ;
125
116
this .creator = creator ;
126
117
this .categories = new ArrayList <>();
127
- this .depictions = new ArrayList <>();
128
118
this .descriptions = new HashMap <>();
129
119
}
130
120
@@ -215,28 +205,11 @@ public String getPageId() {
215
205
private void setPageId (String pageId ) {
216
206
this .pageId = pageId ;
217
207
}
208
+
218
209
public String getThumbUrl () {
219
210
return thumbUrl ;
220
211
}
221
212
222
- /**
223
- * Gets tag of media
224
- * @param key Media key
225
- * @return Media tag
226
- */
227
- public Object getTag (String key ) {
228
- return tags .get (key );
229
- }
230
-
231
- /**
232
- * Modifies( or creates a) tag of media
233
- * @param key Media key
234
- * @param value Media value
235
- */
236
- public void setTag (String key , String value ) {
237
- tags .put (key , value );
238
- }
239
-
240
213
/**
241
214
* Gets media display title
242
215
* @return Media title
@@ -423,38 +396,6 @@ public void setCreator(String creator) {
423
396
this .creator = creator ;
424
397
}
425
398
426
- /**
427
- * Gets the width of the media.
428
- * @return file width as an int
429
- */
430
- public int getWidth () {
431
- return width ;
432
- }
433
-
434
- /**
435
- * Sets the width of the media.
436
- * @param width file width as an int
437
- */
438
- public void setWidth (int width ) {
439
- this .width = width ;
440
- }
441
-
442
- /**
443
- * Gets the height of the media.
444
- * @return file height as an int
445
- */
446
- public int getHeight () {
447
- return height ;
448
- }
449
-
450
- /**
451
- * Sets the height of the media.
452
- * @param height file height as an int
453
- */
454
- public void setHeight (int height ) {
455
- this .height = height ;
456
- }
457
-
458
399
/**
459
400
* Gets the license name of the file.
460
401
* @return license as a String
@@ -510,12 +451,6 @@ public ArrayList<String> getCategories() {
510
451
return (ArrayList <String >) categories .clone (); // feels dirty
511
452
}
512
453
513
- /**
514
- * @return array list of depictions associated with the current media
515
- */
516
- public ArrayList <String > getDepictions () {
517
- return (ArrayList <String >) depictions .clone ();
518
- }
519
454
520
455
/**
521
456
* Sets the categories the file falls under.
@@ -529,11 +464,6 @@ public void setCategories(List<String> categories) {
529
464
this .categories .addAll (categories );
530
465
}
531
466
532
- public void setDepictions (List <String > depictions ) {
533
- this .depictions .clear ();
534
- this .depictions .addAll (depictions );
535
- }
536
-
537
467
/**
538
468
* Modifies (or sets) media descriptions
539
469
* @param descriptions Media descriptions
@@ -645,8 +575,6 @@ public void writeToParcel(Parcel dest, int flags) {
645
575
dest .writeLong (this .dataLength );
646
576
dest .writeLong (this .dateCreated != null ? this .dateCreated .getTime () : -1 );
647
577
dest .writeLong (this .dateUploaded != null ? this .dateUploaded .getTime () : -1 );
648
- dest .writeInt (this .width );
649
- dest .writeInt (this .height );
650
578
dest .writeString (this .license );
651
579
dest .writeString (this .licenseUrl );
652
580
dest .writeString (this .creator );
@@ -655,7 +583,6 @@ public void writeToParcel(Parcel dest, int flags) {
655
583
dest .writeList (this .depictionList );
656
584
dest .writeByte (this .requestedDeletion ? (byte ) 1 : (byte ) 0 );
657
585
dest .writeSerializable (this .descriptions );
658
- dest .writeSerializable (this .tags );
659
586
dest .writeParcelable (this .coordinates , flags );
660
587
}
661
588
@@ -673,8 +600,6 @@ protected Media(Parcel in) {
673
600
this .dateCreated = tmpDateCreated == -1 ? null : new Date (tmpDateCreated );
674
601
long tmpDateUploaded = in .readLong ();
675
602
this .dateUploaded = tmpDateUploaded == -1 ? null : new Date (tmpDateUploaded );
676
- this .width = in .readInt ();
677
- this .height = in .readInt ();
678
603
this .license = in .readString ();
679
604
this .licenseUrl = in .readString ();
680
605
this .creator = in .readString ();
@@ -685,7 +610,6 @@ protected Media(Parcel in) {
685
610
in .readList (depictionList ,null );
686
611
this .requestedDeletion = in .readByte () != 0 ;
687
612
this .descriptions = (HashMap <String , String >) in .readSerializable ();
688
- this .tags = (HashMap <String , String >) in .readSerializable ();
689
613
this .coordinates = in .readParcelable (LatLng .class .getClassLoader ());
690
614
}
691
615
0 commit comments