org.apache.tika.parser.image
Class ImageMetadataExtractor

java.lang.Object
  extended by org.apache.tika.parser.image.ImageMetadataExtractor

public class ImageMetadataExtractor
extends java.lang.Object


Constructor Summary
ImageMetadataExtractor(Metadata metadata)
           
 
Method Summary
static void handleCommonImageTags(Metadata metadata, com.drew.metadata.Tag tag, com.drew.metadata.Directory directory)
          Maps common TIFF and EXIF tags onto the Tika TIFF image metadata namespace.
static void handleGeoImageTags(Metadata metadata)
          Maps EXIF Geo Tags onto the Tika Geo metadata namespace.
protected  void parse(com.drew.metadata.Metadata imageMetadata)
           
 void parseJpeg(java.io.InputStream stream)
           
 void parseTiff(java.io.InputStream stream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageMetadataExtractor

public ImageMetadataExtractor(Metadata metadata)
Method Detail

parseTiff

public void parseTiff(java.io.InputStream stream)
               throws java.io.IOException,
                      org.xml.sax.SAXException,
                      TikaException
Throws:
java.io.IOException
org.xml.sax.SAXException
TikaException

parseJpeg

public void parseJpeg(java.io.InputStream stream)
               throws java.io.IOException,
                      org.xml.sax.SAXException,
                      TikaException
Throws:
java.io.IOException
org.xml.sax.SAXException
TikaException

parse

protected void parse(com.drew.metadata.Metadata imageMetadata)
              throws java.io.IOException,
                     org.xml.sax.SAXException,
                     TikaException
Throws:
java.io.IOException
org.xml.sax.SAXException
TikaException

handleGeoImageTags

public static void handleGeoImageTags(Metadata metadata)
Maps EXIF Geo Tags onto the Tika Geo metadata namespace. Needs to be run at the end, because the GPS information is spread across several EXIF tags.


handleCommonImageTags

public static void handleCommonImageTags(Metadata metadata,
                                         com.drew.metadata.Tag tag,
                                         com.drew.metadata.Directory directory)
                                  throws com.drew.metadata.MetadataException
Maps common TIFF and EXIF tags onto the Tika TIFF image metadata namespace.

Throws:
com.drew.metadata.MetadataException


Copyright © 2007-2010 The Apache Software Foundation. All Rights Reserved.