|
17 | 17 | import java.io.IOException;
|
18 | 18 | import java.io.InputStream;
|
19 | 19 | import java.net.URI;
|
20 |
| -import java.util.ArrayDeque; |
21 | 20 | import java.util.Arrays;
|
22 | 21 | import java.util.Collections;
|
23 | 22 | import java.util.HashMap;
|
|
27 | 26 | import java.util.Optional;
|
28 | 27 | import java.util.Set;
|
29 | 28 | import java.util.function.Function;
|
30 |
| -import java.util.stream.Collector; |
31 | 29 | import java.util.stream.Collectors;
|
32 | 30 | import java.util.stream.Stream;
|
33 | 31 |
|
@@ -195,7 +193,7 @@ private String iriToReversedHostNameNotation( final IRI iri ) {
|
195 | 193 | .filter( StringUtils::isNotBlank )
|
196 | 194 | .collect( Collectors.joining( "." ) );
|
197 | 195 |
|
198 |
| - return reversedHost + ( path.isEmpty() ? "" : "." + path ); |
| 196 | + return reversedHost + (path.isEmpty() ? "" : "." + path); |
199 | 197 | }
|
200 | 198 |
|
201 | 199 | private Optional<IRI> iri( final String lexicalRepresentation ) {
|
@@ -361,9 +359,14 @@ private List<String> seeReferences( final SubmodelElement element ) {
|
361 | 359 | .filter( key -> key.getType() == KeyTypes.CONCEPT_DESCRIPTION || key.getType() == KeyTypes.GLOBAL_REFERENCE )
|
362 | 360 | .map( Key::getValue )
|
363 | 361 | .flatMap( value -> validIrdiOrUri( value ).stream() )
|
| 362 | + .map( this::sanitizeValue ) |
364 | 363 | .toList();
|
365 | 364 | }
|
366 | 365 |
|
| 366 | + private String sanitizeValue( String value ) { |
| 367 | + return value.replace( "/ ", "/" ); |
| 368 | + } |
| 369 | + |
367 | 370 | private List<String> seeReferences( final Submodel submodel ) {
|
368 | 371 | return validIrdiOrUri( submodel.getId() ).stream().toList();
|
369 | 372 | }
|
|
0 commit comments