Class CocoAnnotationsReportReader

    • Field Detail

      • m_Prefix

        protected String m_Prefix
        the prefix of the objects in the report.
      • m_LabelKey

        protected String m_LabelKey
        the meta-data key with the label.
    • Constructor Detail

      • CocoAnnotationsReportReader

        public CocoAnnotationsReportReader()
    • Method Detail

      • setPrefix

        public void setPrefix​(String value)
        Sets the field prefix used in the report.
        Specified by:
        setPrefix in interface ObjectPrefixHandler
        Parameters:
        value - the field prefix
      • prefixTipText

        public String prefixTipText()
        Returns the tip text for this property.
        Specified by:
        prefixTipText in interface ObjectPrefixHandler
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setLabelKey

        public void setLabelKey​(String value)
        Sets the key in the meta-data containing the label.
        Parameters:
        value - the key
      • getLabelKey

        public String getLabelKey()
        Returns the key in the meta-data containing the label.
        Returns:
        the key
      • labelKeyTipText

        public String labelKeyTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • determineParentID

        protected int determineParentID​(Report report)
        Tries to determine the parent ID for the current report.
        Specified by:
        determineParentID in class AbstractReportReader<Report>
        Parameters:
        report - the report to determine the ID for
        Returns:
        the parent database ID, -1 if it cannot be determined
      • loadCategories

        protected Map<Integer,​String> loadCategories​(net.minidev.json.JSONArray categories)
        Turns the categories JSON array into a lookup table for category ID -> label.
        Parameters:
        categories - the array to process
        Returns:
        the mapping
      • addValue

        protected void addValue​(Report report,
                                String key,
                                Object value)
        Adds the specified value to the report.
        Parameters:
        report - the report to update
        key - the field name
        value - the value (integer, double, boolean, string)
      • loadImages

        protected Map<Integer,​Report> loadImages​(net.minidev.json.JSONArray images)
        Turns the images JSON array into a lookup table for image ID -> Report.
        Parameters:
        images - the array to process
        Returns:
        the mapping