Module dev.metaschema.databind
Package dev.metaschema.databind.model
Interface IBoundDefinitionModelFieldComplex
- All Superinterfaces:
IAttributable,IBoundDefinition,IBoundDefinitionModel<IBoundObject>,IBoundDefinitionModelComplex,IBoundDefinitionModelField<IBoundObject>,IBoundModelElement,IBoundModelObject<IBoundObject>,IContainer,IDefaultable,IDefinition,IDescribable,IFeatureComplexItemValueHandler,IFeatureContainerFlag<IBoundInstanceFlag>,IFeatureValueConstrained,IField,IFieldDefinition,IItemValueHandler<IBoundObject>,IJsonNamed,IModelDefinition,IModelElement,IModelElementVisitable,INamed,INamedModelElement,IValueConstrained,IValuedDefinition
public interface IBoundDefinitionModelFieldComplex
extends IBoundDefinitionModelField<IBoundObject>, IBoundDefinitionModelComplex
Represents a field definition bound to a Java class.
This definition is considered "complex", since it is bound to a Java class.
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.metaschema.core.model.IAttributable
IAttributable.KeyNested classes/interfaces inherited from interface dev.metaschema.core.model.IDefinition
IDefinition.ModuleScope -
Field Summary
Fields inherited from interface dev.metaschema.core.model.IAttributable
DEFAULT_PROPERY_NAMESPACEFields inherited from interface dev.metaschema.core.model.IDefinition
DEFAULT_MODULE_SCOPE -
Method Summary
Modifier and TypeMethodDescriptiondefault booleancanHandleXmlQName(IEnhancedQName qname) Determine if the provided XML qualified name is associated with this property.default ObjectRetrieves the default data value for this model construct.Get the Metaschema definition representing the bound complex data.Get the bound field value associated with this field.default ObjectgetFieldValue(Object item) Get the value of the field's value from the field item object.default IDataTypeAdapter<?>Retrieves the data type of the definition's value.default Map<String,IBoundProperty<?>> getJsonProperties(Predicate<IBoundInstanceFlag> flagFilter) Get a mapping of JSON property names to their corresponding bound properties.default StringRetrieves the configured static label to use as the value key, or the type specific name if a label is not configured.default IBoundObjectreadItem(IBoundObject parent, IItemReadHandler handler) Parse and return an item.default voidwriteItem(IBoundObject item, IItemWriteHandler handler) Write the provided item.Methods inherited from interface dev.metaschema.core.model.IAttributable
getProperties, getPropertyValues, hasProperty, hasPropertyValueMethods inherited from interface dev.metaschema.databind.model.IBoundDefinitionModel
getBindingContext, getInlineInstanceMethods inherited from interface dev.metaschema.databind.model.IBoundDefinitionModelComplex
callAfterDeserialize, callBeforeDeserialize, getAfterDeserializeMethod, getBeforeDeserializeMethodMethods inherited from interface dev.metaschema.databind.model.IBoundDefinitionModelField
getInlineInstance, getJsonValueKeyFlagInstanceMethods inherited from interface dev.metaschema.databind.model.IBoundModelElement
getContainingModuleMethods inherited from interface dev.metaschema.core.model.IDefaultable
getEffectiveDefaultValue, getResolvedDefaultValueMethods inherited from interface dev.metaschema.core.model.IDefinition
getDefinitionQName, getLocation, getModuleScope, toCoordinatesMethods inherited from interface dev.metaschema.core.model.IDescribable
getDescription, getEffectiveDescription, getEffectiveFormalName, getFormalNameMethods inherited from interface dev.metaschema.databind.model.info.IFeatureComplexItemValueHandler
deepCopyItem, getBoundClass, getJsonProperties, newInstanceMethods inherited from interface dev.metaschema.core.model.IFeatureContainerFlag
getFlagContainer, getFlagInstanceByName, getFlagInstances, getJsonKeyMethods inherited from interface dev.metaschema.core.model.constraint.IFeatureValueConstrained
addConstraint, addConstraint, addConstraint, addConstraint, addConstraint, addLetExpression, getAllowedValuesConstraints, getConstraints, getConstraintSupport, getExpectConstraints, getIndexHasKeyConstraints, getLetExpressions, getMatchesConstraints, getReportConstraintsMethods inherited from interface dev.metaschema.core.model.IField
getModelTypeMethods inherited from interface dev.metaschema.core.model.IFieldDefinition
accept, getEffectiveJsonValueKeyName, getJsonValueKey, hasJsonValueKeyFlagInstance, isInlineMethods inherited from interface dev.metaschema.core.model.IModelDefinition
hasChildrenMethods inherited from interface dev.metaschema.core.model.IModelElement
getRemarksMethods inherited from interface dev.metaschema.core.model.INamed
getEffectiveIndex, getEffectiveName, getIndex, getName, getQName, getUseIndex, getUseNameMethods inherited from interface dev.metaschema.core.model.INamedModelElement
getJsonNameMethods inherited from interface dev.metaschema.core.model.constraint.IValueConstrained
getSource
-
Method Details
-
getDefinition
Description copied from interface:IFeatureComplexItemValueHandlerGet the Metaschema definition representing the bound complex data.- Specified by:
getDefinitionin interfaceIFeatureComplexItemValueHandler- Returns:
- the definition
-
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
-
getFieldValue
Get the bound field value associated with this field.- Returns:
- the field's value binding
-
getFieldValue
Description copied from interface:IFieldDefinitionGet the value of the field's value from the field item object.- Specified by:
getFieldValuein interfaceIFieldDefinition- Parameters:
item- the field item- Returns:
- the field's value or
nullif it has no value
-
getJsonValueKeyName
Description copied from interface:IFieldDefinitionRetrieves the configured static label to use as the value key, or the type specific name if a label is not configured.- Specified by:
getJsonValueKeyNamein interfaceIFieldDefinition- Returns:
- the value key label
-
getJavaTypeAdapter
Description copied from interface:IValuedDefinitionRetrieves the data type of the definition's value.- Specified by:
getJavaTypeAdapterin interfaceIValuedDefinition- Returns:
- the data type
-
getJsonProperties
@NonNull default Map<String,IBoundProperty<?>> getJsonProperties(@Nullable Predicate<IBoundInstanceFlag> flagFilter) Description copied from interface:IBoundDefinitionModelComplexGet a mapping of JSON property names to their corresponding bound properties.- Specified by:
getJsonPropertiesin interfaceIBoundDefinitionModelComplex- Parameters:
flagFilter- a predicate to filter which flag instances to include, ornullto include all flags- Returns:
- a map of property names to bound properties
-
readItem
@NonNull default IBoundObject readItem(IBoundObject parent, IItemReadHandler handler) throws IOException Description copied from interface:IItemValueHandlerParse and return an item.- Specified by:
readItemin interfaceIItemValueHandler<IBoundObject>- 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<IBoundObject>- Parameters:
item- the data to writehandler- the item writing handler- Throws:
IOException- if an error occurred while writing
-
canHandleXmlQName
Description copied from interface:IBoundModelObjectDetermine if the provided XML qualified name is associated with this property.- Specified by:
canHandleXmlQNamein interfaceIBoundModelObject<IBoundObject>- Parameters:
qname- the XML qualified name of the property being parsed- Returns:
trueif the instance will handle this name, orfalseotherwise
-