ParameterMapImplpublic interface ParameterMap
ParameterMap serves as registry of Parameters that can be used
to configure a ParametrizedPlugin.
A ParameterMap holds a list of Parameter instances upon its
initialization, therefore acting as a registry of allowed Parameters.
Furthermore, a ParameterMap supports setting values of its parameters
either directly or automatically
via ParameterConversion of a supplied RDF subgraph.
Calling init(Resource) on a given ParameterMap will change its state to
initialized and prevent further modification of its values, effectively making it immutable.
It is mandatory to call init(Resource) before getting values from a ParameterMap.
| Modifier and Type | Field | Description |
|---|---|---|
static ParameterMap |
EMPTY_INSTANCE |
An empty, unmodifiable instance
|
| Modifier and Type | Method | Description |
|---|---|---|
java.util.Set<Parameter> |
getAllParameters() |
|
<T> T |
getValue(Parameter p) |
Get the value for the given parameter.
|
<T> T |
getValue(Parameter p,
T defaultValue) |
Get the value for the given parameter, or the defaultValue, if it has not been set.
|
ParameterMap |
init(org.apache.jena.rdf.model.Resource r) |
Initialize this
ParameterMap, making it immutable and enabling the getters. |
ParameterMap |
setValue(Parameter p,
java.lang.Object node) |
Directly set a value for a parameter.
|
static final ParameterMap EMPTY_INSTANCE
java.util.Set<Parameter> getAllParameters()
ParameterMaps supported parametersParameterMap setValue(Parameter p, java.lang.Object node) throws java.lang.IllegalStateException
p - the parameter which should be setnode - the value to set for the given parameterParameterMap, for method chainingjava.lang.IllegalStateException - if this ParameterMap has already been initialized<T> T getValue(Parameter p) throws java.lang.IllegalStateException
T - this methods generic return typep - the parameter to getjava.lang.IllegalStateException - if this ParameterMap has not been initialized yet<T> T getValue(Parameter p, T defaultValue) throws java.lang.IllegalStateException
T - this methods generic return typep - the parameter to getdefaultValue - a defaultValue as fallbackdefaultVaue if the value has not been set or has been set to null;
otherwise, the value of parameter pjava.lang.IllegalStateException - if this ParameterMap has not been initialized yetParameterMap init(org.apache.jena.rdf.model.Resource r)
ParameterMap, making it immutable and enabling the getters.r - if not null, this Resource and its corresponding subgraph will be used for
automatic parameter value assignmentParameterMap, for method chainingCopyright © 2018. All rights reserved.