org.modeshape.sequencer.msoffice
Class MSOfficeMetadataSequencer

java.lang.Object
  extended by org.modeshape.sequencer.msoffice.MSOfficeMetadataSequencer
All Implemented Interfaces:
StreamSequencer

public class MSOfficeMetadataSequencer
extends Object
implements StreamSequencer

A sequencer that processes the content of an MS Office document, extracts the metadata for the file, and then writes that metadata to the repository.

This sequencer produces data that corresponds to the following structure:


Field Summary
static String EXCEL_FULL_CONTENT
           
static String EXCEL_SHEET_NAME
           
static String METADATA_NODE
           
static String MSOFFICE_AUTHOR
           
static String MSOFFICE_CHARACTERS
           
static String MSOFFICE_COMMENT
           
static String MSOFFICE_CREATED
           
static String MSOFFICE_CREATING_APPLICATION
           
static String MSOFFICE_KEYWORDS
           
static String MSOFFICE_LAST_PRINTED
           
static String MSOFFICE_LAST_SAVED_BY
           
static String MSOFFICE_PAGES
           
static String MSOFFICE_PRIMARY_TYPE
           
static String MSOFFICE_REVISION
           
static String MSOFFICE_SAVED
           
static String MSOFFICE_SUBJECT
           
static String MSOFFICE_TEMPLATE
           
static String MSOFFICE_THUMBNAIL
           
static String MSOFFICE_TITLE
           
static String MSOFFICE_TOTAL_EDITING_TIME
           
static String MSOFFICE_WORDS
           
static String POWERPOINT_SLIDE_NODE
           
static String SLIDE_NOTES
           
static String SLIDE_TEXT
           
static String SLIDE_THUMBNAIL
           
static String SLIDE_TITLE
           
static String WORD_HEADING_LEVEL
           
static String WORD_HEADING_NAME
           
static String WORD_HEADING_NODE
           
 
Constructor Summary
MSOfficeMetadataSequencer()
           
 
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

MSOFFICE_PRIMARY_TYPE

public static final String MSOFFICE_PRIMARY_TYPE
See Also:
Constant Field Values

MSOFFICE_TITLE

public static final String MSOFFICE_TITLE
See Also:
Constant Field Values

MSOFFICE_SUBJECT

public static final String MSOFFICE_SUBJECT
See Also:
Constant Field Values

MSOFFICE_AUTHOR

public static final String MSOFFICE_AUTHOR
See Also:
Constant Field Values

MSOFFICE_KEYWORDS

public static final String MSOFFICE_KEYWORDS
See Also:
Constant Field Values

MSOFFICE_COMMENT

public static final String MSOFFICE_COMMENT
See Also:
Constant Field Values

MSOFFICE_TEMPLATE

public static final String MSOFFICE_TEMPLATE
See Also:
Constant Field Values

MSOFFICE_LAST_SAVED_BY

public static final String MSOFFICE_LAST_SAVED_BY
See Also:
Constant Field Values

MSOFFICE_REVISION

public static final String MSOFFICE_REVISION
See Also:
Constant Field Values

MSOFFICE_TOTAL_EDITING_TIME

public static final String MSOFFICE_TOTAL_EDITING_TIME
See Also:
Constant Field Values

MSOFFICE_LAST_PRINTED

public static final String MSOFFICE_LAST_PRINTED
See Also:
Constant Field Values

MSOFFICE_CREATED

public static final String MSOFFICE_CREATED
See Also:
Constant Field Values

MSOFFICE_SAVED

public static final String MSOFFICE_SAVED
See Also:
Constant Field Values

MSOFFICE_PAGES

public static final String MSOFFICE_PAGES
See Also:
Constant Field Values

MSOFFICE_WORDS

public static final String MSOFFICE_WORDS
See Also:
Constant Field Values

MSOFFICE_CHARACTERS

public static final String MSOFFICE_CHARACTERS
See Also:
Constant Field Values

MSOFFICE_CREATING_APPLICATION

public static final String MSOFFICE_CREATING_APPLICATION
See Also:
Constant Field Values

MSOFFICE_THUMBNAIL

public static final String MSOFFICE_THUMBNAIL
See Also:
Constant Field Values

POWERPOINT_SLIDE_NODE

public static final String POWERPOINT_SLIDE_NODE
See Also:
Constant Field Values

SLIDE_TITLE

public static final String SLIDE_TITLE
See Also:
Constant Field Values

SLIDE_TEXT

public static final String SLIDE_TEXT
See Also:
Constant Field Values

SLIDE_NOTES

public static final String SLIDE_NOTES
See Also:
Constant Field Values

SLIDE_THUMBNAIL

public static final String SLIDE_THUMBNAIL
See Also:
Constant Field Values

EXCEL_FULL_CONTENT

public static final String EXCEL_FULL_CONTENT
See Also:
Constant Field Values

EXCEL_SHEET_NAME

public static final String EXCEL_SHEET_NAME
See Also:
Constant Field Values

WORD_HEADING_NODE

public static final String WORD_HEADING_NODE
See Also:
Constant Field Values

WORD_HEADING_NAME

public static final String WORD_HEADING_NAME
See Also:
Constant Field Values

WORD_HEADING_LEVEL

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

MSOfficeMetadataSequencer

public MSOfficeMetadataSequencer()
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


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