Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.sequencer.ddl
Class DdlSequencer

    java.lang.Object
      org.modeshape.sequencer.ddl.DdlSequencer

All Implemented Interfaces:
  StreamSequencer

    @NotThreadSafe
    public class DdlSequencer

extends Object
implements StreamSequencer

A sequencer of DDL files.

Field Summary
`protected static String[]` | `DEFAULT_CLASSPATH`
`protected static List<String>` | `DEFAULT_GRAMMARS`
`protected static Map<String,DdlParser>` | `STANDARD_PARSERS_BY_NAME`

Constructor Summary
`DdlSequencer()`

Method Summary
`protected DdlParsers` | `createParsers(List<DdlParser> parsers)` Method that creates the DdlParsers instance.
`String[]` | `getClasspath()` Get the names of the classloaders that should be used to load any non-standard DdlParser implementations specified in the list of grammars.
`String[]` | `getGrammars()` Get the names of the grammars that should be considered during processing.
`protected String` | `getNameOfDdlContent(StreamSequencerContext context)` Utility method that attempts to discover the "name" of the DDL content being sequenced, which may help identify the dialect.
`protected List<DdlParser>` | `getParserList(StreamSequencerContext context)`
`void` | `sequence(InputStream stream, SequencerOutput output, StreamSequencerContext context)` Sequence the data found in the supplied stream, placing the output information into the supplied map.
`void` | `setClasspath(String[] classpath)` Set the names of the classloaders that should be used to load any non-standard DdlParser implementations specified in the list of grammars.
`void` | `setGrammars(String[] grammarNamesOrClasses)` Set the names of the grammars that should be considered during processing.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEFAULT_CLASSPATH

    protected static final String[] DEFAULT_CLASSPATH

### DEFAULT_GRAMMARS

    protected static final List<String> DEFAULT_GRAMMARS

### STANDARD_PARSERS_BY_NAME

    protected static final Map<String,DdlParser> STANDARD_PARSERS_BY_NAME

Constructor Detail

### DdlSequencer

    public DdlSequencer()

Method Detail

### getGrammars

    public String[] getGrammars()

  Get the names of the grammars that should be considered during processing. The grammar names may be the case-insensitive `identifier` of a built-in grammar, or the name of a `DdlParser` implementation class.

  Returns:
    the array of grammar names or classes; never null but possibly empty

### setGrammars

    public void setGrammars(String[] grammarNamesOrClasses)

  Set the names of the grammars that should be considered during processing. The grammar names may be the case-insensitive `identifier` of a built-in grammar, or the name of a `DdlParser` implementation class.

  Parameters:
    `grammarNamesOrClasses` - the names; may be null if the default grammar list should be used

### getClasspath

    public String[] getClasspath()

  Get the names of the classloaders that should be used to load any non-standard DdlParser implementations specified in the list of grammars.

  Returns:
    the classloader names that make up the classpath; never null but possibly empty if the default classpath should be used

### setClasspath

    public void setClasspath(String[] classpath)

  Set the names of the classloaders that should be used to load any non-standard DdlParser implementations specified in the list of grammars.

  Parameters:
    `classpath` - the classloader names that make up the classpath; may be null or empty if the default classpath should be used

### 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(java.io.InputStream, org.modeshape.graph.sequencer.SequencerOutput, org.modeshape.graph.sequencer.StreamSequencerContext)`

### createParsers

    protected DdlParsers createParsers(List<DdlParser> parsers)

  Method that creates the DdlParsers instance. This may be overridden in subclasses to creates specific implementations.

  Parameters:
    `parsers` - the list of DdlParser instances to use; may be empty or null
  Returns:
    the DdlParsers implementation; may not be null

### getNameOfDdlContent

    protected String getNameOfDdlContent(StreamSequencerContext context)

  Utility method that attempts to discover the "name" of the DDL content being sequenced, which may help identify the dialect.

  Parameters:
    `context` - the sequencing context; never null
  Returns:
    the name, or null if no name could be identified

### getParserList

    protected List<DdlParser> getParserList(StreamSequencerContext context)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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