Class RecordDefinitionTranslator


  • public class RecordDefinitionTranslator
    extends Object
    • Constructor Detail

      • RecordDefinitionTranslator

        public RecordDefinitionTranslator()
    • 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