Package com.inductiveautomation.rm.base
Class RMCSVReader
java.lang.Object
com.inductiveautomation.rm.base.RMCSVReader
A class for reading file of comma separated values, or really any separated values.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the entity generated from last readRecords.Returns the field delimiter.intReturns the number of field delimiters found in last readFormat.booleanReturns whether first row has field names.booleanReturns whether fields are quoted.Returns the record delimiter.intReturns the number of record delimeters found in last readFormat.getSourceName(Object aSource) Returns the source name.getSourceString(Object aSource) Creates the source string.voidreadFormat(String aString) Analyzes the given string and sets reader format attributes.readObject(Object aSource) Reads given source and returns list of maps.readObject(Object aSource, Entity anEntity) Reads given source and returns list of maps.readObject(Object aSource, String aName, boolean doReadFormat) Reads records from given string (and creates entity).voidsetFieldDelimiter(String aDelimiter) Sets the field delimiter.voidsetHasHeaderRow(boolean aFlag) Sets whether first row has field names.voidsetHasQuotedFields(boolean aFlag) Sets whether records are quoted.voidsetRecordDelimiter(String aDelimiter) Sets the record delimiter.
-
Constructor Details
-
RMCSVReader
public RMCSVReader()
-
-
Method Details
-
getFieldDelimiter
Returns the field delimiter. -
setFieldDelimiter
Sets the field delimiter. -
getRecordDelimiter
Returns the record delimiter. -
setRecordDelimiter
Sets the record delimiter. -
getHasHeaderRow
public boolean getHasHeaderRow()Returns whether first row has field names. -
setHasHeaderRow
public void setHasHeaderRow(boolean aFlag) Sets whether first row has field names. -
getHasQuotedFields
public boolean getHasQuotedFields()Returns whether fields are quoted. -
setHasQuotedFields
public void setHasQuotedFields(boolean aFlag) Sets whether records are quoted. -
readObject
Reads given source and returns list of maps. -
readObject
Reads given source and returns list of maps. -
readObject
Reads records from given string (and creates entity). -
readFormat
Analyzes the given string and sets reader format attributes. -
getFieldDelimiterCount
public int getFieldDelimiterCount()Returns the number of field delimiters found in last readFormat. -
getEntity
Returns the entity generated from last readRecords. -
getRecordDelimiterCount
public int getRecordDelimiterCount()Returns the number of record delimeters found in last readFormat. -
getSourceName
Returns the source name. -
getSourceString
Creates the source string.
-