Skip to content

Commit

Permalink
Merge branch 'main' into 2.9.x
Browse files Browse the repository at this point in the history
  • Loading branch information
atextor committed Jul 26, 2024
2 parents 56d65a8 + 730a00c commit 65278ba
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,23 +152,24 @@ include::esmf-developer-guide:ROOT:partial$esmf-aspect-meta-model-java-artifact.
[[understanding-model-resolution]]
=== Understanding Model Resolution

The example in the last section showed how a self-contained Aspect Model file can be loaded (i.e., a file that
does not refer to model element definitions in other files or namespaces). Whenever models are loaded that
could contain such references, or you want to load a model element by URN, the AspectModelLoader relies on
so-called _resolution strategies_. A resolution strategy is a function that takes a model element identifier
(a model element URN) as an input and returns the content of the file that contains the corresponding model
element definition. Note that this is not necessarily a file in the local filesystem, but it could also be a
remote file or even exist only virtually as a collection of statements in an RDF triple store. Several
`ResolutionStrategy`s are provided that can be instantiated and passed to the `AspectModelLoader` constructor
to enable it to find model element definitions:
The example in the last section showed how a self-contained Aspect Model file can be loaded (i.e., a
file that does not refer to model element definitions in other files or namespaces). Whenever models
are loaded that could contain such references, or you want to load a model element by URN, the
AspectModelLoader relies on so-called _resolution strategies_. A resolution strategy is a function
that takes a model element identifier (a model element URN) as an input and returns the content of
the file that contains the corresponding model element definition. Note that this is not necessarily
a file in the local filesystem, but it could also be a remote file or even exist only virtually as a
collection of statements in an RDF triple store. Several `ResolutionStrategy`​s are provided
that can be instantiated and passed to the `AspectModelLoader` constructor to enable it to find
model element definitions:

* The `FileSystemStrategy` resolves elements from files in the file system which are either structured in the
xref:tooling-guide:samm-cli.adoc#models-directory-structure[models directory structure] or exist as flat
list of files in one directory (by using `FileSystemStrategy` with a `FlatModelsRoot`).
* The `ClassPathStrategy` resolves model elements from resources in the Java class path.
* The `FromLoadedFileStrategy` resolves model elements from an `AspectModelFile` that already resides in
memory.
* The `EitherStrategy` can be used to chain two or more different `ResolutionStrategy`s.
* The `EitherStrategy` can be used to chain two or more different `ResolutionStrategy`​s.
* The `ExternalResolverStrategy` delegates resolution to an external command such as a script; it is used in
the implementation of the `--custom-resolver` option of the xref:tooling-guide:samm-cli.adoc[samm-cli].

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ Configuration Properties:
| `aspectApiBaseUrl` | The base URL for the Aspect API OpenAPI specification. | `String` | none | {ok}
| `aspectParameterFile` | The path to a file including the schema description for the resource. For JSON the description has to be in json, for YAML it has to be in YAML. | `String` | none | {nok}
| `useSemanticApiVersion` | Use the complete semantic version of the Aspect Model as the version of the Aspect API. | `Boolean` | `false` | {nok}
| `aspectResourcePath` | The resource-path` for the Aspect API endpoints. | `String` | none | {nok}
| `aspectResourcePath` | The `resource-path` for the Aspect API endpoints. | `String` | none | {nok}
| `includeQueryApi` | Include the path for the Query Aspect API Endpoint in the OpenAPI specification. | `Boolean` | `false` | {nok}
| `includeFullCrud` | Include the POST/PUT/PATCH methods in the OpenAPI specification. | `Boolean` | `false` | {nok}
| `includePost` | Include the POST method in the OpenAPI specification. | `Boolean` | `false` | {nok}
Expand Down

0 comments on commit 65278ba

Please sign in to comment.