Package org.openrefine.browsing
Class EngineConfig
- java.lang.Object
-
- org.openrefine.browsing.EngineConfig
-
public class EngineConfig extends Object
Stores the configuration of facets and whether we are using row or record mode. In addition it also stores an optional limit on the number of rows (or records) to aggregate when computing facets.
-
-
Field Summary
Fields Modifier and Type Field Description protected Long
_aggregationLimit
protected List<FacetConfig>
_facets
protected Engine.Mode
_mode
static EngineConfig
ALL_RECORDS
static EngineConfig
ALL_ROWS
-
Constructor Summary
Constructors Constructor Description EngineConfig(List<FacetConfig> facets, Engine.Mode mode)
Creates a new EngineConfig from a list of facet configurations and an engine mode.EngineConfig(List<FacetConfig> facets, Engine.Mode mode, Long aggregationLimit)
Creates a new EngineConfig from a list of facet configurations, an engine mode and an aggregation limit.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Long
getAggregationLimit()
A null aggregation limit means no limit.Set<String>
getColumnDependencies()
Computes the set of columns the facets depend on.List<FacetConfig>
getFacetConfigs()
Engine.Mode
getMode()
boolean
isNeutral()
Returns true when this engine configuration does not filter out any row, which is when all the applied facets are in the "reset" position.static EngineConfig
reconstruct(String json)
-
-
-
Field Detail
-
_facets
protected final List<FacetConfig> _facets
-
_mode
protected final Engine.Mode _mode
-
_aggregationLimit
protected final Long _aggregationLimit
-
ALL_ROWS
public static final EngineConfig ALL_ROWS
-
ALL_RECORDS
public static final EngineConfig ALL_RECORDS
-
-
Constructor Detail
-
EngineConfig
public EngineConfig(List<FacetConfig> facets, Engine.Mode mode)
Creates a new EngineConfig from a list of facet configurations and an engine mode. No limit on facet aggregation.
-
EngineConfig
public EngineConfig(List<FacetConfig> facets, Engine.Mode mode, Long aggregationLimit)
Creates a new EngineConfig from a list of facet configurations, an engine mode and an aggregation limit. A null aggregationLimit of means no limit (which happens when the field is not specified in the JSON serialization). A zero aggregationLimit means no aggregation at all.
-
-
Method Detail
-
getMode
public Engine.Mode getMode()
-
getFacetConfigs
public List<FacetConfig> getFacetConfigs()
-
getAggregationLimit
public Long getAggregationLimit()
A null aggregation limit means no limit. A zero aggregation limit means no aggregation at all.
-
getColumnDependencies
public Set<String> getColumnDependencies()
Computes the set of columns the facets depend on. If the extraction of dependencies fails for some facet, or if the engine uses the records mode, this returns null.- Returns:
- the set of column dependencies, or null
-
isNeutral
public boolean isNeutral()
Returns true when this engine configuration does not filter out any row, which is when all the applied facets are in the "reset" position.
-
reconstruct
public static EngineConfig reconstruct(String json)
-
-