Class ImageMetadataSequencer

  extended by org.modeshape.sequencer.image.ImageMetadataSequencer
All Implemented Interfaces:

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.

Constructor Summary
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public ImageMetadataSequencer()
Method Detail


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.

ModeShape'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
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-2011 JBoss, a division of Red Hat. All Rights Reserved.