*/
@Override
public void setData(int field, String value)
throws OperationNotSupportedException {
if (field < 0 || 5 < field) {
throw new OperationNotSupportedException("writing for field "
+ field + " is not supported yet");
}
if (!isExifToolAvailable()) {
logger.log(Level.CONFIG, "ExifTool is not available, "
+ "but setData(int, String) is used.");
}
String fieldName = "";
switch (field) {
case InfoConstants.GPS_LATITUDE:
throw new OperationNotSupportedException(
"writing latitude is not supported yet");
case InfoConstants.GPS_LONGITUDE:
throw new OperationNotSupportedException(
"writing longitude is not supported yet");
case InfoConstants.DATE_TIME:
throw new OperationNotSupportedException(
"writing date/time is not supported yet");
case InfoConstants.USER_COMMENT:
logger.log(Level.FINER, "new user comment for writing: " + value);
fieldName = "EXIF:UserComment";
break;
case InfoConstants.IMAGE_DESCRIPTION:
logger.log(Level.FINER, "new image description for writing: "
+ value);
fieldName = "EXIF:ImageDescription";
break;
default:
throw new OperationNotSupportedException("writing for field "
+ field + " is not supported yet");
}
saveMap.put(fieldName, value);
}