5
5
6
6
This reference describes all error codes and validation results that can be produced by the ESMF SDK when loading, parsing, or validating Aspect Models.
7
7
8
+ == Table of Contents
9
+
10
+ * <<error-code-format,Error Code Format>>
11
+ * <<error-categories,Error Categories>>
12
+ * <<meta-violations,Meta-violations>>
13
+ * <<shacl-violations,SHACL Constraint Violations>>
14
+ ** <<datatype-violations,Data Type Violations>>
15
+ ** <<cardinality-violations,Cardinality Violations>>
16
+ ** <<constraint-violations,Value Constraint Violations>>
17
+ ** <<structure-violations,Structure and Relationship Violations>>
18
+ ** <<enumeration-violations,Enumeration and Choice Violations>>
19
+ ** <<samm-specific-violations,SAMM-Specific Violations>>
20
+ * <<error-contexts,Error Contexts>>
21
+ * <<error-message-format,Error Message Format>>
22
+ * <<accessing-error-information,Accessing Error Information>>
23
+ * <<error-resolution,Error Resolution Guide>>
24
+ * <<best-practices,Best Practices>>
25
+ * <<integration-examples,Integration Examples>>
26
+ * <<version-compatibility,Version Compatibility>>
27
+ * <<troubleshooting,Troubleshooting>>
28
+
8
29
[[error-code-format]]
9
30
== Error Code Format
10
31
@@ -169,7 +190,7 @@ Context information:
169
190
Element: :ElementName
170
191
Property: :propertyName
171
192
File: model.ttl:15:23
172
-
193
+
173
194
Suggestion: Specific guidance for fixing the error.
174
195
```
175
196
@@ -262,11 +283,11 @@ Each error code includes specific guidance in the error message. Common patterns
262
283
public class CustomViolationFormatter implements Violation.Visitor<String> {
263
284
@Override
264
285
public String visit(DatatypeViolation violation) {
265
- return String.format("ERR_TYPE: Fix data type for %s (Line %d)",
266
- violation.context().element(),
286
+ return String.format("ERR_TYPE: Fix data type for %s (Line %d)",
287
+ violation.context().element(),
267
288
violation.context().sourceLocation().line());
268
289
}
269
-
290
+
270
291
// ... other visitor methods
271
292
}
272
293
----
@@ -277,7 +298,7 @@ public class CustomViolationFormatter implements Violation.Visitor<String> {
277
298
----
278
299
Map<String, List<Violation>> errorsByCode = violations.stream()
279
300
.collect(Collectors.groupingBy(Violation::errorCode));
280
-
301
+
281
302
// Handle each error type separately
282
303
List<Violation> dataTypeErrors = errorsByCode.get("ERR_TYPE");
283
304
List<Violation> cardinalityErrors = errorsByCode.get("ERR_MAX_COUNT");
@@ -340,4 +361,4 @@ For version-specific error code information, see the release notes and migration
340
361
For additional support:
341
362
- ESMF SDK GitHub Issues: https://github.com/eclipse-esmf/esmf-sdk/issues
342
363
- SAMM Specification: https://eclipse-esmf.github.io/samm-specification/
343
- - Community Forum: https://github.com/eclipse-esmf/esmf-sdk/discussions
364
+ - Community Forum: https://github.com/eclipse-esmf/esmf-sdk/discussions
0 commit comments