1 /*
2 * SPDX-FileCopyrightText: none
3 * SPDX-License-Identifier: CC0-1.0
4 */
5
6 package gov.nist.secauto.metaschema.core.model;
7
8 import gov.nist.secauto.metaschema.core.datatype.markup.MarkupLine;
9
10 import edu.umd.cs.findbugs.annotations.Nullable;
11
12 public interface IDescribable {
13 /**
14 * The formal display name.
15 *
16 * @return the formal name or {@code null} if not defined
17 */
18 // from INamedModelElement
19 @Nullable
20 String getFormalName();
21
22 /**
23 * Get the text that describes the basic use of the element.
24 *
25 * @return a line of markup text or {@code null} if not defined
26 */
27 // from INamedModelElement
28 @Nullable
29 MarkupLine getDescription();
30
31 /**
32 * The resolved formal display name, which allows an instance to override a
33 * definition's name.
34 *
35 * @return the formal name or {@code null} if not defined
36 */
37 // from INamedModelElement
38 @Nullable
39 default String getEffectiveFormalName() {
40 return getFormalName();
41 }
42
43 /**
44 * Get the text that describes the basic use of the element, which allows an
45 * instance to override a definition's description.
46 *
47 * @return a line of markup text or {@code null} if not defined
48 */
49 // from INamedModelElement
50 @Nullable
51 default MarkupLine getEffectiveDescription() {
52 return getDescription();
53 }
54 }