Interface IBoundInstanceFlag
- All Superinterfaces:
IAttributable
,IBoundDefinition
,IBoundDefinitionFlag
,IBoundInstance<Object>
,IBoundModelElement
,IBoundModelObject<Object>
,IBoundProperty<Object>
,IConstrained
,IDefaultable
,IDefinition
,IDescribable
,IFeatureDefinitionInstanceInlined<IBoundDefinitionFlag,
,IBoundInstanceFlag> IFeatureJavaField
,IFeatureScalarItemValueHandler
,IFeatureValueConstrained
,IFlag
,IFlagDefinition
,IFlagInstance
,IInstance
,IInstanceAbsolute
,IItemValueHandler<Object>
,IJsonNamed
,IModelElement
,INamed
,INamedInstance
,INamedModelElement
,IValueConstrained
,IValued
,IValuedDefinition
,IValuedInstance
,IValuedMutable
public interface IBoundInstanceFlag
extends IFlagInstance, IBoundDefinitionFlag, IFeatureScalarItemValueHandler, IBoundInstance<Object>, IFeatureDefinitionInstanceInlined<IBoundDefinitionFlag,IBoundInstanceFlag>
Represents a flag instance bound to Java data.
-
Nested Class Summary
Nested classes/interfaces inherited from interface gov.nist.secauto.metaschema.core.model.IAttributable
IAttributable.Key
Nested classes/interfaces inherited from interface gov.nist.secauto.metaschema.core.model.IDefinition
IDefinition.ModuleScope
-
Field Summary
Fields inherited from interface gov.nist.secauto.metaschema.core.model.IAttributable
DEFAULT_PROPERY_NAMESPACE
Fields inherited from interface gov.nist.secauto.metaschema.core.model.IDefinition
DEFAULT_MODULE_SCOPE
Fields inherited from interface gov.nist.secauto.metaschema.core.model.IFlagInstance
DEFAULT_FLAG_REQUIRED
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
canHandleXmlQName
(QName qname) Determine if the provided XML qualified name is associated with this property.default void
deepCopy
(IBoundObject fromInstance, IBoundObject toInstance) Copy this instance from one parent object to another.default IBoundInstanceFlag
default IBoundDefinitionModel<IBoundObject>
boolean
Determines if this flag's value is used as the property name for the JSON object that holds the remaining data based on this flag's containing definition.boolean
Determines if this flag is used as a JSON "value key".static IBoundInstanceFlag
newInstance
(Field field, IBoundDefinitionModel<IBoundObject> containingDefinition) Create a new bound flag instance.default Object
readItem
(IBoundObject parent, IItemReadHandler handler) Parse and return an item.default void
writeItem
(Object item, IItemWriteHandler handler) Write the provided item.Methods inherited from interface gov.nist.secauto.metaschema.core.model.IAttributable
getProperties, getPropertyValues, hasProperty, hasPropertyValue
Methods inherited from interface gov.nist.secauto.metaschema.databind.model.IBoundInstance
getContainingModule, getValue, setValue
Methods inherited from interface gov.nist.secauto.metaschema.core.model.IDefaultable
getDefaultValue, getResolvedDefaultValue
Methods inherited from interface gov.nist.secauto.metaschema.core.model.IDefinition
getLocation, getModuleScope
Methods inherited from interface gov.nist.secauto.metaschema.core.model.IDescribable
getDescription, getFormalName
Methods inherited from interface gov.nist.secauto.metaschema.core.model.IFeatureDefinitionInstanceInlined
getDefinitionQName, getEffectiveDefaultValue, getEffectiveDescription, getEffectiveFormalName, getEffectiveIndex, getEffectiveName, isInline, toCoordinates
Methods inherited from interface gov.nist.secauto.metaschema.databind.model.IFeatureJavaField
getField, getItemType, getType
Methods inherited from interface gov.nist.secauto.metaschema.databind.model.info.IFeatureScalarItemValueHandler
deepCopyItem, getJavaTypeAdapter, getValueFromString, setValue
Methods inherited from interface gov.nist.secauto.metaschema.core.model.constraint.IFeatureValueConstrained
addConstraint, addConstraint, addConstraint, addConstraint, addLetExpression, getAllowedValuesConstraints, getConstraints, getConstraintSupport, getExpectConstraints, getIndexHasKeyConstraints, getLetExpressions, getMatchesConstraints
Methods inherited from interface gov.nist.secauto.metaschema.core.model.IFlag
getModelType
Methods inherited from interface gov.nist.secauto.metaschema.core.model.IFlagInstance
getReferencedDefinitionQName, getXmlQName, isRequired
Methods inherited from interface gov.nist.secauto.metaschema.core.model.IInstance
toCoordinates
Methods inherited from interface gov.nist.secauto.metaschema.core.model.IModelElement
getRemarks
Methods inherited from interface gov.nist.secauto.metaschema.core.model.INamed
getIndex, getName, getUseIndex, getUseName, getXmlNamespace
Methods inherited from interface gov.nist.secauto.metaschema.core.model.INamedModelElement
getJsonName
Methods inherited from interface gov.nist.secauto.metaschema.core.model.IValuedDefinition
getJavaTypeAdapter
-
Method Details
-
newInstance
@NonNull static IBoundInstanceFlag newInstance(@NonNull Field field, @NonNull IBoundDefinitionModel<IBoundObject> containingDefinition) Create a new bound flag instance.- Parameters:
field
- the Java field the instance is bound tocontainingDefinition
- the definition containing the instance- Returns:
- the new instance
-
isJsonKey
boolean isJsonKey()Determines if this flag's value is used as the property name for the JSON object that holds the remaining data based on this flag's containing definition.- Returns:
true
if this flag is used as a JSON key, orfalse
otherwise
-
isJsonValueKey
boolean isJsonValueKey()Determines if this flag is used as a JSON "value key". A "value key" is a flag who's value is used as the property name for the containing objects value.- Returns:
true
if the flag is used as a JSON "value key", orfalse
otherwise
-
getContainingDefinition
- Specified by:
getContainingDefinition
in interfaceIBoundInstance<Object>
- Specified by:
getContainingDefinition
in interfaceIFlagInstance
- Specified by:
getContainingDefinition
in interfaceIInstance
-
getParentContainer
- Specified by:
getParentContainer
in interfaceIFlagInstance
- Specified by:
getParentContainer
in interfaceIInstance
-
getDefinition
For an inline instance, this instance is the definition.
- Specified by:
getDefinition
in interfaceIFeatureDefinitionInstanceInlined<IBoundDefinitionFlag,
IBoundInstanceFlag> - Specified by:
getDefinition
in interfaceIFlagInstance
- Specified by:
getDefinition
in interfaceINamedInstance
- Specified by:
getDefinition
in interfaceIValuedInstance
-
getInlineInstance
- Specified by:
getInlineInstance
in interfaceIDefinition
- Specified by:
getInlineInstance
in interfaceIFeatureDefinitionInstanceInlined<IBoundDefinitionFlag,
IBoundInstanceFlag> - Specified by:
getInlineInstance
in interfaceIFlagDefinition
-
deepCopy
default void deepCopy(@NonNull IBoundObject fromInstance, @NonNull IBoundObject toInstance) throws BindingException Description copied from interface:IBoundProperty
Copy this instance from one parent object to another.- Specified by:
deepCopy
in interfaceIBoundProperty<Object>
- Parameters:
fromInstance
- the object to copy fromtoInstance
- the object to copy to- Throws:
BindingException
- if an error occurred while processing the object bindings
-
readItem
@NonNull default Object readItem(IBoundObject parent, @NonNull IItemReadHandler handler) throws IOException Description copied from interface:IItemValueHandler
Parse and return an item.- Specified by:
readItem
in interfaceIItemValueHandler<Object>
- Parameters:
parent
- the parent Java object to use for serialization callbacks, ornull
if there is no parenthandler
- the item parsing handler- Returns:
- the Java object representing the parsed item
- Throws:
IOException
- if an error occurred while parsing
-
writeItem
Description copied from interface:IItemValueHandler
Write the provided item.- Specified by:
writeItem
in interfaceIItemValueHandler<Object>
- Parameters:
item
- the data to writehandler
- the item writing handler- Throws:
IOException
- if an error occurred while writing
-
canHandleXmlQName
Description copied from interface:IBoundModelObject
Determine if the provided XML qualified name is associated with this property.- Specified by:
canHandleXmlQName
in interfaceIBoundModelObject<Object>
- Parameters:
qname
- the XML qualified name of the property being parsed- Returns:
true
if the instance will handle this name, orfalse
otherwise
-