com.drew.metadata.exif
Class ExifDescriptor

java.lang.Object
  extended by com.drew.metadata.TagDescriptor
      extended by com.drew.metadata.exif.ExifDescriptor
All Implemented Interfaces:
Serializable

public class ExifDescriptor
extends TagDescriptor

Provides human-readable string represenations of tag values stored in a ExifDirectory.

See Also:
Serialized Form

Field Summary
private  boolean _allowDecimalRepresentationOfRationals
          Dictates whether rational values will be represented in decimal format in instances where decimal notation is elegant (such as 1/2 -> 0.5, but not 1/3).
private static DecimalFormat SimpleDecimalFormatter
           
 
Fields inherited from class com.drew.metadata.TagDescriptor
_directory
 
Constructor Summary
ExifDescriptor(Directory directory)
           
 
Method Summary
static String convertBytesToVersionString(int[] components)
          Takes a series of 4 bytes from the specified offset, and converts these to a well-known version number, where possible.
 String get35mmFilmEquivFocalLengthDescription()
           
 String getApertureValueDescription()
           
 String getBitsPerSampleDescription()
           
 String getColorSpaceDescription()
           
 String getComponentConfigurationDescription()
           
 String getCompressionDescription()
           
 String getCompressionLevelDescription()
           
 String getContrastDescription()
           
 String getCustomRenderedDescription()
           
 String getDescription(int tagType)
          Returns a descriptive value of the the specified tag for this image.
 String getDigitalZoomRatioDescription()
           
 String getExifImageHeightDescription()
           
 String getExifImageWidthDescription()
           
 String getExifVersionDescription()
           
 String getExposureBiasDescription()
           
 String getExposureModeDescription()
           
 String getExposureProgramDescription()
           
 String getExposureTimeDescription()
           
 String getFileSourceDescription()
           
 String getFillOrderDescription()
           
 String getFlashDescription()
           
 String getFlashPixVersionDescription()
           
 String getFNumberDescription()
           
 String getFocalLengthDescription()
           
 String getFocalPlaneResolutionUnitDescription()
           
 String getFocalPlaneXResolutionDescription()
           
 String getFocalPlaneYResolutionDescription()
           
 String getGainControlDescription()
           
 String getIsoEquivalentDescription()
           
 String getMaxApertureValueDescription()
           
 String getMeteringModeDescription()
           
 String getNewSubfileTypeDescription()
           
 String getOrientationDescription()
           
 String getPhotometricInterpretationDescription()
           
 String getPlanarConfigurationDescription()
           
 String getReferenceBlackWhiteDescription()
           
 String getResolutionDescription()
           
 String getRowsPerStripDescription()
           
 String getSamplesPerPixelDescription()
           
 String getSaturationDescription()
           
 String getSceneCaptureTypeDescription()
           
 String getSceneTypeDescription()
           
 String getSensingMethodDescription()
           
 String getSharpnessDescription()
           
 String getShutterSpeedDescription()
           
 String getStripByteCountsDescription()
           
 String getSubfileTypeDescription()
           
 String getSubjectDistanceDescription()
           
 String getSubjectDistanceRangeDescription()
           
 String getThresholdingDescription()
           
 String getThumbnailDescription()
           
 String getThumbnailImageHeightDescription()
           
 String getThumbnailImageWidthDescription()
           
 String getThumbnailLengthDescription()
           
 String getThumbnailOffsetDescription()
           
private  String getUnicodeDescription(int tag)
          The Windows specific tags uses plain Unicode
 String getUserCommentDescription()
           
 String getWhiteBalanceDescription()
           
 String getWhiteBalanceModeDescription()
           
 String getWindowsAuthorDescription()
           
 String getWindowsCommentDescription()
           
 String getWindowsKeywordsDescription()
           
 String getWindowsSubjectDescription()
           
 String getWindowsTitleDescription()
           
 String getXResolutionDescription()
           
 String getYCbCrPositioningDescription()
           
 String getYCbCrSubsamplingDescription()
           
 String getYResolutionDescription()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_allowDecimalRepresentationOfRationals

private boolean _allowDecimalRepresentationOfRationals
Dictates whether rational values will be represented in decimal format in instances where decimal notation is elegant (such as 1/2 -> 0.5, but not 1/3).


SimpleDecimalFormatter

private static final DecimalFormat SimpleDecimalFormatter
Constructor Detail

ExifDescriptor

public ExifDescriptor(Directory directory)
Method Detail

getDescription

public String getDescription(int tagType)
                      throws MetadataException
Returns a descriptive value of the the specified tag for this image. Where possible, known values will be substituted here in place of the raw tokens actually kept in the Exif segment. If no substitution is available, the value provided by getString(int) will be returned.

Specified by:
getDescription in class TagDescriptor
Parameters:
tagType - the tag to find a description for
Returns:
a description of the image's value for the specified tag, or null if the tag hasn't been defined.
Throws:
MetadataException

getNewSubfileTypeDescription

public String getNewSubfileTypeDescription()
                                    throws MetadataException
Throws:
MetadataException

getSubfileTypeDescription

public String getSubfileTypeDescription()
                                 throws MetadataException
Throws:
MetadataException

getThresholdingDescription

public String getThresholdingDescription()
                                  throws MetadataException
Throws:
MetadataException

getFillOrderDescription

public String getFillOrderDescription()
                               throws MetadataException
Throws:
MetadataException

getSubjectDistanceRangeDescription

public String getSubjectDistanceRangeDescription()
                                          throws MetadataException
Throws:
MetadataException

getSharpnessDescription

public String getSharpnessDescription()
                               throws MetadataException
Throws:
MetadataException

getSaturationDescription

public String getSaturationDescription()
                                throws MetadataException
Throws:
MetadataException

getContrastDescription

public String getContrastDescription()
                              throws MetadataException
Throws:
MetadataException

getGainControlDescription

public String getGainControlDescription()
                                 throws MetadataException
Throws:
MetadataException

getSceneCaptureTypeDescription

public String getSceneCaptureTypeDescription()
                                      throws MetadataException
Throws:
MetadataException

get35mmFilmEquivFocalLengthDescription

public String get35mmFilmEquivFocalLengthDescription()
                                              throws MetadataException
Throws:
MetadataException

getDigitalZoomRatioDescription

public String getDigitalZoomRatioDescription()
                                      throws MetadataException
Throws:
MetadataException

getWhiteBalanceModeDescription

public String getWhiteBalanceModeDescription()
                                      throws MetadataException
Throws:
MetadataException

getExposureModeDescription

public String getExposureModeDescription()
                                  throws MetadataException
Throws:
MetadataException

getCustomRenderedDescription

public String getCustomRenderedDescription()
                                    throws MetadataException
Throws:
MetadataException

getUserCommentDescription

public String getUserCommentDescription()
                                 throws MetadataException
Throws:
MetadataException

getThumbnailDescription

public String getThumbnailDescription()
                               throws MetadataException
Throws:
MetadataException

getIsoEquivalentDescription

public String getIsoEquivalentDescription()
                                   throws MetadataException
Throws:
MetadataException

getReferenceBlackWhiteDescription

public String getReferenceBlackWhiteDescription()
                                         throws MetadataException
Throws:
MetadataException

getExifVersionDescription

public String getExifVersionDescription()
                                 throws MetadataException
Throws:
MetadataException

getFlashPixVersionDescription

public String getFlashPixVersionDescription()
                                     throws MetadataException
Throws:
MetadataException

getSceneTypeDescription

public String getSceneTypeDescription()
                               throws MetadataException
Throws:
MetadataException

getFileSourceDescription

public String getFileSourceDescription()
                                throws MetadataException
Throws:
MetadataException

getExposureBiasDescription

public String getExposureBiasDescription()
                                  throws MetadataException
Throws:
MetadataException

getMaxApertureValueDescription

public String getMaxApertureValueDescription()
                                      throws MetadataException
Throws:
MetadataException

getApertureValueDescription

public String getApertureValueDescription()
                                   throws MetadataException
Throws:
MetadataException

getExposureProgramDescription

public String getExposureProgramDescription()
                                     throws MetadataException
Throws:
MetadataException

getYCbCrSubsamplingDescription

public String getYCbCrSubsamplingDescription()
                                      throws MetadataException
Throws:
MetadataException

getPlanarConfigurationDescription

public String getPlanarConfigurationDescription()
                                         throws MetadataException
Throws:
MetadataException

getSamplesPerPixelDescription

public String getSamplesPerPixelDescription()

getRowsPerStripDescription

public String getRowsPerStripDescription()

getStripByteCountsDescription

public String getStripByteCountsDescription()

getPhotometricInterpretationDescription

public String getPhotometricInterpretationDescription()
                                               throws MetadataException
Throws:
MetadataException

getCompressionDescription

public String getCompressionDescription()
                                 throws MetadataException
Throws:
MetadataException

getBitsPerSampleDescription

public String getBitsPerSampleDescription()

getThumbnailImageWidthDescription

public String getThumbnailImageWidthDescription()

getThumbnailImageHeightDescription

public String getThumbnailImageHeightDescription()

getFocalPlaneXResolutionDescription

public String getFocalPlaneXResolutionDescription()
                                           throws MetadataException
Throws:
MetadataException

getFocalPlaneYResolutionDescription

public String getFocalPlaneYResolutionDescription()
                                           throws MetadataException
Throws:
MetadataException

getFocalPlaneResolutionUnitDescription

public String getFocalPlaneResolutionUnitDescription()
                                              throws MetadataException
Throws:
MetadataException

getExifImageWidthDescription

public String getExifImageWidthDescription()
                                    throws MetadataException
Throws:
MetadataException

getExifImageHeightDescription

public String getExifImageHeightDescription()
                                     throws MetadataException
Throws:
MetadataException

getColorSpaceDescription

public String getColorSpaceDescription()
                                throws MetadataException
Throws:
MetadataException

getFocalLengthDescription

public String getFocalLengthDescription()
                                 throws MetadataException
Throws:
MetadataException

getFlashDescription

public String getFlashDescription()
                           throws MetadataException
Throws:
MetadataException

getWhiteBalanceDescription

public String getWhiteBalanceDescription()
                                  throws MetadataException
Throws:
MetadataException

getMeteringModeDescription

public String getMeteringModeDescription()
                                  throws MetadataException
Throws:
MetadataException

getSubjectDistanceDescription

public String getSubjectDistanceDescription()
                                     throws MetadataException
Throws:
MetadataException

getCompressionLevelDescription

public String getCompressionLevelDescription()
                                      throws MetadataException
Throws:
MetadataException

getThumbnailLengthDescription

public String getThumbnailLengthDescription()

getThumbnailOffsetDescription

public String getThumbnailOffsetDescription()

getYResolutionDescription

public String getYResolutionDescription()
                                 throws MetadataException
Throws:
MetadataException

getXResolutionDescription

public String getXResolutionDescription()
                                 throws MetadataException
Throws:
MetadataException

getExposureTimeDescription

public String getExposureTimeDescription()

getShutterSpeedDescription

public String getShutterSpeedDescription()
                                  throws MetadataException
Throws:
MetadataException

getFNumberDescription

public String getFNumberDescription()
                             throws MetadataException
Throws:
MetadataException

getYCbCrPositioningDescription

public String getYCbCrPositioningDescription()
                                      throws MetadataException
Throws:
MetadataException

getOrientationDescription

public String getOrientationDescription()
                                 throws MetadataException
Throws:
MetadataException

getResolutionDescription

public String getResolutionDescription()
                                throws MetadataException
Throws:
MetadataException

getSensingMethodDescription

public String getSensingMethodDescription()
                                   throws MetadataException
Throws:
MetadataException

getComponentConfigurationDescription

public String getComponentConfigurationDescription()
                                            throws MetadataException
Throws:
MetadataException

convertBytesToVersionString

public static String convertBytesToVersionString(int[] components)
Takes a series of 4 bytes from the specified offset, and converts these to a well-known version number, where possible. For example, (hex) 30 32 31 30 == 2.10).

Parameters:
components - the four version values
Returns:
the version as a string of form 2.10

getUnicodeDescription

private String getUnicodeDescription(int tag)
                              throws MetadataException
The Windows specific tags uses plain Unicode

Throws:
MetadataException

getWindowsAuthorDescription

public String getWindowsAuthorDescription()
                                   throws MetadataException
Throws:
MetadataException

getWindowsCommentDescription

public String getWindowsCommentDescription()
                                    throws MetadataException
Throws:
MetadataException

getWindowsKeywordsDescription

public String getWindowsKeywordsDescription()
                                     throws MetadataException
Throws:
MetadataException

getWindowsTitleDescription

public String getWindowsTitleDescription()
                                  throws MetadataException
Throws:
MetadataException

getWindowsSubjectDescription

public String getWindowsSubjectDescription()
                                    throws MetadataException
Throws:
MetadataException