Package org.rosaenlg.lib
Class RenderOptionsInput
- java.lang.Object
-
- org.rosaenlg.lib.RenderOptionsInput
-
- Direct Known Subclasses:
RenderOptionsOutput
public class RenderOptionsInput extends Object
RosaeNLG runtime options helper.- Author:
- Ludan Stoecklé [email protected]
-
-
Field Summary
Fields Modifier and Type Field Description protected int
defaultAmong
default amongprotected String
defaultSynoMode
default synonym modeprotected int
forceRandomSeed
force random seedprotected static String
KEY_DEFAULTAMONG
JSON key for default amongprotected static String
KEY_DEFAULTSYNOMODE
JSON key for default synonym modeprotected static String
KEY_FORCERANDOMSEED
JSON key for force random seedprotected static String
KEY_LANGUAGE
JSON key for languageprotected static String
KEY_RENDERDEBUG
JSON key for render debugprotected String
language
input languageprotected boolean
renderDebug
render debug
-
Constructor Summary
Constructors Constructor Description RenderOptionsInput()
Create an empty object.RenderOptionsInput(org.json.JSONObject jsonOptions)
Create from a JSON object by picking relevant parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getDefaultAmong()
gets the defaultAmong value.String
getDefaultSynoMode()
gets the default synonym mode.int
getForceRandomSeed()
gets the forced random seed.String
getLanguage()
gets the language.boolean
getRenderDebug()
gets the renderDebug value.RenderOptionsInput
setDefaultAmong(int defaultAmong)
sets the defaultAmong value.RenderOptionsInput
setDefaultSynoMode(String defaultSynoMode)
sets defaultSynoMode param.RenderOptionsInput
setForceRandomSeed(int forceRandomSeed)
sets forceRandomSeed param, which is the random seed.RenderOptionsInput
setLanguage(String language)
sets the language, for instance 'en_US' or 'fr_FR'.RenderOptionsInput
setRenderDebug(boolean renderDebug)
sets renderDebug value.org.json.JSONObject
toJsonObj()
Serializes the object to a JSON object.String
toJsonString()
Serializes the object to a JSON String.
-
-
-
Field Detail
-
language
protected String language
input language
-
forceRandomSeed
protected int forceRandomSeed
force random seed
-
defaultSynoMode
protected String defaultSynoMode
default synonym mode
-
defaultAmong
protected int defaultAmong
default among
-
renderDebug
protected boolean renderDebug
render debug
-
KEY_LANGUAGE
protected static final String KEY_LANGUAGE
JSON key for language- See Also:
- Constant Field Values
-
KEY_FORCERANDOMSEED
protected static final String KEY_FORCERANDOMSEED
JSON key for force random seed- See Also:
- Constant Field Values
-
KEY_DEFAULTSYNOMODE
protected static final String KEY_DEFAULTSYNOMODE
JSON key for default synonym mode- See Also:
- Constant Field Values
-
KEY_DEFAULTAMONG
protected static final String KEY_DEFAULTAMONG
JSON key for default among- See Also:
- Constant Field Values
-
KEY_RENDERDEBUG
protected static final String KEY_RENDERDEBUG
JSON key for render debug- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RenderOptionsInput
public RenderOptionsInput()
Create an empty object.
-
RenderOptionsInput
public RenderOptionsInput(org.json.JSONObject jsonOptions)
Create from a JSON object by picking relevant parameters.- Parameters:
jsonOptions
- json options which can contain runtime parameters
-
-
Method Detail
-
toJsonString
public String toJsonString()
Serializes the object to a JSON String.- Returns:
- String the object as a JSON String
-
toJsonObj
public org.json.JSONObject toJsonObj()
Serializes the object to a JSON object.- Returns:
- JSONObject the object as a JSON String
-
setLanguage
public RenderOptionsInput setLanguage(String language)
sets the language, for instance 'en_US' or 'fr_FR'.- Parameters:
language
- the language- Returns:
- this to set further options
-
setForceRandomSeed
public RenderOptionsInput setForceRandomSeed(int forceRandomSeed)
sets forceRandomSeed param, which is the random seed.- Parameters:
forceRandomSeed
- the random seed- Returns:
- this to set further options
-
setDefaultSynoMode
public RenderOptionsInput setDefaultSynoMode(String defaultSynoMode)
sets defaultSynoMode param.- Parameters:
defaultSynoMode
- the default synonym mode- Returns:
- this to set further options
-
setDefaultAmong
public RenderOptionsInput setDefaultAmong(int defaultAmong)
sets the defaultAmong value.- Parameters:
defaultAmong
- the default among value- Returns:
- this to set further options
-
setRenderDebug
public RenderOptionsInput setRenderDebug(boolean renderDebug)
sets renderDebug value.- Parameters:
renderDebug
- the renderDebug value- Returns:
- this to set further options
-
getLanguage
public String getLanguage()
gets the language.- Returns:
- the language
-
getForceRandomSeed
public int getForceRandomSeed()
gets the forced random seed.- Returns:
- this to set further options
-
getDefaultSynoMode
public String getDefaultSynoMode()
gets the default synonym mode.- Returns:
- defaultSynoMode
-
getDefaultAmong
public int getDefaultAmong()
gets the defaultAmong value.- Returns:
- defaultAmong
-
getRenderDebug
public boolean getRenderDebug()
gets the renderDebug value.- Returns:
- renderDebug
-
-