import net.osdn.gokigen.gr2control.camera.ICameraFileInfo;
+import java.text.SimpleDateFormat;
import java.util.Date;
+import java.util.Locale;
public class CameraFileInfo implements ICameraFileInfo
{
this.dateTime = new Date();
}
- public void setDateTime(@NonNull Date dateTime)
- {
- this.dateTime = dateTime;
- }
- public void setCaptured(boolean captured)
- {
- this.captured = captured;
- }
- public void setAperature(String av)
- {
- this.av = av;
- }
- public void setShutterSpeed(String tv)
- {
- this.tv = tv;
- }
- public void setIso(String sv)
- {
- this.sv = sv;
- }
- public void setExpRev(String xv)
- {
- this.xv = xv;
- }
- public void setOrientation(int orientation)
- {
- this.orientation = orientation;
- }
- public void setAspectRatio(String aspectRatio)
- {
- this.aspectRatio = aspectRatio;
- }
- public void setModel(String cameraModel)
- {
- this.cameraModel = cameraModel;
- }
- public void setLatLng(String latlng)
- {
- this.latlng = latlng;
- }
-
@Override
public Date getDatetime()
{
{
return (captured);
}
+
+ @Override
+ public void updateValues(String dateTime, String av, String tv, String sv, String xv, int orientation, String aspectRatio, String model, String latLng, boolean captured) {
+ this.av = av;
+ this.tv = tv;
+ this.sv = sv;
+ this.xv = xv;
+ this.orientation = orientation;
+ this.aspectRatio = aspectRatio;
+ this.cameraModel = model;
+ this.latlng = latLng;
+ this.captured = captured;
+ try
+ {
+ SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss", Locale.US);
+ this.dateTime = df.parse(dateTime);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
}