|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.dna.sequencer.images.ImageMetadataSequencer
public class ImageMetadataSequencer
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:
image:metadata
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.
Field Summary | |
---|---|
static java.lang.String |
IMAGE_BITS_PER_PIXEL
|
static java.lang.String |
IMAGE_ENCODING
|
static java.lang.String |
IMAGE_FORMAT_NAME
|
static java.lang.String |
IMAGE_HEIGHT
|
static java.lang.String |
IMAGE_MIME_TYPE
|
static java.lang.String |
IMAGE_MIXINS
|
static java.lang.String |
IMAGE_NUMBER_OF_IMAGES
|
static java.lang.String |
IMAGE_PHYSICAL_HEIGHT_DPI
|
static java.lang.String |
IMAGE_PHYSICAL_HEIGHT_INCHES
|
static java.lang.String |
IMAGE_PHYSICAL_WIDTH_DPI
|
static java.lang.String |
IMAGE_PHYSICAL_WIDTH_INCHES
|
static java.lang.String |
IMAGE_PRIMARY_TYPE
|
static java.lang.String |
IMAGE_PROGRESSIVE
|
static java.lang.String |
IMAGE_WIDTH
|
static java.lang.String |
METADATA_NODE
|
Constructor Summary | |
---|---|
ImageMetadataSequencer()
|
Method Summary | |
---|---|
void |
sequence(java.io.InputStream stream,
SequencerOutput output,
ProgressMonitor progressMonitor)
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 |
---|
public static final java.lang.String METADATA_NODE
public static final java.lang.String IMAGE_PRIMARY_TYPE
public static final java.lang.String IMAGE_MIXINS
public static final java.lang.String IMAGE_MIME_TYPE
public static final java.lang.String IMAGE_ENCODING
public static final java.lang.String IMAGE_FORMAT_NAME
public static final java.lang.String IMAGE_WIDTH
public static final java.lang.String IMAGE_HEIGHT
public static final java.lang.String IMAGE_BITS_PER_PIXEL
public static final java.lang.String IMAGE_PROGRESSIVE
public static final java.lang.String IMAGE_NUMBER_OF_IMAGES
public static final java.lang.String IMAGE_PHYSICAL_WIDTH_DPI
public static final java.lang.String IMAGE_PHYSICAL_HEIGHT_DPI
public static final java.lang.String IMAGE_PHYSICAL_WIDTH_INCHES
public static final java.lang.String IMAGE_PHYSICAL_HEIGHT_INCHES
Constructor Detail |
---|
public ImageMetadataSequencer()
Method Detail |
---|
public void sequence(java.io.InputStream stream, SequencerOutput output, ProgressMonitor progressMonitor)
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.
This operation should report progress to the supplied ProgressMonitor
. At the beginning of the operation, call
ProgressMonitor.beginTask(double, org.jboss.dna.common.i18n.I18n, Object...)
with a meaningful message describing
the operation and a total for the amount of work that will be done by this sequencer. Then perform the sequencing work,
periodically reporting work by specifying the amount of work
that has was just
completed or by creating a subtask
and reporting work against that subtask
monitor.
The implementation should also periodically check whether the operation has been
cancelled
. If this method returns true, the implementation should abort all work as
soon as possible and close any resources that were acquired or opened.
Finally, the implementation should call ProgressMonitor.done()
when the operation has finished.
sequence
in interface StreamSequencer
stream
- the stream with the data to be sequenced; never nulloutput
- the output from the sequencing operation; never nullprogressMonitor
- the progress monitor that should be kept updated with the sequencer's progress and that should be
frequently consulted as to whether this operation has been cancelled
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |