Package nz.org.riskscape.config.ini
Class IniConfig
java.lang.Object
nz.org.riskscape.config.ini.IniConfig
- All Implemented Interfaces:
nz.org.riskscape.config.Config
,Ini4jConfigConstants
public class IniConfig
extends Object
implements nz.org.riskscape.config.Config, Ini4jConfigConstants
RiskScape Config
implementation, based on our home-brew ini file parser - IniParser2
.
-
Field Summary
Fields inherited from interface nz.org.riskscape.config.Config
EMPTY
Fields inherited from interface nz.org.riskscape.config.ini4j.Ini4jConfigConstants
AUTOIMPORT_DEFAULT, AUTOIMPORT_KEY, DEFAULT_PROJECT_INI, IMPORT_KEY, INI_SUFFIX, PROJECT_SECTION, RECURSION_LIMIT, TYPE_PREFIXES
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<nz.org.riskscape.problem.Problem>
List<nz.org.riskscape.problem.Problem>
static void
diffWarning
(nz.org.riskscape.problem.ResultOrProblems<? extends nz.org.riskscape.config.Config> oldConfig, nz.org.riskscape.problem.ResultOrProblems<? extends nz.org.riskscape.config.Config> newConfig) static IniConfig
fromIniFile
(URI location, nz.org.riskscape.ini.IniFile inifile) Testing constructor to build ini config from an already parsed inifile, without processing any importsList<nz.org.riskscape.config.ConfigSection>
getAll()
Optional<nz.org.riskscape.config.ConfigSection>
getSection
(String name) static nz.org.riskscape.problem.ResultOrProblems<IniConfig>
Attempt to build aIniConfig
instance from the given URI.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface nz.org.riskscape.config.ini4j.Ini4jConfigConstants
getWellKnownTypePrefix
-
Constructor Details
-
IniConfig
-
-
Method Details
-
fromIniFile
Testing constructor to build ini config from an already parsed inifile, without processing any imports
-
diffWarning
public static void diffWarning(nz.org.riskscape.problem.ResultOrProblems<? extends nz.org.riskscape.config.Config> oldConfig, nz.org.riskscape.problem.ResultOrProblems<? extends nz.org.riskscape.config.Config> newConfig) -
load
public static nz.org.riskscape.problem.ResultOrProblems<IniConfig> load(URI base, nz.org.riskscape.engine.resource.ResourceFactory factory) Attempt to build a
IniConfig
instance from the given URI. Will process any top level import keys to recursively load other files. -
getAll
- Specified by:
getAll
in interfacenz.org.riskscape.config.Config
-
getSection
- Specified by:
getSection
in interfacenz.org.riskscape.config.Config
-
add
-
add
-
getRootLocation
- Specified by:
getRootLocation
in interfacenz.org.riskscape.config.Config
-