Skip to content

Commit bdbacf3

Browse files
rlippolismichael-simons
authored andcommitted
GH-2402 - Fix spelling and grammar errors.
1 parent 71a5129 commit bdbacf3

File tree

67 files changed

+137
-137
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+137
-137
lines changed

src/main/asciidoc/appendix/custom-queries.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ If this would get mapped into a list, it will contain duplicates for the `Movie`
3838

3939
To get the right object(s) back, it is required to _collect_ the relationships and related nodes in the query: `MATCH (m:Movie{title: 'The Matrix'})<-[r:ACTED_IN]-(p:Person) return m,collect(r),collect(p)`
4040

41-
.Single record (shortended)
41+
.Single record (shortened)
4242
----
4343
+------------------------------------------------------------------------+
4444
| m | collect(r) | collect(p) |
@@ -380,7 +380,7 @@ The following example basically defines the same query as above, but uses a `WHE
380380
include::../../../../src/test/java/org/springframework/data/neo4j/documentation/repositories/domain_events/ARepository.java[tags=spel]
381381
----
382382

383-
The SpEL blocked starts with `:#{` and than refers to the given `String` parameters by name (`#pt1`).
383+
The SpEL blocked starts with `:#{` and then refers to the given `String` parameters by name (`#pt1`).
384384
Don't confuse this with the above Cypher syntax!
385385
The SpEL expression concatenates both parameters into one single value that is eventually passed on to the <<neo4j-client>>.
386386
The SpEL block ends with `}`.

src/main/asciidoc/appendix/migrating.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@ It depends to large extend on the Spring Data and therefore, on the Spring Frame
1313
Depending on how the application has been structured, that is, how much the any of the framework part leaked into your business code, the more you have to adapt your application.
1414
It gets worse when you have more than one Spring Data module in your application, if you accessed a relational database in the same service layer as your graph database.
1515
Updating two object mapping frameworks is not fun.
16-
Relying on a embedded database configured through Spring Data itself::
16+
Relying on an embedded database configured through Spring Data itself::
1717
The embedded database in a SDN+OGM project is configured by Neo4j-OGM.
1818
Say you want to upgrade from Neo4j 3.0 to 3.5, you can't without upgrading your whole application.
1919
Why is that?
2020
As you chose to embed a database into your application, you tied yourself into the modules that configure this embedded database.
2121
To have another, embedded database version, you have to upgrade the module that configured it, because the old one does not support the new database.
2222
As there is always a Spring Data version corresponding to Neo4j-OGM, you would have to upgrade that as well.
23-
Spring Data however depends on Spring Framework and than the arguments from the first bullet apply.
23+
Spring Data however depends on Spring Framework and then the arguments from the first bullet apply.
2424
Being unsure about which building blocks to include::
2525
It's not easy to get the terms right.
2626
We wrote the building blocks of an SDN+OGM setting https://michael-simons.github.io/neo4j-sdn-ogm-tips/what_are_the_building_blocks_of_sdn_and_ogm.html[here].
2727
It may be so that all of them have been added by coincidence and you're dealing with a lot of conflicting dependencies.
2828

2929
TIP: Backed by those observations, we recommend to make sure you're using only the Bolt or http transport in your current application before switching from SDN+OGM to SDN.
30-
Thus, your application and the access layer of your application is to large extend independent from the databases version.
30+
Thus, your application and the access layer of your application is to a large extent independent of the database's version.
3131
From that state, consider moving from SDN+OGM to SDN.
3232

3333
[[migrating.preparation]]
@@ -136,7 +136,7 @@ Both `@EnableBookmarkManagement` and `@UseBookmark` as well as the `org.springfr
136136
interface and its only implementation `org.springframework.data.neo4j.bookmark.CaffeineBookmarkManager` are gone and are not needed anymore.
137137

138138
SDN uses Bookmarks for all transactions, without configuration.
139-
You can remove the bean declaration of `CaffeineBookmarkManager` as well as the the dependency to `com.github.ben-manes.caffeine:caffeine`.
139+
You can remove the bean declaration of `CaffeineBookmarkManager` as well as the dependency to `com.github.ben-manes.caffeine:caffeine`.
140140

141141
[[migrating.autoindex]]
142142
=== Automatic creation of constraints and indexes
@@ -158,7 +158,7 @@ they tend to be not so nice in production: How do you handle different versions
158158
Version A asserting the indexes that have been created by a newer version B?
159159

160160
We think it's better to take control about this upfront and recommend using controlled database migrations, based on a tool like https://www.liquigraph.org[Liquigraph] or https://github.com/michael-simons/neo4j-migrations[Neo4j migrations].
161-
The later has been seen in use with SDN inside the JHipster project.
161+
The latter has been seen in use with SDN inside the JHipster project.
162162
Both projects have in common that they store the current version of the schema within the database and make sure that a schema matches expectations before things are being updated.
163163

164164
Migrating off from previous Neo4j-OGM annotations affects `@Index`, `@CompositeIndex` and `@Required` and an example for those is given here in <<indexed.class>>:

src/main/asciidoc/appendix/neo4j-client.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Spring Data Neo4j comes with a Neo4j Client, providing a thin layer on top of Ne
55

66
While the https://github.com/neo4j/neo4j-java-driver[plain Java driver] is a very versatile tool providing an asynchronous API in addition to the imperative and reactive versions, it doesn't integrate with Spring application level transactions.
77

8-
SDN uses the driver through the concept of a idiomatic client as directly as possible.
8+
SDN uses the driver through the concept of an idiomatic client as directly as possible.
99

1010
The client has the following main goals
1111

@@ -36,7 +36,7 @@ Interactions with a Neo4j Client usually ends with a call to
3636
* `fetch().all()`
3737
* `run()`
3838

39-
The imperative version will interact at this moment with the database and get the requested results or summary, wrapped in a `Optional<>` or a `Collection`.
39+
The imperative version will interact at this moment with the database and get the requested results or summary, wrapped in an `Optional<>` or a `Collection`.
4040

4141
The reactive version will in contrast return a publisher of the requested type.
4242
Interaction with the database and retrieval of the results will not happen until the publisher is subscribed to.
@@ -150,7 +150,7 @@ Both reactive and imperative client offer
150150

151151
The imperative client returns `Optional<T>` and `Collection<T>` respectively, while the reactive client returns `Mono<T>` and `Flux<T>`, the later one being executed only if subscribed to.
152152

153-
If you don't expect any results from your query, than use `run()` after specificity the query.
153+
If you don't expect any results from your query, then use `run()` after specifying the query.
154154

155155
[[neo4j-client-reactive-get-result-summaries]]
156156
[source,java]
@@ -172,7 +172,7 @@ Please take a moment to compare both listings and understand the difference when
172172

173173
[[neo4j-client-imperative-get-result-summaries]]
174174
[source,java]
175-
.Retrieving result summaries in a imperative way
175+
.Retrieving result summaries in an imperative way
176176
----
177177
ResultSummary resultSummary = imperativeClient
178178
.query("MATCH (m:Movie) where m.title = 'Aeon Flux' DETACH DELETE m")

src/main/asciidoc/faq/faq.adoc

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public class DatabaseSelectionAwareNeo4jHealthIndicator extends AbstractHealthIn
147147
}
148148
----
149149

150-
This uses the available database selection to run the same query that Boot runs to check wether a connection is healthy or not.
150+
This uses the available database selection to run the same query that Boot runs to check whether a connection is healthy or not.
151151
Use the following configuration to apply it:
152152

153153
[[faq.multidatabase.health.imperative.config]]
@@ -361,7 +361,7 @@ public final class BookmarkCapture
361361
}
362362
----
363363

364-
For seeding the transaction system, a customized transactionmanager like the the following is required:
364+
For seeding the transaction system, a customized transaction manager like the following is required:
365365

366366
[source,java,indent=0,tabsize=4]
367367
.BookmarkSeedingConfig.java
@@ -402,7 +402,7 @@ public class BookmarkSeedingConfig {
402402
<.> Pass it on to the customized transaction manager
403403

404404
WARNING: There is *no* need to do any of these things above, unless your application has the need to access or provide
405-
this data. If in doubt, don't do neither.
405+
this data. If in doubt, don't do either.
406406

407407
[[faq.annotations.specific]]
408408
== Do I need to use Neo4j specific annotations?
@@ -557,7 +557,7 @@ public interface MyPersonRepository extends Neo4jRepository<Person, Long> {
557557
== Can I map named paths?
558558

559559
A series of connected nodes and relationships is called a "path" in Neo4j.
560-
Cypher allows paths to be named using an identifer, as exemplified by:
560+
Cypher allows paths to be named using an identifier, as exemplified by:
561561

562562
[source,cypher]
563563
----
@@ -578,7 +578,7 @@ Which looks like this:
578578

579579
image::bacon-distance.png[]
580580

581-
We find 3 nodes labeled `Person` and 2 nodes labeled `Movie`. Both can be mapped with a custom queury.
581+
We find 3 nodes labeled `Person` and 2 nodes labeled `Movie`. Both can be mapped with a custom query.
582582
Assume there's a node entity for both `Person` and `Movie` as well as `Actor` taking care of the relationship:
583583

584584

@@ -690,7 +690,7 @@ What are the alternatives?
690690
* <<projections.sdn.general-remarks,Projections>> might be already enough to shape your *view* on the graph: They can be used to define
691691
the depth of fetching properties and related entities in an explicit way: By modelling them.
692692
* If your goal is to make only the conditions of your queries *dynamic*, then have a look at the <<core.extensions.querydsl, `QuerydslPredicateExecutor`>>
693-
but especially our own variant of it, the `CypherdslConditionExecutor`. Both <<sdn-mixins,mixins>> allow to add conditions to
693+
but especially our own variant of it, the `CypherdslConditionExecutor`. Both <<sdn-mixins,mixins>> allow adding conditions to
694694
the full queries we create for you. Thus, you will have the domain fully populated together with custom conditions.
695695
Of course, your conditions must work with what we generate. Find the names of the root node, the related nodes and more
696696
<<custom-queries,here>>.
@@ -710,7 +710,7 @@ Why speaking about custom repository fragments now?
710710
* You might have more complex situation in which more than one dynamic query is required, but the queries still belong
711711
conceptually in a repository and not in the service layer
712712
* Your custom queries return a graph shaped result that fits not quite to your domain model
713-
and therefore the custom query should be accomponied by a custom mapping as well
713+
and therefore the custom query should be accompanied by a custom mapping as well
714714
* You have the need for interacting with the driver, i.e. for bulk loads that should not go through object mapping.
715715

716716
Assume the following repository _declaration_ that basically aggregates one base repository plus 3 fragments:
@@ -725,9 +725,9 @@ include::../../../../src/test/java/org/springframework/data/neo4j/documentation/
725725
The repository contains <<movie-entity, Movies>> as shown in <<example-node-spring-boot-project,the getting started section>>.
726726

727727
The additional interface from which the repository extends (`DomainResults`, `NonDomainResults` and `LowlevelInteractions`)
728-
are the fragments that addresses all the concerncs above.
728+
are the fragments that addresses all the concerns above.
729729

730-
=== Using complex, dynamic custom queries and but still returning domain types
730+
=== Using complex, dynamic custom queries but still returning domain types
731731

732732
The fragment `DomainResults` declares one additional method `findMoviesAlongShortestPath`:
733733

@@ -758,21 +758,21 @@ The important takeaway here is:
758758

759759
* The template "knows" your domain objects and maps them accordingly
760760
* `@Query` is not the only option to define custom queries
761-
* The can be generated in various ways
761+
* They can be generated in various ways
762762
* The `@Transactional` annotation is respected
763763

764764
=== Using custom queries and custom mappings
765765

766766
Often times a custom query indicates custom results.
767-
Should all of those results be mapepd as `@Node`? Of course not! Many times those objects represents read commands
767+
Should all of those results be mapped as `@Node`? Of course not! Many times those objects represents read commands
768768
and are not meant to be used as write commands.
769769
It is also not unlikely that SDN 6 cannot or want not map everything that is possible with Cypher.
770770
It does however offer several hooks to run your own mapping: On the `Neo4jClient`.
771771
The benefit of using the SDN 6 `Neo4jClient` over the driver:
772772

773773
* The `Neo4jClient` is integrated with Springs transaction management
774774
* It has a fluent API for binding parameters
775-
* It has a fluent API exposing both the records and the Neo4j typesystem so that you can access
775+
* It has a fluent API exposing both the records and the Neo4j type system so that you can access
776776
everything in your result to execute the mapping
777777

778778
Declaring the fragment is exactly the same as before:
@@ -798,7 +798,7 @@ include::../../../../src/test/java/org/springframework/data/neo4j/documentation/
798798
<.> The client takes only in Strings, but the Cypher-DSL can still be used when rendering into a String
799799
<.> Bind one single value to a named parameter. There's also an overload to bind a whole map of parameters
800800
<.> This is the type of the result you want
801-
<.> And finally, the `mappedBy` method, exposing one `Record` for each entry in the result plus the drivers typesystem if needed.
801+
<.> And finally, the `mappedBy` method, exposing one `Record` for each entry in the result plus the drivers type system if needed.
802802
This is the API in which you hook in for your custom mappings
803803

804804
The whole query runs in the context of a Spring transaction, in this case, a read-only one.
@@ -816,7 +816,7 @@ include::../../../../src/test/java/org/springframework/data/neo4j/documentation/
816816
----
817817
<.> Work with the driver directly. As with all the examples: There is no need for `@Autowired` magic. All the fragments
818818
are actually testable on their own.
819-
<.> The usecase is made up. Here we use a driver managed transaction deleting the whole graph and return the number of
819+
<.> The use case is made up. Here we use a driver managed transaction deleting the whole graph and return the number of
820820
deleted nodes and relationships
821821

822822
This interaction does of course not run in a Spring transaction, as the driver does not know about Spring.
@@ -855,11 +855,11 @@ include::../../../../src/test/java/org/springframework/data/neo4j/integration/im
855855
<.> This signature is required by the base class. Take the `Neo4jOperations` (the actual specification of the `Neo4jTemplate`)
856856
and the entity information and store them on an attribute if needed.
857857

858-
In this example we forbide the use of the `findAll` method.
858+
In this example we forbid the use of the `findAll` method.
859859
You could add methods taking in a fetch depth and run custom queries based on that depth.
860860
One way to do this is shown in <<domain-results>>.
861861

862-
To enable this base repository for all declared repesotiries enable Neo4j repositories with: `@EnableNeo4jRepositories(repositoryBaseClass = MyRepositoryImpl.class)`.
862+
To enable this base repository for all declared repositories enable Neo4j repositories with: `@EnableNeo4jRepositories(repositoryBaseClass = MyRepositoryImpl.class)`.
863863

864864
[[faq.entities.auditing]]
865865
== How do I audit entities?

src/main/asciidoc/getting-started/getting-started.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ If you don't have a running database but Docker installed, please run:
2929
docker run --publish=7474:7474 --publish=7687:7687 -e 'NEO4J_AUTH=neo4j/secret' neo4j:{neo4j-version}
3030
----
3131

32-
You know can access http://localhost:7474/browser/?cmd=play&arg=movies[http://localhost:7474].
32+
You can now access http://localhost:7474/browser/?cmd=play&arg=movies[http://localhost:7474].
3333
The above command sets the password of the server to `secret`.
3434
Note the command ready to run in the prompt (`:play movies`).
3535
Execute it to fill your database with some test data.
3636

3737
[[create-spring-boot-project]]
3838
== Create a new Spring Boot project
3939

40-
The easiest way to setup a Spring Boot project is https://start.spring.io[start.spring.io]
40+
The easiest way to set up a Spring Boot project is https://start.spring.io[start.spring.io]
4141
(which is integrated in the major IDEs as well, in case you don't want to use the website).
4242

4343
Select the "Spring Web Starter" to get all the dependencies needed for creating a Spring based web application.
@@ -148,8 +148,8 @@ module your.module {
148148
exports your.domain; // <.>
149149
}
150150
----
151-
<.> Spring Data Neo4j uses Spring Data Commons and it's reflective capabilities, so
152-
you would need to open up your domain packages to `spring.core` at least.
151+
<.> Spring Data Neo4j uses Spring Data Commons and its reflective capabilities, so
152+
you would need to open up your domain packages to `spring.core` at least.
153153
<.> We assume here that `your.domain` contains also repositories: Those must be exported to be accessible by
154154
`spring.beans`, `spring.context` and `spring.data.commons`. If you don't want to export them to the world,
155155
you can restrict them to those modules.

src/main/asciidoc/introduction-and-preface/building-blocks.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The template comes in handy in scenarios with a large number of domain classes o
2727
The highest level of abstraction is a Spring Data repository.
2828

2929
All abstractions of SDN come in both imperative and reactive fashions.
30-
It is not recommend to mix both programming styles in the same application.
30+
It is not recommended mixing both programming styles in the same application.
3131
The reactive infrastructure requires a Neo4j 4.0+ database.
3232

3333
[[sdn-building-blocks]]
@@ -72,7 +72,7 @@ The reactive infrastructure requires a Neo4j 4.0+ database.
7272
The template mechanism is similar to the templates of others stores.
7373
Find some more information about it in <<template-support,our FAQ>>.
7474
The Neo4j Client as such is unique to SDN.
75-
You will find it's documentation in the <<neo4j-client,appendix>>.
75+
You will find its documentation in the <<neo4j-client,appendix>>.
7676

7777
[[sdn-packages]]
7878
== On the package level

0 commit comments

Comments
 (0)