Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 50 additions & 18 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@
<dist.accessKey>s3 access key</dist.accessKey>
<dist.secretKey>s3 secret key</dist.secretKey>
-->
<docbook.srcDir>${basedir}/src/docbkx</docbook.srcDir>
<docbook.snippetsDir>${basedir}/spring-data-neo4j/target/docbkx</docbook.snippetsDir>
<docbook.generatedDir>${basedir}/target/classes</docbook.generatedDir>
</properties>
<profiles>
<profile>
Expand Down Expand Up @@ -264,20 +267,47 @@
<version>3.1.0.RELEASE</version>
</extension>
</extensions>
<plugins>
<resources>
<resource>
<directory>${docbook.srcDir}</directory>
<filtering>false</filtering>
</resource>
<resource>
<directory>${docbook.snippetsDir}</directory>
<filtering>false</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>resources</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.agilejava.docbkx</groupId>
<artifactId>docbkx-maven-plugin</artifactId>
<version>2.0.8</version>
<version>2.0.11</version>
<executions>
<execution>
<id>single-page</id>
<goals>
<goal>generate-html</goal>
</goals>
<configuration>
<sourceDirectory>${docbook.generatedDir}</sourceDirectory>
<keepRelativeImageUris>true</keepRelativeImageUris>
<htmlCustomization>${basedir}/src/docbkx/resources/xsl/html.xsl</htmlCustomization>
<htmlCustomization>${docbook.generatedDir}/resources/xsl/html.xsl</htmlCustomization>
<useExtensions>1</useExtensions>
<highlightSource>1</highlightSource>
<highlightDefaultLanguage></highlightDefaultLanguage>
Expand All @@ -286,16 +316,16 @@
file="${basedir}/target/docbkx/html/index.html"/>

<copy todir="${basedir}/target/site/reference/html" flatten="true">
<fileset dir="${basedir}/src/docbkx/">
<exclude name="${basedir}/src/docbkx/resources/*"/>
<fileset dir="${basedir}/target/classes/">
<exclude name="${docbook.generatedDir}/resources/*"/>
<include name="**/*.png"/>
<include name="**/*.gif"/>
<include name="**/*.jpg"/>
</fileset>
</copy>

<copy todir="${basedir}/target/site/reference/html">
<fileset dir="${basedir}/src/docbkx/resources">
<fileset dir="${docbook.generatedDir}/resources">
<include name="**/*.css"/>
<include name="**/*.png"/>
<include name="**/*.gif"/>
Expand All @@ -312,9 +342,9 @@
<goal>generate-rtf</goal>
</goals>
<configuration>
<imgSrcPath>${basedir}/src/docbkx/</imgSrcPath>
<admonGraphicsPath>${basedir}/src/docbkx/resources/images/</admonGraphicsPath>
<sourceDirectory>${basedir}/src/docbkx/</sourceDirectory>
<imgSrcPath>${docbook.generatedDir}/</imgSrcPath>
<admonGraphicsPath>${docbook.generatedDir}/resources/images/</admonGraphicsPath>
<sourceDirectory>${docbook.generatedDir}/</sourceDirectory>
<fopExtensions>0</fopExtensions>
<fop1Extensions>0</fop1Extensions>
<useExtensions>0</useExtensions>
Expand All @@ -334,9 +364,10 @@
<goal>generate-pdf</goal>
</goals>
<configuration>
<imgSrcPath>${basedir}/src/docbkx/</imgSrcPath>
<admonGraphicsPath>${basedir}/src/docbkx/resources/images/</admonGraphicsPath>
<foCustomization>${basedir}/src/docbkx/resources/xsl/fopdf.xsl</foCustomization>
<sourceDirectory>${docbook.generatedDir}</sourceDirectory>
<imgSrcPath>${docbook.generatedDir}/</imgSrcPath>
<admonGraphicsPath>${docbook.generatedDir}/resources/images/</admonGraphicsPath>
<foCustomization>${docbook.generatedDir}/resources/xsl/fopdf.xsl</foCustomization>
<useExtensions>1</useExtensions>
<highlightSource>1</highlightSource>
<highlightDefaultLanguage></highlightDefaultLanguage>
Expand All @@ -354,9 +385,10 @@
<goal>generate-html</goal>
</goals>
<configuration>
<sourceDirectory>${docbook.generatedDir}</sourceDirectory>
<keepRelativeImageUris>true</keepRelativeImageUris>
<chunkedOutput>true</chunkedOutput>
<htmlCustomization>${basedir}/src/docbkx/resources/xsl/html_chunk.xsl</htmlCustomization>
<htmlCustomization>${docbook.generatedDir}/resources/xsl/html_chunk.xsl</htmlCustomization>
<useExtensions>1</useExtensions>
<highlightSource>1</highlightSource>
<highlightDefaultLanguage></highlightDefaultLanguage>
Expand All @@ -368,15 +400,15 @@
</fileset>
</move>
<copy todir="${basedir}/target/site/reference/multi">
<fileset dir="${basedir}/src/docbkx/resources">
<fileset dir="${docbook.generatedDir}/resources">
<include name="**/*.png"/>
<include name="**/*.gif"/>
<include name="**/*.jpg"/>
</fileset>
</copy>
<copy todir="${basedir}/target/site/reference/multi" flatten="true">
<fileset dir="${basedir}/src/docbkx">
<exclude name="${basedir}/src/docbkx/resources/*"/>
<fileset dir="${docbook.generatedDir}">
<exclude name="${docbook.generatedDir}/resources/*"/>
<include name="**/*.css"/>
<include name="**/*.png"/>
<include name="**/*.gif"/>
Expand Down Expand Up @@ -406,8 +438,8 @@
<chunkedOutput>false</chunkedOutput>
<draftWatermarkImage/>
<htmlStylesheet>css/html.css</htmlStylesheet>
<sourceDirectory>${basedir}/src/docbkx/</sourceDirectory>
<!--foCustomization>${basedir}/src/docbkx/resources/xsl/fopdf.xsl</foCustomization-->
<sourceDirectory>${docbook.generatedDir}/</sourceDirectory>
<!--foCustomization>${docbook.generatedDir}/resources/xsl/fopdf.xsl</foCustomization-->
<xincludeSupported>true</xincludeSupported>
<entities>
<entity>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<spring:url value="/resources/spring/Spring.js" var="spring_url" />
<spring:url value="/resources/spring/Spring-Dojo.js" var="spring_dojo_url" />
<spring:url value="/resources/images/favicon.ico" var="favicon" />
<link rel="stylesheet" type="text/css" media="screen" href="${roo_css_url}"><!-- required for FF3 and Opera --></link>
<link rel="stylesheet" type="text/css" href="${tundra_url}"><!-- required for FF3 and Opera --></link>
<link rel="stylesheet" type="text/css" media="screen" href="${roo_css_url}" /><!-- required for FF3 and Opera -->
<link rel="stylesheet" type="text/css" href="${tundra_url}" /><!-- required for FF3 and Opera -->
<link rel="SHORTCUT ICON" href="${favicon}" />

<!-- Get the user local from the page context (it was set by Spring MVC's locale resolver) -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

public abstract class DocumentingTestBase {

private static final String DOCBOOK_DIR = "src/docbkx";
private static final String DOCBOOK_DIR = "target/docbkx";
private static final String SRC_TEST_JAVA = "src/test/java";
protected String title;
protected String snippetTitle;
Expand All @@ -52,7 +52,7 @@ private String getSnippetName() {
}

private File docbookDirectory() {
return new File(determineRoot(),DOCBOOK_DIR);
return new File (new File(determineRoot(),module()), DOCBOOK_DIR);
}

protected File getSnippetFileName(File directory, String name) {
Expand Down Expand Up @@ -130,9 +130,9 @@ protected String module() {

protected File determineRoot() {
File currentDirectory = currentDirectory();
if (new File(currentDirectory,DOCBOOK_DIR).exists()) return currentDirectory;
if (new File(currentDirectory,module()).exists()) return currentDirectory;
currentDirectory = currentDirectory.getParentFile();
if (new File(currentDirectory,DOCBOOK_DIR).exists()) return currentDirectory;
if (new File(currentDirectory,module()).exists()) return currentDirectory;
throw new IllegalStateException("Can't determine root directory, started at "+currentDirectory());
}
}
8 changes: 4 additions & 4 deletions src/docbkx/introduction/about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@
We also appreciate very much the foresight of Rod Johnson and Emil Eifrem to initiate the project, and now
also providing great forewords. Their leadership inspired collaboration between the engineering teams at
SpringSource and Neo Technology, a tremendous help during the making of Spring Data Neo4j.
 

</para>
 

<para>
Last but not least we thank our vibrant community, both in the Spring Forums as well as on the Neo4j
Mailing list and on many other places on the internet for giving us feedback, reporting issues and suggesting
improvements. Without that important feedback we wouldn't be where we are today.
 

</para>
</section>  
<para>
Enjoy the book!
</para>
</section>
</preface>
6 changes: 4 additions & 2 deletions src/docbkx/reference/cross-store.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,13 @@
persists fields explicitly annotated with <code>@GraphProperty</code>. JPA will ignore these fields.
</para>
</section>
<section><title>Example</title>
<para>
The following example is taken from the
<ulink url="http://github.com/SpringSource/spring-data-neo4j-examples">Spring Data Neo4j examples</ulink>
myrestaurants-social project:
</para>
<example>
<para><example>
<title>Cross-store node entity</title>
<programlisting language="java"><![CDATA[@Entity
@Table(name = "user_account")
Expand Down Expand Up @@ -114,7 +115,8 @@ public class UserAccount {
}
}
]]></programlisting>
</example>
</example></para>
</section>
</section>
<section>
<title>Configuring cross-store persistence</title>
Expand Down
28 changes: 14 additions & 14 deletions src/docbkx/reference/neo4j.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,23 @@
Neo4j has been in commercial development for 10 years and in production for over 7 years.
Most importantly it has a helpful and contributing community surrounding it, but it also:
<itemizedlist>
<listitem>has an intuitive graph-oriented model for data representation. Instead of tables, rows,
<listitem><simpara>has an intuitive graph-oriented model for data representation. Instead of tables, rows,
and columns, you work with a graph consisting of
<ulink url="http://wiki.neo4j.org/content/Getting_Started">nodes, relationships, and properties</ulink>.
</listitem>
<listitem>has a disk-based, native storage manager optimized for storing graph structures
</simpara></listitem>
<listitem><simpara>has a disk-based, native storage manager optimized for storing graph structures
with maximum performance and scalability.
</listitem>
<listitem>is scalable. Neo4j can handle graphs with many billions of nodes/relationships/properties on
</simpara></listitem>
<listitem><simpara>is scalable. Neo4j can handle graphs with many billions of nodes/relationships/properties on
a single machine, but can also be scaled out across multiple machines for high availability.
</listitem>
<listitem>has a powerful traversal framework for traversing in the node space.
</listitem>
<listitem>can be deployed as a standalone server or an embedded database with a very small
</simpara></listitem>
<listitem><simpara>has a powerful traversal framework for traversing in the node space.
</simpara></listitem>
<listitem><simpara>can be deployed as a standalone server or an embedded database with a very small
distribution footprint (~700k jar).
</listitem>
<listitem>has a Java <ulink url="http://api.neo4j.org/">API</ulink>.
</listitem>
</simpara></listitem>
<listitem><simpara>has a Java <ulink url="http://api.neo4j.org/">API</ulink>.
</simpara></listitem>
</itemizedlist>
</para>
<para>
Expand Down Expand Up @@ -132,9 +132,9 @@ for (Path position : traversalDescription.traverse(myStartNode)) {
Spring Data Neo4j provides automatic indexing via the @Indexed annotation, eliminating the need
for manual index management.
</para>
<note>
<note><para>
Modifying Neo4j indexes also requires transactions.
</note>
</para></note>
<example>
<title>Index usage</title>
<programlisting language="java"><![CDATA[IndexManager indexManager = graphDb.index();
Expand Down
10 changes: 5 additions & 5 deletions src/docbkx/reference/preface.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</para>

<para>
Spring Data Neo4j allows, at anytime, to drop down to the <xref linkend="neo4j" >Neo4j-API</xref> level to execute functionality with
Spring Data Neo4j allows, at anytime, to drop down to the Neo4j-API, see <xref linkend="neo4j" /> level to execute functionality with
the highest performance possible.
</para>
<para>
Expand All @@ -46,16 +46,16 @@
</para>
<para>
To use advanced functionality like traversals, Cypher and Gremlin, a basic understanding of the graph data model is required.
The graph data model is explained in the chapter about <xref linkend="neo4j">Neo4j</xref>.
The graph data model is explained in the chapter about Neo4j, see <xref linkend="neo4j" />.
</para>
<para>
Relationships between entities are first class citizens in a graph database and therefore worth a separate
<xref linkend="reference:programming_model:relationships" >chapter</xref> describing their usage in Spring Data Neo4j.
chapter (<xref linkend="reference:programming_model:relationships" />) describing their usage in Spring Data Neo4j.
</para>
<para>
To add fields that are just backed by graph operations is a bit more involved. First you should know
about traversals, Cypher queries and Gremlin expressions.
Those are explained in the <xref linkend="neo4j" >Neo4j-API</xref> chapter. Then you can start adding purely
Those are explained in <xref linkend="neo4j" />Neo4j-API. Then you can start adding purely
dynamically gathered fields to your entities.
</para>
<para>
Expand Down Expand Up @@ -124,7 +124,7 @@
</para>
<para>
Being a Spring Data library, Spring Data Neo4j also implements a comprehensive template for interacting with the Neo4j graph database.
The <xref linkend="reference:template">Neo4jTemplate</xref> provides all basic graph operations as well as advanced querying with
The Neo4jTemplate (<xref linkend="reference:template" />) provides all basic graph operations as well as advanced querying with
Indexes, Cypher, Gremlin and Traversals with a convenient API.
</para>
<para>
Expand Down
4 changes: 2 additions & 2 deletions src/docbkx/reference/programming-model/aspectj.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<ulink url="http://download.eclipse.org/tools/ajdt/36/dev/update">http://download.eclipse.org/tools/ajdt/36/dev/update</ulink>).
The current version that does not show incorrect errors is AspectJ 1.6.12.RELEASE (included in STS 2.8.0), previous versions are reported
to mislead the user.
</para> ¸
</para>
<note>
<para>
There might be some issues with the eclipse maven plugin not adding AspectJ files correctly to the build path.
Expand All @@ -68,4 +68,4 @@
give the compiler at least 512 MB of RAM.
</para>
</section>
</section>
</section>
4 changes: 2 additions & 2 deletions src/docbkx/reference/programming-model/indexing.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ Person mark = graphRepository.findAllByQuery("people-search", "name", "ma*");
</example>

</para>
<note>
<note><para>
Please note that indexes are currently created on demand, so whenever an index that doesn't exist
is requested from a query or get operation it is created. This is subject to change but has
currently the implication that those indexes won't be configured as fulltext which causes
subsequent fulltext updates to those indexes to fail.
</note>
</para></note>
</section>
<section>
<title>Manual index access</title>
Expand Down
12 changes: 6 additions & 6 deletions src/docbkx/reference/programming-model/node-entities.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<para>
If the <code>partial</code> attribute is set to true, this entity takes part in a cross-store setting,
where the entity lives in both the graph database and a JPA data source. See
<xref linkend="cross-store"/> for more information.
<xref linkend="reference:cross-store"/> for more information.
</para>
<para>
Entity fields can be annotated with <code>@GraphProperty</code>, <code>@RelatedTo</code>,
Expand Down Expand Up @@ -94,11 +94,11 @@ public class Group {
]]></programlisting>

</example>
<para>
<note>
<note>
<para>
Please note that this annotation can also be used on repository methods.
</note>
</para>
</para>
</note>
</section>
<section>
<title>@GraphTraversal: fields as traversal result views</title>
Expand Down Expand Up @@ -132,4 +132,4 @@ public class Group {

</example>
</section>
</section>
</section>
Loading