Class TableCellFormatter


  • public class TableCellFormatter
    extends java.lang.Object
    A formatter that will render a table cell.
    Author:
    Alex Kalderimis
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.json.JSONObject toJSON​(ResultCell cell)
      Get the JSONObject that represents each cell in the results row
      java.util.Map<java.lang.String,​java.lang.Object> toMap​(ResultCell cell)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TableCellFormatter

        public TableCellFormatter​(InterMineAPI im)
        Parameters:
        im - The InterMine state object
    • Method Detail

      • toMap

        public java.util.Map<java.lang.String,​java.lang.Object> toMap​(ResultCell cell)
        Parameters:
        cell - The thing we are rendering.
        Returns:
        A data structure we can easily jsonify.
      • toJSON

        public org.json.JSONObject toJSON​(ResultCell cell)
        Get the JSONObject that represents each cell in the results row
        Parameters:
        cell - The result element with the data
        Returns:
        A JSONObject