Skip to content

Commit 01354fa

Browse files
committed
Fix styles
1 parent 11189bb commit 01354fa

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

core/esmf-aspect-meta-model-java/src/main/java/org/eclipse/esmf/aspectmodel/loader/instantiator/PropertyInstantiator.java

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,26 +51,26 @@ public PropertyInstantiator( final ModelElementFactory modelElementFactory ) {
5151
}
5252

5353
@Override
54-
public Property apply(final Resource property) {
55-
final boolean isOptional = optionalAttributeValue(property, SammNs.SAMM.optional())
56-
.map(Statement::getBoolean).orElse(false);
57-
final boolean isNotInPayload = optionalAttributeValue(property, SammNs.SAMM.notInPayload())
58-
.map(Statement::getBoolean).orElse(false);
59-
final Optional<String> payloadName = optionalAttributeValue(property, SammNs.SAMM.payloadName())
60-
.map(Statement::getString);
61-
final Optional<Resource> extendsResource = optionalAttributeValue(property, SammNs.SAMM._extends())
62-
.map(Statement::getResource);
63-
final Optional<Property> extends_ = extendsResource.map(superElementResource ->
64-
modelElementFactory.create(Property.class, superElementResource));
54+
public Property apply( final Resource property ) {
55+
final boolean isOptional = optionalAttributeValue( property, SammNs.SAMM.optional() )
56+
.map( Statement::getBoolean ).orElse( false );
57+
final boolean isNotInPayload = optionalAttributeValue( property, SammNs.SAMM.notInPayload() )
58+
.map( Statement::getBoolean ).orElse( false );
59+
final Optional<String> payloadName = optionalAttributeValue( property, SammNs.SAMM.payloadName() )
60+
.map( Statement::getString );
61+
final Optional<Resource> extendsResource = optionalAttributeValue( property, SammNs.SAMM._extends() )
62+
.map( Statement::getResource );
63+
final Optional<Property> extends_ = extendsResource.map( superElementResource ->
64+
modelElementFactory.create( Property.class, superElementResource ) );
6565
final boolean isAbstract = !property.isAnon() &&
66-
property.getModel().contains(property, RDF.type, SammNs.SAMM.AbstractProperty());
66+
property.getModel().contains( property, RDF.type, SammNs.SAMM.AbstractProperty() );
6767

6868
final MetaModelBaseAttributes metaModelBaseAttributes = property.isAnon()
6969
? buildBaseAttributes( extendsResource.orElse( property ) )
7070
: buildBaseAttributes( property );
7171
final DefaultPropertyWrapper defaultPropertyWrapper = new DefaultPropertyWrapper( metaModelBaseAttributes );
7272

73-
if ( resourcePropertyMap.containsKey( property )) {
73+
if ( resourcePropertyMap.containsKey( property ) ) {
7474
return resourcePropertyMap.get( property );
7575
}
7676
resourcePropertyMap.put( property, defaultPropertyWrapper );
@@ -92,9 +92,9 @@ public Property apply(final Resource property) {
9292
throw new AspectLoadingException( "Type of example value on Property " + property + " has incorrect type" );
9393
}
9494
return type.as( Scalar.class );
95-
})
95+
} )
9696
.map( type -> buildValue( node, Optional.of( property ), type ) );
97-
});
97+
} );
9898

9999
defProperty = new DefaultProperty( metaModelBaseAttributes, Optional.of( characteristic ),
100100
exampleValue, isOptional, isNotInPayload, payloadName, isAbstract, extends_ );
@@ -104,7 +104,6 @@ public Property apply(final Resource property) {
104104
return defaultPropertyWrapper;
105105
}
106106

107-
108107
private ScalarValue buildScalarValue( final Literal literal, final Scalar type ) {
109108
final Object literalValue = literal.getValue();
110109
if ( literalValue instanceof BaseDatatype.TypedValue ) {

0 commit comments

Comments
 (0)