Interface IFieldDefinition
-
- All Superinterfaces:
IConstrained
,IContainer
,IDefinition
,gov.nist.secauto.metaschema.core.model.constraint.impl.IFeatureValueConstrained
,IField
,IFlagContainer
,IModelElement
,INamedModelElement
,IValueConstrained
,IValuedDefinition
public interface IFieldDefinition extends IValuedDefinition, IFlagContainer, IField
-
-
Field Summary
-
Fields inherited from interface gov.nist.secauto.metaschema.core.model.IDefinition
DEFAULT_DEFINITION_MODEL_SCOPE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Object
getFieldValue(Object item)
Get the value of the field's value from the field item object.IFieldInstance
getInlineInstance()
IfIDefinition.isInline()
istrue
, return the instance the definition is inlined for.default Object
getJsonValueKey()
Retrieves the key to use as the field name for this field's value in JSON.IFlagInstance
getJsonValueKeyFlagInstance()
Retrieves the flag instance who's value will be used as the "value key".String
getJsonValueKeyName()
Retrieves the configured static label to use as the value key, or the type specific name if a label is not configured.default IFieldDefinition
getOwningDefinition()
Retrieve the Metaschema definition containing this container.default boolean
hasJsonValueKeyFlagInstance()
Check if a JSON value key flag is configured.-
Methods inherited from interface gov.nist.secauto.metaschema.core.model.IDefinition
getModuleScope, isInline, toCoordinates
-
Methods inherited from interface gov.nist.secauto.metaschema.core.model.constraint.impl.IFeatureValueConstrained
addConstraint, addConstraint, addConstraint, addConstraint, getAllowedValuesConstraints, getConstraints, getConstraintSupport, getExpectConstraints, getIndexHasKeyConstraints, getMatchesConstraints
-
Methods inherited from interface gov.nist.secauto.metaschema.core.model.IField
getModelType
-
Methods inherited from interface gov.nist.secauto.metaschema.core.model.IFlagContainer
getFlagInstanceByName, getFlagInstances, getJsonKeyFlagInstance, hasJsonKey, isSimple
-
Methods inherited from interface gov.nist.secauto.metaschema.core.model.IModelElement
getContainingModule, getRemarks
-
Methods inherited from interface gov.nist.secauto.metaschema.core.model.INamedModelElement
getDescription, getEffectiveDescription, getEffectiveFormalName, getEffectiveName, getFormalName, getJsonName, getName, getProperties, getPropertyValues, getUseName, hasProperty, hasPropertyValue
-
Methods inherited from interface gov.nist.secauto.metaschema.core.model.IValuedDefinition
getDefaultValue, getJavaTypeAdapter
-
-
-
-
Method Detail
-
getOwningDefinition
default IFieldDefinition getOwningDefinition()
Description copied from interface:IFlagContainer
Retrieve the Metaschema definition containing this container.- Specified by:
getOwningDefinition
in interfaceIContainer
- Specified by:
getOwningDefinition
in interfaceIFlagContainer
- Returns:
- the containing Metaschema definition
-
getInlineInstance
IFieldInstance getInlineInstance()
Description copied from interface:IDefinition
IfIDefinition.isInline()
istrue
, return the instance the definition is inlined for.- Specified by:
getInlineInstance
in interfaceIDefinition
- Specified by:
getInlineInstance
in interfaceIFlagContainer
- Returns:
- the instance or
null
otherwise
-
getJsonValueKey
@Nullable default Object getJsonValueKey()
Retrieves the key to use as the field name for this field's value in JSON.- Returns:
- a string or a FlagInstance value
-
hasJsonValueKeyFlagInstance
default boolean hasJsonValueKeyFlagInstance()
Check if a JSON value key flag is configured.- Returns:
true
if a JSON value key flag is configured, orfalse
otherwise
-
getJsonValueKeyFlagInstance
@Nullable IFlagInstance getJsonValueKeyFlagInstance()
Retrieves the flag instance who's value will be used as the "value key".- Returns:
- the configured flag instance, or
null
if a flag is not configured as the "value key"
-
getJsonValueKeyName
@NonNull String getJsonValueKeyName()
Retrieves the configured static label to use as the value key, or the type specific name if a label is not configured.- Returns:
- the value key label
-
getFieldValue
Object getFieldValue(@NonNull Object item)
Get the value of the field's value from the field item object.- Parameters:
item
- the field item- Returns:
- the field's value or
null
if it has no value
-
-