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.qname.IEnhancedQName;
9 import edu.umd.cs.findbugs.annotations.NonNull;
10
11 /**
12 * This marker interface indicates that the instance has a flag, field, or
13 * assembly name associated with it which will be used in JSON/YAML or XML to
14 * identify the data.
15 *
16 */
17 public interface INamedInstance extends INamedModelElement, IAttributable, IInstance {
18 /**
19 * Retrieve the definition of this instance.
20 *
21 * @return the corresponding definition
22 */
23 @NonNull
24 IDefinition getDefinition();
25
26 /**
27 * Determine if the definition of this instance is declared inline.
28 *
29 * @return {@code true} if the definition of this instance is declared inline or
30 * {@code false} otherwise
31 */
32 boolean isInlineDefinition();
33
34 /**
35 * This represents the qualified name of a referenced definition.
36 *
37 * @return the qualified name
38 * @see IDefinition#getDefinitionQName()
39 */
40 @NonNull
41 IEnhancedQName getReferencedDefinitionQName();
42 }