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