diff --git a/core/esmf-aspect-model-aas-generator/src/main/java/org/eclipse/esmf/aspectmodel/aas/AspectModelAASVisitor.java b/core/esmf-aspect-model-aas-generator/src/main/java/org/eclipse/esmf/aspectmodel/aas/AspectModelAASVisitor.java index 781ae2168..7d178909a 100644 --- a/core/esmf-aspect-model-aas-generator/src/main/java/org/eclipse/esmf/aspectmodel/aas/AspectModelAASVisitor.java +++ b/core/esmf-aspect-model-aas-generator/src/main/java/org/eclipse/esmf/aspectmodel/aas/AspectModelAASVisitor.java @@ -358,13 +358,12 @@ private void createConceptDescription( final Property property, final Context co if ( property.getCharacteristic().isEmpty() ) { return; } - final Characteristic characteristic = property.getCharacteristic().get(); // check if the concept description is already created. If not create a new one. if ( !context.hasEnvironmentConceptDescription( property.getAspectModelUrn().toString() ) ) { final ConceptDescription conceptDescription = new DefaultConceptDescription.Builder() - .idShort( characteristic.getName() ) - .displayName( LangStringMapper.NAME.map( characteristic.getPreferredNames() ) ) + .idShort( property.getName() ) + .displayName( LangStringMapper.NAME.map( property.getPreferredNames() ) ) .embeddedDataSpecifications( extractEmbeddedDataSpecification( property ) ) .id( DEFAULT_MAPPER.determineIdentifierFor( property ) ) .build(); diff --git a/core/esmf-aspect-model-aas-generator/src/test/java/org/eclipse/esmf/aspectmodel/aas/AspectModelAASGeneratorTest.java b/core/esmf-aspect-model-aas-generator/src/test/java/org/eclipse/esmf/aspectmodel/aas/AspectModelAASGeneratorTest.java index 9dd6db755..a6f05a840 100644 --- a/core/esmf-aspect-model-aas-generator/src/test/java/org/eclipse/esmf/aspectmodel/aas/AspectModelAASGeneratorTest.java +++ b/core/esmf-aspect-model-aas-generator/src/test/java/org/eclipse/esmf/aspectmodel/aas/AspectModelAASGeneratorTest.java @@ -290,7 +290,7 @@ void testGenerateAasxFromAspectModelWithEnumeration() throws IOException, Deseri assertEquals( 2, env.getConceptDescriptions().size() ); final DataSpecificationIec61360 dataSpecificationContent = (DataSpecificationIec61360) env.getConceptDescriptions().stream() - .filter( conceptDescription -> conceptDescription.getIdShort().equals( "TestEnumeration" ) ) + .filter( conceptDescription -> conceptDescription.getIdShort().equals( "testProperty" ) ) .findFirst() .get() .getEmbeddedDataSpecifications()