org.jboss.dna.sequencer.image
Class ImageMetadataSequencer

java.lang.Object
  extended by org.jboss.dna.sequencer.image.ImageMetadataSequencer
All Implemented Interfaces:
StreamSequencer

public class ImageMetadataSequencer
extends Object
implements StreamSequencer

A sequencer that processes the binary content of an image file, extracts the metadata for the image, and then writes that image metadata to the repository.

This sequencer produces data that corresponds to the following structure:

This structure could be extended in the future to add EXIF and IPTC metadata as child nodes. For example, EXIF metadata is structured as tags in directories, where the directories form something like namespaces, and which are used by different camera vendors to store custom metadata. This structure could be mapped with each directory (e.g. "EXIF" or "Nikon Makernote" or "IPTC") as the name of a child node, with the EXIF tags values stored as either properties or child nodes.

Author:
Randall Hauch, John Verhaeg

Field Summary
static String IMAGE_BITS_PER_PIXEL
           
static String IMAGE_ENCODING
           
static String IMAGE_FORMAT_NAME
           
static String IMAGE_HEIGHT
           
static String IMAGE_MIME_TYPE
           
static String IMAGE_MIXINS
           
static String IMAGE_NUMBER_OF_IMAGES
           
static String IMAGE_PHYSICAL_HEIGHT_DPI
           
static String IMAGE_PHYSICAL_HEIGHT_INCHES
           
static String IMAGE_PHYSICAL_WIDTH_DPI
           
static String IMAGE_PHYSICAL_WIDTH_INCHES
           
static String IMAGE_PRIMARY_TYPE
           
static String IMAGE_PROGRESSIVE
           
static String IMAGE_WIDTH
           
static String METADATA_NODE
           
 
Constructor Summary
ImageMetadataSequencer()
           
 
Method Summary
 void sequence(InputStream stream, SequencerOutput output, StreamSequencerContext context)
          Sequence the data found in the supplied stream, placing the output information into the supplied map.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

METADATA_NODE

public static final String METADATA_NODE
See Also:
Constant Field Values

IMAGE_PRIMARY_TYPE

public static final String IMAGE_PRIMARY_TYPE
See Also:
Constant Field Values

IMAGE_MIXINS

public static final String IMAGE_MIXINS
See Also:
Constant Field Values

IMAGE_MIME_TYPE

public static final String IMAGE_MIME_TYPE
See Also:
Constant Field Values

IMAGE_ENCODING

public static final String IMAGE_ENCODING
See Also:
Constant Field Values

IMAGE_FORMAT_NAME

public static final String IMAGE_FORMAT_NAME
See Also:
Constant Field Values

IMAGE_WIDTH

public static final String IMAGE_WIDTH
See Also:
Constant Field Values

IMAGE_HEIGHT

public static final String IMAGE_HEIGHT
See Also:
Constant Field Values

IMAGE_BITS_PER_PIXEL

public static final String IMAGE_BITS_PER_PIXEL
See Also:
Constant Field Values

IMAGE_PROGRESSIVE

public static final String IMAGE_PROGRESSIVE
See Also:
Constant Field Values

IMAGE_NUMBER_OF_IMAGES

public static final String IMAGE_NUMBER_OF_IMAGES
See Also:
Constant Field Values

IMAGE_PHYSICAL_WIDTH_DPI

public static final String IMAGE_PHYSICAL_WIDTH_DPI
See Also:
Constant Field Values

IMAGE_PHYSICAL_HEIGHT_DPI

public static final String IMAGE_PHYSICAL_HEIGHT_DPI
See Also:
Constant Field Values

IMAGE_PHYSICAL_WIDTH_INCHES

public static final String IMAGE_PHYSICAL_WIDTH_INCHES
See Also:
Constant Field Values

IMAGE_PHYSICAL_HEIGHT_INCHES

public static final String IMAGE_PHYSICAL_HEIGHT_INCHES
See Also:
Constant Field Values
Constructor Detail

ImageMetadataSequencer

public ImageMetadataSequencer()
Method Detail

sequence

public void sequence(InputStream stream,
                     SequencerOutput output,
                     StreamSequencerContext context)
Sequence the data found in the supplied stream, placing the output information into the supplied map.

JBoss DNA's SequencingService determines the sequencers that should be executed by monitoring the changes to one or more workspaces that it is monitoring. Changes in those workspaces are aggregated and used to determine which sequencers should be called. If the sequencer implements this interface, then this method is called with the property that is to be sequenced along with the interface used to register the output. The framework takes care of all the rest.

Specified by:
sequence in interface StreamSequencer
Parameters:
stream - the stream with the data to be sequenced; never null
output - the output from the sequencing operation; never null
context - the context for the sequencing operation; never null
See Also:
StreamSequencer.sequence(InputStream, SequencerOutput, StreamSequencerContext)


Copyright © 2008-Present JBoss a division of Red Hat. All Rights Reserved.