commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dam...@apache.org
Subject svn commit: r1241569 [1/3] - in /commons/proper/sanselan/trunk/src: main/java/org/apache/commons/sanselan/formats/tiff/ main/java/org/apache/commons/sanselan/formats/tiff/constants/ main/java/org/apache/commons/sanselan/formats/tiff/datareaders/ main/j...
Date Tue, 07 Feb 2012 19:33:58 GMT
Author: damjan
Date: Tue Feb  7 19:33:57 2012
New Revision: 1241569

URL: http://svn.apache.org/viewvc?rev=1241569&view=rev
Log:
Converted TiffDirectoryConstants to an enum,
moved constants in ExifTagConstants out of enum types
(where apparently Java doesn't allow them to ever be found?),
added licences to files where it was left out in previous commits,
and converted some magic numbers to constants.

Jira issue key: SANSELAN-42


Added:
    commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/TiffDirectoryType.java
  (with props)
Modified:
    commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/TiffField.java
    commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/TiffImageMetadata.java
    commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/ExifTagConstants.java
    commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/GpsTagConstants.java
    commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/TagConstantsUtils.java
    commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/TagHolder.java
    commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/TagInfo.java
    commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/TiffDirectoryConstants.java
    commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/TiffTagConstants.java
    commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/datareaders/DataReader.java
    commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/write/TiffOutputDirectory.java
    commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/icc/IccTagDataTypes.java
    commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/icc/IccTagTypes.java
    commons/proper/sanselan/trunk/src/test/java/org/apache/commons/sanselan/formats/jpeg/exif/TextFieldTest.java

Modified: commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/TiffField.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/TiffField.java?rev=1241569&r1=1241568&r2=1241569&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/TiffField.java
(original)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/TiffField.java
Tue Feb  7 19:33:57 2012
@@ -32,6 +32,7 @@ import org.apache.commons.sanselan.forma
 import org.apache.commons.sanselan.formats.tiff.constants.GpsTagConstants;
 import org.apache.commons.sanselan.formats.tiff.constants.TagInfo;
 import org.apache.commons.sanselan.formats.tiff.constants.TiffConstants;
+import org.apache.commons.sanselan.formats.tiff.constants.TiffDirectoryType;
 import org.apache.commons.sanselan.formats.tiff.constants.TiffTagConstants;
 import org.apache.commons.sanselan.formats.tiff.fieldtypes.FieldType;
 
@@ -137,7 +138,7 @@ public class TiffField implements TiffCo
         for (int i = 0; i < possibleMatches.size(); i++)
         {
             TagInfo tagInfo = possibleMatches.get(i);
-            if (tagInfo.directoryType == EXIF_DIRECTORY_UNKNOWN)
+            if (tagInfo.directoryType == TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN)
                 // pass
                 continue;
             else if (directoryType == tagInfo.directoryType.directoryType)
@@ -149,7 +150,7 @@ public class TiffField implements TiffCo
         {
             TagInfo tagInfo = possibleMatches.get(i);
 
-            if (tagInfo.directoryType == EXIF_DIRECTORY_UNKNOWN)
+            if (tagInfo.directoryType == TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN)
                 // pass
                 continue;
             else if (directoryType >= 0
@@ -165,7 +166,7 @@ public class TiffField implements TiffCo
         {
             TagInfo tagInfo = possibleMatches.get(i);
 
-            if (tagInfo.directoryType == EXIF_DIRECTORY_UNKNOWN)
+            if (tagInfo.directoryType == TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN)
                 return tagInfo;
         }
 

Modified: commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/TiffImageMetadata.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/TiffImageMetadata.java?rev=1241569&r1=1241568&r2=1241569&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/TiffImageMetadata.java
(original)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/TiffImageMetadata.java
Tue Feb  7 19:33:57 2012
@@ -30,8 +30,8 @@ import org.apache.commons.sanselan.commo
 import org.apache.commons.sanselan.formats.tiff.constants.AllTagConstants;
 import org.apache.commons.sanselan.formats.tiff.constants.GpsTagConstants;
 import org.apache.commons.sanselan.formats.tiff.constants.TagInfo;
-import org.apache.commons.sanselan.formats.tiff.constants.TiffConstants;
 import org.apache.commons.sanselan.formats.tiff.constants.TiffDirectoryConstants;
+import org.apache.commons.sanselan.formats.tiff.constants.TiffDirectoryType;
 import org.apache.commons.sanselan.formats.tiff.fieldtypes.FieldType;
 import org.apache.commons.sanselan.formats.tiff.write.TiffOutputDirectory;
 import org.apache.commons.sanselan.formats.tiff.write.TiffOutputField;
@@ -262,7 +262,7 @@ public class TiffImageMetadata extends I
         int tagsMatching = tagCount == null ? 0 : tagCount.intValue();
 
         List<? extends IImageMetadataItem> directories = getDirectories();
-        if (exactDirectoryMatch || tagInfo.directoryType != EXIF_DIRECTORY_UNKNOWN)
+        if (exactDirectoryMatch || tagInfo.directoryType != TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN)
         {
             for (int i = 0; i < directories.size(); i++)
             {



Mime
View raw message