Author: bcarothers
Date: 2009-06-09 17:08:19 -0400 (Tue, 09 Jun 2009)
New Revision: 1021
Modified:
trunk/docs/reference/src/main/docbook/en-US/content/jcr/configuration.xml
trunk/docs/reference/src/main/docbook/en-US/content/sequencers/compact_node_types.xml
trunk/docs/reference/src/main/docbook/en-US/content/sequencers/image.xml
trunk/docs/reference/src/main/docbook/en-US/content/sequencers/java_source.xml
trunk/docs/reference/src/main/docbook/en-US/content/sequencers/microsoft_office.xml
trunk/docs/reference/src/main/docbook/en-US/content/sequencers/mp3.xml
trunk/docs/reference/src/main/docbook/en-US/content/sequencers/xml.xml
trunk/docs/reference/src/main/docbook/en-US/content/sequencers/zip.xml
Log:
Updated the example configuration code for each of the sequencers. Fixed a small typo in
the configuration chapter.
Modified: trunk/docs/reference/src/main/docbook/en-US/content/jcr/configuration.xml
===================================================================
--- trunk/docs/reference/src/main/docbook/en-US/content/jcr/configuration.xml 2009-06-09
20:12:01 UTC (rev 1020)
+++ trunk/docs/reference/src/main/docbook/en-US/content/jcr/configuration.xml 2009-06-09
21:08:19 UTC (rev 1021)
@@ -367,7 +367,7 @@
<sect1 id="using_dna_whats_next">
<title>What's next</title>
<para>
- This chapter outline how you configure JBoss DNA, how you then access a
<code>javax.jcr.Repository</code> instance,
+ This chapter outlines how you configure JBoss DNA, how you then access a
<code>javax.jcr.Repository</code> instance,
and use the standard JCR API to interact with the repository. The
<link linkend="jcr">next chapter</link> talks about using the
JCR API with your JBoss DNA repository.
</para>
Modified:
trunk/docs/reference/src/main/docbook/en-US/content/sequencers/compact_node_types.xml
===================================================================
---
trunk/docs/reference/src/main/docbook/en-US/content/sequencers/compact_node_types.xml 2009-06-09
20:12:01 UTC (rev 1020)
+++
trunk/docs/reference/src/main/docbook/en-US/content/sequencers/compact_node_types.xml 2009-06-09
21:08:19 UTC (rev 1021)
@@ -32,6 +32,22 @@
<title>Compact Node Type (CND) Sequencer</title>
<para>
This sequencer processes JCR Compact Node Definition (CND) files
- to extract the node definitions with their property definitions, and inserts these into
the repository using JCR standard notation.
+ to extract the node definitions with their property definitions, and inserts these into
the repository using JCR built-in types.
+ The node structure generated by this sequencer is equivalent to the node structure used
in <code>/jcr:system/jcr:nodeTypes</code>.
</para>
+
+ <para>
+ This sequencer can be added to the repository configuration like so:
+<programlisting>
+JcrConfiguration config = ...
+
+config.sequencer("CND Sequencer")
+ .usingClass("org.jboss.dna.sequencer.cnd.CndSequencer")
+ .loadedFromClasspath()
+ .setDescription("Sequences CND files to extract the node type
definitions")
+ .sequencingFrom("//(*.cnd[*])/jcr:content[@jcr:data]")
+ .andOutputtingTo("/nodeTypes/$1");
+
+</programlisting>
+ </para>
</chapter>
\ No newline at end of file
Modified: trunk/docs/reference/src/main/docbook/en-US/content/sequencers/image.xml
===================================================================
--- trunk/docs/reference/src/main/docbook/en-US/content/sequencers/image.xml 2009-06-09
20:12:01 UTC (rev 1020)
+++ trunk/docs/reference/src/main/docbook/en-US/content/sequencers/image.xml 2009-06-09
21:08:19 UTC (rev 1021)
@@ -93,16 +93,16 @@
</para>
<para>
To use this sequencer, simply include the
<code>dna-sequencer-images</code> JAR
- in your application and configure the Sequencing Service to use this sequencer using
something similar to:
+ in your application and configure the &JcrConfiguration; to use this sequencer
using something similar to:
</para>
<programlisting>
-String name = "Image Sequencer";
-String desc = "Sequences image files to extract the characteristics of the
image";
-String classname = "org.jboss.dna.sequencer.images.ImageMetadataSequencer";
-String[] classpath = null; // Use the current classpath
-String[] pathExpressions =
{"//(*.(jpg|jpeg|gif|bmp|pcx|png|iff|ras|pbm|pgm|ppm|psd)[*])/jcr:content[@jcr:data]
=> /images/$1"};
-&SequencerConfig; sequencerConfig = new &SequencerConfig;(name, desc, classname,
- classpath, pathExpressions);
-sequencingService.addSequencer(sequencerConfig);
+JcrConfiguration config = ...
+config.sequencer("Image Sequencer")
+ .usingClass("org.jboss.dna.sequencer.image.ImageMetadataSequencer")
+ .loadedFromClasspath()
+ .setDescription("Sequences image files to extract the characteristics of the
image")
+
.sequencingFrom("//(*.(jpg|jpeg|gif|bmp|pcx|png|iff|ras|pbm|pgm|ppm|psd)[*])/jcr:content[@jcr:data]")
+ .andOutputtingTo("/images/$1");
+
</programlisting>
</chapter>
\ No newline at end of file
Modified: trunk/docs/reference/src/main/docbook/en-US/content/sequencers/java_source.xml
===================================================================
---
trunk/docs/reference/src/main/docbook/en-US/content/sequencers/java_source.xml 2009-06-09
20:12:01 UTC (rev 1020)
+++
trunk/docs/reference/src/main/docbook/en-US/content/sequencers/java_source.xml 2009-06-09
21:08:19 UTC (rev 1021)
@@ -42,16 +42,16 @@
</para>
<para>
To use this sequencer, simply include the <code>dna-sequencer-java</code>
JAR (plus all of the JARs that it is dependent upon)
- in your application and configure the Sequencing Service to use this sequencer using
something similar to:
+ in your application and configure the &JcrConfiguration; to use this sequencer
using something similar to:
</para>
<programlisting>
-String name = "Java Sequencer";
-String desc = "Sequences java files to extract the characteristics of the Java
source";
-String classname = "org.jboss.dna.sequencer.java.JavaMetadataSequencer";
-String[] classpath = null; // Use the current classpath
-String[] pathExpressions = {"//(*.java[*])/jcr:content[@jcr:data] =>
/java/$1"};
-&SequencerConfig; sequencerConfig = new &SequencerConfig;(name, desc, classname,
- classpath, pathExpressions);
-this.sequencingService.addSequencer(sequencerConfig);
+JcrConfiguration config = ...
+
+config.sequencer("Java Sequencer")
+ .usingClass("org.jboss.dna.sequencer.java.JavaMetadataSequencer")
+ .loadedFromClasspath()
+ .setDescription("Sequences java files to extract the characteristics of the
Java source")
+ .sequencingFrom("//(*.(java)[*])/jcr:content[@jcr:data]")
+ .andOutputtingTo("/java/$1");
</programlisting>
</chapter>
\ No newline at end of file
Modified:
trunk/docs/reference/src/main/docbook/en-US/content/sequencers/microsoft_office.xml
===================================================================
---
trunk/docs/reference/src/main/docbook/en-US/content/sequencers/microsoft_office.xml 2009-06-09
20:12:01 UTC (rev 1020)
+++
trunk/docs/reference/src/main/docbook/en-US/content/sequencers/microsoft_office.xml 2009-06-09
21:08:19 UTC (rev 1021)
@@ -32,7 +32,7 @@
<title><trademark class='registered'>Microsoft
Office</trademark> Document Sequencer</title>
<para>
This sequencer is included in JBoss DNA and processes Microsoft Office documents,
including Word documents, Excel spreadsheets,
- and PowerPoint presentations. With documents, the sequencer extracts the internal
structure based on Heading styles.
+ and PowerPoint presentations. With documents, the sequencer attempts to infer the
internal structure from the heading styles.
With presentations, the sequencer extracts the slides, titles, text and slide
thumbnails.
With spreadsheets, the sequencer extracts the names of the sheets. And, the sequencer
extracts for all the files the
general file information, including the name of the author, title, keywords, subject,
comments, and various dates.
@@ -40,16 +40,16 @@
<para>
To use this sequencer, simply include the
<code>dna-sequencer-msoffice</code> JAR and all of the
<ulink
url="http://poi.apache.org/">POI</ulink> JARs
- in your application and configure the Sequencing Service to use this sequencer using
something similar to:
+ in your application and configure the &JcrConfiguration; to use this sequencer using
something similar to:
</para>
<programlisting>
-String name = "Microsoft Office Document Sequencer";
-String desc = "Sequences MS Office documents, including spreadsheets and
presentations";
-String classname =
"org.jboss.dna.sequencer.msoffice.MSOfficeMetadataSequencer";
-String[] classpath = null; // Use the current classpath
-String[] pathExpressions = {"//(*.(doc|docx|ppt|pps|xls)[*])/jcr:content[@jcr:data]
=> /msoffice/$1"};
-&SequencerConfig; sequencerConfig = new &SequencerConfig;(name, desc, classname,
- classpath, pathExpressions);
-sequencingService.addSequencer(sequencerConfig);
+JcrConfiguration config = ...
+
+config.sequencer("Microsoft Office Document Sequencer")
+
.usingClass("org.jboss.dna.sequencer.msoffice.MSOfficeMetadataSequencer")
+ .loadedFromClasspath()
+ .setDescription("Sequences MS Office documents, including spreadsheets and
presentations")
+
.sequencingFrom("//(*.(*.(doc|docx|ppt|pps|xls)[*])/jcr:content[@jcr:data]")
+ .andOutputtingTo("/msoffice/$1");
</programlisting>
</chapter>
\ No newline at end of file
Modified: trunk/docs/reference/src/main/docbook/en-US/content/sequencers/mp3.xml
===================================================================
--- trunk/docs/reference/src/main/docbook/en-US/content/sequencers/mp3.xml 2009-06-09
20:12:01 UTC (rev 1020)
+++ trunk/docs/reference/src/main/docbook/en-US/content/sequencers/mp3.xml 2009-06-09
21:08:19 UTC (rev 1021)
@@ -39,15 +39,16 @@
</para>
<para>
To use this sequencer, simply include the <code>dna-sequencer-mp3</code>
JAR and the <ulink
url="http://www.jthink.net/jaudiotagger/">JAudioTagger</u...
- library in your application and configure the Sequencing Service to use this
sequencer using something similar to:
+ library in your application and configure the &JcrConfiguration; to use this
sequencer using something similar to:
</para>
<programlisting>
- String name = "MP3 Sequencer";
- String desc = "Sequences MP3 files to extract the ID3 tags of the audio
file";
- String classname = "org.jboss.dna.sequencer.mp3.Mp3MetadataSequencer";
- String[] pathExpressions = {"//(*.mp3[*])/jcr:content[@jcr:data] =>
/mp3s/$1"};
- &SequencerConfig; sequencerConfig = new &SequencerConfig;(name, desc, classname,
- classpath, pathExpressions);
- this.sequencingService.addSequencer(sequencerConfig);
+JcrConfiguration config = ...
+
+config.sequencer("MP3 Sequencer")
+ .usingClass("org.jboss.dna.sequencer.mp3.Mp3MetadataSequencer")
+ .loadedFromClasspath()
+ .setDescription("Sequences MP3 files to extract the ID3 tags of the audio
file")
+ .sequencingFrom("//(*.mp3[*])/jcr:content[@jcr:data]")
+ .andOutputtingTo("/mp3s/$1");
</programlisting>
</chapter>
\ No newline at end of file
Modified: trunk/docs/reference/src/main/docbook/en-US/content/sequencers/xml.xml
===================================================================
--- trunk/docs/reference/src/main/docbook/en-US/content/sequencers/xml.xml 2009-06-09
20:12:01 UTC (rev 1020)
+++ trunk/docs/reference/src/main/docbook/en-US/content/sequencers/xml.xml 2009-06-09
21:08:19 UTC (rev 1021)
@@ -31,6 +31,17 @@
<chapter id="xml-sequencer">
<title>XML Document Sequencer</title>
<para>
- This sequencer stores the structure and data of an XML file into the repository.
+ This sequencer stores the structure and data of an XML file into the repository.
DTD, entity, comments,
+ and other content are maintained by the sequencer in the output structure.
</para>
+ <programlisting>
+JcrConfiguration config = ...
+
+config.sequencer("XML Sequencer")
+ .usingClass("org.jboss.dna.sequencer.xml.XmlSequencer")
+ .loadedFromClasspath()
+ .setDescription("Sequences XML documents and maps their data into the
repository")
+ .sequencingFrom("//(*.xml[*])/jcr:content[@jcr:data]")
+ .andOutputtingTo("/xml/$1");
+</programlisting>
</chapter>
\ No newline at end of file
Modified: trunk/docs/reference/src/main/docbook/en-US/content/sequencers/zip.xml
===================================================================
--- trunk/docs/reference/src/main/docbook/en-US/content/sequencers/zip.xml 2009-06-09
20:12:01 UTC (rev 1020)
+++ trunk/docs/reference/src/main/docbook/en-US/content/sequencers/zip.xml 2009-06-09
21:08:19 UTC (rev 1021)
@@ -32,19 +32,21 @@
<title>ZIP File Sequencer</title>
<para>
The ZIP file sequencer is included in JBoss DNA and extracts the files and folders
contained in the ZIP archive file,
- extracting the files and folders into the repository using JCR's
<code>nt:file</code> and <code>nt:folder</code> node types.
+ extracting the files and folders into the repository using JCR's
<code>nt:file</code> and <code>nt:folder</code>
+ built-in node types. The structure of the output thus matches the logical structure of
the contents of the ZIP file.
</para>
<para>
To use this sequencer, simply include the <code>dna-sequencer-zip</code>
JAR
- in your application and configure the Sequencing Service to use this sequencer using
something similar to:
+ in your application and configure the &JcrConfiguration; to use this sequencer
using something similar to:
</para>
<programlisting>
-String name = "ZIP Sequencer";
-String desc = "Sequences ZIP archives to extract the files and folders";
-String classname = "org.jboss.dna.sequencer.zip.ZipSequencer";
-String[] pathExpressions = {"//(*.zip[*])/jcr:content[@jcr:data] =>
/zips/$1"};
-&SequencerConfig; sequencerConfig = new &SequencerConfig;(name, desc, classname,
- classpath, pathExpressions);
-this.sequencingService.addSequencer(sequencerConfig);
-</programlisting>
+JcrConfiguration config = ...
+
+config.sequencer("ZIP Sequencer")
+ .usingClass("org.jboss.dna.sequencer.zip.ZipSequencer")
+ .loadedFromClasspath()
+ .setDescription("Sequences compressed files to extract the internal file and
folder structure")
+ .sequencingFrom("//(*.(zip|gz|jar|war|ear)[*])/jcr:content[@jcr:data]")
+ .andOutputtingTo("/zips/$1");
+ </programlisting>
</chapter>
\ No newline at end of file