|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.sequencer.ddl.DdlSequencer
@NotThreadSafe public class DdlSequencer
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 |
---|
protected static final String[] DEFAULT_CLASSPATH
protected static final List<String> DEFAULT_GRAMMARS
protected static final Map<String,DdlParser> STANDARD_PARSERS_BY_NAME
Constructor Detail |
---|
public DdlSequencer()
Method Detail |
---|
public String[] getGrammars()
identifier
of a built-in grammar, or the name of a DdlParser
implementation class.
public void setGrammars(String[] grammarNamesOrClasses)
identifier
of a built-in grammar, or the name of a DdlParser
implementation class.
grammarNamesOrClasses
- the names; may be null if the default grammar list should be usedpublic String[] getClasspath()
public void setClasspath(String[] classpath)
classpath
- the classloader names that make up the classpath; may be null or empty if the default classpath should be
usedpublic void sequence(InputStream stream, SequencerOutput output, StreamSequencerContext context)
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.
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
StreamSequencer.sequence(java.io.InputStream,
org.modeshape.graph.sequencer.SequencerOutput, org.modeshape.graph.sequencer.StreamSequencerContext)
protected DdlParsers createParsers(List<DdlParser> parsers)
parsers
- the list of DdlParser instances to use; may be empty or null
protected String getNameOfDdlContent(StreamSequencerContext context)
context
- the sequencing context; never null
protected List<DdlParser> getParserList(StreamSequencerContext context)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |