001/*
002 * SPDX-FileCopyrightText: none
003 * SPDX-License-Identifier: CC0-1.0
004 */
005
006package dev.metaschema.core.model;
007
008import dev.metaschema.core.datatype.markup.MarkupMultiline;
009import edu.umd.cs.findbugs.annotations.NonNull;
010import edu.umd.cs.findbugs.annotations.Nullable;
011
012/**
013 * A marker interface for Metaschema constructs that can be members of a
014 * Metaschema definition's model.
015 */
016public interface IModelElement extends IDefaultable, IModelElementVisitable {
017
018  /**
019   * Get the Metaschema model type of the information element.
020   *
021   * @return the type
022   */
023  @NonNull
024  ModelType getModelType();
025
026  /**
027   * Retrieves a string that uniquely identifies the model element in the overall
028   * collection of model elements. This should the type of element, it's name, and
029   * any additional information needed to uniquely identify it.
030   *
031   * @return the coordinates
032   */
033  @NonNull
034  String toCoordinates();
035
036  /**
037   * Retrieve the remarks associated with this information element, if any.
038   *
039   * @return the remarks or {@code null} if no remarks are defined
040   */
041  @Nullable
042  MarkupMultiline getRemarks();
043
044  /**
045   * Retrieves the Metaschema module that contains the information element's
046   * declaration.
047   *
048   * @return the Metaschema module
049   */
050  // REFACTOR: move to definition
051  @NonNull
052  IModule getContainingModule();
053}