org.modeshape.sequencer.mp3
Class Mp3MetadataSequencer

java.lang.Object
  extended by org.modeshape.sequencer.mp3.Mp3MetadataSequencer
All Implemented Interfaces:
StreamSequencer

public class Mp3MetadataSequencer
extends Object
implements StreamSequencer

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

This sequencer produces data that corresponds to the following structure:


Field Summary
static String METADATA_NODE
           
static String MP3_ALBUM
           
static String MP3_AUTHOR
           
static String MP3_COMMENT
           
static String MP3_PRIMARY_TYPE
           
static String MP3_TITLE
           
static String MP3_YEAR
           
 
Constructor Summary
Mp3MetadataSequencer()
           
 
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
 

Field Detail

METADATA_NODE

public static final String METADATA_NODE
See Also:
Constant Field Values

MP3_PRIMARY_TYPE

public static final String MP3_PRIMARY_TYPE
See Also:
Constant Field Values

MP3_TITLE

public static final String MP3_TITLE
See Also:
Constant Field Values

MP3_AUTHOR

public static final String MP3_AUTHOR
See Also:
Constant Field Values

MP3_ALBUM

public static final String MP3_ALBUM
See Also:
Constant Field Values

MP3_YEAR

public static final String MP3_YEAR
See Also:
Constant Field Values

MP3_COMMENT

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

Mp3MetadataSequencer

public Mp3MetadataSequencer()
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.

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