Class Widget


  • public class Widget
    extends java.lang.Object
    A representation of a list analysis widget, containing the metadata necessary to describe its usage and to choose how and whether to display its results.
    • Constructor Summary

      Constructors 
      Constructor Description
      Widget​(java.lang.String name, java.lang.String title, java.lang.String description, java.lang.String widgetType, java.lang.String chartType, java.util.Collection<java.lang.String> targets, java.util.Collection<java.lang.String> filters, java.lang.String xLabel, java.lang.String yLabel)
      Constructor.
    • Constructor Detail

      • Widget

        public Widget​(java.lang.String name,
                      java.lang.String title,
                      java.lang.String description,
                      java.lang.String widgetType,
                      java.lang.String chartType,
                      java.util.Collection<java.lang.String> targets,
                      java.util.Collection<java.lang.String> filters,
                      java.lang.String xLabel,
                      java.lang.String yLabel)
        Constructor. Intended for use by the widget parser.
        Parameters:
        name - The Name of this widget.
        title - The title of this widget.
        description - the description of this widget.
        widgetType - The type of widget (enrichment, chart, etc).
        chartType - The type of chart if a chart widget (otherwise null).
        targets - The classes this widget may consume.
        filters - The available filter values.
        xLabel - The label for the X-Axis if a chart widget.
        yLabel - The label for the Y-Axis if a chart widget.
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns:
        the name of the widget
      • getTitle

        public java.lang.String getTitle()
        Returns:
        the human readable descriptive title of the widget
      • getDescription

        public java.lang.String getDescription()
        Returns:
        the longer description of this widget, if any
      • getWidgetType

        public java.lang.String getWidgetType()
        Returns:
        the type of widget this object describes (eg. 'enrichment', 'chart').
      • isEnrichment

        public boolean isEnrichment()
        Returns:
        whether or not this is an enrichment widget
      • isChart

        public boolean isChart()
        Returns:
        whether or not this is a chart widget
      • getChartType

        public java.lang.String getChartType()
        Returns:
        the type of chart widget this object represents. Only makes sense for chart widgets.
      • getTargets

        public java.util.Set<java.lang.String> getTargets()
        Returns:
        The names of classes this widget can analyse.
      • getFilters

        public java.util.Set<java.lang.String> getFilters()
        Returns:
        the valid values of the 'filter' property.
      • getXAxisLabel

        public java.lang.String getXAxisLabel()
        Returns:
        the label for the domain (X) axis. Only makes sense for chart widgets.
      • getYAxisLabel

        public java.lang.String getYAxisLabel()
        Returns:
        the label for the range (Y) axis. Only makes sense for chart widgets.