1 /*
2 * SPDX-FileCopyrightText: none
3 * SPDX-License-Identifier: CC0-1.0
4 */
5
6 package gov.nist.secauto.metaschema.core.model;
7
8 /**
9 * Represents a field instance within an assembly definition.
10 * <p>
11 * A field instance references a field definition and specifies how that field
12 * is used within its containing assembly, including XML wrapping behavior.
13 */
14 public interface IFieldInstance extends IField, INamedModelInstance, IValuedInstance {
15 /**
16 * The default value for whether a field is wrapped in XML.
17 */
18 boolean DEFAULT_FIELD_IN_XML_WRAPPED = true;
19
20 /**
21 * Retrieves the field definition referenced by this instance.
22 *
23 * @return the field definition
24 */
25 @Override
26 IFieldDefinition getDefinition();
27
28 /**
29 * Determines if the field is configured to have a wrapper in XML.
30 *
31 * @return {@code true} if an XML wrapper is required, or {@code false}
32 * otherwise
33 * @see #DEFAULT_FIELD_IN_XML_WRAPPED
34 */
35 default boolean isInXmlWrapped() {
36 return DEFAULT_FIELD_IN_XML_WRAPPED;
37 }
38 }