1 /*
2 * Created on Nov 26, 2004
3 *
4 */
5 package ubc.midp.mobilephoto.core.ui.datamodel;
6
7 /**
8 * @author trevor
9 *
10 * This class holds meta data associated with a photo or image. There is a one-to-one
11 * relationship between images and image metadata. (ie. Every photo in MobilePhoto will
12 * have a corresonding ImageData object).
13 * It stores the recordId of the image record in RMS, the recordID of the metadata record
14 * the name of the photo album(s) it belongs to, the text label, associated phone numbers
15 * etc.
16 *
17 */
18 public class ImageData {
19
20 private int recordId; //imageData recordId
21 private int foreignRecordId; //image recordId
22 private String parentAlbumName; //Should we allow single image to be part of multiple albums?
23 private String imageLabel;
24
25 private int numberOfViews = 0;
26
27 private boolean favorite = false;
28
29 /**
30 * @param foreignRecordId
31 * @param parentAlbumName
32 * @param imageLabel
33 */
34 public ImageData(int foreignRecordId, String parentAlbumName,String imageLabel) {
35 super();
36 this.foreignRecordId = foreignRecordId;
37 this.parentAlbumName = parentAlbumName;
38 this.imageLabel = imageLabel;
39
40 }
41
42 /**
43 * @return Returns the recordId.
44 */
45 public int getRecordId() {
46 return recordId;
47 }
48
49 /**
50 * @param recordId The recordId to set.
51 */
52 public void setRecordId(int recordId) {
53 this.recordId = recordId;
54 }
55
56 /**
57 * @return Returns the foreignRecordId.
58 */
59 public int getForeignRecordId() {
60 return foreignRecordId;
61 }
62
63 /**
64 * @param foreignRecordId The foreignRecordId to set.
65 */
66 public void setForeignRecordId(int foreignRecordId) {
67 this.foreignRecordId = foreignRecordId;
68 }
69
70 /**
71 * @return Returns the imageLabel.
72 */
73 public String getImageLabel() {
74 return imageLabel;
75 }
76
77 /**
78 * @param imageLabel The imageLabel to set.
79 */
80 public void setImageLabel(String imageLabel) {
81 this.imageLabel = imageLabel;
82 }
83
84 /**
85 * @return Returns the parentAlbumName.
86 */
87 public String getParentAlbumName() {
88 return parentAlbumName;
89 }
90
91 /**
92 * @param parentAlbumName The parentAlbumName to set.
93 */
94 public void setParentAlbumName(String parentAlbumName) {
95 this.parentAlbumName = parentAlbumName;
96 }
97
98 public void toggleFavorite() {
99 this.favorite = ! favorite;
100 }
101
102 /**
103 * @param favorite
104 */
105 public void setFavorite(boolean favorite) {
106 this.favorite = favorite;
107 }
108
109 /**
110 * @return the favorite
111 */
112 public boolean isFavorite() {
113 return favorite;
114 }
115 public void increaseNumberOfViews() {
116
117 }
118
119 /**
120 * @return the numberOfViews
121 */
122 public int getNumberOfViews() {
123 return numberOfViews;
124 }
125
126 /**
127 * @param views
128 */
129 public void setNumberOfViews(int views) {
130 this.numberOfViews = views;
131 }
132 }
|