Class SchemaGeneratorForCSV
java.lang.Object
org.eclipse.lemminx.customservice.synapse.schemagen.util.AbstractSchemaGenerator
org.eclipse.lemminx.customservice.synapse.schemagen.util.SchemaGeneratorForCSV
- All Implemented Interfaces:
ISchemaGenerator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetSchemaContent(String fileText, FileType type, String delimiter) getSchemaResourcePath(String filePath, FileType type, String delimiter) readObjectsFromCsv(String content, String delimiter) Read objects from CSVwriteAsJson(List<Map<String, String>> data) get the json string
-
Constructor Details
-
SchemaGeneratorForCSV
public SchemaGeneratorForCSV()
-
-
Method Details
-
getSchemaResourcePath
public String getSchemaResourcePath(String filePath, FileType type, String delimiter) throws IOException - Specified by:
getSchemaResourcePathin interfaceISchemaGenerator- Overrides:
getSchemaResourcePathin classAbstractSchemaGenerator- Throws:
IOException
-
getSchemaContent
- Specified by:
getSchemaContentin interfaceISchemaGenerator- Overrides:
getSchemaContentin classAbstractSchemaGenerator- Throws:
IOException
-
readObjectsFromCsv
public List<Map<String,String>> readObjectsFromCsv(String content, String delimiter) throws IOException Read objects from CSV- Parameters:
content-- Returns:
- Throws:
IOException
-
writeAsJson
get the json string- Parameters:
data-- Returns:
- Throws:
IOException
-