- All Superinterfaces:
IAttributable,IBoundDefinition,IBoundDefinitionFlag,IBoundInstance<Object>,IBoundModelElement,IBoundModelObject<Object>,IBoundProperty<Object>,IDefaultable,IDefinition,IDescribable,IFeatureDefinitionInstanceInlined<IBoundDefinitionFlag,,IBoundInstanceFlag> IFeatureJavaField,IFeatureScalarItemValueHandler,IFeatureValueConstrained,IFlag,IFlagDefinition,IFlagInstance,IInstance,IInstanceAbsolute,IItemValueHandler<Object>,IJsonNamed,IModelElement,IModelElementVisitable,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 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.IFlagInstance
DEFAULT_FLAG_REQUIRED -
Method Summary
Modifier and TypeMethodDescriptiondefault <CONTEXT,RESULT>
RESULTaccept(IModelElementVisitor<CONTEXT, RESULT> visitor, CONTEXT context) A visitor callback.default 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.Retrieve the Metaschema module definition on which the instance was declared.Retrieves the flag definition referenced by this instance.default IBoundInstanceFlagIfIDefinition.isInline()istrue, return the instance the definition is inlined for.default IBoundDefinitionModel<IBoundObject>Retrieves the parent container that contains this flag instance.booleanDetermines 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.booleanDetermines if this flag is used as a JSON "value key".static IBoundInstanceFlagnewInstance(Field field, IBoundDefinitionModel<IBoundObject> containingDefinition) Create a new bound flag instance.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.IBoundInstance
getContainingModule, getValue, setValueMethods inherited from interface dev.metaschema.core.model.IDefaultable
getDefaultValue, getResolvedDefaultValueMethods 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.IFeatureDefinitionInstanceInlined
getDefinitionQName, getEffectiveDefaultValue, getEffectiveDescription, getEffectiveFormalName, getEffectiveIndex, getEffectiveName, getSource, isInline, 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.IFlag
getModelTypeMethods inherited from interface dev.metaschema.core.model.IFlagInstance
isRequiredMethods inherited from interface dev.metaschema.core.model.IInstance
toCoordinatesMethods inherited from interface dev.metaschema.core.model.IModelElement
getRemarksMethods inherited from interface dev.metaschema.core.model.INamed
getIndex, getName, getQName, getUseIndex, getUseNameMethods inherited from interface dev.metaschema.core.model.INamedInstance
getReferencedDefinitionQNameMethods inherited from interface dev.metaschema.core.model.INamedModelElement
getJsonNameMethods inherited from interface dev.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:
trueif this flag is used as a JSON key, orfalseotherwise
-
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:
trueif the flag is used as a JSON "value key", orfalseotherwise
-
getContainingDefinition
Description copied from interface:IInstanceRetrieve the Metaschema module definition on which the instance was declared.- Specified by:
getContainingDefinitionin interfaceIBoundInstance<Object>- Specified by:
getContainingDefinitionin interfaceIFlagInstance- Specified by:
getContainingDefinitionin interfaceIInstance- Returns:
- the Metaschema module definition on which the instance was declared
-
getParentContainer
Description copied from interface:IFlagInstanceRetrieves the parent container that contains this flag instance.- Specified by:
getParentContainerin interfaceIFlagInstance- Specified by:
getParentContainerin interfaceIInstance- Returns:
- the parent model definition
-
getDefinition
Retrieves the flag definition referenced by this instance.For an inline instance, this instance is the definition.
- Specified by:
getDefinitionin interfaceIFeatureDefinitionInstanceInlined<IBoundDefinitionFlag,IBoundInstanceFlag> - Specified by:
getDefinitionin interfaceIFlagInstance- Specified by:
getDefinitionin interfaceINamedInstance- Specified by:
getDefinitionin interfaceIValuedInstance- Returns:
- the flag definition
-
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 interfaceIDefinition- Specified by:
getInlineInstancein interfaceIFeatureDefinitionInstanceInlined<IBoundDefinitionFlag,IBoundInstanceFlag> - Specified by:
getInlineInstancein interfaceIFlagDefinition- Returns:
- the instance or
nullotherwise - See Also:
-
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
-
readItem
@NonNull default Object readItem(IBoundObject parent, @NonNull IItemReadHandler handler) throws IOException 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
-
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
-
accept
default <CONTEXT,RESULT> RESULT accept(IModelElementVisitor<CONTEXT, RESULT> visitor, CONTEXT context) Description copied from interface:IFlagInstanceA visitor callback.- Specified by:
acceptin interfaceIFlagDefinition- Specified by:
acceptin interfaceIFlagInstance- 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
-