Package org.hpccsystems.commons.ecl
Class RecordDefinitionTranslator
- java.lang.Object
-
- org.hpccsystems.commons.ecl.RecordDefinitionTranslator
-
public class RecordDefinitionTranslator extends Object
-
-
Constructor Summary
Constructors Constructor Description RecordDefinitionTranslator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FieldDefparseJsonRecordDefinition(org.json.JSONObject recordDefinition)Parses the json record definition.static StringtoECLRecord(FieldDef field)toECL Converts the provided FieldDef into an ECL record definition.static org.json.JSONObjecttoJsonRecord(FieldDef field)toJson Converts the provided FieldDef into a json record definition.
-
-
-
Method Detail
-
toECLRecord
public static String toECLRecord(FieldDef field) throws Exception
toECL Converts the provided FieldDef into an ECL record definition.- Parameters:
field- the FieldDef to convert- Returns:
- ECL Record defintion as a String
- Throws:
Exception- the exception
-
toJsonRecord
public static org.json.JSONObject toJsonRecord(FieldDef field) throws Exception
toJson Converts the provided FieldDef into a json record definition.- Parameters:
field- the FieldDef to convert- Returns:
- Record as a JSONObject
- Throws:
Exception- the exception
-
parseJsonRecordDefinition
public static FieldDef parseJsonRecordDefinition(org.json.JSONObject recordDefinition) throws UnparsableContentException
Parses the json record definition.- Parameters:
recordDefinition- the record definition- Returns:
- the field def
- Throws:
UnparsableContentException- the unparsable content exception
-
-