Package org.cdlib.mrt.tools
Class YamlParser
java.lang.Object
org.cdlib.mrt.tools.YamlParser
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.json.JSONObject
createJson
(Object map) org.json.JSONArray
createJsonArray
(Object map) dumpJson()
dumpJsonForKey
(String key) dumpJsonObject
(Object map) org.json.JSONObject
getJson()
org.json.JSONArray
getJsonArrayForKey
(String key) org.json.JSONObject
getJsonForKey
(String key) boolean
void
resolveValues
(LinkedHashMap<String, Object> lmap) void
setPrettyJson
(boolean pretty)
-
Constructor Details
-
YamlParser
-
YamlParser
-
YamlParser
public YamlParser()
-
-
Method Details
-
setPrettyJson
public void setPrettyJson(boolean pretty) -
getPrettyJson
public boolean getPrettyJson() -
parse
public LinkedHashMap<String,Object> parse(String fs) throws FileNotFoundException, RuntimeConfigException -
parseString
- Throws:
RuntimeConfigException
-
parse
- Throws:
RuntimeConfigException
-
loadConfigMap
-
dumpJson
-
dumpJsonForKey
-
getJson
public org.json.JSONObject getJson() throws org.json.JSONException- Throws:
org.json.JSONException
-
getJsonForKey
- Throws:
org.json.JSONException
-
getJsonArrayForKey
- Throws:
org.json.JSONException
-
dumpJsonObject
-
createJson
- Throws:
org.json.JSONException
-
createJsonArray
- Throws:
org.json.JSONException
-
getParsedValues
-
getResolvedValues
-
resolveValues
- Throws:
RuntimeConfigException
-
resolveValues
public LinkedHashMap<String,Object> resolveValues(LinkedHashMap<String, Object> lmap) throws RuntimeConfigException- Throws:
RuntimeConfigException
-