- All Superinterfaces:
IBoundModelObject<Object>,IBoundProperty<Object>,IDefaultable,IFeatureJavaField,IFeatureScalarItemValueHandler,IItemValueHandler<Object>,IJsonNamed,IValued,IValuedMutable
Represents the bound value of a field definition.
This interface provides access to the scalar value within a field, including support for JSON value key handling and default values.
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleancanHandleXmlQName(IEnhancedQName qname) Determine if the provided XML qualified name is associated with this property.default voiddeepCopy(IBoundObject fromInstance, IBoundObject toInstance) Copy this instance from one parent object to another.Retrieves the default data value for this model construct.default ObjectGet the effective default value for the model construct.Get the name of the JSON value key flag.Get the name of the JSON value key.Get the field definition that contain's the field value.default ObjectreadItem(IBoundObject parent, IItemReadHandler handler) Parse and return an item.default voidwriteItem(Object item, IItemWriteHandler handler) Write the provided item.Methods inherited from interface dev.metaschema.core.model.IDefaultable
getResolvedDefaultValueMethods inherited from interface dev.metaschema.databind.model.IFeatureJavaField
getField, getItemType, getType, getValue, setValueMethods inherited from interface dev.metaschema.databind.model.info.IFeatureScalarItemValueHandler
deepCopyItem, getJavaTypeAdapter, getValueFromString, setValueMethods inherited from interface dev.metaschema.core.model.IJsonNamed
getJsonName
-
Method Details
-
getDefaultValue
Description copied from interface:IDefaultableRetrieves the default data value for this model construct.Child implementations are expected to override this method to provide a more reasonable default value.
- Specified by:
getDefaultValuein interfaceIDefaultable- Returns:
- the default value or
nullif there is no default
-
getParentFieldDefinition
Get the field definition that contain's the field value.- Returns:
- the parent field definition
-
getJsonValueKeyFlagName
Get the name of the JSON value key flag.Note: if a JSON value key flag is specified, then the JSON value key name is expected to be ignored.
- Returns:
- the flag name or
nullif no JSON value key flag is configured - See Also:
-
getJsonValueKeyName
Get the name of the JSON value key.Note: if a JSON value key flag is specified, then this value is expected to be ignored.
- Returns:
- the name
- See Also:
-
getEffectiveDefaultValue
Description copied from interface:IDefaultableGet the effective default value for the model construct.This should consider default values in any related referenced definitions or child constructs as needed to determine the default to use.
- Specified by:
getEffectiveDefaultValuein interfaceIDefaultable- Returns:
- the effective default value or
nullif there is no effective default value
-
readItem
Description copied from interface:IItemValueHandlerParse and return an item.- Specified by:
readItemin interfaceIItemValueHandler<Object>- Parameters:
parent- the parent Java object to use for serialization callbacks, ornullif 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:IItemValueHandlerWrite the provided item.- Specified by:
writeItemin interfaceIItemValueHandler<Object>- Parameters:
item- the data to writehandler- the item writing handler- Throws:
IOException- if an error occurred while writing
-
deepCopy
default void deepCopy(@NonNull IBoundObject fromInstance, @NonNull IBoundObject toInstance) throws BindingException Description copied from interface:IBoundPropertyCopy this instance from one parent object to another.- Specified by:
deepCopyin 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
-
canHandleXmlQName
Description copied from interface:IBoundModelObjectDetermine if the provided XML qualified name is associated with this property.- Specified by:
canHandleXmlQNamein interfaceIBoundModelObject<Object>- Parameters:
qname- the XML qualified name of the property being parsed- Returns:
trueif the instance will handle this name, orfalseotherwise
-