Module dev.metaschema.databind
Package dev.metaschema.databind.model
Interface IBoundInstanceModelFieldScalar
- All Superinterfaces:
IAttributable,IBoundDefinition,IBoundDefinitionModel<Object>,IBoundDefinitionModelField<Object>,IBoundInstance<Object>,IBoundInstanceModel<Object>,IBoundInstanceModelField<Object>,IBoundInstanceModelNamed<Object>,IBoundModelElement,IBoundModelObject<Object>,IBoundProperty<Object>,IContainer,IDefaultable,IDefinition,IDescribable,IFeatureContainerFlag<IBoundInstanceFlag>,IFeatureDefinitionInstanceInlined<IBoundDefinitionModelField<Object>,,IBoundInstanceModelFieldScalar> IFeatureJavaField,IFeatureScalarItemValueHandler,IFeatureValueConstrained,IField,IFieldDefinition,IFieldInstance,IFieldInstanceAbsolute,IGroupable,IInstance,IInstanceAbsolute,IItemValueHandler<Object>,IJsonInstance,IJsonNamed,IModelDefinition,IModelElement,IModelElementVisitable,IModelInstance,IModelInstanceAbsolute,INamed,INamedInstance,INamedModelElement,INamedModelInstance,INamedModelInstanceAbsolute,IValueConstrained,IValued,IValuedDefinition,IValuedInstance,IValuedMutable
public interface IBoundInstanceModelFieldScalar
extends IBoundInstanceModelField<Object>, IBoundDefinitionModelField<Object>, IFeatureScalarItemValueHandler, IFeatureDefinitionInstanceInlined<IBoundDefinitionModelField<Object>,IBoundInstanceModelFieldScalar>
Represents a bound field instance that contains scalar (simple) data, such as
a string or number value.
-
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_SCOPEFields inherited from interface dev.metaschema.core.model.IFieldInstance
DEFAULT_FIELD_IN_XML_WRAPPEDFields inherited from interface dev.metaschema.core.model.IGroupable
DEFAULT_GROUP_AS_MAX_OCCURS, DEFAULT_GROUP_AS_MIN_OCCURS, DEFAULT_JSON_GROUP_AS_BEHAVIOR, DEFAULT_XML_GROUP_AS_BEHAVIOR -
Method Summary
Modifier and TypeMethodDescriptiondefault <CONTEXT,RESULT>
RESULTaccept(IModelElementVisitor<CONTEXT, RESULT> visitor, CONTEXT context) A visitor callback.Retrieve the Metaschema module definition on which the instance was declared.default IBoundDefinitionModelField<Object>Retrieve the definition of this instance.default ObjectgetFieldValue(Object item) Get the value of the field's value from the field item object.default IContainerFlagSupport<IBoundInstanceFlag>Lazy initialize the flag instances associated with this definition.default IBoundInstanceModelFieldScalarIfIDefinition.isInline()istrue, return the instance the definition is inlined for.default IBoundInstanceFlaggetItemJsonKey(Object item) Get the JSON key flag for the provided item.default IBoundInstanceFlagGet the JSON key associated with this instance.default IBoundInstanceFlagRetrieves the flag instance whose value will be used as the "value key".default StringRetrieves the configured static label to use as the value key, or the type specific name if a label is not configured.default booleanisInline()Determine if the definition is defined inline, meaning the definition is declared where it is used.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.IAttributable
getProperties, getPropertyValues, hasProperty, hasPropertyValueMethods inherited from interface dev.metaschema.databind.model.IBoundDefinitionModel
getBindingContextMethods inherited from interface dev.metaschema.databind.model.IBoundInstance
getContainingModule, getValue, setValueMethods inherited from interface dev.metaschema.databind.model.IBoundInstanceModel
deepCopy, getCollectionInfo, getResolvedDefaultValueMethods inherited from interface dev.metaschema.databind.model.IBoundInstanceModelField
canHandleXmlQNameMethods inherited from interface dev.metaschema.databind.model.IBoundInstanceModelNamed
getEffectiveJsonKey, getIndex, getItemValues, getNameMethods inherited from interface dev.metaschema.core.model.IDefaultable
getDefaultValueMethods inherited from interface dev.metaschema.core.model.IDefinition
getLocation, getModuleScopeMethods inherited from interface dev.metaschema.core.model.IDescribable
getDescription, getFormalNameMethods inherited from interface dev.metaschema.core.model.IFeatureContainerFlag
getFlagInstanceByName, getFlagInstancesMethods inherited from interface dev.metaschema.core.model.IFeatureDefinitionInstanceInlined
getDefinitionQName, getEffectiveDefaultValue, getEffectiveDescription, getEffectiveFormalName, getEffectiveIndex, getEffectiveName, getSource, isInlineDefinition, toCoordinatesMethods inherited from interface dev.metaschema.databind.model.IFeatureJavaField
getField, getItemType, getTypeMethods inherited from interface dev.metaschema.databind.model.info.IFeatureScalarItemValueHandler
deepCopyItem, getJavaTypeAdapter, getValueFromString, setValueMethods 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
getEffectiveJsonValueKeyName, getJsonValueKey, hasJsonValueKeyFlagInstanceMethods inherited from interface dev.metaschema.core.model.IFieldInstance
isInXmlWrappedMethods inherited from interface dev.metaschema.core.model.IFieldInstanceAbsolute
isEffectiveValueWrappedInXmlMethods inherited from interface dev.metaschema.core.model.IGroupable
getEffectiveXmlGroupAsQName, getGroupAsName, getJsonGroupAsBehavior, getMaxOccurs, getMinOccurs, getXmlGroupAsBehaviorMethods inherited from interface dev.metaschema.core.model.IInstance
toCoordinatesMethods 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.IModelInstance
getParentContainerMethods inherited from interface dev.metaschema.core.model.INamed
getQName, getUseIndex, getUseNameMethods inherited from interface dev.metaschema.core.model.INamedInstance
getReferencedDefinitionQNameMethods inherited from interface dev.metaschema.core.model.INamedModelInstance
hasJsonKeyMethods inherited from interface dev.metaschema.core.model.INamedModelInstanceAbsolute
getJsonNameMethods inherited from interface dev.metaschema.core.model.IValuedDefinition
getJavaTypeAdapter
-
Method Details
-
getDefinition
Description copied from interface:INamedInstanceRetrieve the definition of this instance.- Specified by:
getDefinitionin interfaceIBoundInstanceModelField<Object>- Specified by:
getDefinitionin interfaceIBoundInstanceModelNamed<Object>- Specified by:
getDefinitionin interfaceIFeatureDefinitionInstanceInlined<IBoundDefinitionModelField<Object>,IBoundInstanceModelFieldScalar> - Specified by:
getDefinitionin interfaceIFieldInstance- Specified by:
getDefinitionin interfaceINamedInstance- Specified by:
getDefinitionin interfaceINamedModelInstance- Specified by:
getDefinitionin interfaceIValuedInstance- Returns:
- the corresponding definition
-
isInline
default boolean isInline()Description copied from interface:IDefinitionDetermine if the definition is defined inline, meaning the definition is declared where it is used.If this method returns
false, thenIDefinition.getInlineInstance()must returnnull.- Specified by:
isInlinein interfaceIDefinition- Specified by:
isInlinein interfaceIFeatureDefinitionInstanceInlined<IBoundDefinitionModelField<Object>,IBoundInstanceModelFieldScalar> - Specified by:
isInlinein interfaceIFieldDefinition- Returns:
trueif the definition is declared inline orfalseif the definition is able to be globally referenced- See Also:
-
getInlineInstance
Description copied from interface:IDefinitionIfIDefinition.isInline()istrue, return the instance the definition is inlined for.If this method returns
null, thenIDefinition.getInlineInstance()must returnfalse.- Specified by:
getInlineInstancein interfaceIBoundDefinitionModel<Object>- Specified by:
getInlineInstancein interfaceIBoundDefinitionModelField<Object>- Specified by:
getInlineInstancein interfaceIDefinition- Specified by:
getInlineInstancein interfaceIFeatureDefinitionInstanceInlined<IBoundDefinitionModelField<Object>,IBoundInstanceModelFieldScalar> - Specified by:
getInlineInstancein interfaceIFieldDefinition- Returns:
- the instance or
nullotherwise - See Also:
-
getContainingDefinition
IBoundDefinitionModelAssembly getContainingDefinition()Description copied from interface:IInstanceRetrieve the Metaschema module definition on which the instance was declared.- Specified by:
getContainingDefinitionin interfaceIBoundInstance<Object>- Specified by:
getContainingDefinitionin interfaceIBoundInstanceModel<Object>- Specified by:
getContainingDefinitionin interfaceIInstance- Specified by:
getContainingDefinitionin interfaceIModelInstance- Returns:
- the Metaschema module definition on which the instance was declared
-
getFlagContainer
Description copied from interface:IFeatureContainerFlagLazy initialize the flag instances associated with this definition.- Specified by:
getFlagContainerin interfaceIFeatureContainerFlag<IBoundInstanceFlag>- Returns:
- the flag container
-
getJsonKey
Description copied from interface:INamedModelInstanceGet the JSON key associated with this instance.- Specified by:
getJsonKeyin interfaceIBoundInstanceModelNamed<Object>- Specified by:
getJsonKeyin interfaceIFeatureContainerFlag<IBoundInstanceFlag>- Specified by:
getJsonKeyin interfaceIModelDefinition- Specified by:
getJsonKeyin interfaceINamedModelInstance- Specified by:
getJsonKeyin interfaceINamedModelInstanceAbsolute- Returns:
- the configured JSON key or
nullif no JSON key is configured
-
getItemJsonKey
Description copied from interface:IBoundInstanceModelGet the JSON key flag for the provided item.- Specified by:
getItemJsonKeyin interfaceIBoundInstanceModel<Object>- Specified by:
getItemJsonKeyin interfaceIBoundInstanceModelNamed<Object>- Parameters:
item- the item to get the JSON key flag for- Returns:
- the JSON key flag
-
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
-
getJsonValueKeyFlagInstance
Description copied from interface:IFieldDefinitionRetrieves the flag instance whose value will be used as the "value key".- Specified by:
getJsonValueKeyFlagInstancein interfaceIBoundDefinitionModelField<Object>- Specified by:
getJsonValueKeyFlagInstancein interfaceIFieldDefinition- Returns:
- the configured flag instance, or
nullif a flag is not configured as the "value key"
-
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
-
accept
default <CONTEXT,RESULT> RESULT accept(IModelElementVisitor<CONTEXT, RESULT> visitor, CONTEXT context) Description copied from interface:IModelElementVisitableA visitor callback.- Specified by:
acceptin interfaceIFieldDefinition- Specified by:
acceptin interfaceIFieldInstanceAbsolute- Specified by:
acceptin interfaceIModelElementVisitable- Type Parameters:
CONTEXT- the type of the context parameterRESULT- the type of the visitor result- Parameters:
visitor- the calling visitorcontext- a parameter used to pass contextual information between visitors- Returns:
- the visitor result
-