All Superinterfaces:
IProblemHandler
All Known Implementing Classes:
DefaultXmlProblemHandler

public interface IXmlProblemHandler extends IProblemHandler
  • 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 parsed
      targetObject - the Java object for the parentDefinition
      attribute - the unknown attribute
      parsingContext - the XML parsing context used for parsing
      Returns:
      true if the attribute was handled by this method, or false 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 found
      targetObject - the Java object for the parentDefinition
      start - the parsed XML start element
      parsingContext - the XML parsing context used for parsing
      Returns:
      true if the element was handled by this method, or false 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 found
      targetObject - the Java object for the parentDefinition
      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 found
      targetObject - the Java object for the parentDefinition
      unhandledInstances - the set of instances that had no data to parse
      Throws:
      IOException - if an error occurred while handling the missing instances