Este conteúdo não está disponível no idioma selecionado.

9.4. Configuring a DDL File Sequencer


  1. Include the relevant libraries

    Include modeshape-sequencer-ddl-VERSION.jar in your application.
  2. Choose one of the following for sequencing configuration

    • Define sequencing configuration based on standard example provided in SOA-ROOT/eds/modeshape/resources/modeshape-config-standard.xml:
      <mode:sequencer jcr:name="DDL File Sequencer" mode:classname="org.modeshape.sequencer.ddl.DdlSequencer">
        <mode:description>
          Sequences DDL files loaded under '/files', extracting the structured abstract syntax tree of the DDL commands and expressions.
        </mode:description>
        <mode:pathExpression>
          eds-store:default:/files(//(*.ddl[*]))/jcr:content[@jcr:data] => eds-store:default:/sequenced/ddl/$1
        </mode:pathExpression>
      </mode:sequencer>
      
    • Configure via org.modeshape.jcr.JcrConfiguration:
      JcrConfiguration config = ...
      
      config.sequencer("DDL File Sequencer")
            .usingClass("org.modeshape.sequencer.ddl.DdlSequencer")
            .loadedFromClasspath()
            .setDescription("Sequences DDL files loaded under '/files', extracting the structured abstract syntax tree of the DDL commands and expressions.")
            .sequencingFrom("/files(//(*.ddl[*]))/jcr:content[@jcr:data]")
            .andOutputtingTo("/sequenced/ddl/$1");
      This will use all of the built-in grammars (e.g., "standard", "oracle", "postgres", and "derby"). To specify a different order or subset of the grammars, use the setProperty(...) method. The following example uses the standard grammar followed by the PostgreSQL grammar:
      config.sequencer("DDL File Sequencer")
            .usingClass("org.modeshape.sequencer.ddl.DdlSequencer")
            .loadedFromClasspath()
            .setDescription("Sequences DDL files loaded under '/files', extracting the structured abstract syntax tree of the DDL commands and expressions.")
            .setProperty("grammar","standard","postgres")
            .sequencingFrom("/files(//(*.ddl[*]))/jcr:content[@jcr:data]")
            .andOutputtingTo("/sequenced/ddl/$1");
      To use a custom implementation of DdlParser , use the fully-qualified name of the implementation class (which must have a no-arg constructor) as the name of the grammar:
      config.sequencer("DDL File Sequencer")
            .usingClass("org.modeshape.sequencer.ddl.DdlSequencer")
            .loadedFromClasspath()
            .setDescription("Sequences DDL files loaded under '/files', extracting the structured abstract syntax tree of the DDL commands and expressions.")
            .setProperty("grammar","standard","postgres","org.example.ddl.MyCustomDdlParser")
            .sequencingFrom("/files(//(*.ddl[*]))/jcr:content[@jcr:data]")
            .andOutputtingTo("/sequenced/ddl/$1");

    Note

    Refer to SOA-ROOT/eds/modeshape/resources/modeshape-config-standard.xml for more information.
Red Hat logoGithubredditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar. Explore nossas atualizações recentes.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja o Blog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

Theme

© 2026 Red Hat
Voltar ao topo