001/*
002 * SPDX-FileCopyrightText: none
003 * SPDX-License-Identifier: CC0-1.0
004 */
005
006package dev.metaschema.core.model;
007
008import dev.metaschema.core.qname.IEnhancedQName;
009import edu.umd.cs.findbugs.annotations.NonNull;
010
011/**
012 * This marker interface indicates that the instance has a flag, field, or
013 * assembly name associated with it which will be used in JSON/YAML or XML to
014 * identify the data.
015 *
016 */
017public interface INamedInstance extends INamedModelElement, IAttributable, IInstance {
018  /**
019   * Retrieve the definition of this instance.
020   *
021   * @return the corresponding definition
022   */
023  @NonNull
024  IDefinition getDefinition();
025
026  /**
027   * Determine if the definition of this instance is declared inline.
028   *
029   * @return {@code true} if the definition of this instance is declared inline or
030   *         {@code false} otherwise
031   */
032  boolean isInlineDefinition();
033
034  /**
035   * This represents the qualified name of a referenced definition.
036   *
037   * @return the qualified name
038   * @see IDefinition#getDefinitionQName()
039   */
040  @NonNull
041  IEnhancedQName getReferencedDefinitionQName();
042}