Skip to content

Commit c949676

Browse files
authored
Update README.md
1 parent 97622d3 commit c949676

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ Therefore, you can easily include the library to your Maven or Gradle build:
1414
<dependency>
1515
<groupId>org.contextmapper</groupId>
1616
<artifactId>context-map-generator</artifactId>
17-
<version>1.0.2</version>
17+
<version>1.1.0</version>
1818
</dependency>
1919
```
2020

2121
**Gradle:**
2222
```gradle
23-
implementation 'org.contextmapper:context-map-generator:1.0.2'
23+
implementation 'org.contextmapper:context-map-generator:1.1.0'
2424
```
2525

2626
### Preconditions
@@ -80,6 +80,23 @@ The program above generates the following Context Map:
8080

8181
<a href="https://raw.githubusercontent.com/ContextMapper/context-map-generator/master/context-map-example-1.png" target="_blank"><img src="https://raw.githubusercontent.com/ContextMapper/context-map-generator/master/context-map-example-1.png" alt="Example Context Map" /></a>
8282

83+
### Labels
84+
Optionally it is possible to define a `name` or `implementation technology` for each relationship by using the corresponding setters. The following example calls show how we set them on relationships from the example above:
85+
86+
```java
87+
.addRelationship(new UpstreamDownstreamRelationship(printing, debtCollection)
88+
.setUpstreamPatterns(OPEN_HOST_SERVICE, PUBLISHED_LANGUAGE)
89+
.setDownstreamPatterns(ANTICORRUPTION_LAYER))
90+
.setName("PrintingDebts")
91+
92+
.addRelationship(new SharedKernel(debtCollection, policyManagement)
93+
.setImplementationTechnology("Java Library"))
94+
```
95+
96+
The generator adds those information as additional labels to the generated relationships, as this example shows:
97+
98+
<a href="https://raw.githubusercontent.com/ContextMapper/context-map-generator/master/context-map-example-3.png" target="_blank"><img src="https://raw.githubusercontent.com/ContextMapper/context-map-generator/master/context-map-example-3.png" alt="Example Context Map" /></a>
99+
83100
### DDD "Cargo" Sample Application
84101
```java
85102
BoundedContext cargoBookingContext = new BoundedContext("Cargo Booking Context");

0 commit comments

Comments
 (0)