Skip to content

Commit

Permalink
Merge branch 'main' into bugfix/375-javabeans-bool-spec-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ysrbo committed Nov 2, 2023
2 parents 9d7e213 + 75a4ed0 commit b925c70
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -624,11 +624,11 @@ public static Quantifiable castToQuantifiable( final Characteristic characterist
}

public static String getterName( final Property property ) {
final Type type = property.getDataType().orElseThrow();
final boolean isBooleanType =
!property.isOptional()
&& type.isScalar()
&& XSD.xboolean.getURI().equals( type.getUrn() );
final boolean isBooleanType = !property.isOptional()
&& property.getDataType()
.filter( Type::isScalar )
.map( type -> XSD.xboolean.getURI().equals( type.getUrn() ) )
.orElse( false );
return (isBooleanType ? "is" : "get") + StringUtils.capitalize( property.getPayloadName() );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ include::esmf-developer-guide:ROOT:partial$esmf-aspect-model-urn-artifact.adoc[]
== Loading and Saving Aspect Models

Aspect models are, like their Meta Model, described using the Resource Description Format (RDF,
xref:samm-specification:appendix:appendix.adoc#rdf11[[rdf11\]]) and the Terse RDF Triple Language syntax (TTL,
xref:samm-specification:appendix:appendix.adoc#turtle[[turtle\]]). There are two ways of working with Aspect models:
xref:samm-specification:appendix:bibliography.adoc#rdf11[[rdf11\]]) and the Terse RDF Triple Language syntax (TTL,
xref:samm-specification:appendix:bibliography.adoc#turtle[[turtle\]]). There are two ways of working with Aspect models:
Either the model is loaded as an RDF model where the abstraction level directly corresponds to the RDF/Turtle
serialization, or the RDF is parsed into a native Java Aspect model representation where the abstraction level
corresponds to the SAMM concepts. Both approaches have different use cases and advantages and both are supported by the
Expand All @@ -123,7 +123,7 @@ a|
* Low level, focus on power and flexibility
* Flexibly navigate and filter the model on the RDF statements level
* Work with models that are valid RDF, but incomplete Aspect models, e.g. in Aspect model editors
* Use SPARQL xref:samm-specification:appendix:appendix.adoc#sparql[[sparql\]] to execute complex queries on Aspect models
* Use SPARQL xref:samm-specification:appendix:bibliography.adoc#sparql[[sparql\]] to execute complex queries on Aspect models
a|
* High level, focus on convenience and type-safety
* Use Aspect-model specific interfaces for type-safe code
Expand Down

0 comments on commit b925c70

Please sign in to comment.