#1097 - Polishing some grammatical and spelling errors.

This commit is contained in:
Martin Otten
2019-10-21 15:40:40 +02:00
committed by Greg Turnquist
parent b048c272e6
commit 8c6dfc922c

View File

@@ -11,7 +11,7 @@ This section covers the basics of Spring HATEOAS and its fundamental domain abst
The fundamental idea of hypermedia is to enrich the representation of a resource with hypermedia elements.
The simplest form of that are links.
They indicate a client that it can navigate to a certain resource.
The semantics of a related resource are defined in a so called link relation.
The semantics of a related resource are defined in a so-called link relation.
You might have seen this in the header of an HTML file already:
.A link in an HTML document
@@ -26,8 +26,8 @@ As you can see the link points to a resource `theme.css` and indicates that it i
Links often carry additional information, like the media type that the resource pointed to will return.
However, the fundamental building blocks of a link are its reference and relation.
Spring HATEOAS let's you work with links through its immutable `Link` value type.
Its constructor take both an hypertext reference and a link relation, the latter being defaulted to the IANA link relation `self`.
Spring HATEOAS lets you work with links through its immutable `Link` value type.
Its constructor takes both a hypertext reference and a link relation, the latter being defaulted to the IANA link relation `self`.
Read more on the latter in <<fundamentals.link-relations>>.
@@ -48,8 +48,8 @@ Find more information on how to create links pointing to Spring MVC and Spring W
== URI templates
For a Spring HATEOAS `Link`, the hypertext reference can not only be a URI, but also a URI template according to https://tools.ietf.org/html/rfc6570[RFC-6570].
A URI template contains so called template variables and allows expansion of these parameters.
This allows clients to turn parameterized templates into URIs without having to know about the structure of the final URI, it only needs to know about the names or the variables.
A URI template contains so-called template variables and allows expansion of these parameters.
This allows clients to turn parameterized templates into URIs without having to know about the structure of the final URI, it only needs to know about the names of the variables.
.Using links with templated URIs
====
@@ -78,7 +78,7 @@ assertThat(template.toString()).isEqualTo("/{segment}/something{?parameter}");
[[fundamentals.link-relations]]
== Link relations
To indicate the relationship of target resource to the current one so called link relations are used.
To indicate the relationship of the target resource to the current one so-called link relations are used.
Spring HATEOAS provides a `LinkRelation` type to easily create `String`-based instances of it.
@@ -184,7 +184,7 @@ EntityModel<Person> model = new EntityModel<>(person);
=== Collection resource representation model
For resources that a conceptually collections, a `CollectionModel` is available.
For resources that are conceptually collections, a `CollectionModel` is available.
Its elements can either be simple objects or `RepresentationModel` instances in turn.
.Using `EntityModel` to wrap existing objects