Package geodress.exceptions

Examples of geodress.exceptions.OperationNotSupportedException


   */
  @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);
  }
View Full Code Here


  @Override
  public void setData(int field, String value)
      throws OperationNotSupportedException {
    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);
      saveMap.put(TiffConstants.EXIF_TAG_USER_COMMENT, value);
      break;
    case InfoConstants.IMAGE_DESCRIPTION:
      logger.log(Level.FINER, "new image description for writing: "
          + value);
      saveMap.put(TiffConstants.TIFF_TAG_IMAGE_DESCRIPTION, value);
      break;
    default:
      throw new OperationNotSupportedException("writing for field "
          + field + " is not supported yet");
    }
  }
View Full Code Here

TOP

Related Classes of geodress.exceptions.OperationNotSupportedException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.