Class WidgetConfig
- java.lang.Object
-
- org.intermine.web.logic.widget.config.WidgetConfig
-
- Direct Known Subclasses:
EnrichmentWidgetConfig
,GraphWidgetConfig
,HTMLWidgetConfig
,TableWidgetConfig
public abstract class WidgetConfig extends java.lang.Object
Class representing a Widget Configuration- Author:
- "Xavier Watkins"
-
-
Constructor Summary
Constructors Constructor Description WidgetConfig()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDescription()
abstract java.util.Map<java.lang.String,java.util.Collection<java.lang.String>>
getExtraAttributes(InterMineBag imBag, ObjectStore os)
java.lang.String
getFilterLabel()
java.lang.String
getFilters()
java.util.List<java.lang.String>
getFiltersValues(ObjectStore os, InterMineBag bag, java.lang.String ids)
java.lang.String
getId()
java.util.List<PathConstraint>
getPathConstraints()
java.lang.String
getStartClass()
java.lang.String
getTitle()
java.lang.String
getTypeClass()
java.lang.String
getViews()
abstract Widget
getWidget(InterMineBag imBag, InterMineBag populationBag, ObjectStore os, WidgetOptions options, java.lang.String ids, java.lang.String populationIds)
void
setConstraints(java.lang.String constraints)
void
setDescription(java.lang.String description)
void
setFilterLabel(java.lang.String filterLabel)
void
setFilters(java.lang.String filters)
void
setId(java.lang.String id)
protected static void
setPathConstraints(java.lang.String constraints, java.util.List<? super PathConstraint> pathConstraints)
Turn a string representing a set of constraints into a list of constraints.void
setStartClass(java.lang.String startClass)
void
setTitle(java.lang.String title)
void
setTypeClass(java.lang.String typeClass)
void
setViews(java.lang.String views)
-
-
-
Method Detail
-
getId
public java.lang.String getId()
- Returns:
- the id
-
setId
public void setId(java.lang.String id)
- Parameters:
id
- the id to set
-
getDescription
public java.lang.String getDescription()
- Returns:
- the description
-
setDescription
public void setDescription(java.lang.String description)
- Parameters:
description
- the description to set
-
getTitle
public java.lang.String getTitle()
- Returns:
- the title
-
setTitle
public void setTitle(java.lang.String title)
- Parameters:
title
- the title to set
-
getFilters
public java.lang.String getFilters()
- Returns:
- the filters as set in the config file
-
getFiltersValues
public java.util.List<java.lang.String> getFiltersValues(ObjectStore os, InterMineBag bag, java.lang.String ids)
- Parameters:
os
- The database to look in for dynamically defined values.bag
- The bag to constrain by for sensible dynamic filters.ids
- The ids to constrain by for sensible dynamic filters, required if bag is null- Returns:
- the filter values
-
setFilters
public void setFilters(java.lang.String filters)
- Parameters:
filters
- the filters to set
-
getFilterLabel
public java.lang.String getFilterLabel()
- Returns:
- the label for the filters
-
setFilterLabel
public void setFilterLabel(java.lang.String filterLabel)
- Parameters:
filterLabel
- the label for the filters
-
getStartClass
public java.lang.String getStartClass()
- Returns:
- the start class
-
setStartClass
public void setStartClass(java.lang.String startClass)
- Parameters:
startClass
- the start class
-
getExtraAttributes
public abstract java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> getExtraAttributes(InterMineBag imBag, ObjectStore os) throws java.lang.Exception
- Parameters:
imBag
- the InterMineBagos
- the ObjectStore- Returns:
- the getExtraAttributes
- Throws:
java.lang.Exception
- if something goes wrong
-
getTypeClass
public java.lang.String getTypeClass()
- Returns:
- the typeClass
-
setTypeClass
public void setTypeClass(java.lang.String typeClass)
- Parameters:
typeClass
- the typeClass to set
-
getViews
public java.lang.String getViews()
- Returns:
- the views as a comma-separated string
-
setViews
public void setViews(java.lang.String views)
- Parameters:
views
- The views as a comma-separated string
-
setConstraints
public void setConstraints(java.lang.String constraints)
- Parameters:
constraints
- The constraints
-
setPathConstraints
protected static void setPathConstraints(java.lang.String constraints, java.util.List<? super PathConstraint> pathConstraints)
Turn a string representing a set of constraints into a list of constraints.- Parameters:
constraints
- A string representing constraints.pathConstraints
- An accumulator into which constraints are put.
-
getPathConstraints
public java.util.List<PathConstraint> getPathConstraints()
- Returns:
- the path constraints for this widget.
-
getWidget
public abstract Widget getWidget(InterMineBag imBag, InterMineBag populationBag, ObjectStore os, WidgetOptions options, java.lang.String ids, java.lang.String populationIds)
- Parameters:
imBag
- the bag for this widgetpopulationBag
- the population bagos
- The objectstore where all the data is.options
- the options for this widget.ids
- list of IDs to analyse, use instead of intermine bagpopulationIds
- use instead of populationBag- Returns:
- the widget
-
-