Class AnnotationHelper


  • public class AnnotationHelper
    extends Object
    Methods for dealing with annotations in reports.
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    • Constructor Detail

      • AnnotationHelper

        public AnnotationHelper()
    • Method Detail

      • removeIndex

        public static boolean removeIndex​(Report report,
                                          String prefix,
                                          int index)
        Removes the specified index from the report.
        Parameters:
        report - the report to process
        prefix - the object prefix to use
        Returns:
        true if successfully removed
      • findLastIndex

        public static int findLastIndex​(Report report,
                                        String prefix)
        Determines the last index used with the given prefix.
        Parameters:
        report - the report to process
        prefix - the object prefix to use
        Returns:
        the last index
      • valuesForIndex

        public static Map<String,​Object> valuesForIndex​(Report report,
                                                              String prefix,
                                                              int index)
        Returns all the values stored in the report under this index.
        Parameters:
        report - the report to look up the index in
        prefix - the object prefix to use
        index - the index to retrieve the values for
        Returns:
        the values
      • getLocations

        public static List<SelectionRectangle> getLocations​(Report report,
                                                            String prefix)
        Returns all currently stored locations.
        Parameters:
        report - the report to get the locations from
        prefix - the object prefix to use
        Returns:
        the locations