Skip to content

Commit 25346a8

Browse files
Add missing copyrights
1 parent 95fcd43 commit 25346a8

File tree

4 files changed

+61
-13
lines changed

4 files changed

+61
-13
lines changed

core/sds-aspect-model-aas-generator/src/main/java/io/openmanufacturing/sds/aspectmodel/aas/DefaultPropertyMapper.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
/*
2+
* Copyright (c) 2021-2023 Robert Bosch Manufacturing Solutions GmbH
3+
*
4+
* See the AUTHORS file(s) distributed with this work for additional
5+
* information regarding authorship.
6+
*
7+
* This Source Code Form is subject to the terms of the Mozilla Public
8+
* License, v. 2.0. If a copy of the MPL was not distributed with this
9+
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
10+
*
11+
* SPDX-License-Identifier: MPL-2.0
12+
*/
113
package io.openmanufacturing.sds.aspectmodel.aas;
214

315
import org.eclipse.digitaltwin.aas4j.v3.model.Property;

core/sds-aspect-model-aas-generator/src/main/java/io/openmanufacturing/sds/aspectmodel/aas/LangStringMapper.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
/*
2+
* Copyright (c) 2021-2023 Robert Bosch Manufacturing Solutions GmbH
3+
*
4+
* See the AUTHORS file(s) distributed with this work for additional
5+
* information regarding authorship.
6+
*
7+
* This Source Code Form is subject to the terms of the Mozilla Public
8+
* License, v. 2.0. If a copy of the MPL was not distributed with this
9+
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
10+
*
11+
* SPDX-License-Identifier: MPL-2.0
12+
*/
113
package io.openmanufacturing.sds.aspectmodel.aas;
214

315
import java.util.List;

core/sds-aspect-model-aas-generator/src/main/java/io/openmanufacturing/sds/aspectmodel/aas/LangStringPropertyMapper.java

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
/*
2+
* Copyright (c) 2021-2023 Robert Bosch Manufacturing Solutions GmbH
3+
*
4+
* See the AUTHORS file(s) distributed with this work for additional
5+
* information regarding authorship.
6+
*
7+
* This Source Code Form is subject to the terms of the Mozilla Public
8+
* License, v. 2.0. If a copy of the MPL was not distributed with this
9+
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
10+
*
11+
* SPDX-License-Identifier: MPL-2.0
12+
*/
113
package io.openmanufacturing.sds.aspectmodel.aas;
214

315
import java.util.HashMap;
@@ -40,16 +52,16 @@ public MultiLanguageProperty mapToAasProperty( Type type, io.openmanufacturing.s
4052

4153
private List<LangString> extractLangStrings( Property property, Context context ) {
4254
return context.getRawPropertyValue()
43-
.filter( JsonNode::isObject )
44-
.map( node -> {
45-
final Map<String, String> entries = new HashMap<>();
46-
node.fields().forEachRemaining( field -> entries.put( field.getKey(), field.getValue().asText() ) );
47-
return entries;
48-
} )
49-
.map( rawEntries -> rawEntries.entrySet()
50-
.stream()
51-
.map( entry -> LANG_STRING_MAPPER.createLangString( entry.getValue(), entry.getKey() ) )
52-
.toList() )
53-
.orElseGet( () -> List.of() );
55+
.filter( JsonNode::isObject )
56+
.map( node -> {
57+
final Map<String, String> entries = new HashMap<>();
58+
node.fields().forEachRemaining( field -> entries.put( field.getKey(), field.getValue().asText() ) );
59+
return entries;
60+
} )
61+
.map( rawEntries -> rawEntries.entrySet()
62+
.stream()
63+
.map( entry -> LANG_STRING_MAPPER.createLangString( entry.getValue(), entry.getKey() ) )
64+
.toList() )
65+
.orElseGet( () -> List.of() );
5466
}
5567
}

core/sds-aspect-model-aas-generator/src/main/java/io/openmanufacturing/sds/aspectmodel/aas/PropertyMapper.java

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
/*
2+
* Copyright (c) 2021-2023 Robert Bosch Manufacturing Solutions GmbH
3+
*
4+
* See the AUTHORS file(s) distributed with this work for additional
5+
* information regarding authorship.
6+
*
7+
* This Source Code Form is subject to the terms of the Mozilla Public
8+
* License, v. 2.0. If a copy of the MPL was not distributed with this
9+
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
10+
*
11+
* SPDX-License-Identifier: MPL-2.0
12+
*/
113
package io.openmanufacturing.sds.aspectmodel.aas;
214

315
import java.util.Map;
@@ -126,7 +138,7 @@ default Reference buildReferenceToConceptDescription( Property property ) {
126138
*/
127139
default String determineIdentifierFor( NamedElement element ) {
128140
return element.getAspectModelUrn()
129-
.map( AspectModelUrn::toString )
130-
.orElseGet( element::getName );
141+
.map( AspectModelUrn::toString )
142+
.orElseGet( element::getName );
131143
}
132144
}

0 commit comments

Comments
 (0)