Interface IXmlProblemHandler

    • 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 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
                                             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 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
                                                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 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
                                                 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 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