Interface IXmlProblemHandler
-
- All Superinterfaces:
IProblemHandler
- All Known Implementing Classes:
DefaultXmlProblemHandler
public interface IXmlProblemHandler extends IProblemHandler
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default voidhandleMissingFlagInstances(IClassBinding parentDefinition, Object targetObject, Collection<IBoundFlagInstance> unhandledInstances)A callback used to handle bound flag instances for which no data was found when the content was parsed.default voidhandleMissingModelInstances(IAssemblyClassBinding parentDefinition, Object targetObject, Collection<IBoundNamedModelInstance> unhandledInstances)A callback used to handle bound model instances for which no data was found when the content was parsed.default booleanhandleUnknownAttribute(IFlagContainer parentDefinition, Object targetObject, Attribute attribute, IXmlParsingContext parsingContext)Callback used to handle an attribute that is unknown to the model being parsed.default booleanhandleUnknownElement(IAssemblyClassBinding parentDefinition, Object 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 Detail
-
handleUnknownAttribute
default boolean handleUnknownAttribute(@NonNull IFlagContainer parentDefinition, @NonNull Object 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 theparentDefinitionattribute- the unknown attributeparsingContext- the XML parsing context used for parsing- Returns:
trueif the attribute was handled by this method, orfalseotherwise- Throws:
IOException- if an error occurred while handling the unrecognized data
-
handleUnknownElement
default boolean handleUnknownElement(@NonNull IAssemblyClassBinding parentDefinition, @NonNull Object 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 theparentDefinitionstart- the parsed XML start elementparsingContext- the XML parsing context used for parsing- Returns:
trueif the element was handled by this method, orfalseotherwise- Throws:
IOException- if an error occurred while handling the unrecognized data
-
handleMissingFlagInstances
default void handleMissingFlagInstances(@NonNull IClassBinding parentDefinition, @NonNull Object targetObject, @NonNull Collection<IBoundFlagInstance> 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 theparentDefinitionunhandledInstances- 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 IAssemblyClassBinding parentDefinition, @NonNull Object targetObject, @NonNull Collection<IBoundNamedModelInstance> 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 theparentDefinitionunhandledInstances- the set of instances that had no data to parse- Throws:
IOException- if an error occurred while handling the missing instances
-
-