1 package tim.prune.data;
6 * Class to represent a photo and link to DataPoint
10 /** File where photo is stored */
11 private File _file = null;
12 /** Associated DataPoint if correlated */
13 private DataPoint _dataPoint = null;
18 * @param inFile File object for photo
20 public Photo(File inFile)
23 // TODO: Cache photo file contents to allow thumbnail preview
28 * @return File object where photo resides
37 * Set the data point associated with the photo
38 * @param inPoint DataPoint with coordinates etc
40 public void setDataPoint(DataPoint inPoint)
46 * @return the DataPoint object
48 public DataPoint getDataPoint()
54 * Check if a Photo object refers to the same File as another
55 * @param inOther other Photo object
56 * @return true if the Files are the same
58 public boolean equals(Photo inOther)
60 return (inOther != null && inOther.getFile() != null && getFile() != null
61 && inOther.getFile().equals(getFile()));