Author: jukka
Date: Sat Oct 24 23:39:16 2009
New Revision: 829469
URL: http://svn.apache.org/viewvc?rev=829469&view=rev
Log:
TIKA-314: Initial support for JPEG EXIF metadata extraction
Add license headers, generics
Modified:
lucene/tika/trunk/tika-parsers/src/main/java/org/apache/tika/parser/jpeg/JpegParser.java
lucene/tika/trunk/tika-parsers/src/test/java/org/apache/tika/parser/jpeg/JpegParserTest.java
Modified:
lucene/tika/trunk/tika-parsers/src/main/java/org/apache/tika/parser/jpeg/JpegParser.java
URL:
http://svn.apache.org/viewvc/lucene/tika/trunk/tika-parsers/src/main/java/org/apache/tika/parser/jpeg/JpegParser.java?rev=829469&r1=829468&r2=829469&view=diff
==============================================================================
---
lucene/tika/trunk/tika-parsers/src/main/java/org/apache/tika/parser/jpeg/JpegParser.java
(original)
+++
lucene/tika/trunk/tika-parsers/src/main/java/org/apache/tika/parser/jpeg/JpegParser.java
Sat Oct 24 23:39:16 2009
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
package org.apache.tika.parser.jpeg;
import org.apache.tika.parser.Parser;
@@ -37,10 +53,10 @@
try {
com.drew.metadata.Metadata jpegMetadata =
JpegMetadataReader.readMetadata(stream);
- Iterator directories = jpegMetadata.getDirectoryIterator();
+ Iterator<?> directories = jpegMetadata.getDirectoryIterator();
while (directories.hasNext()) {
Directory directory = (Directory) directories.next();
- Iterator tags = directory.getTagIterator();
+ Iterator<?> tags = directory.getTagIterator();
while (tags.hasNext()) {
Tag tag = (Tag)tags.next();
@@ -58,4 +74,5 @@
xhtml.startDocument();
xhtml.endDocument();
}
+
}
Modified:
lucene/tika/trunk/tika-parsers/src/test/java/org/apache/tika/parser/jpeg/JpegParserTest.java
URL:
http://svn.apache.org/viewvc/lucene/tika/trunk/tika-parsers/src/test/java/org/apache/tika/parser/jpeg/JpegParserTest.java?rev=829469&r1=829468&r2=829469&view=diff
==============================================================================
---
lucene/tika/trunk/tika-parsers/src/test/java/org/apache/tika/parser/jpeg/JpegParserTest.java
(original)
+++
lucene/tika/trunk/tika-parsers/src/test/java/org/apache/tika/parser/jpeg/JpegParserTest.java
Sat Oct 24 23:39:16 2009
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
package org.apache.tika.parser.jpeg;
import junit.framework.TestCase;