Interface IXmlProblemHandler
- All Superinterfaces:
IProblemHandler
- All Known Implementing Classes:
DefaultXmlProblemHandler
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
handleMissingFlagInstances
(IBoundDefinitionModelComplex parentDefinition, IBoundObject targetObject, Collection<IBoundInstanceFlag> unhandledInstances) A callback used to handle bound flag instances for which no data was found when the content was parsed.default void
handleMissingModelInstances
(IBoundDefinitionModelAssembly parentDefinition, IBoundObject targetObject, Collection<? extends IBoundInstanceModel<?>> unhandledInstances) A callback used to handle bound model instances for which no data was found when the content was parsed.default boolean
handleUnknownAttribute
(IBoundDefinitionModelComplex parentDefinition, IBoundObject targetObject, Attribute attribute, IXmlParsingContext parsingContext) Callback used to handle an attribute that is unknown to the model being parsed.default boolean
handleUnknownElement
(IBoundDefinitionModelAssembly parentDefinition, IBoundObject targetObject, StartElement start, IXmlParsingContext parsingContext) Callback used to handle an element that is unknown to the model being parsed.Methods inherited from interface gov.nist.secauto.metaschema.databind.io.IProblemHandler
handleMissingInstances
-
Method Details
-
handleUnknownAttribute
default boolean handleUnknownAttribute(@NonNull IBoundDefinitionModelComplex parentDefinition, @NonNull IBoundObject targetObject, @NonNull Attribute attribute, @NonNull IXmlParsingContext parsingContext) throws IOException Callback used to handle an attribute that is unknown to the model being parsed.- Parameters:
parentDefinition
- the bound class currently describing the data being parsedtargetObject
- the Java object for theparentDefinition
attribute
- the unknown attributeparsingContext
- the XML parsing context used for parsing- Returns:
true
if the attribute was handled by this method, orfalse
otherwise- Throws:
IOException
- if an error occurred while handling the unrecognized data
-
handleUnknownElement
default boolean handleUnknownElement(@NonNull IBoundDefinitionModelAssembly parentDefinition, @NonNull IBoundObject targetObject, @NonNull StartElement start, @NonNull IXmlParsingContext parsingContext) throws IOException Callback used to handle an element that is unknown to the model being parsed.- Parameters:
parentDefinition
- the bound assembly class on which the missing instances are foundtargetObject
- the Java object for theparentDefinition
start
- the parsed XML start elementparsingContext
- the XML parsing context used for parsing- Returns:
true
if the element was handled by this method, orfalse
otherwise- Throws:
IOException
- if an error occurred while handling the unrecognized data
-
handleMissingFlagInstances
default void handleMissingFlagInstances(@NonNull IBoundDefinitionModelComplex parentDefinition, @NonNull IBoundObject targetObject, @NonNull Collection<IBoundInstanceFlag> unhandledInstances) throws IOException A callback used to handle bound flag instances for which no data was found when the content was parsed.This can be used to supply default or prescribed values based on application logic.
- Parameters:
parentDefinition
- the bound assembly class on which the missing instances are foundtargetObject
- the Java object for theparentDefinition
unhandledInstances
- the set of instances that had no data to parse- Throws:
IOException
- if an error occurred while handling the missing instances
-
handleMissingModelInstances
default void handleMissingModelInstances(@NonNull IBoundDefinitionModelAssembly parentDefinition, @NonNull IBoundObject targetObject, @NonNull Collection<? extends IBoundInstanceModel<?>> unhandledInstances) throws IOException A callback used to handle bound model instances for which no data was found when the content was parsed.This can be used to supply default or prescribed values based on application logic.
- Parameters:
parentDefinition
- the bound assembly class on which the missing instances are foundtargetObject
- the Java object for theparentDefinition
unhandledInstances
- the set of instances that had no data to parse- Throws:
IOException
- if an error occurred while handling the missing instances
-