public class

ExifTags

extends ExtensionPoint
implements Extension Extensible
java.lang.Object
   ↳ com.google.gdata.data.AbstractExtension
     ↳ com.google.gdata.data.ExtensionPoint
       ↳ com.google.gdata.data.photos.ExifTags

Class Overview

A photo's exif tags. Exif tags are represented as a collection element with nested elements, because that way clients can iterate over the exif tags without having to know ahead of time exactly what is in it. We also support retrieval of particular exif tags if the client knows what they want. Some standard tags are supported with helper methods to retrieve them by name.

Summary

[Expand]
Inherited Fields
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
Public Constructors
ExifTags()
Public Methods
void declareExtensions(ExtensionProfile extProfile)
Declares the set of expected Extension types for an ExtensionPoint within the target extension profile.
void generate(XmlWriter w, ExtensionProfile extProfile)
Generates an XML representation for the extension.
Float getApetureFNumber()
String getCameraMake()
String getCameraModel()
static ExtensionDescription getDefaultDescription()
Float getDistance()
ExifTag getExifTag(String exifName)
Get a particular exif tag by name.
String getExifTagValue(String exifName)
Gets the value of a particular exif tag, or null if it doesn't exist.
Collection<ExifTag> getExifTags()
Gets the exif tags as a collection of ExifTag.
Float getExposureTime()
Boolean getFlashUsed()
Float getFocalLength()
XmlParser.ElementHandler getHandler(ExtensionProfile extProfile, String namespace, String localName, Attributes attrs)
The default implementation uses the AbstractExtension.AttributesHandler to handle parsing the extension.
String getImageUniqueID()
Integer getIsoEquivalent()
Date getTime()
void setApetureFNumber(Float fstop)
Set the fstop value used.
void setCameraMake(String make)
Set the make of the camera used.
void setCameraModel(String model)
Set the model of the camera used.
void setDistance(Float distance)
Set the distance to the subject.
void setExifTagValue(String name, String value)
Sets the value of a particular exif tag by name.
void setExifTagValue(String name, Number value)
Convenience method to set an exif tag based on a float value.
void setExposureTime(Float exposure)
Set the exposure time used.
void setFlashUsed(Boolean flash)
Set whether the flash was used.
void setFocalLength(Float focalLength)
Set the focal length used.
void setImageUniqueID(String imageUniqueID)
Set the unique image id for the photo.
void setIsoEquivalent(Integer iso)
Set the iso equivalent value used.
void setTime(Date time)
Set the date/time the photo was taken.
[Expand]
Inherited Methods
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
From class java.lang.Object
From interface com.google.gdata.data.Extension
From interface com.google.gdata.data.photos.Extensible

Public Constructors

public ExifTags ()

Public Methods

public void declareExtensions (ExtensionProfile extProfile)

Declares the set of expected Extension types for an ExtensionPoint within the target extension profile. The base implementation does not declare any extensions, but can be overridden by specific types of ExtensionPoints that always contain a well-defined set of extensions.

Parameters
extProfile The ExtensionProfile to initialize.

public void generate (XmlWriter w, ExtensionProfile extProfile)

Generates an XML representation for the extension.

Parameters
w XML writer
extProfile Extension profile
Throws
IOException

public Float getApetureFNumber ()

Returns
  • the fstop value used.
Throws
ParseException if the value is not a valid floating point number.

public String getCameraMake ()

Returns
  • the make of the camera, i.e. Nikon, Canon, Sony.

public String getCameraModel ()

Returns
  • the model of the camera used.

public static ExtensionDescription getDefaultDescription ()

public Float getDistance ()

Returns
  • the distance to the subject.
Throws
ParseException if the value is not a valid floating point number.

public ExifTag getExifTag (String exifName)

Get a particular exif tag by name. This will retrieve the proper exif tag based on the name.

Parameters
exifName

public String getExifTagValue (String exifName)

Gets the value of a particular exif tag, or null if it doesn't exist.

Parameters
exifName

public Collection<ExifTag> getExifTags ()

Gets the exif tags as a collection of ExifTag.

public Float getExposureTime ()

Returns
  • the exposure time used.

public Boolean getFlashUsed ()

Returns
  • TRUE if the flash was used.

public Float getFocalLength ()

Returns
  • the focal length used.
Throws
ParseException if the value is not a valid floating point number.

public XmlParser.ElementHandler getHandler (ExtensionProfile extProfile, String namespace, String localName, Attributes attrs)

The default implementation uses the AbstractExtension.AttributesHandler to handle parsing the extension.

Parameters
extProfile Extension profile
namespace Extension namespace
localName Tag name, without the namespace prefix
attrs Tag attributes
Returns
  • an element handler

public String getImageUniqueID ()

Returns
  • the unique image id for the photo.

public Integer getIsoEquivalent ()

Returns
  • the iso equivalent value used.
Throws
ParseException if the value was not parsable as an integer.

public Date getTime ()

Returns
  • the time the photo was taken.
Throws
ParseException if the value is not a number, represented as a long.

public void setApetureFNumber (Float fstop)

Set the fstop value used.

Parameters
fstop

public void setCameraMake (String make)

Set the make of the camera used.

Parameters
make

public void setCameraModel (String model)

Set the model of the camera used.

Parameters
model

public void setDistance (Float distance)

Set the distance to the subject.

Parameters
distance

public void setExifTagValue (String name, String value)

Sets the value of a particular exif tag by name.

Parameters
name
value

public void setExifTagValue (String name, Number value)

Convenience method to set an exif tag based on a float value.

Parameters
name
value

public void setExposureTime (Float exposure)

Set the exposure time used.

Parameters
exposure

public void setFlashUsed (Boolean flash)

Set whether the flash was used.

Parameters
flash

public void setFocalLength (Float focalLength)

Set the focal length used.

Parameters
focalLength

public void setImageUniqueID (String imageUniqueID)

Set the unique image id for the photo.

Parameters
imageUniqueID

public void setIsoEquivalent (Integer iso)

Set the iso equivalent value used.

Parameters
iso

public void setTime (Date time)

Set the date/time the photo was taken.

Parameters
time