public class LenskitConfigDSL extends BindingDSL
BindingDSL
with additional
methods available at the top level for configuring the LensKit configuration itself.Modifier | Constructor and Description |
---|---|
|
LenskitConfigDSL(ConfigurationLoader loader)
Construct a new delegate with an empty configuration.
|
protected |
LenskitConfigDSL(ConfigurationLoader loader,
LenskitConfiguration cfg)
Construct a new delegate.
|
Modifier and Type | Method and Description |
---|---|
LenskitConfiguration |
getConfig()
Get the LensKit configuration being configured.
|
ConfigurationLoader |
getConfigLoader()
Get the configuration loader associated with this DSL (used to power the
include(java.io.File)
method). |
void |
include(File file)
Include another configuration file.
|
void |
root(Class<?> type)
Add a root type.
|
addComponent, at, at, at, at, at, at, bind, bind, bindAny, domain, getContext, include, include, include, matching, matching, prefDomain, set, within, within, within, within, within, within
addComponent, in, in, in, wrapContext
public LenskitConfigDSL(ConfigurationLoader loader)
protected LenskitConfigDSL(ConfigurationLoader loader, LenskitConfiguration cfg)
cfg
- The context to configure.public LenskitConfiguration getConfig()
public ConfigurationLoader getConfigLoader()
include(java.io.File)
method).IllegalStateException
- if there is no associated loader.public void root(Class<?> type)
type
- The type to add.LenskitConfiguration.addRoot(Class)
public void include(File file) throws IOException, RecommenderConfigurationException
BindingDSL
include
in class BindingDSL
file
- The configuration file.IOException
- if an error is thrown loading the script.RecommenderConfigurationException
- if there is an error running the script.