1 /*
2 * SPDX-FileCopyrightText: none
3 * SPDX-License-Identifier: CC0-1.0
4 */
5
6 package dev.metaschema.core.model;
7
8 import dev.metaschema.core.datatype.markup.MarkupMultiline;
9 import edu.umd.cs.findbugs.annotations.NonNull;
10 import edu.umd.cs.findbugs.annotations.Nullable;
11
12 /**
13 * A marker interface for Metaschema constructs that can be members of a
14 * Metaschema definition's model.
15 */
16 public interface IModelElement extends IDefaultable, IModelElementVisitable {
17
18 /**
19 * Get the Metaschema model type of the information element.
20 *
21 * @return the type
22 */
23 @NonNull
24 ModelType getModelType();
25
26 /**
27 * Retrieves a string that uniquely identifies the model element in the overall
28 * collection of model elements. This should the type of element, it's name, and
29 * any additional information needed to uniquely identify it.
30 *
31 * @return the coordinates
32 */
33 @NonNull
34 String toCoordinates();
35
36 /**
37 * Retrieve the remarks associated with this information element, if any.
38 *
39 * @return the remarks or {@code null} if no remarks are defined
40 */
41 @Nullable
42 MarkupMultiline getRemarks();
43
44 /**
45 * Retrieves the Metaschema module that contains the information element's
46 * declaration.
47 *
48 * @return the Metaschema module
49 */
50 // REFACTOR: move to definition
51 @NonNull
52 IModule getContainingModule();
53 }