Este conteúdo não está disponível no idioma selecionado.
7.4. Configuring an XML Document Sequencer
Include the relevant libraries
Includemodeshape-sequencer-xml-VERSION.jarin your application.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="XML File Sequencer" mode:classname="org.modeshape.sequencer.xml.XmlSequencer"> <mode:description> Sequences XML files loaded under '/files', extracting the contents into the equivalent JCR graph structure. </mode:description> <mode:pathExpression> eds-store:default:/files(//)*.xml[*]/jcr:content[@jcr:data] => eds-store:default:/sequenced/xml/$1 </mode:pathExpression> </mode:sequencer> - Configure via
org.modeshape.jcr.JcrConfiguration:JcrConfiguration config = ... config.sequencer("XML File Sequencer") .usingClass("org.modeshape.sequencer.xml.XmlSequencer") .loadedFromClasspath() .setDescription("Sequences XML files loaded under '/files', extracting the contents into the equivalent JCR graph structure.") .sequencingFrom("/files(//)*.xml[*]/jcr:content[@jcr:data]") .andOutputtingTo("/sequenced/xml/$1");
Note
Refer toSOA-ROOT/eds/modeshape/resources/modeshape-config-standard.xmlfor more information.