You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following best practices, while not mandatory, are highly recommended for optimal performance and to mitigate potential issues, especially when working with Aspect Models at scale.
19
19
20
-
[[the-name-attribute]]
21
-
== The `name` attribute
20
+
[[model-element-names]]
21
+
== Model element names
22
22
23
-
The `name` attribute is mandatory for all model elements.
23
+
This section refers to model element names as described in
24
+
xref:ROOT:namespaces.adoc#aspect-model-element-identifiers-definition[Aspect Model Element
25
+
Identifiers Definition], i.e., the part of a model element's identifier after the `\#` sign of a
26
+
model element URN or after the `:` in the CURIE syntax, respectively.
24
27
25
28
Use camel-case capitalization, as detailed in the xref:ROOT:modeling-guidelines.adoc#naming-rules[naming rules].
26
29
@@ -42,7 +45,8 @@ In addition to that, there are also best practices for:
42
45
[[camel-case-for-acronyms]]
43
46
=== Camel case for acronyms
44
47
45
-
For every part of a `name`, also for acronyms, strictly apply camel-case capitalization as detailed in the xref:ROOT:modeling-guidelines.adoc#naming-rules[naming rules].
48
+
For every part of a model element name, also for acronyms, strictly apply camel-case capitalization
49
+
as detailed in the xref:ROOT:modeling-guidelines.adoc#naming-rules[naming rules].
46
50
47
51
For example:
48
52
@@ -57,12 +61,12 @@ For example:
57
61
|`documentUrl`
58
62
|===
59
63
60
-
Create `name` attributes where each capital letter can be trusted to trigger the start of a new name part.
64
+
Create model element names where each capital letter can be trusted to trigger the start of a new name part.
61
65
62
66
That way, for example, automated case conversion will produce meaningful names (e.g., when generating code based on an Aspect Model):
63
67
64
68
|===
65
-
|SAMM `name` |Resulting name in generated code (automated case conversion)
69
+
|Model element name |Resulting name in generated code (automated case conversion)
66
70
67
71
|{nok-small} `documentURL`
68
72
|`DOCUMENT_U_R_L` {nok-small}
@@ -116,7 +120,7 @@ Complete identifier of such a Property: +
116
120
`urn:samm:foo.myapplication:1.0.0#count`
117
121
|===
118
122
119
-
NOTE: The complete identifier of a Property is the versioned namespace combined with the element's `name`, for example, `urn:samm:foo.myapplication:1.0.0#count`.
123
+
NOTE: The complete identifier of a Property is the versioned namespace combined with the element's name, for example, `urn:samm:foo.myapplication:1.0.0#count`.
120
124
So, the `foo` context (namespace) is already part of `count`​'s identifier.
121
125
122
126
[[no-redundant-suffix]]
@@ -160,7 +164,7 @@ Regarding meaningfulness, see also the details given for the `description` attri
160
164
[[add-payload-names-for-properties]]
161
165
=== Payload names for Properties
162
166
163
-
An expressive Property `name` can be long.
167
+
An expressive Property name can be long.
164
168
165
169
If you consider a Property's name too long for the runtime payload, xref:ROOT:modeling-guidelines.adoc#payload-names[add a payload name].
166
170
@@ -215,7 +219,7 @@ For optimal results, consider the following best practices:
215
219
216
220
In addition to that, there are also best practices for:
217
221
218
-
* <<the-name-attribute>>
222
+
* <<model-element-names>>
219
223
* <<the-description-attribute>>
220
224
221
225
[[precise-and-understandable]]
@@ -236,17 +240,17 @@ People might encounter the Preferred Name, for example:
236
240
[[separate-words]]
237
241
=== Separate words
238
242
239
-
Should you copy and paste an element's `name` to use it as the `preferredName`, adapt it accordingly.
243
+
Should you copy and paste an element's name to use it as the `preferredName`, adapt it accordingly.
240
244
241
-
For example, if the `name` consists of more than one word, written in camel case, separate it into the respective words.
245
+
For example, if the name consists of more than one word, written in camel case, separate it into the respective words.
242
246
243
-
.Examples of Preferred Names derived from the `name` attributes of the model elements
247
+
.Examples of Preferred Names derived from the model element names of the model elements
244
248
[source,turtle,subs="attributes+,+quotes"]
245
249
----
246
250
:plantId a samm:Property ;
247
251
samm:preferredName "plant ID"@en ;
248
252
249
-
:machineTmperature a samm:Property ;
253
+
:machineTemperature a samm:Property ;
250
254
samm:preferredName "machine temperature"@en ;
251
255
252
256
:euTaxonomyDisclosureStatement a samm:Property ;
@@ -380,7 +384,7 @@ For optimal results, consider the following best practices:
380
384
381
385
In addition to that, there are also best practices for:
382
386
383
-
* <<the-name-attribute>>
387
+
* <<model-element-names>>
384
388
* <<the-preferredname-attribute>>
385
389
386
390
[[capitalization-start-uppercase]]
@@ -443,15 +447,15 @@ It can consist of only a sentence fragment, or it may be longer—but do not jus
443
447
|Set of products sharing similar features.
444
448
|===
445
449
446
-
Regarding meaningfulness, see also the details given for the `name` attribute at <<meaningful-names>>.
450
+
Regarding meaningfulness, see also the details given for the model element name at <<meaningful-names>>.
447
451
448
452
[[abbreviations-in-descriptions]]
449
453
=== Unmistakable abbreviations
450
454
451
455
Use abbreviations sparingly.
452
456
453
457
Only use very common standard abbreviations; ensure they are not misleading.
454
-
See also the details provided for the `name` attribute: <<unmistakable-abbreviations>>.
458
+
See also the details provided for the model element name: <<unmistakable-abbreviations>>.
455
459
456
460
It is acceptable to use editorial abbreviations such as `e.g.` ("for example") or `i.e.` ("that is") or `etc.` ("and so forth").
0 commit comments