Interface IItemValueHandler<TYPE>
- Type Parameters:
TYPE
- the Java type of the item
- All Known Subinterfaces:
IBoundDefinitionFlag
,IBoundDefinitionModel<ITEM>
,IBoundDefinitionModelAssembly
,IBoundDefinitionModelComplex
,IBoundDefinitionModelField<ITEM>
,IBoundDefinitionModelFieldComplex
,IBoundFieldValue
,IBoundInstance<ITEM>
,IBoundInstanceFlag
,IBoundInstanceModel<ITEM>
,IBoundInstanceModelAssembly
,IBoundInstanceModelChoiceGroup
,IBoundInstanceModelField<ITEM>
,IBoundInstanceModelFieldComplex
,IBoundInstanceModelFieldScalar
,IBoundInstanceModelGroupedAssembly
,IBoundInstanceModelGroupedField
,IBoundInstanceModelGroupedNamed
,IBoundInstanceModelNamed<ITEM>
,IBoundModelObject<ITEM>
,IBoundProperty<ITEM>
,IFeatureComplexItemValueHandler
,IFeatureScalarItemValueHandler
public interface IItemValueHandler<TYPE>
A feature interface for handling read, writing, and copying item objects,
which are the data building blocks of a Metaschema module instance.
-
Method Summary
Modifier and TypeMethodDescriptiondeepCopyItem
(TYPE item, IBoundObject parentInstance) Create and return a deep copy of the provided item.readItem
(IBoundObject parent, IItemReadHandler handler) Parse and return an item.void
writeItem
(TYPE item, IItemWriteHandler handler) Write the provided item.
-
Method Details
-
readItem
@Nullable TYPE readItem(@Nullable IBoundObject parent, @NonNull IItemReadHandler handler) throws IOException Parse and return an item.- 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
Write the provided item.- Parameters:
item
- the data to writehandler
- the item writing handler- Throws:
IOException
- if an error occurred while writing
-
deepCopyItem
@NonNull TYPE deepCopyItem(@NonNull TYPE item, @Nullable IBoundObject parentInstance) throws BindingException Create and return a deep copy of the provided item.- Parameters:
item
- the item to copyparentInstance
- an optional parent object to use for serialization callbacks- Returns:
- the new deep copy
- Throws:
BindingException
- if an error occurred while analyzing the bound objects
-