Package com.logicaldoc.ai.sampler
Class CSVSampler
java.lang.Object
com.logicaldoc.core.PersistentObject
com.logicaldoc.ai.sampler.Sampler
com.logicaldoc.ai.sampler.StreamSampler
com.logicaldoc.ai.sampler.CSVSampler
- All Implemented Interfaces:
- Closeable,- Serializable,- AutoCloseable
A 
Expected format of each resource is this one:
StreamSampler that reads the contents of a CSV file extracting all
 the rows as string arrays. Expected format of each resource is this one:
5.1,3.5,1.4,.2,"Setosa" 7,3.2,4.7,1.4,"Versicolor" 6.2,3.4,5.4,2.3,"Virginica"This example will produce three rows of 5 elements each:
5.1, 3.5, 1.4, .2, Setosa 7, 3.2, 4.7, 1.4, Versicolor 6.2, 3.4, 5.4, 2.3, Virginica
- Since:
- 9.2
- Author:
- Marco Meschieri - LogicalDOC
- See Also:
- 
Field SummaryFields inherited from class com.logicaldoc.core.PersistentObjectDELETED_CODE_DEFAULT, DELETED_CODE_STRONG, id
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptioncollect()Collects a list of samplesbooleanintgetQuote()inthashCode()voidsetCategoryIndex(int categoryIndex) voidsetDelimiter(String delimiter) voidMethods inherited from class com.logicaldoc.ai.sampler.StreamSamplerclose, getStream, setStreamMethods inherited from class com.logicaldoc.ai.sampler.SamplergetDescription, getDocId, getFolderId, getLabel, getName, newSampler, setDescription, setDocId, setFolderId, setLabel, setName, toString, typesMethods inherited from class com.logicaldoc.core.PersistentObjectgetCreation, getDeleted, getId, getLastModified, getRecordVersion, getTenantId, setCreation, setDeleted, setId, setLastModified, setRecordVersion, setTenantId
- 
Constructor Details- 
CSVSamplerpublic CSVSampler()
- 
CSVSampler
- 
CSVSampler
 
- 
- 
Method Details- 
getDelimiter
- 
setDelimiter
- 
getQuote
- 
setQuote
- 
getCategoryIndexpublic int getCategoryIndex()
- 
setCategoryIndexpublic void setCategoryIndex(int categoryIndex) 
- 
collectDescription copied from class:SamplerCollects a list of samples- Specified by:
- collectin class- Sampler
- Returns:
- The iterator over the samples
- Throws:
- IOException- I/O Error
 
- 
hashCodepublic int hashCode()
- 
equals
 
-