Interface BuilderProcessor


public interface BuilderProcessor
Author:
TomForwood Class defining a processor that runs on a RosettaModelObjectBuilder instances of this class are designed to be used with the RosettaModelObjectBuilder process method to perform visitor pattern processing on the object tree. They are permitted to make changes to the underlying objects and can return an accumulated result in the report object BuilderProcessors added to the rosetta model using the processor syntax will be automatically run during the ingestion stages and can be used to perform custom mapping logic
  • Method Details

    • processRosetta

      <R extends RosettaModelObject> boolean processRosetta(RosettaPath path, Class<R> rosettaType, RosettaModelObjectBuilder builder, RosettaModelObjectBuilder parent, AttributeMeta... metas)
      Process a rosetta object
      Parameters:
      path - the RosettaPath taken to the object
      rosettaType - the Type of the object
      builder - a RosettaModelObjectBuilder representing the object
      parent - the RosettaModelObjectBuilder which contains this object as an attribute
      metas - Flags indicating meta information about the attribute returns true if this processor is interested in processing the objects fields
    • processRosetta

      <R extends RosettaModelObject> boolean processRosetta(RosettaPath path, Class<R> rosettaType, List<? extends RosettaModelObjectBuilder> builders, RosettaModelObjectBuilder parent, AttributeMeta... metas)
      Processes a list of Rosetta objects - allows new values to be added or removed from the list
      Parameters:
      path - the RosettaPath taken to the objects
      rosettaType - the Type of the objects
      builders - a List of RosettaModelObjectBuilder representing the objects
      parent - the RosettaModelObjectbuilder which contains these object as an attribute
      metas - Flags indicating meta information about the attribute
    • processBasic

      <T> void processBasic(RosettaPath path, Class<T> rosettaType, T instance, RosettaModelObjectBuilder parent, AttributeMeta... metas)
      process a rosetta primitive type
      Parameters:
      path - the RosettaPath taken to the objects
      rosettaType - the Type of the objects
      instance - the primitive value to be processed
      parent - the RosettaModelObjectBuilder which contains these object as an attribute
      metas - Flags indicating meta information about the attribute
    • processBasic

      <T> void processBasic(RosettaPath path, Class<T> rosettaType, Collection<? extends T> instances, RosettaModelObjectBuilder parent, AttributeMeta... metas)
      process a list of rosetta primitive type - allows new values to be added or removed from the list
      Parameters:
      path - the RosettaPath taken to the objects
      rosettaType - the Type of the objects
      instances - the list of primitive value to be processed
      parent - the RosettaModelObjectbuilder which contains these object as an attribute
      metas - Flags indicating meta information about the attribute
    • report

      Returns:
      a report representing the result of this processor