Skip to content

Commit 5fc24aa

Browse files
rlippolismichael-simons
authored andcommitted
GH-2402 - Fix spelling and grammar errors.
1 parent 45a0e64 commit 5fc24aa

File tree

57 files changed

+116
-115
lines changed

Some content is hidden

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

57 files changed

+116
-115
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) |
@@ -205,7 +205,7 @@ The following example basically defines the same query as above, but uses a `WHE
205205
include::../../../../src/test/java/org/springframework/data/neo4j/documentation/repositories/domain_events/ARepository.java[tags=spel]
206206
----
207207

208-
The SpEL blocked starts with `:#{` and than refers to the given `String` parameters by name (`#pt1`).
208+
The SpEL blocked starts with `:#{` and then refers to the given `String` parameters by name (`#pt1`).
209209
Don't confuse this with the above Cypher syntax!
210210
The SpEL expression concatenates both parameters into one single value that is eventually passed on to the <<neo4j-client>>.
211211
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: 14 additions & 14 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]]
@@ -487,7 +487,7 @@ public interface MyPersonRepository extends Neo4jRepository<Person, Long> {
487487
== Can I map named paths?
488488

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

492492
[source,cypher]
493493
----
@@ -508,7 +508,7 @@ Which looks like this:
508508

509509
image::bacon-distance.png[]
510510

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

514514

@@ -623,8 +623,8 @@ Why speaking about custom repository fragments?
623623
* You might want to use the Cypher-DSL for building type-safe queries
624624
* You might have more complex situation in which a dynamic query is required, but the query still belongs
625625
conceptually in a repository and not in the service layer
626-
* Your custom query returns a graph shaped result that fits not quite to your domain model
627-
and therefore the custom query should be accomponied by a custom mapping as well
626+
* Your custom queries return a graph shaped result that fits not quite to your domain model
627+
and therefore the custom query should be accompanied by a custom mapping as well
628628
* You have the need for interacting with the driver, i.e. for bulk loads that should not go through object mapping.
629629

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

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

644-
=== Using complex, dynamic custom queries and but still returning domain types
644+
=== Using complex, dynamic custom queries but still returning domain types
645645

646646
The fragment `DomainResults` declares one additional method `findMoviesAlongShortestPath`:
647647

@@ -672,21 +672,21 @@ The important takeaway here is:
672672

673673
* The template "knows" your domain objects and maps them accordingly
674674
* `@Query` is not the only option to define custom queries
675-
* The can be generated in various ways
675+
* They can be generated in various ways
676676
* The `@Transactional` annotation is respected
677677

678678
=== Using custom queries and custom mappings
679679

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

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

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

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

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

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

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

778778
[[faq.entities.auditing]]
779779
== How do I audit entities?

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

Lines changed: 2 additions & 2 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.

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

src/main/asciidoc/object-mapping/mapping.adoc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ See <<conversions>> for more information on that.
4848
* `@LastModifiedDate`: Applied at the field level to indicate the last modification date of a node.
4949
* `@PersistenceConstructor`: Applied at one constructor to mark it as a the preferred constructor when reading entities.
5050
* `@Persistent`: Applied at the class level to indicate this class is a candidate for mapping to the database.
51-
* `@Version`: Applied at field level is used for optimistic locking and checked for modification on save operations.
52-
The initial value is zero which is bumped automatically on every update.
51+
* `@Version`: Applied at field level it is used for optimistic locking and checked for modification on save operations.
52+
The initial value is zero which is bumped automatically on every update.
5353

5454
Have a look at <<auditing>> for all annotations regarding auditing support.
5555

@@ -62,11 +62,11 @@ To map an Object to nodes in the graph and vice versa, we need a label to identi
6262

6363
`@Node` has an attribute `labels` that allows you to configure one or more labels to be used when reading and writing instances of the annotated class.
6464
The `value` attribute is an alias for `labels`.
65-
If you don't specify a label, than the simple class name will be used as the primary label.
65+
If you don't specify a label, then the simple class name will be used as the primary label.
6666
In case you want to provide multiple labels, you could either:
6767

6868
. Supply an array to the `labels` property.
69-
The first element in the array will considered as the primary label.
69+
The first element in the array will be considered as the primary label.
7070
. Supply a value for `primaryLabel` and put the additional labels in `labels`.
7171

7272
The primary label should always be the most concrete label that reflects your domain class.
@@ -285,7 +285,7 @@ NOTE: We haven't modelled the relationship between movies and people in both dir
285285
Why is that?
286286
We see the `MovieEntity` as the aggregate root, owning the relationships.
287287
On the other hand, we want to be able to pull all people from the database without selecting all the movies associated with them.
288-
Please consider your applications use case before you try to map every relationship in your database in every direction.
288+
Please consider your application's use case before you try to map every relationship in your database in every direction.
289289
While you can do this, you may end up rebuilding a graph database inside your object graph and this is not the intention of a mapping framework.
290290

291291
[[mapping.id-handling]]
@@ -294,7 +294,7 @@ While you can do this, you may end up rebuilding a graph database inside your ob
294294
[[mapping.id-handling.internal-id]]
295295
=== Using the internal Neo4j id
296296

297-
The easiest way to give your domain classes an unique identifier is the combination of `@Id` and `@GeneratedValue`
297+
The easiest way to give your domain classes a unique identifier is the combination of `@Id` and `@GeneratedValue`
298298
on a field of type `Long` (preferable the object, not the scalar `long`, as literal `null` is the better indicator whether an instance is new or not):
299299

300300
.Mutable MovieEntity with internal Neo4j id
@@ -367,7 +367,7 @@ You either have to provide a setter for the id attribute or something like a _wi
367367

368368
The `@GeneratedValue` annotation can take a class implementing `org.springframework.data.neo4j.core.schema.IdGenerator` as parameter.
369369
SDN provides `InternalIdGenerator` (the default) and `UUIDStringGenerator` out of the box.
370-
The later generates new UUIDs for each entity and returns them as `java.lang.String`.
370+
The latter generates new UUIDs for each entity and returns them as `java.lang.String`.
371371
An application entity using that would look like this:
372372

373373
.Mutable MovieEntity with externally generated surrogate key

0 commit comments

Comments
 (0)