[dna-commits] DNA SVN: r1487 - in trunk/docs/reference/src/main/docbook/en-US/content: core and 1 other directories.

dna-commits at lists.jboss.org dna-commits at lists.jboss.org
Tue Dec 29 11:27:38 EST 2009


Author: bcarothers
Date: 2009-12-29 11:27:37 -0500 (Tue, 29 Dec 2009)
New Revision: 1487

Modified:
   trunk/docs/reference/src/main/docbook/en-US/content/connectors/federation.xml
   trunk/docs/reference/src/main/docbook/en-US/content/connectors/file_system.xml
   trunk/docs/reference/src/main/docbook/en-US/content/connectors/in_memory.xml
   trunk/docs/reference/src/main/docbook/en-US/content/connectors/infinispan.xml
   trunk/docs/reference/src/main/docbook/en-US/content/connectors/jboss_cache.xml
   trunk/docs/reference/src/main/docbook/en-US/content/connectors/jdbc_metadata.xml
   trunk/docs/reference/src/main/docbook/en-US/content/connectors/jdbc_storage.xml
   trunk/docs/reference/src/main/docbook/en-US/content/connectors/subversion.xml
   trunk/docs/reference/src/main/docbook/en-US/content/core/graph.xml
   trunk/docs/reference/src/main/docbook/en-US/content/jcr/configuration.xml
   trunk/docs/reference/src/main/docbook/en-US/content/jcr/jcr.xml
   trunk/docs/reference/src/main/docbook/en-US/content/jcr/rest_service.xml
Log:
DNA-595 Connector chapters in the Reference Guide should should examples of configuring in Java code and XML configuration

Applied patch that adds the XML examples as per the defect.  The patch also updates the JCR section and cleans up a few places where a programlisting was overflowing horizontally.

Modified: trunk/docs/reference/src/main/docbook/en-US/content/connectors/federation.xml
===================================================================
--- trunk/docs/reference/src/main/docbook/en-US/content/connectors/federation.xml	2009-12-29 11:41:49 UTC (rev 1486)
+++ trunk/docs/reference/src/main/docbook/en-US/content/connectors/federation.xml	2009-12-29 16:27:37 UTC (rev 1487)
@@ -412,11 +412,15 @@
          'Configuration' content (which is defined by this file) will appear under '/'. -->
     <dna:projections>
       <!-- Project the 'Cars' content, starting with the '/Cars' node. -->
-      <dna:projection jcr:name="Cars projection" dna:source="Cars" dna:workspaceName="workspace1">
+      <dna:projection jcr:name="Cars projection" 
+      				  dna:source="Cars" 
+      				  dna:workspaceName="workspace1">
           <dna:projectionRules>/Vehicles/Cars => /Cars</dna:projectionRules>
       </dna:projection>
       <!-- Project the 'Aicraft' content, starting with the '/Aircraft' node. -->
-      <dna:projection jcr:name="Aircarft projection" dna:source="Aircraft" dna:workspaceName="workspace2">
+      <dna:projection jcr:name="Aircarft projection" 
+      				  dna:source="Aircraft" 
+      				  dna:workspaceName="workspace2">
           <dna:projectionRules>/Vehicles/Aircraft => /Aircraft</dna:projectionRules>
       </dna:projection>
       <!-- Project the 'System' content. Only needed when this source is accessed through JCR. -->

Modified: trunk/docs/reference/src/main/docbook/en-US/content/connectors/file_system.xml
===================================================================
--- trunk/docs/reference/src/main/docbook/en-US/content/connectors/file_system.xml	2009-12-29 11:41:49 UTC (rev 1486)
+++ trunk/docs/reference/src/main/docbook/en-US/content/connectors/file_system.xml	2009-12-29 16:27:37 UTC (rev 1487)
@@ -132,19 +132,62 @@
 		</tgroup>
 	</table>
 	<para>
-		The file system connector is used by creating in the &JcrConfiguration; a repository source that uses the &InMemoryRepositorySource; class.
+		One way to configure the file system connector is to create &JcrConfiguration; instance with a repository source that uses the &FileSystemSource; class.
 		For example:
 	</para>
   <programlisting role="JAVA"><![CDATA[
 JcrConfiguration config = ...
-config.repositorySource("source A")
+config.repositorySource("FS Store")
       .usingClass(FileSystemSource.class)
       .setDescription("The repository for our content")
       .setProperty("workspaceRootPath", "/home/content/someApp")
       .setProperty("defaultWorkspaceName", "prod")
       .setProperty("predefinedWorkspaceNames", new String[] { "staging", "dev"})
       .setProperty("rootNodeUuid", UUID.fromString("fd129c12-81a8-42ed-aa4b-820dba49e6f0")
+      .setProperty("updatesAllowed", "true")
       .setProperty("creatingWorkspaceAllowed", "false");
  ]]></programlisting>
-</chapter>
+	<para>
+		Another way to configure the file system connector is to create &JcrConfiguration; instance and load an XML configuration file that contains a repository source that 
+		uses the &FileSystemSource; class.
+		For example a file named configRepository.xml can be created with these contents:
+	</para>
+	
+  <programlisting role="XML"><![CDATA[
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration xmlns:dna="http://www.jboss.org/dna/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0">
+    <!-- 
+    Define the sources for the content.  These sources are directly accessible using the 
+    DNA-specific Graph API. In fact, this is how the DNA JCR implementation works.  You can 
+    think of these as being similar to JDBC DataSource objects, except that they expose graph 
+    content via the Graph API instead of records via SQL or JDBC. 
+    -->
+    <dna:sources jcr:primaryType="nt:unstructured">
+        <!-- 
+        The 'FS Store' repository is a file system source with a three predefined workspaces 
+        ("prod", "staging", and "dev").
+        -->
+        <dna:source jcr:name="FS Store" 
+        	dna:classname="org.jboss.dna.connector.filesystem.FileSystemSource"
+        	dna:description="The repository for our content"
+        	dna:workspaceRootPath="/home/content/someApp"
+        	dna:defaultWorkspaceName="prod"
+        	dna:predefinedWorkspaceNames="staging, dev"
+        	dna:rootNodeUuid="fd129c12-81a8-42ed-aa4b-820dba49e6f0"
+        	dna:creatingWorkspacesAllowed="false"
+        	dna:updatesAllowed="true"
+        	/>    
+    </dna:sources>
 
+	<!-- MIME type detectors and JCR repositories would be defined below --> 
+</configuration>
+ ]]></programlisting>
+	<para>
+		The configuration can then be loaded from Java like this:
+	</para>
+	
+	<programlisting role="JAVA"><![CDATA[
+JcrConfiguration config = new JcrConfiguration().loadFrom("/configRepository.xml");
+ ]]></programlisting>
+ </chapter>
+

Modified: trunk/docs/reference/src/main/docbook/en-US/content/connectors/in_memory.xml
===================================================================
--- trunk/docs/reference/src/main/docbook/en-US/content/connectors/in_memory.xml	2009-12-29 11:41:49 UTC (rev 1486)
+++ trunk/docs/reference/src/main/docbook/en-US/content/connectors/in_memory.xml	2009-12-29 16:27:37 UTC (rev 1487)
@@ -85,14 +85,51 @@
 		</tgroup>
 	</table>
 	<para>
-		Using the in-memory connector is used by creating in the &JcrConfiguration; a repository source that uses the &InMemoryRepositorySource; class.
+		One way to configure the in-memory connector is to create &JcrConfiguration; instance with a repository source that uses the &InMemoryRepositorySource; class.
 		For example:
 	</para>
   <programlisting role="JAVA"><![CDATA[
 JcrConfiguration config = ...
-config.repositorySource("source A")
+config.repositorySource("IMR Store")
       .usingClass(InMemoryRepositorySource.class)
       .setDescription("The repository for our content")
       .setProperty("defaultWorkspaceName", workspaceName);
  ]]></programlisting>
+	<para>
+		Another way to configure the in-memory connector is to create &JcrConfiguration; instance and load an XML configuration file that contains a repository source that 
+		uses the &InMemoryRepositorySource; class.
+		For example a file named configRepository.xml can be created with these contents:
+	</para>
+	
+  <programlisting role="XML"><![CDATA[
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration xmlns:dna="http://www.jboss.org/dna/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0">
+    <!-- 
+    Define the sources for the content.  These sources are directly accessible using the 
+    DNA-specific Graph API.  In fact, this is how the DNA JCR implementation works.  You 
+    can think of these as being similar to JDBC DataSource objects, except that they expose 
+    graph content via the Graph API instead of records via SQL or JDBC. 
+    -->
+    <dna:sources jcr:primaryType="nt:unstructured">
+        <!-- 
+        The 'IMR Store' repository is an in-memory source with a single default workspace (though 
+        others could be created, too).
+        -->
+        <dna:source jcr:name="IMR Store" 
+                    dna:classname="org.jboss.dna.graph.connector.inmemory.InMemoryRepositorySource" 
+                    dna:description="The repository for our content" 
+                    dna:defaultWorkspaceName="default"/>    
+    </dna:sources>
+    
+	<!-- MIME type detectors and JCR repositories would be defined below --> 
+</configuration>
+ ]]></programlisting>
+	<para>
+		The configuration can then be loaded from Java like this:
+	</para>
+	
+	<programlisting role="JAVA"><![CDATA[
+JcrConfiguration config = new JcrConfiguration().loadFrom("/configRepository.xml");
+ ]]></programlisting>
+
 </chapter>
\ No newline at end of file

Modified: trunk/docs/reference/src/main/docbook/en-US/content/connectors/infinispan.xml
===================================================================
--- trunk/docs/reference/src/main/docbook/en-US/content/connectors/infinispan.xml	2009-12-29 11:41:49 UTC (rev 1486)
+++ trunk/docs/reference/src/main/docbook/en-US/content/connectors/infinispan.xml	2009-12-29 16:27:37 UTC (rev 1487)
@@ -99,18 +99,58 @@
 			</tbody>
 		</tgroup>
 	</table>
-	<para>
-		The Infinispan connector is used by creating in the &JcrConfiguration; a repository source that uses the &InfinispanSource; class.
+ 	<para>
+		One way to configure the Infinispan connector is to create &JcrConfiguration; instance with a repository source that uses the &InfinispanSource; class.
 		For example:
 	</para>
   <programlisting role="JAVA"><![CDATA[
 JcrConfiguration config = ...
-config.repositorySource("source A")
+config.repositorySource("Infinispan Store")
       .usingClass(InfinispanSource.class)
       .setDescription("The repository for our content")
       .setProperty("defaultWorkspaceName", "prod")
       .setProperty("rootNodeUuid", UUID.fromString("84b73fc8-81a8-42ed-aa4b-3905094966f0")
       .setProperty("predefinedWorkspaceNames", new String[] { "staging", "dev"});
+]]></programlisting>
+	<para>
+		Another way to configure the Infinispan connector is to create &JcrConfiguration; instance and load an XML configuration file that contains a repository source that 
+		uses the &InfinispanSource; class.
+		For example a file named configRepository.xml can be created with these contents:
+	</para>
+	
+  <programlisting role="XML"><![CDATA[
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration xmlns:dna="http://www.jboss.org/dna/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0">
+    <!-- 
+    Define the sources for the content.  These sources are directly accessible using the 
+    DNA-specific Graph API.  In fact, this is how the DNA JCR implementation works.  You 
+    can think of these as being similar to JDBC DataSource objects, except that they expose 
+    graph content via the Graph API instead of records via SQL or JDBC. 
+    -->
+    <dna:sources jcr:primaryType="nt:unstructured">
+        <!-- 
+        The 'Infinispan Store' repository is a Infinispan repository with a single default 
+        workspace (though others could be created, too).
+        -->
+        <dna:source jcr:name="Infinispan Store" 
+                    dna:classname="org.jboss.dna.graph.connector.infinispan.InfinispanSource" 
+                    dna:description="The repository for our content"
+                    dna:defaultworkspaceName="prod"
+                    dna:rootNodeUuid="84b73fc8-81a8-42ed-aa4b-3905094966f0"
+                    dna:predefinedWorkspaceNames="staging,dev"/>    
+    </dna:sources>
+    
+	<!-- MIME type detectors and JCR repositories would be defined below --> 
+</configuration>
  ]]></programlisting>
+	<para>
+		The configuration can then be loaded from Java like this:
+	</para>
+	
+	<programlisting role="JAVA"><![CDATA[
+JcrConfiguration config = new JcrConfiguration().loadFrom("/configRepository.xml");
+ ]]></programlisting>
  </chapter>
 
+ 
+

Modified: trunk/docs/reference/src/main/docbook/en-US/content/connectors/jboss_cache.xml
===================================================================
--- trunk/docs/reference/src/main/docbook/en-US/content/connectors/jboss_cache.xml	2009-12-29 11:41:49 UTC (rev 1486)
+++ trunk/docs/reference/src/main/docbook/en-US/content/connectors/jboss_cache.xml	2009-12-29 16:27:37 UTC (rev 1487)
@@ -116,17 +116,55 @@
 		</tgroup>
 	</table>
 	<para>
-		The JBoss Cache connector is used by creating in the &JcrConfiguration; a repository source that uses the &JBossCacheSource; class.
+		One way to configure the JBoss Cache connector is to create &JcrConfiguration; instance with a repository source that uses the &JBossCacheSource; class.
 		For example:
 	</para>
   <programlisting role="JAVA"><![CDATA[
 JcrConfiguration config = ...
-config.repositorySource("source A")
+config.repositorySource("Store")
       .usingClass(JBossCacheSource.class)
       .setDescription("The repository for our content")      
       .setProperty("defaultWorkspaceName", "prod")
       .setProperty("rootNodeUuid", UUID.fromString("12083e7e-2b55-4c8d-954d-627a9f5c45c2"))
       .setProperty("predefinedWorkspaceNames", new String[] { "staging", "dev"});
  ]]></programlisting>
+	<para>
+		Another way to configure the JBoss Cache connector is to create &JcrConfiguration; instance and load an XML configuration file that contains a repository source that 
+		uses the &JBossCacheSource; class.
+		For example a file named configRepository.xml can be created with these contents:
+	</para>
+	
+  <programlisting role="XML"><![CDATA[
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration xmlns:dna="http://www.jboss.org/dna/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0">
+    <!-- 
+    Define the sources for the content.  These sources are directly accessible using the 
+    DNA-specific Graph API.  In fact, this is how the DNA JCR implementation works.  You 
+    can think of these as being similar to JDBC DataSource objects, except that they expose 
+    graph content via the Graph API instead of records via SQL or JDBC. 
+    -->
+    <dna:sources jcr:primaryType="nt:unstructured">
+        <!-- 
+        The 'Store' repository is a JBoss Cache repository with a single default workspace (though 
+        others could be created, too).
+        -->
+        <dna:source jcr:name="Store" 
+                    dna:classname="org.jboss.dna.graph.connector.jbosscache.JBossCacheSource" 
+                    dna:description="The repository for our content"
+                    dna:defaultworkspaceName="prod"
+                    dna:rootNodeUuid="12083e7e-2b55-4c8d-954d-627a9f5c45c2"
+                    dna:predefinedWorkspaceNames="staging,dev"/>    
+    </dna:sources>
+    
+	<!-- MIME type detectors and JCR repositories would be defined below --> 
+</configuration>
+ ]]></programlisting>
+	<para>
+		The configuration can then be loaded from Java like this:
+	</para>
+	
+	<programlisting role="JAVA"><![CDATA[
+JcrConfiguration config = new JcrConfiguration().loadFrom("/configRepository.xml");
+ ]]></programlisting>
  </chapter>
 

Modified: trunk/docs/reference/src/main/docbook/en-US/content/connectors/jdbc_metadata.xml
===================================================================
--- trunk/docs/reference/src/main/docbook/en-US/content/connectors/jdbc_metadata.xml	2009-12-29 11:41:49 UTC (rev 1486)
+++ trunk/docs/reference/src/main/docbook/en-US/content/connectors/jdbc_metadata.xml	2009-12-29 16:27:37 UTC (rev 1487)
@@ -77,7 +77,7 @@
 				</row>
 				<row>
 					<entry>rootNodeUuid</entry>
-					<entry>Optional property that, if used, defines the UUID of the root node in the in-memory repository.  If not used,
+					<entry>Optional property that, if used, defines the UUID of the root node in the repository.  If not used,
 						then a new UUID is generated.</entry>
 				</row>
 				<row>
@@ -210,21 +210,58 @@
 			</tbody>
 		</tgroup>
 	</table>
-	<para>
-		The JDBC metadata connector is used by creating in the &JcrConfiguration; a repository source that uses the &JdbcMetadataSource; class.
+ 	<para>
+		One way to configure the JDBC metadata connector is to create &JcrConfiguration; instance with a repository source that uses the &JdbcMetadataSource; class.
 		For example:
 	</para>
   <programlisting role="JAVA"><![CDATA[
 JcrConfiguration config = ...
-config.repositorySource("source A")
+config.repositorySource("Meta Store")
       .usingClass(JdbcMetadataSource.class)
-      .setDescription("The database store for our content")
+      .setDescription("The database source for our content")
       .setProperty("dataSourceJndiName", "java:/MyDataSource")
-      .setProperty("nameOfDefaultWorkspace", "default")
- ]]></programlisting>
+      .setProperty("nameOfDefaultWorkspace", "default");
+]]></programlisting>
 	<para>
 		Of course, setting other more advanced properties would entail calling <code>setProperty(...)</code> for each.  Since almost all
 		of the properties have acceptable default values, however, we don't need to set very many of them.
 	</para>
-</chapter>
+	<para>
+		Another way to configure the JDBC metadata connector is to create &JcrConfiguration; instance and load an XML configuration file that contains a repository source that 
+		uses the &JdbcMetadataSource; class.
+		For example a file named configRepository.xml can be created with these contents:
+	</para>
+	
+  <programlisting role="XML"><![CDATA[
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration xmlns:dna="http://www.jboss.org/dna/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0">
+    <!-- 
+    Define the sources for the content.  These sources are directly accessible using the 
+    DNA-specific Graph API.  In fact, this is how the DNA JCR implementation works.  You 
+    can think of these as being similar to JDBC DataSource objects, except that they expose 
+    graph content via the Graph API instead of records via SQL or JDBC. 
+    -->
+    <dna:sources jcr:primaryType="nt:unstructured">
+        <!-- 
+        The 'Meta Store' repository is a JDBC metadata repository with a single default 
+        workspace (though others could be created, too).
+        -->
+        <dna:source jcr:name="Meta Store" 
+                    dna:classname="org.jboss.dna.graph.connector.meta.jdbc.JdbcMetadataSource" 
+                    dna:description="The database source for our content"
+                    dna:dataSourceJndiName="java:/MyDataSource"
+                    dna:defaultworkspaceName="default"/>    
+    </dna:sources>
+    
+	<!-- MIME type detectors and JCR repositories would be defined below --> 
+</configuration>
+ ]]></programlisting>
+	<para>
+		The configuration can then be loaded from Java like this:
+	</para>
+	
+	<programlisting role="JAVA"><![CDATA[
+JcrConfiguration config = new JcrConfiguration().loadFrom("/configRepository.xml");
+ ]]></programlisting>
+ </chapter>
 

Modified: trunk/docs/reference/src/main/docbook/en-US/content/connectors/jdbc_storage.xml
===================================================================
--- trunk/docs/reference/src/main/docbook/en-US/content/connectors/jdbc_storage.xml	2009-12-29 11:41:49 UTC (rev 1486)
+++ trunk/docs/reference/src/main/docbook/en-US/content/connectors/jdbc_storage.xml	2009-12-29 16:27:37 UTC (rev 1487)
@@ -29,7 +29,7 @@
 %CustomDTD;
 ]>
 <chapter id="jdbc-storage-connector">
-  <title>JDBC Storage (JPA) Connector</title>
+  <title>JPA Connector</title>
   <para>
 		This connector stores a graph of any structure or size in a relational database, using a JPA provider on top of a JDBC driver. 
 		Currently this connector relies upon some Hibernate-specific capabilities.  The schema of the database is dictated by this
@@ -62,7 +62,7 @@
 				</row>
 				<row>
 					<entry>rootNodeUuid</entry>
-					<entry>Optional property that, if used, defines the UUID of the root node in the in-memory repository.  If not used,
+					<entry>Optional property that, if used, defines the UUID of the root node in the repository.  If not used,
 						then a new UUID is generated.</entry>
 				</row>
 				<row>
@@ -251,25 +251,64 @@
 			</tbody>
 		</tgroup>
 	</table>
-	<para>
-		The JPA connector is used by creating in the &JcrConfiguration; a repository source that uses the &JpaSource; class.
+ 	<para>
+		One way to configure the JPA connector is to create &JcrConfiguration; instance with a repository source that uses the &JpaSource; class.
 		For example:
 	</para>
   <programlisting role="JAVA"><![CDATA[
 JcrConfiguration config = ...
-config.repositorySource("source A")
+config.repositorySource("JPA Store")
       .usingClass(JpaSource.class)
       .setDescription("The database store for our content")
       .setProperty("dialect", "org.hibernate.dialect.MySQLDialect")
       .setProperty("dataSourceJndiName", "java:/MyDataSource")
-      .setProperty("nameOfDefaultWorkspace", "My Default Workspace")
+      .setProperty("defaultWorkspaceName", "My Default Workspace")
       .setProperty("autoGenerateSchema", "validate");
  ]]></programlisting>
-	<para>
+  	<para>
 		Of course, setting other more advanced properties would entail calling <code>setProperty(...)</code> for each.  Since almost all
 		of the properties have acceptable default values, however, we don't need to set very many of them.
 	</para>
+ 	<para>
+		Another way to configure the JPA connector is to create &JcrConfiguration; instance and load an XML configuration file that contains a repository source that 
+		uses the &JpaSource; class.
+		For example a file named configRepository.xml can be created with these contents:
+	</para>
+	
+  <programlisting role="XML"><![CDATA[
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration xmlns:dna="http://www.jboss.org/dna/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0">
+    <!-- 
+    Define the sources for the content.  These sources are directly accessible using the 
+    DNA-specific Graph API.  In fact, this is how the DNA JCR implementation works.  You 
+    can think of these as being similar to JDBC DataSource objects, except that they expose 
+    graph content via the Graph API instead of records via SQL or JDBC. 
+    -->
+    <dna:sources jcr:primaryType="nt:unstructured">
+        <!-- 
+        The 'JPA Store' repository is an JPA source with a single default workspace (though 
+        others could be created, too).
+        -->
+        <dna:source jcr:name="JPA Store" 
+                    dna:classname="org.jboss.dna.graph.connector.store.jpa.JpaSource"
+                    dna:description="The database store for our content"
+                    dna:dialect="org.hibernate.dialect.MySQLDialect"
+                    dna:dataSourceJndiName="java:/MyDataSource"
+                    dna:defaultWorkspaceName="default"
+                    dna:autoGenerateSchema="validate"/>    
+    </dna:sources>
+    
+	<!-- MIME type detectors and JCR repositories would be defined below --> 
+</configuration>
+ ]]></programlisting>
 	<para>
+		The configuration can then be loaded from Java like this:
+	</para>
+	
+	<programlisting role="JAVA"><![CDATA[
+JcrConfiguration config = new JcrConfiguration().loadFrom("/configRepository.xml");
+ ]]></programlisting>
+	<para>
 	DNA users who prefer not to give DDL privileges to the DNA database user for this connector can use the DNA JPA DDL generation 
 	tool to create the proper DDL files for their database dialect.  This tool is packaged as an executable jar in the 
 	utils/dna-jpa-ddl-gen subproject and can be executed with the following syntax:

Modified: trunk/docs/reference/src/main/docbook/en-US/content/connectors/subversion.xml
===================================================================
--- trunk/docs/reference/src/main/docbook/en-US/content/connectors/subversion.xml	2009-12-29 11:41:49 UTC (rev 1486)
+++ trunk/docs/reference/src/main/docbook/en-US/content/connectors/subversion.xml	2009-12-29 16:27:37 UTC (rev 1487)
@@ -108,25 +108,57 @@
 			</tbody>
 		</tgroup>
 	</table>
-	<para>
-		Using the SVN connector can be used by creating in the &JcrConfiguration; a repository source that uses the &SVNRepositorySource; class.
+ 	<para>
+		One way to configure the Subversion connector is to create &JcrConfiguration; instance with a repository source that uses the &SVNRepositorySource; class.
 		For example:
 	</para>
   <programlisting role="JAVA"><![CDATA[
 JcrConfiguration config = ...
-config.repositorySource("SVN repository for JBoss DNA")
+config.repositorySource("SVN Store")
       .usingClass(SVNRepositorySource.class)
       .setDescription("The DNA SVN repository (anonymous access)")
       .setProperty("repositoryRootUrl", "http://anonsvn.jboss.org/repos/dna");
       .setProperty("directoryForDefaultWorkspace", "http://anonsvn.jboss.org/repos/dna/trunk");
-      .setProperty("predefinedWorkspaceNames", new String[] {
-                        "http://anonsvn.jboss.org/repos/dna/trunk",
-                        "http://anonsvn.jboss.org/repos/dna/tags/0.1",
-                        "http://anonsvn.jboss.org/repos/dna/tags/0.2",
-                        "http://anonsvn.jboss.org/repos/dna/tags/0.3",
-                        "http://anonsvn.jboss.org/repos/dna/tags/0.4",
-                        "http://anonsvn.jboss.org/repos/dna/tags/0.5",
-                        "http://anonsvn.jboss.org/repos/dna/tags/0.6"
-                  });
+      .setProperty("predefinedWorkspaceNames", new String[] {"http://anonsvn.jboss.org/repos/dna/trunk });
  ]]></programlisting>
+	<para>
+		Another way to configure the Subversion connector is to create &JcrConfiguration; instance and load an XML configuration file that contains a repository source that 
+		uses the &SVNRepositorySource; class.
+		For example a file named configRepository.xml can be created with these contents:
+	</para>
+	
+  <programlisting role="XML"><![CDATA[
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration xmlns:dna="http://www.jboss.org/dna/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0">
+    <!-- 
+    Define the sources for the content.  These sources are directly accessible using the 
+    DNA-specific Graph API.  In fact, this is how the DNA JCR implementation works.  You 
+    can think of these as being similar to JDBC DataSource objects, except that they expose 
+    graph content via the Graph API instead of records via SQL or JDBC. 
+    -->
+    <dna:sources jcr:primaryType="nt:unstructured">
+        <!-- 
+        The 'SVN Store' repository is an Subversion source with one workspace (although others could 
+        be defined).
+        -->
+        <dna:source jcr:name="SVN Store" 
+                    dna:classname="org.jboss.dna.graph.connector.svn.SVNRepositorySource" 
+                    dna:description="The DNA SVN repository (anonymous access)"
+                    dna:repositoryRootUrl="http://anonsvn.jboss.org/repos/dna"
+                    dna:directoryForDefaultWorkspace="http://anonsvn.jboss.org/repos/dna/trunk"
+                    dna:predefinedWorkspaceNames="http://anonsvn.jboss.org/repos/dna/trunk"
+                    dna:defaultWorkspaceName="default"/>    
+    </dna:sources>
+    
+	<!-- MIME type detectors and JCR repositories would be defined below --> 
+</configuration>
+ ]]></programlisting>
+	<para>
+		The configuration can then be loaded from Java like this:
+	</para>
+	
+	<programlisting role="JAVA"><![CDATA[
+JcrConfiguration config = new JcrConfiguration().loadFrom("/configRepository.xml");
+ ]]></programlisting>
+ 
 </chapter>

Modified: trunk/docs/reference/src/main/docbook/en-US/content/core/graph.xml
===================================================================
--- trunk/docs/reference/src/main/docbook/en-US/content/core/graph.xml	2009-12-29 11:41:49 UTC (rev 1486)
+++ trunk/docs/reference/src/main/docbook/en-US/content/core/graph.xml	2009-12-29 16:27:37 UTC (rev 1487)
@@ -208,7 +208,8 @@
 		</para>
 		<programlisting>
 @Immutable
-public static interface &PathSegment; extends Cloneable, Comparable&lt;&PathSegment;>, &Serializable;, &Readable; {
+public static interface &PathSegment; extends Cloneable, Comparable&lt;&PathSegment;>, &Serializable;, &Readable; 
+{
 
     /**
      * Get the name component of this segment.

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-12-29 11:41:49 UTC (rev 1486)
+++ trunk/docs/reference/src/main/docbook/en-US/content/jcr/configuration.xml	2009-12-29 16:27:37 UTC (rev 1487)
@@ -185,7 +185,8 @@
 	      </dna:repository>
 	  </dna:repositories>
     <!-- 
-    Define the sources for the content. These sources are directly accessible using the DNA-specific Graph API.
+    Define the sources for the content. These sources are directly accessible using the 
+    DNA-specific Graph API.
     -->
     <dna:sources jcr:primaryType="nt:unstructured">
         <dna:source jcr:name="Cars" 

Modified: trunk/docs/reference/src/main/docbook/en-US/content/jcr/jcr.xml
===================================================================
--- trunk/docs/reference/src/main/docbook/en-US/content/jcr/jcr.xml	2009-12-29 11:41:49 UTC (rev 1486)
+++ trunk/docs/reference/src/main/docbook/en-US/content/jcr/jcr.xml	2009-12-29 16:27:37 UTC (rev 1487)
@@ -211,10 +211,11 @@
 		<sect2>
 			<title>Optional Features</title>
 			<para>
-				JBoss DNA does not currently support any of the optional JCR features.  Currently, the observation optional feature is planned to be complete prior
-				to the 1.0 release.  The locking optional feature <emphasis>may</emphasis> be implemented in this time frame as well.  
+				JBoss DNA does currently supports the optional JCR locking feature.  Currently, the observation optional feature is planned to be complete prior
+				to the 1.0 release.  
 				<note>
-					<para>The JCR-SQL optional feature is not planned to be implemented as it has been dropped from the <ulink url="&JSR283;">JSR-283</ulink> specification.
+					<para>
+						The JCR-SQL optional feature is not planned to be implemented as it has been dropped from the <ulink url="&JSR283;">JSR-283</ulink> specification.
 					</para>
 				</note>
 			</para>
@@ -227,9 +228,11 @@
 				and workspace level.
 			</para>
 			<para>
-				JBoss DNA has extended the set of JCR-defined actions ("add_node", "set_property", "remove", and "read") with additional actions ("register_type" and 
-				"register_namespace") that restrict the ability to register (and unregister) types and namespaces, respectively.  Permissions to perform these actions are aggregated in roles that
-				can be assigned to users. 
+				JBoss DNA has extended the set of JCR-defined actions ("add_node", "set_property", "remove", and "read") with additional actions ("register_type",  
+				"register_namespace", and "unlock_any").  The register_type and register_namespace permissions restrict the ability to register (and unregister) types and namespaces, respectively.
+				The unlock_any permission grants the user the ability to unlock any locked node or branch (as opposed to users without that permission who can only unlock nodes or branches that they 
+				have locked themselves or for which they hold the lock token).  
+				Permissions to perform these actions are aggregated in roles that can be assigned to users. 
 			</para>
 			<para>
 				JBoss DNA currently defines three roles: <code>READONLY</code>, <code>READWRITE</code>, and <code>ADMIN</code>.  If the &Credentials; passed into 
@@ -289,6 +292,12 @@
 					<entry></entry>
 					<entry>Allows</entry>
 				</row>
+				<row>
+					<entry>unlock_any</entry>
+					<entry></entry>
+					<entry></entry>
+					<entry>Allows</entry>
+				</row>
 			</tbody>
 		</tgroup>
 	</table>
@@ -344,11 +353,11 @@
 		<sect2>
 			<title>Built-In Node Types</title>
 			<para>JBoss DNA supports all of the built-in node types described in the JSR-170 specification.  However, several of these node types
-			(mix:lockable, mix:versionable, nt:version, nt:versionLabels, nt:versionHistory, and nt:frozenNode) are semantically meaningless
-			as JBoss DNA does not yet support the locking or versioning optional features.
+			(mix:versionable, nt:version, nt:versionLabels, nt:versionHistory, and nt:frozenNode) are semantically meaningless
+			as JBoss DNA does not yet support the versioning optional feature.
 			</para>
 			<para>Although JBoss DNA does define some custom node types in the <code>dna</code> namespace, none of these
-			node types are intended to be used by developers integrating with JBoss DNA and may be changed or removed
+			node types except for <code>dna:resource</code> are intended to be used by developers integrating with JBoss DNA and may be changed or removed
 			at any time.
 			</para>
 		</sect2>
@@ -375,9 +384,10 @@
 				Node types can be defined like so:
 	    <programlisting>
 &Session; session = ... ;
+&Workspace; workspace = session.getWorkspace();
 
 // Obtain the DNA-specific node type manager ...
-&JcrNodeTypeManager; nodeTypeManager = (JcrNodeTypeManager) session.getWorkspace().getNodeTypeManager();
+&JcrNodeTypeManager; nodeTypeManager = (JcrNodeTypeManager) workspace.getNodeTypeManager();
 
 // Declare a mixin node type named "searchable" (with no namespace)
 &NodeTypeTemplate; nodeType = nodeTypeManager.createNodeTypeTemplate();
@@ -429,7 +439,8 @@
 
 &Session; session = ... ;
 // Obtain the DNA-specific node type manager ...
-&JcrNodeTypeManager; nodeTypeManager = (JcrNodeTypeManager) session.getWorkspace().getNodeTypeManager();
+&Workspace; workspace = session.getWorkspace();
+&JcrNodeTypeManager; nodeTypeManager = (JcrNodeTypeManager) workspace.getNodeTypeManager();
 nodeTypeManager.registerNodeTypes(nodeTypeSource);
 </programlisting>
     The &CndNodeTypeSource; class actually implements the &JcrNodeTypeSource; interface, so other implementations can actually be defined.

Modified: trunk/docs/reference/src/main/docbook/en-US/content/jcr/rest_service.xml
===================================================================
--- trunk/docs/reference/src/main/docbook/en-US/content/jcr/rest_service.xml	2009-12-29 11:41:49 UTC (rev 1486)
+++ trunk/docs/reference/src/main/docbook/en-US/content/jcr/rest_service.xml	2009-12-29 16:27:37 UTC (rev 1487)
@@ -250,11 +250,12 @@
 		"jcr:primaryType": "nt:unstructured",
 		"jcr:uuid": "163bc5e5-3b57-4e63-b2ae-ededf43d3445"
 		"options": [ "1", "2" ]
-		"content/base64/": "TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dCBieSB0aGlz
-		            IHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlciBhbmltYWxzLCB3aGljaCBpcyBhIGx1c3Qgb2Yg
-		            dGhlIG1pbmQsIHRoYXQgYnkgYSBwZXJzZXZlcmFuY2Ugb2YgZGVsaWdodCBpbiB0aGUgY29udGlu
-		            dWVkIGFuZCBpbmRlZmF0aWdhYmxlIGdlbmVyYXRpb24gb2Yga25vd2xlZGdlLCBleGNlZWRzIHRo
-		            ZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS4="
+		"content/base64/": 
+	"TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dCBieSB0aGlz
+IHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlciBhbmltYWxzLCB3aGljaCBpcyBhIGx1c3Qgb2Yg
+dGhlIG1pbmQsIHRoYXQgYnkgYSBwZXJzZXZlcmFuY2Ugb2YgZGVsaWdodCBpbiB0aGUgY29udGlu
+dWVkIGFuZCBpbmRlZmF0aWdhYmxlIGdlbmVyYXRpb24gb2Yga25vd2xlZGdlLCBleGNlZWRzIHRo
+ZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS4="
 	},
 }
 ]]></programlisting>



More information about the dna-commits mailing list