Skip to content

Commit

Permalink
Updated build.xml for 2.5.1 release
Browse files Browse the repository at this point in the history
Rearranged project structure slightly:
- Tests now have their own folder
- Sample code now has its own folder
Added missing package.html file
  • Loading branch information
drewnoakes committed May 20, 2012
1 parent 74ead03 commit 2930406
Show file tree
Hide file tree
Showing 83 changed files with 169 additions and 200 deletions.
File renamed without changes.
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,13 @@
* http://drewnoakes.com/code/exif/
* http://code.google.com/p/metadata-extractor/
*/
package com.drew.metadata.test;
package com.drew.metadata;

import com.drew.imaging.ImageMetadataReader;
import com.drew.imaging.ImageProcessingException;
import com.drew.imaging.jpeg.JpegMetadataReader;
import com.drew.imaging.jpeg.JpegProcessingException;
import com.drew.imaging.jpeg.JpegSegmentReader;
import com.drew.metadata.Directory;
import com.drew.metadata.Metadata;
import com.drew.metadata.Tag;
import com.drew.metadata.exif.ExifReader;
import com.drew.metadata.iptc.IptcReader;

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed Source/com/drew/metadata/iptc/test/iptc1.bytes
Binary file not shown.
Binary file not shown.
Binary file removed Source/com/drew/metadata/iptc/test/withIptc.metadata
Binary file not shown.
33 changes: 33 additions & 0 deletions Source/com/drew/metadata/photoshop/package.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!--
~ Copyright 2002-2011 Drew Noakes
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
~ More information about this project is available at:
~
~ http://drewnoakes.com/code/exif/
~ http://code.google.com/p/metadata-extractor/
-->

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
</head>
<body bgcolor="white">

Contains classes for the extraction and modelling of Photoshop metadata.

<!-- Put @see and @since tags down here. -->

</body>
</html>
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@
* http://drewnoakes.com/code/exif/
* http://code.google.com/p/metadata-extractor/
*/
package com.drew.imaging.jpeg.test;
package com.drew.imaging.jpeg;

import com.drew.imaging.jpeg.JpegMetadataReader;
import com.drew.metadata.Directory;
import com.drew.metadata.Metadata;
import com.drew.metadata.exif.ExifSubIFDDirectory;
Expand All @@ -40,7 +39,7 @@ public class JpegMetadataReaderTest
@Test
public void testExtractMetadata() throws Exception
{
File withExif = new File("Source/com/drew/metadata/exif/test/withExif.jpg");
File withExif = new File("Tests/com/drew/metadata/exif/withExif.jpg");
Metadata metadata = JpegMetadataReader.readMetadata(withExif);
Assert.assertTrue(metadata.containsDirectory(ExifSubIFDDirectory.class));
Directory directory = metadata.getOrCreateDirectory(ExifSubIFDDirectory.class);
Expand All @@ -50,7 +49,7 @@ public void testExtractMetadata() throws Exception
@Test
public void testExtractMetadataUsingInputStream() throws Exception
{
File withExif = new File("Source/com/drew/metadata/exif/test/withExif.jpg");
File withExif = new File("Tests/com/drew/metadata/exif/withExif.jpg");
InputStream in = new BufferedInputStream(new FileInputStream((withExif)));
Metadata metadata = JpegMetadataReader.readMetadata(in);
Assert.assertTrue(metadata.containsDirectory(ExifSubIFDDirectory.class));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
* http://drewnoakes.com/code/exif/
* http://code.google.com/p/metadata-extractor/
*/
package com.drew.imaging.jpeg.test;
package com.drew.imaging.jpeg;

import com.drew.imaging.jpeg.JpegSegmentData;
import com.drew.lang.test.TestHelper;
import com.drew.lang.TestHelper;
import org.junit.Assert;
import org.junit.Test;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@
* http://drewnoakes.com/code/exif/
* http://code.google.com/p/metadata-extractor/
*/
package com.drew.imaging.jpeg.test;
package com.drew.imaging.jpeg;

import com.drew.imaging.jpeg.JpegProcessingException;
import com.drew.imaging.jpeg.JpegSegmentReader;
import com.drew.lang.test.TestHelper;
import com.drew.lang.TestHelper;
import com.drew.metadata.Metadata;
import com.drew.metadata.exif.ExifReader;
import com.drew.metadata.iptc.IptcReader;
Expand All @@ -43,15 +41,15 @@ public class JpegSegmentReaderTest
@Test
public void testLoadJpegWithoutExifDataReturnsNull() throws Exception
{
String jpegNoExif = "Source/com/drew/metadata/exif/test/noExif.jpg";
String jpegNoExif = "Tests/com/drew/metadata/exif/noExif.jpg";
JpegSegmentReader reader = new JpegSegmentReader(new File(jpegNoExif));
Assert.assertNull(reader.readSegment(JpegSegmentReader.SEGMENT_APP1));
}

@Test
public void testIsJpegWithJpegFile() throws Exception
{
File jpeg = new File("Source/com/drew/metadata/exif/test/withExif.jpg");
File jpeg = new File("Tests/com/drew/metadata/exif/withExif.jpg");
try {
new JpegSegmentReader(jpeg);
} catch (JpegProcessingException e) {
Expand All @@ -62,7 +60,7 @@ public void testIsJpegWithJpegFile() throws Exception
@Test
public void testIsJpegWithNonJpegFile() throws Exception
{
File nonJpeg = new File("Source/com/drew/imaging/jpeg/test/JpegSegmentReaderTest.java");
File nonJpeg = new File("Tests/com/drew/imaging/jpeg/JpegSegmentReaderTest.java");
try {
new JpegSegmentReader(nonJpeg);
Assert.fail("shouldn't be able to construct JpegSegmentReader with non-jpeg file");
Expand All @@ -74,7 +72,7 @@ public void testIsJpegWithNonJpegFile() throws Exception
@Test
public void testReadApp1Segment() throws Exception
{
File jpeg = new File("Source/com/drew/metadata/exif/test/withExif.jpg");
File jpeg = new File("Tests/com/drew/metadata/exif/withExif.jpg");
JpegSegmentReader segmentReader = new JpegSegmentReader(jpeg);
byte[] exifData = segmentReader.readSegment(JpegSegmentReader.SEGMENT_APP1);
Assert.assertNotNull(exifData);
Expand All @@ -85,7 +83,7 @@ public void testReadApp1Segment() throws Exception
@Test
public void testReadDQTSegment() throws Exception
{
File jpeg = new File("Source/com/drew/metadata/exif/test/withExif.jpg");
File jpeg = new File("Tests/com/drew/metadata/exif/withExif.jpg");
JpegSegmentReader segmentReader = new JpegSegmentReader(jpeg);
byte[] quantizationTableData = segmentReader.readSegment(JpegSegmentReader.SEGMENT_DQT);
Assert.assertNotNull(quantizationTableData);
Expand All @@ -96,15 +94,15 @@ public void testReadDQTSegment() throws Exception
@Test
public void testReadJpegByteArray() throws Exception
{
File jpeg = new File("Source/com/drew/metadata/exif/test/withExif.jpg");
File jpeg = new File("Tests/com/drew/metadata/exif/withExif.jpg");
final byte[] bytes = TestHelper.loadFileBytes(jpeg);
new JpegSegmentReader(bytes).readSegment(JpegSegmentReader.SEGMENT_APP1);
}

@Test
public void testCreateWithInputStream() throws Exception
{
File jpeg = new File("Source/com/drew/metadata/exif/test/withExif.jpg");
File jpeg = new File("Tests/com/drew/metadata/exif/withExif.jpg");
InputStream in = new FileInputStream(jpeg);
JpegSegmentReader reader = null;
try {
Expand All @@ -119,7 +117,7 @@ public void testCreateWithInputStream() throws Exception
@Test
public void testReadSecondSegmentInstance() throws Exception
{
File jpeg = new File("Source/com/drew/imaging/jpeg/test/withExifAndIptc.jpg");
File jpeg = new File("Tests/com/drew/imaging/jpeg/withExifAndIptc.jpg");
JpegSegmentReader reader = new JpegSegmentReader(jpeg);
byte[] exifData0 = reader.readSegment(JpegSegmentReader.SEGMENT_APP1, 0);
byte[] exifData1 = reader.readSegment(JpegSegmentReader.SEGMENT_APP1, 1);
Expand All @@ -130,15 +128,15 @@ public void testReadSecondSegmentInstance() throws Exception
@Test
public void testReadNonExistentSegmentInstance() throws Exception
{
File jpeg = new File("Source/com/drew/imaging/jpeg/test/withExifAndIptc.jpg");
File jpeg = new File("Tests/com/drew/imaging/jpeg/withExifAndIptc.jpg");
JpegSegmentReader reader = new JpegSegmentReader(jpeg);
Assert.assertNull("third exif segment shouldn't exist", reader.readSegment(JpegSegmentReader.SEGMENT_APP1, 3));
}

@Test
public void testGetSegmentCount() throws Exception
{
File jpeg = new File("Source/com/drew/imaging/jpeg/test/withExifAndIptc.jpg");
File jpeg = new File("Tests/com/drew/imaging/jpeg/withExifAndIptc.jpg");
JpegSegmentReader reader = new JpegSegmentReader(jpeg);
Assert.assertEquals(2, reader.getSegmentCount(JpegSegmentReader.SEGMENT_APP1));
Assert.assertEquals(1, reader.getSegmentCount(JpegSegmentReader.SEGMENT_APP2));
Expand All @@ -148,15 +146,15 @@ public void testGetSegmentCount() throws Exception
@Test
public void testCreateWithFileAndReadMultipleSegments() throws Exception
{
File jpeg = new File("Source/com/drew/imaging/jpeg/test/withExifAndIptc.jpg");
File jpeg = new File("Tests/com/drew/imaging/jpeg/withExifAndIptc.jpg");
JpegSegmentReader reader = new JpegSegmentReader(jpeg);
validateMultipleSegmentRead(reader);
}

@Test
public void testCreateWithInputStreamAndReadMultipleSegments() throws Exception
{
File jpeg = new File("Source/com/drew/imaging/jpeg/test/withExifAndIptc.jpg");
File jpeg = new File("Tests/com/drew/imaging/jpeg/withExifAndIptc.jpg");
InputStream in = new FileInputStream(jpeg);
JpegSegmentReader reader = new JpegSegmentReader(in, false);
validateMultipleSegmentRead(reader);
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@
* http://code.google.com/p/metadata-extractor/
*/

package com.drew.lang.test;
package com.drew.lang;

import com.drew.lang.BufferBoundsException;
import com.drew.lang.BufferReader;
import junit.framework.Assert;
import org.junit.Test;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@
* http://drewnoakes.com/code/exif/
* http://code.google.com/p/metadata-extractor/
*/
package com.drew.lang.test;
package com.drew.lang;

import com.drew.lang.CompoundException;
import com.drew.lang.NullOutputStream;
import org.junit.Assert;
import org.junit.Test;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@
* http://drewnoakes.com/code/exif/
* http://code.google.com/p/metadata-extractor/
*/
package com.drew.lang.test;
package com.drew.lang;

import com.drew.lang.NullOutputStream;
import org.junit.Test;

import java.io.OutputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@
* http://drewnoakes.com/code/exif/
* http://code.google.com/p/metadata-extractor/
*/
package com.drew.lang.test;
package com.drew.lang;

import com.drew.lang.Rational;
import org.junit.Assert;
import org.junit.Test;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@
* http://code.google.com/p/metadata-extractor/
*/

package com.drew.lang.test;
package com.drew.lang;

import com.drew.lang.StringUtil;
import org.junit.Assert;
import org.junit.Test;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* http://drewnoakes.com/code/exif/
* http://code.google.com/p/metadata-extractor/
*/
package com.drew.lang.test;
package com.drew.lang;

import com.drew.imaging.jpeg.JpegMetadataReader;
import com.drew.imaging.jpeg.JpegSegmentData;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@
* http://code.google.com/p/metadata-extractor/
*/

package com.drew.metadata.test;
package com.drew.metadata;

import com.drew.metadata.Age;
import org.junit.Assert;
import org.junit.Test;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
* http://drewnoakes.com/code/exif/
* http://code.google.com/p/metadata-extractor/
*/
package com.drew.metadata.test;
package com.drew.metadata;

import com.drew.lang.Rational;
import com.drew.metadata.Directory;
import com.drew.metadata.exif.ExifSubIFDDirectory;
import org.junit.Assert;
import org.junit.Before;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* http://code.google.com/p/metadata-extractor/
*/

package com.drew.metadata.test;
package com.drew.metadata;

import com.drew.imaging.jpeg.JpegProcessingException;
import com.drew.imaging.jpeg.JpegSegmentData;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* http://drewnoakes.com/code/exif/
* http://code.google.com/p/metadata-extractor/
*/
package com.drew.metadata.test;
package com.drew.metadata;

import com.drew.imaging.jpeg.JpegProcessingException;
import com.drew.imaging.jpeg.JpegSegmentData;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@
* http://drewnoakes.com/code/exif/
* http://code.google.com/p/metadata-extractor/
*/
package com.drew.metadata.test;
package com.drew.metadata;

import com.drew.metadata.Directory;
import com.drew.metadata.Metadata;
import com.drew.metadata.exif.ExifSubIFDDirectory;
import com.drew.metadata.iptc.IptcDirectory;
import org.junit.Assert;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
* http://drewnoakes.com/code/exif/
* http://code.google.com/p/metadata-extractor/
*/
package com.drew.metadata.test;
package com.drew.metadata;

import com.drew.lang.annotations.NotNull;
import com.drew.metadata.Directory;

import java.util.HashMap;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,11 @@
* http://code.google.com/p/metadata-extractor/
*/

package com.drew.metadata.test;
package com.drew.metadata;

import com.drew.imaging.ImageMetadataReader;
import com.drew.imaging.ImageProcessingException;
import com.drew.imaging.jpeg.JpegProcessingException;
import com.drew.metadata.Directory;
import com.drew.metadata.Metadata;
import com.drew.metadata.Tag;

import java.io.File;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@
* http://code.google.com/p/metadata-extractor/
*/

package com.drew.metadata.adobe.test;
package com.drew.metadata.adobe;

import com.drew.imaging.jpeg.JpegSegmentData;
import com.drew.imaging.jpeg.JpegSegmentReader;
import com.drew.metadata.Metadata;
import com.drew.metadata.adobe.AdobeJpegDirectory;
import com.drew.metadata.adobe.AdobeJpegReader;
import org.junit.Assert;
import org.junit.Test;

Expand All @@ -37,7 +35,7 @@ public class AdobeJpegReaderTest
@Test
public void testReadAdobeJpegMetadata1() throws Exception
{
final File metadataFile = new File("Source/com/drew/metadata/adobe/test/adobeJpeg1.jpg");
final File metadataFile = new File("Tests/com/drew/metadata/adobe/adobeJpeg1.jpg");
final JpegSegmentData jpegSegmentData = new JpegSegmentReader(metadataFile).getSegmentData();
final byte[] bytes = jpegSegmentData.getSegment(JpegSegmentReader.SEGMENT_APPE);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@
* http://drewnoakes.com/code/exif/
* http://code.google.com/p/metadata-extractor/
*/
package com.drew.metadata.exif.test;
package com.drew.metadata.exif;

import com.drew.metadata.exif.CanonMakernoteDescriptor;
import com.drew.metadata.exif.CanonMakernoteDirectory;
import junit.framework.Assert;
import org.junit.Test;

Expand Down
Loading

0 comments on commit 2930406

Please sign in to comment.