@@ -51,26 +51,26 @@ public PropertyInstantiator( final ModelElementFactory modelElementFactory ) {
51
51
}
52
52
53
53
@ 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 ) );
65
65
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 () );
67
67
68
68
final MetaModelBaseAttributes metaModelBaseAttributes = property .isAnon ()
69
69
? buildBaseAttributes ( extendsResource .orElse ( property ) )
70
70
: buildBaseAttributes ( property );
71
71
final DefaultPropertyWrapper defaultPropertyWrapper = new DefaultPropertyWrapper ( metaModelBaseAttributes );
72
72
73
- if ( resourcePropertyMap .containsKey ( property )) {
73
+ if ( resourcePropertyMap .containsKey ( property ) ) {
74
74
return resourcePropertyMap .get ( property );
75
75
}
76
76
resourcePropertyMap .put ( property , defaultPropertyWrapper );
@@ -92,9 +92,9 @@ public Property apply(final Resource property) {
92
92
throw new AspectLoadingException ( "Type of example value on Property " + property + " has incorrect type" );
93
93
}
94
94
return type .as ( Scalar .class );
95
- })
95
+ } )
96
96
.map ( type -> buildValue ( node , Optional .of ( property ), type ) );
97
- });
97
+ } );
98
98
99
99
defProperty = new DefaultProperty ( metaModelBaseAttributes , Optional .of ( characteristic ),
100
100
exampleValue , isOptional , isNotInPayload , payloadName , isAbstract , extends_ );
@@ -104,7 +104,6 @@ public Property apply(final Resource property) {
104
104
return defaultPropertyWrapper ;
105
105
}
106
106
107
-
108
107
private ScalarValue buildScalarValue ( final Literal literal , final Scalar type ) {
109
108
final Object literalValue = literal .getValue ();
110
109
if ( literalValue instanceof BaseDatatype .TypedValue ) {
0 commit comments