commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r995859 [23/30] - in /commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan: ./ color/ common/ common/byteSources/ common/mylzw/ formats/bmp/ formats/bmp/pixelparsers/ formats/bmp/writers/ formats/gif/ formats/ico/ formats/jpeg/ f...
Date Fri, 10 Sep 2010 16:33:42 GMT
Modified: commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/constants/GPSTagConstants.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/constants/GPSTagConstants.java?rev=995859&r1=995858&r2=995859&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/constants/GPSTagConstants.java (original)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/constants/GPSTagConstants.java Fri Sep 10 16:33:35 2010
@@ -17,205 +17,205 @@
 package org.apache.sanselan.formats.tiff.constants;
 
 public interface GPSTagConstants
-		extends
-			TiffDirectoryConstants,
-			TiffFieldTypeConstants
+        extends
+            TiffDirectoryConstants,
+            TiffFieldTypeConstants
 {
-	public static final TagInfo GPS_TAG_GPS_VERSION_ID = new TagInfo(
-			"GPS Version ID", 0x0000, FIELD_TYPE_DESCRIPTION_BYTE, 4,
-			EXIF_DIRECTORY_GPS);
-
-	// ************************************************************
-	public static final TagInfo GPS_TAG_GPS_LATITUDE_REF = new TagInfo(
-			"GPS Latitude Ref", 0x0001, FIELD_TYPE_DESCRIPTION_ASCII, 2,
-			EXIF_DIRECTORY_GPS);
-
-	public static final String GPS_TAG_GPS_LATITUDE_REF_VALUE_NORTH = "N";
-	public static final String GPS_TAG_GPS_LATITUDE_REF_VALUE_SOUTH = "S";
-	// ************************************************************
-	public static final TagInfo GPS_TAG_GPS_LATITUDE = new TagInfo(
-			"GPS Latitude", 0x0002, FIELD_TYPE_DESCRIPTION_RATIONAL, 3,
-			EXIF_DIRECTORY_GPS);
-
-	// ************************************************************
-	public static final TagInfo GPS_TAG_GPS_LONGITUDE_REF = new TagInfo(
-			"GPS Longitude Ref", 0x0003, FIELD_TYPE_DESCRIPTION_ASCII, 2,
-			EXIF_DIRECTORY_GPS);
-
-	public static final String GPS_TAG_GPS_LONGITUDE_REF_VALUE_EAST = "E";
-	public static final String GPS_TAG_GPS_LONGITUDE_REF_VALUE_WEST = "W";
-	// ************************************************************
-	public static final TagInfo GPS_TAG_GPS_LONGITUDE = new TagInfo(
-			"GPS Longitude", 0x0004, FIELD_TYPE_DESCRIPTION_RATIONAL, 3,
-			EXIF_DIRECTORY_GPS);
-
-	// ************************************************************
-	public static final TagInfo GPS_TAG_GPS_ALTITUDE_REF = new TagInfo(
-			"GPS Altitude Ref", 0x0005, FIELD_TYPE_DESCRIPTION_BYTE, -1,
-			EXIF_DIRECTORY_GPS);
-
-	public static final int GPS_TAG_GPS_ALTITUDE_REF_VALUE_ABOVE_SEA_LEVEL = 0;
-	public static final int GPS_TAG_GPS_ALTITUDE_REF_VALUE_BELOW_SEA_LEVEL = 1;
-	// ************************************************************
-	public static final TagInfo GPS_TAG_GPS_ALTITUDE = new TagInfo(
-			"GPS Altitude", 0x0006, FIELD_TYPE_DESCRIPTION_RATIONAL, -1,
-			EXIF_DIRECTORY_GPS);
-
-	// ************************************************************
-	public static final TagInfo GPS_TAG_GPS_TIME_STAMP = new TagInfo(
-			"GPS Time Stamp", 0x0007, FIELD_TYPE_DESCRIPTION_RATIONAL, 3,
-			EXIF_DIRECTORY_GPS);
-
-	// ************************************************************
-	public static final TagInfo GPS_TAG_GPS_SATELLITES = new TagInfo(
-			"GPS Satellites", 0x0008, FIELD_TYPE_DESCRIPTION_ASCII, -1,
-			EXIF_DIRECTORY_GPS);
-
-	// ************************************************************
-	public static final TagInfo GPS_TAG_GPS_STATUS = new TagInfo("GPS Status",
-			0x0009, FIELD_TYPE_DESCRIPTION_ASCII, 2, EXIF_DIRECTORY_GPS);
-
-	public static final String GPS_TAG_GPS_STATUS_VALUE_MEASUREMENT_IN_PROGRESS = "A";
-	public static final String GPS_TAG_GPS_STATUS_VALUE_MEASUREMENT_INTEROPERABILITY = "V";
-	// ************************************************************
-	public static final TagInfo GPS_TAG_GPS_MEASURE_MODE = new TagInfo(
-			"GPS Measure Mode", 0x000a, FIELD_TYPE_DESCRIPTION_ASCII, 2,
-			EXIF_DIRECTORY_GPS);
-
-	public static final int GPS_TAG_GPS_MEASURE_MODE_VALUE_2_DIMENSIONAL_MEASUREMENT = 2;
-	public static final int GPS_TAG_GPS_MEASURE_MODE_VALUE_3_DIMENSIONAL_MEASUREMENT = 3;
-	// ************************************************************
-	public static final TagInfo GPS_TAG_GPS_DOP = new TagInfo("GPS DOP",
-			0x000b, FIELD_TYPE_DESCRIPTION_RATIONAL, -1, EXIF_DIRECTORY_GPS);
-
-	// ************************************************************
-	public static final TagInfo GPS_TAG_GPS_SPEED_REF = new TagInfo(
-			"GPS Speed Ref", 0x000c, FIELD_TYPE_DESCRIPTION_ASCII, 2,
-			EXIF_DIRECTORY_GPS);
-
-	public static final String GPS_TAG_GPS_SPEED_REF_VALUE_KMPH = "K";
-	public static final String GPS_TAG_GPS_SPEED_REF_VALUE_MPH = "M";
-	public static final String GPS_TAG_GPS_SPEED_REF_VALUE_KNOTS = "N";
-	// ************************************************************
-	public static final TagInfo GPS_TAG_GPS_SPEED = new TagInfo("GPS Speed",
-			0x000d, FIELD_TYPE_DESCRIPTION_RATIONAL, -1, EXIF_DIRECTORY_GPS);
-
-	// ************************************************************
-	public static final TagInfo GPS_TAG_GPS_TRACK_REF = new TagInfo(
-			"GPS Track Ref", 0x000e, FIELD_TYPE_DESCRIPTION_ASCII, 2,
-			EXIF_DIRECTORY_GPS);
-
-	public static final String GPS_TAG_GPS_TRACK_REF_VALUE_MAGNETIC_NORTH = "M";
-	public static final String GPS_TAG_GPS_TRACK_REF_VALUE_TRUE_NORTH = "T";
-	// ************************************************************
-	public static final TagInfo GPS_TAG_GPS_TRACK = new TagInfo("GPS Track",
-			0x000f, FIELD_TYPE_DESCRIPTION_RATIONAL, -1, EXIF_DIRECTORY_GPS);
-
-	// ************************************************************
-	public static final TagInfo GPS_TAG_GPS_IMG_DIRECTION_REF = new TagInfo(
-			"GPS Img Direction Ref", 0x0010, FIELD_TYPE_DESCRIPTION_ASCII, 2,
-			EXIF_DIRECTORY_GPS);
-
-	public static final String GPS_TAG_GPS_IMG_DIRECTION_REF_VALUE_MAGNETIC_NORTH = "M";
-	public static final String GPS_TAG_GPS_IMG_DIRECTION_REF_VALUE_TRUE_NORTH = "T";
-	// ************************************************************
-	public static final TagInfo GPS_TAG_GPS_IMG_DIRECTION = new TagInfo(
-			"GPS Img Direction", 0x0011, FIELD_TYPE_DESCRIPTION_RATIONAL, -1,
-			EXIF_DIRECTORY_GPS);
-
-	// ************************************************************
-	public static final TagInfo GPS_TAG_GPS_MAP_DATUM = new TagInfo(
-			"GPS Map Datum", 0x0012, FIELD_TYPE_DESCRIPTION_ASCII, -1,
-			EXIF_DIRECTORY_GPS);
-
-	// ************************************************************
-	public static final TagInfo GPS_TAG_GPS_DEST_LATITUDE_REF = new TagInfo(
-			"GPS Dest Latitude Ref", 0x0013, FIELD_TYPE_DESCRIPTION_ASCII, 2,
-			EXIF_DIRECTORY_GPS);
-
-	public static final String GPS_TAG_GPS_DEST_LATITUDE_REF_VALUE_NORTH = "N";
-	public static final String GPS_TAG_GPS_DEST_LATITUDE_REF_VALUE_SOUTH = "S";
-	// ************************************************************
-	public static final TagInfo GPS_TAG_GPS_DEST_LATITUDE = new TagInfo(
-			"GPS Dest Latitude", 0x0014, FIELD_TYPE_DESCRIPTION_RATIONAL, 3,
-			EXIF_DIRECTORY_GPS);
-
-	// ************************************************************
-	public static final TagInfo GPS_TAG_GPS_DEST_LONGITUDE_REF = new TagInfo(
-			"GPS Dest Longitude Ref", 0x0015, FIELD_TYPE_DESCRIPTION_ASCII, 2,
-			EXIF_DIRECTORY_GPS);
-
-	public static final String GPS_TAG_GPS_DEST_LONGITUDE_REF_VALUE_EAST = "E";
-	public static final String GPS_TAG_GPS_DEST_LONGITUDE_REF_VALUE_WEST = "W";
-	// ************************************************************
-	public static final TagInfo GPS_TAG_GPS_DEST_LONGITUDE = new TagInfo(
-			"GPS Dest Longitude", 0x0016, FIELD_TYPE_DESCRIPTION_RATIONAL, 3,
-			EXIF_DIRECTORY_GPS);
-
-	// ************************************************************
-	public static final TagInfo GPS_TAG_GPS_DEST_BEARING_REF = new TagInfo(
-			"GPS Dest Bearing Ref", 0x0017, FIELD_TYPE_DESCRIPTION_ASCII, 2,
-			EXIF_DIRECTORY_GPS);
-
-	public static final String GPS_TAG_GPS_DEST_BEARING_REF_VALUE_MAGNETIC_NORTH = "M";
-	public static final String GPS_TAG_GPS_DEST_BEARING_REF_VALUE_TRUE_NORTH = "T";
-	// ************************************************************
-	public static final TagInfo GPS_TAG_GPS_DEST_BEARING = new TagInfo(
-			"GPS Dest Bearing", 0x0018, FIELD_TYPE_DESCRIPTION_RATIONAL, -1,
-			EXIF_DIRECTORY_GPS);
-
-	// ************************************************************
-	public static final TagInfo GPS_TAG_GPS_DEST_DISTANCE_REF = new TagInfo(
-			"GPS Dest Distance Ref", 0x0019, FIELD_TYPE_DESCRIPTION_ASCII, 2,
-			EXIF_DIRECTORY_GPS);
-
-	public static final String GPS_TAG_GPS_DEST_DISTANCE_REF_VALUE_KILOMETERS = "K";
-	public static final String GPS_TAG_GPS_DEST_DISTANCE_REF_VALUE_MILES = "M";
-	public static final String GPS_TAG_GPS_DEST_DISTANCE_REF_VALUE_NAUTICAL_MILES = "N";
-	// ************************************************************
-	public static final TagInfo GPS_TAG_GPS_DEST_DISTANCE = new TagInfo(
-			"GPS Dest Distance", 0x001a, FIELD_TYPE_DESCRIPTION_RATIONAL, -1,
-			EXIF_DIRECTORY_GPS);
-
-	// ************************************************************
-	public static final TagInfo GPS_TAG_GPS_PROCESSING_METHOD = new TagInfo.Text(
-			"GPS Processing Method", 0x001b, FIELD_TYPE_DESCRIPTION_UNKNOWN,
-			-1, EXIF_DIRECTORY_GPS);
-
-	// ************************************************************
-	public static final TagInfo GPS_TAG_GPS_AREA_INFORMATION = new TagInfo.Text(
-			"GPS Area Information", 0x001c, FIELD_TYPE_DESCRIPTION_UNKNOWN, -1,
-			EXIF_DIRECTORY_GPS);
-
-	// ************************************************************
-	public static final TagInfo GPS_TAG_GPS_DATE_STAMP = new TagInfo(
-			"GPS Date Stamp", 0x001d, FIELD_TYPE_DESCRIPTION_ASCII, 11,
-			EXIF_DIRECTORY_GPS);
-
-	// ************************************************************
-	public static final TagInfo GPS_TAG_GPS_DIFFERENTIAL = new TagInfo(
-			"GPS Differential", 0x001e, FIELD_TYPE_DESCRIPTION_SHORT, -1,
-			EXIF_DIRECTORY_GPS);
-
-	public static final int GPS_TAG_GPS_DIFFERENTIAL_VALUE_NO_CORRECTION = 0;
-	public static final int GPS_TAG_GPS_DIFFERENTIAL_VALUE_DIFFERENTIAL_CORRECTED = 1;
-	// ************************************************************
-
-	public static final TagInfo ALL_GPS_TAGS[] = {
-			GPS_TAG_GPS_VERSION_ID, GPS_TAG_GPS_LATITUDE_REF,
-			GPS_TAG_GPS_LATITUDE, GPS_TAG_GPS_LONGITUDE_REF,
-			GPS_TAG_GPS_LONGITUDE, GPS_TAG_GPS_ALTITUDE_REF,
-			GPS_TAG_GPS_ALTITUDE, GPS_TAG_GPS_TIME_STAMP,
-			GPS_TAG_GPS_SATELLITES, GPS_TAG_GPS_STATUS,
-			GPS_TAG_GPS_MEASURE_MODE, GPS_TAG_GPS_DOP, GPS_TAG_GPS_SPEED_REF,
-			GPS_TAG_GPS_SPEED, GPS_TAG_GPS_TRACK_REF, GPS_TAG_GPS_TRACK,
-			GPS_TAG_GPS_IMG_DIRECTION_REF, GPS_TAG_GPS_IMG_DIRECTION,
-			GPS_TAG_GPS_MAP_DATUM, GPS_TAG_GPS_DEST_LATITUDE_REF,
-			GPS_TAG_GPS_DEST_LATITUDE, GPS_TAG_GPS_DEST_LONGITUDE_REF,
-			GPS_TAG_GPS_DEST_LONGITUDE, GPS_TAG_GPS_DEST_BEARING_REF,
-			GPS_TAG_GPS_DEST_BEARING, GPS_TAG_GPS_DEST_DISTANCE_REF,
-			GPS_TAG_GPS_DEST_DISTANCE, GPS_TAG_GPS_PROCESSING_METHOD,
-			GPS_TAG_GPS_AREA_INFORMATION, GPS_TAG_GPS_DATE_STAMP,
-			GPS_TAG_GPS_DIFFERENTIAL,
-	};
+    public static final TagInfo GPS_TAG_GPS_VERSION_ID = new TagInfo(
+            "GPS Version ID", 0x0000, FIELD_TYPE_DESCRIPTION_BYTE, 4,
+            EXIF_DIRECTORY_GPS);
+
+    // ************************************************************
+    public static final TagInfo GPS_TAG_GPS_LATITUDE_REF = new TagInfo(
+            "GPS Latitude Ref", 0x0001, FIELD_TYPE_DESCRIPTION_ASCII, 2,
+            EXIF_DIRECTORY_GPS);
+
+    public static final String GPS_TAG_GPS_LATITUDE_REF_VALUE_NORTH = "N";
+    public static final String GPS_TAG_GPS_LATITUDE_REF_VALUE_SOUTH = "S";
+    // ************************************************************
+    public static final TagInfo GPS_TAG_GPS_LATITUDE = new TagInfo(
+            "GPS Latitude", 0x0002, FIELD_TYPE_DESCRIPTION_RATIONAL, 3,
+            EXIF_DIRECTORY_GPS);
+
+    // ************************************************************
+    public static final TagInfo GPS_TAG_GPS_LONGITUDE_REF = new TagInfo(
+            "GPS Longitude Ref", 0x0003, FIELD_TYPE_DESCRIPTION_ASCII, 2,
+            EXIF_DIRECTORY_GPS);
+
+    public static final String GPS_TAG_GPS_LONGITUDE_REF_VALUE_EAST = "E";
+    public static final String GPS_TAG_GPS_LONGITUDE_REF_VALUE_WEST = "W";
+    // ************************************************************
+    public static final TagInfo GPS_TAG_GPS_LONGITUDE = new TagInfo(
+            "GPS Longitude", 0x0004, FIELD_TYPE_DESCRIPTION_RATIONAL, 3,
+            EXIF_DIRECTORY_GPS);
+
+    // ************************************************************
+    public static final TagInfo GPS_TAG_GPS_ALTITUDE_REF = new TagInfo(
+            "GPS Altitude Ref", 0x0005, FIELD_TYPE_DESCRIPTION_BYTE, -1,
+            EXIF_DIRECTORY_GPS);
+
+    public static final int GPS_TAG_GPS_ALTITUDE_REF_VALUE_ABOVE_SEA_LEVEL = 0;
+    public static final int GPS_TAG_GPS_ALTITUDE_REF_VALUE_BELOW_SEA_LEVEL = 1;
+    // ************************************************************
+    public static final TagInfo GPS_TAG_GPS_ALTITUDE = new TagInfo(
+            "GPS Altitude", 0x0006, FIELD_TYPE_DESCRIPTION_RATIONAL, -1,
+            EXIF_DIRECTORY_GPS);
+
+    // ************************************************************
+    public static final TagInfo GPS_TAG_GPS_TIME_STAMP = new TagInfo(
+            "GPS Time Stamp", 0x0007, FIELD_TYPE_DESCRIPTION_RATIONAL, 3,
+            EXIF_DIRECTORY_GPS);
+
+    // ************************************************************
+    public static final TagInfo GPS_TAG_GPS_SATELLITES = new TagInfo(
+            "GPS Satellites", 0x0008, FIELD_TYPE_DESCRIPTION_ASCII, -1,
+            EXIF_DIRECTORY_GPS);
+
+    // ************************************************************
+    public static final TagInfo GPS_TAG_GPS_STATUS = new TagInfo("GPS Status",
+            0x0009, FIELD_TYPE_DESCRIPTION_ASCII, 2, EXIF_DIRECTORY_GPS);
+
+    public static final String GPS_TAG_GPS_STATUS_VALUE_MEASUREMENT_IN_PROGRESS = "A";
+    public static final String GPS_TAG_GPS_STATUS_VALUE_MEASUREMENT_INTEROPERABILITY = "V";
+    // ************************************************************
+    public static final TagInfo GPS_TAG_GPS_MEASURE_MODE = new TagInfo(
+            "GPS Measure Mode", 0x000a, FIELD_TYPE_DESCRIPTION_ASCII, 2,
+            EXIF_DIRECTORY_GPS);
+
+    public static final int GPS_TAG_GPS_MEASURE_MODE_VALUE_2_DIMENSIONAL_MEASUREMENT = 2;
+    public static final int GPS_TAG_GPS_MEASURE_MODE_VALUE_3_DIMENSIONAL_MEASUREMENT = 3;
+    // ************************************************************
+    public static final TagInfo GPS_TAG_GPS_DOP = new TagInfo("GPS DOP",
+            0x000b, FIELD_TYPE_DESCRIPTION_RATIONAL, -1, EXIF_DIRECTORY_GPS);
+
+    // ************************************************************
+    public static final TagInfo GPS_TAG_GPS_SPEED_REF = new TagInfo(
+            "GPS Speed Ref", 0x000c, FIELD_TYPE_DESCRIPTION_ASCII, 2,
+            EXIF_DIRECTORY_GPS);
+
+    public static final String GPS_TAG_GPS_SPEED_REF_VALUE_KMPH = "K";
+    public static final String GPS_TAG_GPS_SPEED_REF_VALUE_MPH = "M";
+    public static final String GPS_TAG_GPS_SPEED_REF_VALUE_KNOTS = "N";
+    // ************************************************************
+    public static final TagInfo GPS_TAG_GPS_SPEED = new TagInfo("GPS Speed",
+            0x000d, FIELD_TYPE_DESCRIPTION_RATIONAL, -1, EXIF_DIRECTORY_GPS);
+
+    // ************************************************************
+    public static final TagInfo GPS_TAG_GPS_TRACK_REF = new TagInfo(
+            "GPS Track Ref", 0x000e, FIELD_TYPE_DESCRIPTION_ASCII, 2,
+            EXIF_DIRECTORY_GPS);
+
+    public static final String GPS_TAG_GPS_TRACK_REF_VALUE_MAGNETIC_NORTH = "M";
+    public static final String GPS_TAG_GPS_TRACK_REF_VALUE_TRUE_NORTH = "T";
+    // ************************************************************
+    public static final TagInfo GPS_TAG_GPS_TRACK = new TagInfo("GPS Track",
+            0x000f, FIELD_TYPE_DESCRIPTION_RATIONAL, -1, EXIF_DIRECTORY_GPS);
+
+    // ************************************************************
+    public static final TagInfo GPS_TAG_GPS_IMG_DIRECTION_REF = new TagInfo(
+            "GPS Img Direction Ref", 0x0010, FIELD_TYPE_DESCRIPTION_ASCII, 2,
+            EXIF_DIRECTORY_GPS);
+
+    public static final String GPS_TAG_GPS_IMG_DIRECTION_REF_VALUE_MAGNETIC_NORTH = "M";
+    public static final String GPS_TAG_GPS_IMG_DIRECTION_REF_VALUE_TRUE_NORTH = "T";
+    // ************************************************************
+    public static final TagInfo GPS_TAG_GPS_IMG_DIRECTION = new TagInfo(
+            "GPS Img Direction", 0x0011, FIELD_TYPE_DESCRIPTION_RATIONAL, -1,
+            EXIF_DIRECTORY_GPS);
+
+    // ************************************************************
+    public static final TagInfo GPS_TAG_GPS_MAP_DATUM = new TagInfo(
+            "GPS Map Datum", 0x0012, FIELD_TYPE_DESCRIPTION_ASCII, -1,
+            EXIF_DIRECTORY_GPS);
+
+    // ************************************************************
+    public static final TagInfo GPS_TAG_GPS_DEST_LATITUDE_REF = new TagInfo(
+            "GPS Dest Latitude Ref", 0x0013, FIELD_TYPE_DESCRIPTION_ASCII, 2,
+            EXIF_DIRECTORY_GPS);
+
+    public static final String GPS_TAG_GPS_DEST_LATITUDE_REF_VALUE_NORTH = "N";
+    public static final String GPS_TAG_GPS_DEST_LATITUDE_REF_VALUE_SOUTH = "S";
+    // ************************************************************
+    public static final TagInfo GPS_TAG_GPS_DEST_LATITUDE = new TagInfo(
+            "GPS Dest Latitude", 0x0014, FIELD_TYPE_DESCRIPTION_RATIONAL, 3,
+            EXIF_DIRECTORY_GPS);
+
+    // ************************************************************
+    public static final TagInfo GPS_TAG_GPS_DEST_LONGITUDE_REF = new TagInfo(
+            "GPS Dest Longitude Ref", 0x0015, FIELD_TYPE_DESCRIPTION_ASCII, 2,
+            EXIF_DIRECTORY_GPS);
+
+    public static final String GPS_TAG_GPS_DEST_LONGITUDE_REF_VALUE_EAST = "E";
+    public static final String GPS_TAG_GPS_DEST_LONGITUDE_REF_VALUE_WEST = "W";
+    // ************************************************************
+    public static final TagInfo GPS_TAG_GPS_DEST_LONGITUDE = new TagInfo(
+            "GPS Dest Longitude", 0x0016, FIELD_TYPE_DESCRIPTION_RATIONAL, 3,
+            EXIF_DIRECTORY_GPS);
+
+    // ************************************************************
+    public static final TagInfo GPS_TAG_GPS_DEST_BEARING_REF = new TagInfo(
+            "GPS Dest Bearing Ref", 0x0017, FIELD_TYPE_DESCRIPTION_ASCII, 2,
+            EXIF_DIRECTORY_GPS);
+
+    public static final String GPS_TAG_GPS_DEST_BEARING_REF_VALUE_MAGNETIC_NORTH = "M";
+    public static final String GPS_TAG_GPS_DEST_BEARING_REF_VALUE_TRUE_NORTH = "T";
+    // ************************************************************
+    public static final TagInfo GPS_TAG_GPS_DEST_BEARING = new TagInfo(
+            "GPS Dest Bearing", 0x0018, FIELD_TYPE_DESCRIPTION_RATIONAL, -1,
+            EXIF_DIRECTORY_GPS);
+
+    // ************************************************************
+    public static final TagInfo GPS_TAG_GPS_DEST_DISTANCE_REF = new TagInfo(
+            "GPS Dest Distance Ref", 0x0019, FIELD_TYPE_DESCRIPTION_ASCII, 2,
+            EXIF_DIRECTORY_GPS);
+
+    public static final String GPS_TAG_GPS_DEST_DISTANCE_REF_VALUE_KILOMETERS = "K";
+    public static final String GPS_TAG_GPS_DEST_DISTANCE_REF_VALUE_MILES = "M";
+    public static final String GPS_TAG_GPS_DEST_DISTANCE_REF_VALUE_NAUTICAL_MILES = "N";
+    // ************************************************************
+    public static final TagInfo GPS_TAG_GPS_DEST_DISTANCE = new TagInfo(
+            "GPS Dest Distance", 0x001a, FIELD_TYPE_DESCRIPTION_RATIONAL, -1,
+            EXIF_DIRECTORY_GPS);
+
+    // ************************************************************
+    public static final TagInfo GPS_TAG_GPS_PROCESSING_METHOD = new TagInfo.Text(
+            "GPS Processing Method", 0x001b, FIELD_TYPE_DESCRIPTION_UNKNOWN,
+            -1, EXIF_DIRECTORY_GPS);
+
+    // ************************************************************
+    public static final TagInfo GPS_TAG_GPS_AREA_INFORMATION = new TagInfo.Text(
+            "GPS Area Information", 0x001c, FIELD_TYPE_DESCRIPTION_UNKNOWN, -1,
+            EXIF_DIRECTORY_GPS);
+
+    // ************************************************************
+    public static final TagInfo GPS_TAG_GPS_DATE_STAMP = new TagInfo(
+            "GPS Date Stamp", 0x001d, FIELD_TYPE_DESCRIPTION_ASCII, 11,
+            EXIF_DIRECTORY_GPS);
+
+    // ************************************************************
+    public static final TagInfo GPS_TAG_GPS_DIFFERENTIAL = new TagInfo(
+            "GPS Differential", 0x001e, FIELD_TYPE_DESCRIPTION_SHORT, -1,
+            EXIF_DIRECTORY_GPS);
+
+    public static final int GPS_TAG_GPS_DIFFERENTIAL_VALUE_NO_CORRECTION = 0;
+    public static final int GPS_TAG_GPS_DIFFERENTIAL_VALUE_DIFFERENTIAL_CORRECTED = 1;
+    // ************************************************************
+
+    public static final TagInfo ALL_GPS_TAGS[] = {
+            GPS_TAG_GPS_VERSION_ID, GPS_TAG_GPS_LATITUDE_REF,
+            GPS_TAG_GPS_LATITUDE, GPS_TAG_GPS_LONGITUDE_REF,
+            GPS_TAG_GPS_LONGITUDE, GPS_TAG_GPS_ALTITUDE_REF,
+            GPS_TAG_GPS_ALTITUDE, GPS_TAG_GPS_TIME_STAMP,
+            GPS_TAG_GPS_SATELLITES, GPS_TAG_GPS_STATUS,
+            GPS_TAG_GPS_MEASURE_MODE, GPS_TAG_GPS_DOP, GPS_TAG_GPS_SPEED_REF,
+            GPS_TAG_GPS_SPEED, GPS_TAG_GPS_TRACK_REF, GPS_TAG_GPS_TRACK,
+            GPS_TAG_GPS_IMG_DIRECTION_REF, GPS_TAG_GPS_IMG_DIRECTION,
+            GPS_TAG_GPS_MAP_DATUM, GPS_TAG_GPS_DEST_LATITUDE_REF,
+            GPS_TAG_GPS_DEST_LATITUDE, GPS_TAG_GPS_DEST_LONGITUDE_REF,
+            GPS_TAG_GPS_DEST_LONGITUDE, GPS_TAG_GPS_DEST_BEARING_REF,
+            GPS_TAG_GPS_DEST_BEARING, GPS_TAG_GPS_DEST_DISTANCE_REF,
+            GPS_TAG_GPS_DEST_DISTANCE, GPS_TAG_GPS_PROCESSING_METHOD,
+            GPS_TAG_GPS_AREA_INFORMATION, GPS_TAG_GPS_DATE_STAMP,
+            GPS_TAG_GPS_DIFFERENTIAL,
+    };
 }

Modified: commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/constants/TagConstantsUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/constants/TagConstantsUtils.java?rev=995859&r1=995858&r2=995859&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/constants/TagConstantsUtils.java (original)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/constants/TagConstantsUtils.java Fri Sep 10 16:33:35 2010
@@ -19,30 +19,30 @@ package org.apache.sanselan.formats.tiff
 public class TagConstantsUtils implements TiffDirectoryConstants
 {
 
-	public static TagInfo[] mergeTagLists(TagInfo lists[][])
-	{
-		int count = 0;
-		for (int i = 0; i < lists.length; i++)
-			count += lists[i].length;
-
-		TagInfo result[] = new TagInfo[count];
-
-		int index = 0;
-		for (int i = 0; i < lists.length; i++)
-		{
-			System.arraycopy(lists[i], 0, result, index, lists[i].length);
-			index += lists[i].length;
-		}
-
-		return result;
-	}
-
-	public static ExifDirectoryType getExifDirectoryType(int type)
-	{
-		for (int i = 0; i < EXIF_DIRECTORIES.length; i++)
-			if (EXIF_DIRECTORIES[i].directoryType == type)
-				return EXIF_DIRECTORIES[i];
-		return EXIF_DIRECTORY_UNKNOWN;
-	}
+    public static TagInfo[] mergeTagLists(TagInfo lists[][])
+    {
+        int count = 0;
+        for (int i = 0; i < lists.length; i++)
+            count += lists[i].length;
+
+        TagInfo result[] = new TagInfo[count];
+
+        int index = 0;
+        for (int i = 0; i < lists.length; i++)
+        {
+            System.arraycopy(lists[i], 0, result, index, lists[i].length);
+            index += lists[i].length;
+        }
+
+        return result;
+    }
+
+    public static ExifDirectoryType getExifDirectoryType(int type)
+    {
+        for (int i = 0; i < EXIF_DIRECTORIES.length; i++)
+            if (EXIF_DIRECTORIES[i].directoryType == type)
+                return EXIF_DIRECTORIES[i];
+        return EXIF_DIRECTORY_UNKNOWN;
+    }
 
 }
\ No newline at end of file

Modified: commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/constants/TagInfo.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/constants/TagInfo.java?rev=995859&r1=995858&r2=995859&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/constants/TagInfo.java (original)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/constants/TagInfo.java Fri Sep 10 16:33:35 2010
@@ -30,418 +30,418 @@ import org.apache.sanselan.util.Debug;
 
 public class TagInfo implements TiffDirectoryConstants, TiffFieldTypeConstants
 {
-	protected static final int LENGTH_UNKNOWN = -1;
+    protected static final int LENGTH_UNKNOWN = -1;
 
-	public TagInfo(String name, int tag, FieldType dataType, int length,
-			ExifDirectoryType exifDirectory)
-	{
-		this(name, tag, new FieldType[]{
-			dataType
-		}, length, exifDirectory);
-	}
-
-	public TagInfo(String name, int tag, FieldType dataType, int length)
-	{
-		this(name, tag, new FieldType[]{
-			dataType
-		}, length, EXIF_DIRECTORY_UNKNOWN);
-	}
-
-	public TagInfo(String name, int tag, FieldType dataType,
-			String lengthDescription)
-	{
-		this(name, tag, new FieldType[]{
-			dataType
-		}, LENGTH_UNKNOWN, EXIF_DIRECTORY_UNKNOWN);
-	}
-
-	public TagInfo(String name, int tag, FieldType dataTypes[],
-			String lengthDescription)
-	{
-		this(name, tag, dataTypes, LENGTH_UNKNOWN, EXIF_DIRECTORY_UNKNOWN);
-	}
-
-	public TagInfo(String name, int tag, FieldType dataType)
-	{
-		this(name, tag, dataType, LENGTH_UNKNOWN, EXIF_DIRECTORY_UNKNOWN);
-	}
-
-	public TagInfo(String name, int tag, FieldType dataTypes[], int length,
-			String lengthDescription)
-	{
-		this(name, tag, dataTypes, length, EXIF_DIRECTORY_UNKNOWN);
-	}
-
-	public final String name;
-	public final int tag;
-	public final FieldType dataTypes[];
-	public final int length;
-	public final ExifDirectoryType directoryType;
-
-	//	public final String lengthDescription;
-
-	public TagInfo(String name, int tag, FieldType dataTypes[], int length,
-			ExifDirectoryType exifDirectory
-	//			, String lengthDescription
-	)
-	{
-		this.name = name;
-		this.tag = tag;
-		this.dataTypes = dataTypes;
-		this.length = length;
-		//		this.lengthDescription = lengthDescription;
-		this.directoryType = exifDirectory;
-	}
-
-	public Object getValue(TiffField entry) throws ImageReadException
-	{
-		Object o = entry.fieldType.getSimpleValue(entry);
-		return o;
-	}
-
-	public byte[] encodeValue(FieldType fieldType, Object value, int byteOrder)
-			throws ImageWriteException
-	{
-		return fieldType.writeData(value, byteOrder);
-	}
-
-	public String getDescription()
-	{
-		return tag + " (0x" + Integer.toHexString(tag) + ": " + name + "): ";
-	}
-
-	public String toString()
-	{
-		return "[TagInfo. tag: " + tag + " (0x" + Integer.toHexString(tag)
-				+ ", name: " + name + "]";
-	}
-
-	public boolean isDate()
-	{
-		return false;
-	}
-
-	public boolean isOffset()
-	{
-		return false;
-	}
-
-	public boolean isText()
-	{
-		return false;
-	}
-
-	public boolean isUnknown()
-	{
-		return false;
-	}
-
-	public static class Offset extends TagInfo
-	{
-		public Offset(String name, int tag, FieldType dataTypes[], int length,
-				ExifDirectoryType exifDirectory)
-		{
-			super(name, tag, dataTypes, length, exifDirectory);
-		}
-
-		public Offset(String name, int tag, FieldType dataType, int length,
-				ExifDirectoryType exifDirectory)
-		{
-			super(name, tag, dataType, length, exifDirectory);
-		}
-
-		public Offset(String name, int tag, FieldType dataType, int length)
-		{
-			super(name, tag, dataType, length);
-		}
-
-		//		"Exif Offset", 0x8769, FIELD_TYPE_DESCRIPTION_UNKNOWN, 1,
-		//		EXIF_DIRECTORY_UNKNOWN);
-		public boolean isOffset()
-		{
-			return true;
-		}
-	}
-
-	public static class Date extends TagInfo
-	{
-		public Date(String name, int tag, FieldType dataType, int length)
-		{
-			super(name, tag, dataType, length);
-		}
-
-		private static final DateFormat DATE_FORMAT_1 = new SimpleDateFormat(
-				"yyyy:MM:dd HH:mm:ss");
-		private static final DateFormat DATE_FORMAT_2 = new SimpleDateFormat(
-				"yyyy:MM:dd:HH:mm:ss");
-
-		public Object getValue(TiffField entry) throws ImageReadException
-		{
-			Object o = entry.fieldType.getSimpleValue(entry);
-
-			String s = (String) o;
-			try
-			{
-				java.util.Date date = DATE_FORMAT_1.parse(s);
-				return date;
-			}
-			catch (Exception e)
-			{
-				//		Debug.debug(e);
-			}
-			try
-			{
-				java.util.Date date = DATE_FORMAT_2.parse(s);
-				return date;
-			}
-			catch (Exception e)
-			{
-				Debug.debug(e);
-			}
-
-			return o;
-		}
-
-		public byte[] encodeValue(FieldType fieldType, Object value,
-				int byteOrder) throws ImageWriteException
-		{
-			throw new ImageWriteException("date encode value: " + value + " ("
-					+ Debug.getType(value) + ")");
-			//			return fieldType.writeData(value, byteOrder);
-			//			Object o = entry.fieldType.getSimpleValue(entry);
-			//			byte bytes2[];
-			//			if (tagInfo.isDate())
-			//				bytes2 = fieldType.getRawBytes(srcField);
-			//			else
-			//				bytes2 = fieldType.writeData(value, byteOrder);
-			//			return o;
-		}
-
-		public String toString()
-		{
-			return "[TagInfo. tag: " + tag + ", name: " + name + " (data)"
-					+ "]";
-		}
-
-		// TODO: use polymorphism
-		public boolean isDate()
-		{
-			return true;
-		}
-
-	}
-
-	public static final class Text extends TagInfo
-	{
-		public Text(String name, int tag, FieldType dataType, int length,
-				ExifDirectoryType exifDirectory)
-		{
-			super(name, tag, dataType, length, exifDirectory);
-		}
-
-		public Text(String name, int tag, FieldType dataTypes[], int length,
-				ExifDirectoryType exifDirectory)
-		{
-			super(name, tag, dataTypes, length, exifDirectory);
-		}
-
-		public boolean isText()
-		{
-			return true;
-		}
-
-		private static final class TextEncoding
-		{
-			public final byte prefix[];
-			public final String encodingName;
-
-			public TextEncoding(final byte[] prefix, final String encodingName)
-			{
-				this.prefix = prefix;
-				this.encodingName = encodingName;
-			}
-		}
-
-		private static final TextEncoding TEXT_ENCODING_ASCII = new TextEncoding(
-				new byte[]{
-						0x41, 0x53, 0x43, 0x49, 0x49, 0x00, 0x00, 0x00,
-				}, "US-ASCII"); // ITU-T T.50 IA5
-		private static final TextEncoding TEXT_ENCODING_JIS = new TextEncoding(
-				new byte[]{
-						0x4A, 0x49, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00,
-				}, "JIS"); // JIS X208-1990
-		private static final TextEncoding TEXT_ENCODING_UNICODE = new TextEncoding(
-				new byte[]{
-						0x55, 0x4E, 0x49, 0x43, 0x4F, 0x44, 0x45, 0x00,
-				// Which Unicode encoding to use, UTF-8?  
-				}, "UTF-8"); // Unicode Standard
-		private static final TextEncoding TEXT_ENCODING_UNDEFINED = new TextEncoding(
-				new byte[]{
-						0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-				// Try to interpret an undefined text as ISO-8859-1 (Latin)
-				}, "ISO-8859-1"); // Undefined
-		private static final TextEncoding TEXT_ENCODINGS[] = {
-				TEXT_ENCODING_ASCII, //
-				TEXT_ENCODING_JIS, //
-				TEXT_ENCODING_UNICODE, //
-				TEXT_ENCODING_UNDEFINED, //
-		};
-
-		public byte[] encodeValue(FieldType fieldType, Object value,
-				int byteOrder) throws ImageWriteException
-		{
-			if (!(value instanceof String))
-				throw new ImageWriteException("Text value not String: " + value
-						+ " (" + Debug.getType(value) + ")");
-			String s = (String) value;
-
-			try
-			{
-				// try ASCII, with NO prefix.
-				byte asciiBytes[] = s
-						.getBytes(TEXT_ENCODING_ASCII.encodingName);
-				String decodedAscii = new String(asciiBytes,
-						TEXT_ENCODING_ASCII.encodingName);
-				if (decodedAscii.equals(s))
-				{
-					// no unicode/non-ascii values.
-					byte result[] = new byte[asciiBytes.length
-							+ TEXT_ENCODING_ASCII.prefix.length];
-					System.arraycopy(TEXT_ENCODING_ASCII.prefix, 0, result, 0,
-							TEXT_ENCODING_ASCII.prefix.length);
-					System.arraycopy(asciiBytes, 0, result,
-							TEXT_ENCODING_ASCII.prefix.length,
-							asciiBytes.length);
-					return result;
-				}
-				else
-				{
-					// use unicode
-					byte unicodeBytes[] = s
-							.getBytes(TEXT_ENCODING_UNICODE.encodingName);
-					byte result[] = new byte[unicodeBytes.length
-							+ TEXT_ENCODING_UNICODE.prefix.length];
-					System.arraycopy(TEXT_ENCODING_UNICODE.prefix, 0, result,
-							0, TEXT_ENCODING_UNICODE.prefix.length);
-					System.arraycopy(unicodeBytes, 0, result,
-							TEXT_ENCODING_UNICODE.prefix.length,
-							unicodeBytes.length);
-					return result;
-				}
-			}
-			catch (UnsupportedEncodingException e)
-			{
-				throw new ImageWriteException(e.getMessage(), e);
-			}
-		}
-
-		public Object getValue(TiffField entry) throws ImageReadException
-		{
-			//			Debug.debug("entry.type", entry.type);
-			//			Debug.debug("entry.type", entry.getDescriptionWithoutValue());
-			//			Debug.debug("entry.type", entry.fieldType);
-
-			if (entry.type == FIELD_TYPE_ASCII.type)
-				return FIELD_TYPE_ASCII.getSimpleValue(entry);
-			else if (entry.type == FIELD_TYPE_UNDEFINED.type)
-				;
-			else if (entry.type == FIELD_TYPE_BYTE.type)
-				;
-			else
-			{
-				Debug.debug("entry.type", entry.type);
-				Debug.debug("entry.directoryType", entry.directoryType);
-				Debug.debug("entry.type", entry.getDescriptionWithoutValue());
-				Debug.debug("entry.type", entry.fieldType);
-				throw new ImageReadException("Text field not encoded as bytes.");
-			}
-
-			byte bytes[] = entry.fieldType.getRawBytes(entry);
-			if (bytes.length < 8)
-			{
-				try
-				{
-					// try ASCII, with NO prefix.
-					return new String(bytes, "US-ASCII");
-				}
-				catch (UnsupportedEncodingException e)
-				{
-					throw new ImageReadException(
-							"Text field missing encoding prefix.");
-				}
-			}
-
-			for (int i = 0; i < TEXT_ENCODINGS.length; i++)
-			{
-				TextEncoding encoding = TEXT_ENCODINGS[i];
-				if (BinaryFileFunctions.compareBytes(bytes, 0, encoding.prefix,
-						0, encoding.prefix.length))
-				{
-					try
-					{
-						//						Debug.debug("encodingName", encoding.encodingName);
-						return new String(bytes, encoding.prefix.length,
-								bytes.length - encoding.prefix.length,
-								encoding.encodingName);
-					}
-					catch (UnsupportedEncodingException e)
-					{
-						throw new ImageReadException(e.getMessage(), e);
-					}
-				}
-			}
-
-			//						Debug.debug("entry.tag", entry.tag + " (0x" + Integer.toHexString(entry.tag ) +")");
-			//						Debug.debug("entry.type", entry.type);
-			//						Debug.debug("bytes", bytes, 10);
-			//			throw new ImageReadException(
-			//					"Unknown Text encoding prefix.");
-
-			try
-			{
-				// try ASCII, with NO prefix.
-				return new String(bytes, "US-ASCII");
-			}
-			catch (UnsupportedEncodingException e)
-			{
-				throw new ImageReadException("Unknown text encoding prefix.");
-			}
-
-		}
-	}
-
-	public static final class Unknown extends TagInfo
-	{
-
-		public Unknown(String name, int tag, FieldType dataTypes[], int length,
-				ExifDirectoryType exifDirectory)
-		{
-			super(name, tag, dataTypes, length, exifDirectory);
-		}
-
-		public boolean isUnknown()
-		{
-			return true;
-		}
-
-		public byte[] encodeValue(FieldType fieldType, Object value,
-				int byteOrder) throws ImageWriteException
-		{
-			//			Debug.debug();
-			//			Debug.debug("unknown tag(0x" + Integer.toHexString(tag) + ") ",
-			//					this);
-			//			Debug.debug("unknown tag fieldType", fieldType);
-			//			Debug.debug("unknown tag value", value);
-			//			Debug.debug("unknown tag value", Debug.getType(value));
-			byte result[] = super.encodeValue(fieldType, value, byteOrder);
-			//			Debug.debug("unknown tag result", result);
-			return result;
-		}
-
-		public Object getValue(TiffField entry) throws ImageReadException
-		{
-			return super.getValue(entry);
-		}
-	}
+    public TagInfo(String name, int tag, FieldType dataType, int length,
+            ExifDirectoryType exifDirectory)
+    {
+        this(name, tag, new FieldType[]{
+            dataType
+        }, length, exifDirectory);
+    }
+
+    public TagInfo(String name, int tag, FieldType dataType, int length)
+    {
+        this(name, tag, new FieldType[]{
+            dataType
+        }, length, EXIF_DIRECTORY_UNKNOWN);
+    }
+
+    public TagInfo(String name, int tag, FieldType dataType,
+            String lengthDescription)
+    {
+        this(name, tag, new FieldType[]{
+            dataType
+        }, LENGTH_UNKNOWN, EXIF_DIRECTORY_UNKNOWN);
+    }
+
+    public TagInfo(String name, int tag, FieldType dataTypes[],
+            String lengthDescription)
+    {
+        this(name, tag, dataTypes, LENGTH_UNKNOWN, EXIF_DIRECTORY_UNKNOWN);
+    }
+
+    public TagInfo(String name, int tag, FieldType dataType)
+    {
+        this(name, tag, dataType, LENGTH_UNKNOWN, EXIF_DIRECTORY_UNKNOWN);
+    }
+
+    public TagInfo(String name, int tag, FieldType dataTypes[], int length,
+            String lengthDescription)
+    {
+        this(name, tag, dataTypes, length, EXIF_DIRECTORY_UNKNOWN);
+    }
+
+    public final String name;
+    public final int tag;
+    public final FieldType dataTypes[];
+    public final int length;
+    public final ExifDirectoryType directoryType;
+
+    //    public final String lengthDescription;
+
+    public TagInfo(String name, int tag, FieldType dataTypes[], int length,
+            ExifDirectoryType exifDirectory
+    //            , String lengthDescription
+    )
+    {
+        this.name = name;
+        this.tag = tag;
+        this.dataTypes = dataTypes;
+        this.length = length;
+        //        this.lengthDescription = lengthDescription;
+        this.directoryType = exifDirectory;
+    }
+
+    public Object getValue(TiffField entry) throws ImageReadException
+    {
+        Object o = entry.fieldType.getSimpleValue(entry);
+        return o;
+    }
+
+    public byte[] encodeValue(FieldType fieldType, Object value, int byteOrder)
+            throws ImageWriteException
+    {
+        return fieldType.writeData(value, byteOrder);
+    }
+
+    public String getDescription()
+    {
+        return tag + " (0x" + Integer.toHexString(tag) + ": " + name + "): ";
+    }
+
+    public String toString()
+    {
+        return "[TagInfo. tag: " + tag + " (0x" + Integer.toHexString(tag)
+                + ", name: " + name + "]";
+    }
+
+    public boolean isDate()
+    {
+        return false;
+    }
+
+    public boolean isOffset()
+    {
+        return false;
+    }
+
+    public boolean isText()
+    {
+        return false;
+    }
+
+    public boolean isUnknown()
+    {
+        return false;
+    }
+
+    public static class Offset extends TagInfo
+    {
+        public Offset(String name, int tag, FieldType dataTypes[], int length,
+                ExifDirectoryType exifDirectory)
+        {
+            super(name, tag, dataTypes, length, exifDirectory);
+        }
+
+        public Offset(String name, int tag, FieldType dataType, int length,
+                ExifDirectoryType exifDirectory)
+        {
+            super(name, tag, dataType, length, exifDirectory);
+        }
+
+        public Offset(String name, int tag, FieldType dataType, int length)
+        {
+            super(name, tag, dataType, length);
+        }
+
+        //        "Exif Offset", 0x8769, FIELD_TYPE_DESCRIPTION_UNKNOWN, 1,
+        //        EXIF_DIRECTORY_UNKNOWN);
+        public boolean isOffset()
+        {
+            return true;
+        }
+    }
+
+    public static class Date extends TagInfo
+    {
+        public Date(String name, int tag, FieldType dataType, int length)
+        {
+            super(name, tag, dataType, length);
+        }
+
+        private static final DateFormat DATE_FORMAT_1 = new SimpleDateFormat(
+                "yyyy:MM:dd HH:mm:ss");
+        private static final DateFormat DATE_FORMAT_2 = new SimpleDateFormat(
+                "yyyy:MM:dd:HH:mm:ss");
+
+        public Object getValue(TiffField entry) throws ImageReadException
+        {
+            Object o = entry.fieldType.getSimpleValue(entry);
+
+            String s = (String) o;
+            try
+            {
+                java.util.Date date = DATE_FORMAT_1.parse(s);
+                return date;
+            }
+            catch (Exception e)
+            {
+                //        Debug.debug(e);
+            }
+            try
+            {
+                java.util.Date date = DATE_FORMAT_2.parse(s);
+                return date;
+            }
+            catch (Exception e)
+            {
+                Debug.debug(e);
+            }
+
+            return o;
+        }
+
+        public byte[] encodeValue(FieldType fieldType, Object value,
+                int byteOrder) throws ImageWriteException
+        {
+            throw new ImageWriteException("date encode value: " + value + " ("
+                    + Debug.getType(value) + ")");
+            //            return fieldType.writeData(value, byteOrder);
+            //            Object o = entry.fieldType.getSimpleValue(entry);
+            //            byte bytes2[];
+            //            if (tagInfo.isDate())
+            //                bytes2 = fieldType.getRawBytes(srcField);
+            //            else
+            //                bytes2 = fieldType.writeData(value, byteOrder);
+            //            return o;
+        }
+
+        public String toString()
+        {
+            return "[TagInfo. tag: " + tag + ", name: " + name + " (data)"
+                    + "]";
+        }
+
+        // TODO: use polymorphism
+        public boolean isDate()
+        {
+            return true;
+        }
+
+    }
+
+    public static final class Text extends TagInfo
+    {
+        public Text(String name, int tag, FieldType dataType, int length,
+                ExifDirectoryType exifDirectory)
+        {
+            super(name, tag, dataType, length, exifDirectory);
+        }
+
+        public Text(String name, int tag, FieldType dataTypes[], int length,
+                ExifDirectoryType exifDirectory)
+        {
+            super(name, tag, dataTypes, length, exifDirectory);
+        }
+
+        public boolean isText()
+        {
+            return true;
+        }
+
+        private static final class TextEncoding
+        {
+            public final byte prefix[];
+            public final String encodingName;
+
+            public TextEncoding(final byte[] prefix, final String encodingName)
+            {
+                this.prefix = prefix;
+                this.encodingName = encodingName;
+            }
+        }
+
+        private static final TextEncoding TEXT_ENCODING_ASCII = new TextEncoding(
+                new byte[]{
+                        0x41, 0x53, 0x43, 0x49, 0x49, 0x00, 0x00, 0x00,
+                }, "US-ASCII"); // ITU-T T.50 IA5
+        private static final TextEncoding TEXT_ENCODING_JIS = new TextEncoding(
+                new byte[]{
+                        0x4A, 0x49, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00,
+                }, "JIS"); // JIS X208-1990
+        private static final TextEncoding TEXT_ENCODING_UNICODE = new TextEncoding(
+                new byte[]{
+                        0x55, 0x4E, 0x49, 0x43, 0x4F, 0x44, 0x45, 0x00,
+                // Which Unicode encoding to use, UTF-8?
+                }, "UTF-8"); // Unicode Standard
+        private static final TextEncoding TEXT_ENCODING_UNDEFINED = new TextEncoding(
+                new byte[]{
+                        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+                // Try to interpret an undefined text as ISO-8859-1 (Latin)
+                }, "ISO-8859-1"); // Undefined
+        private static final TextEncoding TEXT_ENCODINGS[] = {
+                TEXT_ENCODING_ASCII, //
+                TEXT_ENCODING_JIS, //
+                TEXT_ENCODING_UNICODE, //
+                TEXT_ENCODING_UNDEFINED, //
+        };
+
+        public byte[] encodeValue(FieldType fieldType, Object value,
+                int byteOrder) throws ImageWriteException
+        {
+            if (!(value instanceof String))
+                throw new ImageWriteException("Text value not String: " + value
+                        + " (" + Debug.getType(value) + ")");
+            String s = (String) value;
+
+            try
+            {
+                // try ASCII, with NO prefix.
+                byte asciiBytes[] = s
+                        .getBytes(TEXT_ENCODING_ASCII.encodingName);
+                String decodedAscii = new String(asciiBytes,
+                        TEXT_ENCODING_ASCII.encodingName);
+                if (decodedAscii.equals(s))
+                {
+                    // no unicode/non-ascii values.
+                    byte result[] = new byte[asciiBytes.length
+                            + TEXT_ENCODING_ASCII.prefix.length];
+                    System.arraycopy(TEXT_ENCODING_ASCII.prefix, 0, result, 0,
+                            TEXT_ENCODING_ASCII.prefix.length);
+                    System.arraycopy(asciiBytes, 0, result,
+                            TEXT_ENCODING_ASCII.prefix.length,
+                            asciiBytes.length);
+                    return result;
+                }
+                else
+                {
+                    // use unicode
+                    byte unicodeBytes[] = s
+                            .getBytes(TEXT_ENCODING_UNICODE.encodingName);
+                    byte result[] = new byte[unicodeBytes.length
+                            + TEXT_ENCODING_UNICODE.prefix.length];
+                    System.arraycopy(TEXT_ENCODING_UNICODE.prefix, 0, result,
+                            0, TEXT_ENCODING_UNICODE.prefix.length);
+                    System.arraycopy(unicodeBytes, 0, result,
+                            TEXT_ENCODING_UNICODE.prefix.length,
+                            unicodeBytes.length);
+                    return result;
+                }
+            }
+            catch (UnsupportedEncodingException e)
+            {
+                throw new ImageWriteException(e.getMessage(), e);
+            }
+        }
+
+        public Object getValue(TiffField entry) throws ImageReadException
+        {
+            //            Debug.debug("entry.type", entry.type);
+            //            Debug.debug("entry.type", entry.getDescriptionWithoutValue());
+            //            Debug.debug("entry.type", entry.fieldType);
+
+            if (entry.type == FIELD_TYPE_ASCII.type)
+                return FIELD_TYPE_ASCII.getSimpleValue(entry);
+            else if (entry.type == FIELD_TYPE_UNDEFINED.type)
+                ;
+            else if (entry.type == FIELD_TYPE_BYTE.type)
+                ;
+            else
+            {
+                Debug.debug("entry.type", entry.type);
+                Debug.debug("entry.directoryType", entry.directoryType);
+                Debug.debug("entry.type", entry.getDescriptionWithoutValue());
+                Debug.debug("entry.type", entry.fieldType);
+                throw new ImageReadException("Text field not encoded as bytes.");
+            }
+
+            byte bytes[] = entry.fieldType.getRawBytes(entry);
+            if (bytes.length < 8)
+            {
+                try
+                {
+                    // try ASCII, with NO prefix.
+                    return new String(bytes, "US-ASCII");
+                }
+                catch (UnsupportedEncodingException e)
+                {
+                    throw new ImageReadException(
+                            "Text field missing encoding prefix.");
+                }
+            }
+
+            for (int i = 0; i < TEXT_ENCODINGS.length; i++)
+            {
+                TextEncoding encoding = TEXT_ENCODINGS[i];
+                if (BinaryFileFunctions.compareBytes(bytes, 0, encoding.prefix,
+                        0, encoding.prefix.length))
+                {
+                    try
+                    {
+                        //                        Debug.debug("encodingName", encoding.encodingName);
+                        return new String(bytes, encoding.prefix.length,
+                                bytes.length - encoding.prefix.length,
+                                encoding.encodingName);
+                    }
+                    catch (UnsupportedEncodingException e)
+                    {
+                        throw new ImageReadException(e.getMessage(), e);
+                    }
+                }
+            }
+
+            //                        Debug.debug("entry.tag", entry.tag + " (0x" + Integer.toHexString(entry.tag ) +")");
+            //                        Debug.debug("entry.type", entry.type);
+            //                        Debug.debug("bytes", bytes, 10);
+            //            throw new ImageReadException(
+            //                    "Unknown Text encoding prefix.");
+
+            try
+            {
+                // try ASCII, with NO prefix.
+                return new String(bytes, "US-ASCII");
+            }
+            catch (UnsupportedEncodingException e)
+            {
+                throw new ImageReadException("Unknown text encoding prefix.");
+            }
+
+        }
+    }
+
+    public static final class Unknown extends TagInfo
+    {
+
+        public Unknown(String name, int tag, FieldType dataTypes[], int length,
+                ExifDirectoryType exifDirectory)
+        {
+            super(name, tag, dataTypes, length, exifDirectory);
+        }
+
+        public boolean isUnknown()
+        {
+            return true;
+        }
+
+        public byte[] encodeValue(FieldType fieldType, Object value,
+                int byteOrder) throws ImageWriteException
+        {
+            //            Debug.debug();
+            //            Debug.debug("unknown tag(0x" + Integer.toHexString(tag) + ") ",
+            //                    this);
+            //            Debug.debug("unknown tag fieldType", fieldType);
+            //            Debug.debug("unknown tag value", value);
+            //            Debug.debug("unknown tag value", Debug.getType(value));
+            byte result[] = super.encodeValue(fieldType, value, byteOrder);
+            //            Debug.debug("unknown tag result", result);
+            return result;
+        }
+
+        public Object getValue(TiffField entry) throws ImageReadException
+        {
+            return super.getValue(entry);
+        }
+    }
 
 }
\ No newline at end of file

Modified: commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/constants/TiffConstants.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/constants/TiffConstants.java?rev=995859&r1=995858&r2=995859&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/constants/TiffConstants.java (original)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/constants/TiffConstants.java Fri Sep 10 16:33:35 2010
@@ -20,29 +20,29 @@ import org.apache.sanselan.SanselanConst
 import org.apache.sanselan.common.BinaryConstants;
 
 public interface TiffConstants
-		extends
-			SanselanConstants,
-			TiffFieldTypeConstants,
-			TiffDirectoryConstants,
-			AllTagConstants,
-			BinaryConstants
+        extends
+            SanselanConstants,
+            TiffFieldTypeConstants,
+            TiffDirectoryConstants,
+            AllTagConstants,
+            BinaryConstants
 {
-	public static final int DEFAULT_TIFF_BYTE_ORDER = BYTE_ORDER_INTEL;
+    public static final int DEFAULT_TIFF_BYTE_ORDER = BYTE_ORDER_INTEL;
 
-	public static final int TIFF_HEADER_SIZE = 8;
-	public static final int TIFF_DIRECTORY_HEADER_LENGTH = 2;
-	public static final int TIFF_DIRECTORY_FOOTER_LENGTH = 4;
-	public static final int TIFF_ENTRY_LENGTH = 12;
-	public static final int TIFF_ENTRY_MAX_VALUE_LENGTH = 4;
+    public static final int TIFF_HEADER_SIZE = 8;
+    public static final int TIFF_DIRECTORY_HEADER_LENGTH = 2;
+    public static final int TIFF_DIRECTORY_FOOTER_LENGTH = 4;
+    public static final int TIFF_ENTRY_LENGTH = 12;
+    public static final int TIFF_ENTRY_MAX_VALUE_LENGTH = 4;
 
-	public static final int TIFF_COMPRESSION_UNCOMPRESSED_1 = 1;
-	public static final int TIFF_COMPRESSION_UNCOMPRESSED = TIFF_COMPRESSION_UNCOMPRESSED_1;
-	public static final int TIFF_COMPRESSION_CCITT_1D = 2;
-	public static final int TIFF_COMPRESSION_CCITT_GROUP_3 = 3;
-	public static final int TIFF_COMPRESSION_CCITT_GROUP_4 = 4;
-	public static final int TIFF_COMPRESSION_LZW = 5;
-	public static final int TIFF_COMPRESSION_JPEG = 6;
-	public static final int TIFF_COMPRESSION_UNCOMPRESSED_2 = 32771;
-	public static final int TIFF_COMPRESSION_PACKBITS = 32773;
+    public static final int TIFF_COMPRESSION_UNCOMPRESSED_1 = 1;
+    public static final int TIFF_COMPRESSION_UNCOMPRESSED = TIFF_COMPRESSION_UNCOMPRESSED_1;
+    public static final int TIFF_COMPRESSION_CCITT_1D = 2;
+    public static final int TIFF_COMPRESSION_CCITT_GROUP_3 = 3;
+    public static final int TIFF_COMPRESSION_CCITT_GROUP_4 = 4;
+    public static final int TIFF_COMPRESSION_LZW = 5;
+    public static final int TIFF_COMPRESSION_JPEG = 6;
+    public static final int TIFF_COMPRESSION_UNCOMPRESSED_2 = 32771;
+    public static final int TIFF_COMPRESSION_PACKBITS = 32773;
 
 }
\ No newline at end of file

Modified: commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/constants/TiffDirectoryConstants.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/constants/TiffDirectoryConstants.java?rev=995859&r1=995858&r2=995859&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/constants/TiffDirectoryConstants.java (original)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/constants/TiffDirectoryConstants.java Fri Sep 10 16:33:35 2010
@@ -19,106 +19,106 @@ package org.apache.sanselan.formats.tiff
 public interface TiffDirectoryConstants
 {
 
-	public static final int DIRECTORY_TYPE_UNKNOWN = -1;
-	public static final int DIRECTORY_TYPE_ROOT = 0;
-	public static final int DIRECTORY_TYPE_SUB = 1;
-	public static final int DIRECTORY_TYPE_SUB0 = 1;
-	public static final int DIRECTORY_TYPE_SUB1 = 2;
-	public static final int DIRECTORY_TYPE_SUB2 = 3;
-	public static final int DIRECTORY_TYPE_THUMBNAIL = 2;
-	public static final int DIRECTORY_TYPE_EXIF = -2;
-	//	public static final int DIRECTORY_TYPE_SUB = 5;
-	public static final int DIRECTORY_TYPE_GPS = -3;
-	public static final int DIRECTORY_TYPE_INTEROPERABILITY = -4;
-	public static final int DIRECTORY_TYPE_MAKER_NOTES = -5;
-	public static final int DIRECTORY_TYPE_DIR_0 = 0;
-	public static final int DIRECTORY_TYPE_DIR_1 = 1;
-	public static final int DIRECTORY_TYPE_DIR_2 = 2;
-	public static final int DIRECTORY_TYPE_DIR_3 = 3;
-	public static final int DIRECTORY_TYPE_DIR_4 = 4;
-
-	public abstract static class ExifDirectoryType
-	{
-		public final int directoryType;
-		public final String name;
-
-		public ExifDirectoryType(final int directoryType, final String name)
-		{
-			this.directoryType = directoryType;
-			this.name = name;
-		}
-
-		public abstract boolean isImageDirectory();
-
-		public static class Image extends ExifDirectoryType
-		{
-			public Image(final int directoryType, final String name)
-			{
-				super(directoryType, name);
-			}
-
-			public boolean isImageDirectory()
-			{
-				return true;
-			}
-		}
-
-		public static class Special extends ExifDirectoryType
-		{
-			public Special(final int directoryType, final String name)
-			{
-				super(directoryType, name);
-			}
-
-			public boolean isImageDirectory()
-			{
-				return false;
-			}
-		}
-
-	}
-
-	public static final ExifDirectoryType TIFF_DIRECTORY_IFD0 = new ExifDirectoryType.Image(
-			DIRECTORY_TYPE_DIR_0, "IFD0");
-	public static final ExifDirectoryType EXIF_DIRECTORY_IFD0 = TIFF_DIRECTORY_IFD0;
-	public static final ExifDirectoryType TIFF_DIRECTORY_ROOT = TIFF_DIRECTORY_IFD0;
-
-	public static final ExifDirectoryType TIFF_DIRECTORY_IFD1 = new ExifDirectoryType.Image(
-			DIRECTORY_TYPE_DIR_1, "IFD1");
-	public static final ExifDirectoryType EXIF_DIRECTORY_IFD1 = TIFF_DIRECTORY_IFD1;
-
-	public static final ExifDirectoryType TIFF_DIRECTORY_IFD2 = new ExifDirectoryType.Image(
-			DIRECTORY_TYPE_DIR_2, "IFD2");
-	public static final ExifDirectoryType EXIF_DIRECTORY_IFD2 = TIFF_DIRECTORY_IFD2;
-
-	public static final ExifDirectoryType TIFF_DIRECTORY_IFD3 = new ExifDirectoryType.Image(
-			DIRECTORY_TYPE_DIR_3, "IFD3");
-	public static final ExifDirectoryType EXIF_DIRECTORY_IFD3 = TIFF_DIRECTORY_IFD3;
-
-	public static final ExifDirectoryType EXIF_DIRECTORY_SUB_IFD = TIFF_DIRECTORY_IFD1;
-	public static final ExifDirectoryType EXIF_DIRECTORY_SUB_IFD1 = TIFF_DIRECTORY_IFD2;
-	public static final ExifDirectoryType EXIF_DIRECTORY_SUB_IFD2 = TIFF_DIRECTORY_IFD3;
-
-	public static final ExifDirectoryType EXIF_DIRECTORY_INTEROP_IFD = new ExifDirectoryType.Special(
-			DIRECTORY_TYPE_INTEROPERABILITY, "Interop IFD");
-	public static final ExifDirectoryType EXIF_DIRECTORY_MAKER_NOTES = new ExifDirectoryType.Special(
-			DIRECTORY_TYPE_MAKER_NOTES, "Maker Notes");
-	public static final ExifDirectoryType EXIF_DIRECTORY_EXIF_IFD = new ExifDirectoryType.Special(
-			DIRECTORY_TYPE_EXIF, "Exif IFD");
-	public static final ExifDirectoryType EXIF_DIRECTORY_GPS = new ExifDirectoryType.Special(
-			DIRECTORY_TYPE_GPS, "GPS IFD");
-
-	public static final ExifDirectoryType EXIF_DIRECTORY_UNKNOWN = null;
-
-	public static final ExifDirectoryType EXIF_DIRECTORIES[] = {
-			TIFF_DIRECTORY_ROOT, EXIF_DIRECTORY_EXIF_IFD, TIFF_DIRECTORY_IFD0,
-			EXIF_DIRECTORY_IFD0, TIFF_DIRECTORY_IFD1, EXIF_DIRECTORY_IFD1,
-			TIFF_DIRECTORY_IFD2, EXIF_DIRECTORY_IFD2,
-			EXIF_DIRECTORY_INTEROP_IFD, EXIF_DIRECTORY_MAKER_NOTES,
-			EXIF_DIRECTORY_SUB_IFD, EXIF_DIRECTORY_SUB_IFD1,
-			EXIF_DIRECTORY_SUB_IFD2,
-			//EXIF_DIRECTORY_UNKNOWN,
-			EXIF_DIRECTORY_GPS,
-	};
+    public static final int DIRECTORY_TYPE_UNKNOWN = -1;
+    public static final int DIRECTORY_TYPE_ROOT = 0;
+    public static final int DIRECTORY_TYPE_SUB = 1;
+    public static final int DIRECTORY_TYPE_SUB0 = 1;
+    public static final int DIRECTORY_TYPE_SUB1 = 2;
+    public static final int DIRECTORY_TYPE_SUB2 = 3;
+    public static final int DIRECTORY_TYPE_THUMBNAIL = 2;
+    public static final int DIRECTORY_TYPE_EXIF = -2;
+    //    public static final int DIRECTORY_TYPE_SUB = 5;
+    public static final int DIRECTORY_TYPE_GPS = -3;
+    public static final int DIRECTORY_TYPE_INTEROPERABILITY = -4;
+    public static final int DIRECTORY_TYPE_MAKER_NOTES = -5;
+    public static final int DIRECTORY_TYPE_DIR_0 = 0;
+    public static final int DIRECTORY_TYPE_DIR_1 = 1;
+    public static final int DIRECTORY_TYPE_DIR_2 = 2;
+    public static final int DIRECTORY_TYPE_DIR_3 = 3;
+    public static final int DIRECTORY_TYPE_DIR_4 = 4;
+
+    public abstract static class ExifDirectoryType
+    {
+        public final int directoryType;
+        public final String name;
+
+        public ExifDirectoryType(final int directoryType, final String name)
+        {
+            this.directoryType = directoryType;
+            this.name = name;
+        }
+
+        public abstract boolean isImageDirectory();
+
+        public static class Image extends ExifDirectoryType
+        {
+            public Image(final int directoryType, final String name)
+            {
+                super(directoryType, name);
+            }
+
+            public boolean isImageDirectory()
+            {
+                return true;
+            }
+        }
+
+        public static class Special extends ExifDirectoryType
+        {
+            public Special(final int directoryType, final String name)
+            {
+                super(directoryType, name);
+            }
+
+            public boolean isImageDirectory()
+            {
+                return false;
+            }
+        }
+
+    }
+
+    public static final ExifDirectoryType TIFF_DIRECTORY_IFD0 = new ExifDirectoryType.Image(
+            DIRECTORY_TYPE_DIR_0, "IFD0");
+    public static final ExifDirectoryType EXIF_DIRECTORY_IFD0 = TIFF_DIRECTORY_IFD0;
+    public static final ExifDirectoryType TIFF_DIRECTORY_ROOT = TIFF_DIRECTORY_IFD0;
+
+    public static final ExifDirectoryType TIFF_DIRECTORY_IFD1 = new ExifDirectoryType.Image(
+            DIRECTORY_TYPE_DIR_1, "IFD1");
+    public static final ExifDirectoryType EXIF_DIRECTORY_IFD1 = TIFF_DIRECTORY_IFD1;
+
+    public static final ExifDirectoryType TIFF_DIRECTORY_IFD2 = new ExifDirectoryType.Image(
+            DIRECTORY_TYPE_DIR_2, "IFD2");
+    public static final ExifDirectoryType EXIF_DIRECTORY_IFD2 = TIFF_DIRECTORY_IFD2;
+
+    public static final ExifDirectoryType TIFF_DIRECTORY_IFD3 = new ExifDirectoryType.Image(
+            DIRECTORY_TYPE_DIR_3, "IFD3");
+    public static final ExifDirectoryType EXIF_DIRECTORY_IFD3 = TIFF_DIRECTORY_IFD3;
+
+    public static final ExifDirectoryType EXIF_DIRECTORY_SUB_IFD = TIFF_DIRECTORY_IFD1;
+    public static final ExifDirectoryType EXIF_DIRECTORY_SUB_IFD1 = TIFF_DIRECTORY_IFD2;
+    public static final ExifDirectoryType EXIF_DIRECTORY_SUB_IFD2 = TIFF_DIRECTORY_IFD3;
+
+    public static final ExifDirectoryType EXIF_DIRECTORY_INTEROP_IFD = new ExifDirectoryType.Special(
+            DIRECTORY_TYPE_INTEROPERABILITY, "Interop IFD");
+    public static final ExifDirectoryType EXIF_DIRECTORY_MAKER_NOTES = new ExifDirectoryType.Special(
+            DIRECTORY_TYPE_MAKER_NOTES, "Maker Notes");
+    public static final ExifDirectoryType EXIF_DIRECTORY_EXIF_IFD = new ExifDirectoryType.Special(
+            DIRECTORY_TYPE_EXIF, "Exif IFD");
+    public static final ExifDirectoryType EXIF_DIRECTORY_GPS = new ExifDirectoryType.Special(
+            DIRECTORY_TYPE_GPS, "GPS IFD");
+
+    public static final ExifDirectoryType EXIF_DIRECTORY_UNKNOWN = null;
+
+    public static final ExifDirectoryType EXIF_DIRECTORIES[] = {
+            TIFF_DIRECTORY_ROOT, EXIF_DIRECTORY_EXIF_IFD, TIFF_DIRECTORY_IFD0,
+            EXIF_DIRECTORY_IFD0, TIFF_DIRECTORY_IFD1, EXIF_DIRECTORY_IFD1,
+            TIFF_DIRECTORY_IFD2, EXIF_DIRECTORY_IFD2,
+            EXIF_DIRECTORY_INTEROP_IFD, EXIF_DIRECTORY_MAKER_NOTES,
+            EXIF_DIRECTORY_SUB_IFD, EXIF_DIRECTORY_SUB_IFD1,
+            EXIF_DIRECTORY_SUB_IFD2,
+            //EXIF_DIRECTORY_UNKNOWN,
+            EXIF_DIRECTORY_GPS,
+    };
 
 }
\ No newline at end of file

Modified: commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/constants/TiffFieldTypeConstants.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/constants/TiffFieldTypeConstants.java?rev=995859&r1=995858&r2=995859&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/constants/TiffFieldTypeConstants.java (original)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/constants/TiffFieldTypeConstants.java Fri Sep 10 16:33:35 2010
@@ -30,74 +30,74 @@ import org.apache.sanselan.formats.tiff.
 public interface TiffFieldTypeConstants extends SanselanConstants
 {
 
-	public static final FieldTypeByte FIELD_TYPE_BYTE = new FieldTypeByte(1,
-			"Byte");
+    public static final FieldTypeByte FIELD_TYPE_BYTE = new FieldTypeByte(1,
+            "Byte");
 
-	public static final FieldTypeASCII FIELD_TYPE_ASCII = new FieldTypeASCII(2,
-			"ASCII");
+    public static final FieldTypeASCII FIELD_TYPE_ASCII = new FieldTypeASCII(2,
+            "ASCII");
 
-	public static final FieldTypeShort FIELD_TYPE_SHORT = new FieldTypeShort(3,
-			"Short");
+    public static final FieldTypeShort FIELD_TYPE_SHORT = new FieldTypeShort(3,
+            "Short");
 
-	public static final FieldTypeLong FIELD_TYPE_LONG = new FieldTypeLong(4,
-			"Long");
-
-	public static final FieldTypeRational FIELD_TYPE_RATIONAL = new FieldTypeRational(
-			5, "Rational");
-
-	public static final FieldType FIELD_TYPE_SBYTE = new FieldTypeByte(6,
-			"SByte");
-	public static final FieldType FIELD_TYPE_UNDEFINED = new FieldTypeByte(7,
-			"Undefined");
-	public static final FieldType FIELD_TYPE_SSHORT = new FieldTypeShort(8,
-			"SShort");
-
-	public static final FieldType FIELD_TYPE_SLONG = new FieldTypeLong(9,
-			"SLong");
-
-	public static final FieldType FIELD_TYPE_SRATIONAL = new FieldTypeRational(
-			10, "SRational");
-
-	public static final FieldType FIELD_TYPE_FLOAT = new FieldTypeFloat();
-
-	public static final FieldType FIELD_TYPE_DOUBLE = new FieldTypeDouble();
-
-	public static final FieldType FIELD_TYPE_UNKNOWN = new FieldTypeUnknown();
-
-	public static final FieldType FIELD_TYPES[] = {
-			FIELD_TYPE_BYTE, FIELD_TYPE_ASCII, FIELD_TYPE_SHORT,
-			FIELD_TYPE_LONG, FIELD_TYPE_RATIONAL, FIELD_TYPE_SBYTE,
-			FIELD_TYPE_UNDEFINED, FIELD_TYPE_SSHORT, FIELD_TYPE_SLONG,
-			FIELD_TYPE_SRATIONAL, FIELD_TYPE_FLOAT, FIELD_TYPE_DOUBLE,
-	};
-
-	public static final FieldType FIELD_TYPE_ANY[] = FIELD_TYPES;
-
-	public static final FieldType FIELD_TYPE_DESCRIPTION_LONG[] = {
-		FIELD_TYPE_LONG,
-	};
-	public static final FieldType FIELD_TYPE_DESCRIPTION_SHORT[] = {
-		FIELD_TYPE_SHORT,
-	};
-	public static final FieldType FIELD_TYPE_DESCRIPTION_SHORT_OR_LONG[] = {
-			FIELD_TYPE_SHORT, FIELD_TYPE_LONG,
-	};
-	public static final FieldType FIELD_TYPE_DESCRIPTION_ASCII[] = {
-		FIELD_TYPE_ASCII,
-	};
-	public static final FieldType FIELD_TYPE_DESCRIPTION_LONG_OR_SHORT[] = {
-			FIELD_TYPE_SHORT, FIELD_TYPE_LONG,
-	};
-	public static final FieldType FIELD_TYPE_DESCRIPTION_RATIONAL[] = {
-		FIELD_TYPE_RATIONAL,
-	};
-	public static final FieldType FIELD_TYPE_DESCRIPTION_BYTE_OR_SHORT[] = {
-			FIELD_TYPE_SHORT, FIELD_TYPE_BYTE
-	};
-	public static final FieldType FIELD_TYPE_DESCRIPTION_BYTE[] = {
-		FIELD_TYPE_BYTE,
-	};
-	public static final FieldType FIELD_TYPE_DESCRIPTION_ANY[] = FIELD_TYPE_ANY;
-	public static final FieldType FIELD_TYPE_DESCRIPTION_UNKNOWN[] = null;
+    public static final FieldTypeLong FIELD_TYPE_LONG = new FieldTypeLong(4,
+            "Long");
+
+    public static final FieldTypeRational FIELD_TYPE_RATIONAL = new FieldTypeRational(
+            5, "Rational");
+
+    public static final FieldType FIELD_TYPE_SBYTE = new FieldTypeByte(6,
+            "SByte");
+    public static final FieldType FIELD_TYPE_UNDEFINED = new FieldTypeByte(7,
+            "Undefined");
+    public static final FieldType FIELD_TYPE_SSHORT = new FieldTypeShort(8,
+            "SShort");
+
+    public static final FieldType FIELD_TYPE_SLONG = new FieldTypeLong(9,
+            "SLong");
+
+    public static final FieldType FIELD_TYPE_SRATIONAL = new FieldTypeRational(
+            10, "SRational");
+
+    public static final FieldType FIELD_TYPE_FLOAT = new FieldTypeFloat();
+
+    public static final FieldType FIELD_TYPE_DOUBLE = new FieldTypeDouble();
+
+    public static final FieldType FIELD_TYPE_UNKNOWN = new FieldTypeUnknown();
+
+    public static final FieldType FIELD_TYPES[] = {
+            FIELD_TYPE_BYTE, FIELD_TYPE_ASCII, FIELD_TYPE_SHORT,
+            FIELD_TYPE_LONG, FIELD_TYPE_RATIONAL, FIELD_TYPE_SBYTE,
+            FIELD_TYPE_UNDEFINED, FIELD_TYPE_SSHORT, FIELD_TYPE_SLONG,
+            FIELD_TYPE_SRATIONAL, FIELD_TYPE_FLOAT, FIELD_TYPE_DOUBLE,
+    };
+
+    public static final FieldType FIELD_TYPE_ANY[] = FIELD_TYPES;
+
+    public static final FieldType FIELD_TYPE_DESCRIPTION_LONG[] = {
+        FIELD_TYPE_LONG,
+    };
+    public static final FieldType FIELD_TYPE_DESCRIPTION_SHORT[] = {
+        FIELD_TYPE_SHORT,
+    };
+    public static final FieldType FIELD_TYPE_DESCRIPTION_SHORT_OR_LONG[] = {
+            FIELD_TYPE_SHORT, FIELD_TYPE_LONG,
+    };
+    public static final FieldType FIELD_TYPE_DESCRIPTION_ASCII[] = {
+        FIELD_TYPE_ASCII,
+    };
+    public static final FieldType FIELD_TYPE_DESCRIPTION_LONG_OR_SHORT[] = {
+            FIELD_TYPE_SHORT, FIELD_TYPE_LONG,
+    };
+    public static final FieldType FIELD_TYPE_DESCRIPTION_RATIONAL[] = {
+        FIELD_TYPE_RATIONAL,
+    };
+    public static final FieldType FIELD_TYPE_DESCRIPTION_BYTE_OR_SHORT[] = {
+            FIELD_TYPE_SHORT, FIELD_TYPE_BYTE
+    };
+    public static final FieldType FIELD_TYPE_DESCRIPTION_BYTE[] = {
+        FIELD_TYPE_BYTE,
+    };
+    public static final FieldType FIELD_TYPE_DESCRIPTION_ANY[] = FIELD_TYPE_ANY;
+    public static final FieldType FIELD_TYPE_DESCRIPTION_UNKNOWN[] = null;
 
 }
\ No newline at end of file



Mime
View raw message