Package org.molgenis.data.csv
Class CsvRepository
- java.lang.Object
-
- org.molgenis.data.support.AbstractRepository
-
- org.molgenis.data.csv.CsvRepository
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterable<Entity>,Repository<Entity>
public class CsvRepository extends AbstractRepository
Repository implementation for csv files.The filename without the extension is considered to be the entityname
-
-
Constructor Summary
Constructors Constructor Description CsvRepository(File file, EntityTypeFactory entityTypeFactory, AttributeFactory attrMetaFactory, String sheetName, List<CellProcessor> cellProcessors)CsvRepository(File file, EntityTypeFactory entityTypeFactory, AttributeFactory attrMetaFactory, List<CellProcessor> cellProcessors)CsvRepository(File file, EntityTypeFactory entityTypeFactory, AttributeFactory attrMetaFactory, List<CellProcessor> cellProcessors, Character separator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCellProcessor(CellProcessor cellProcessor)longcount()Set<RepositoryCapability>getCapabilities()EntityTypegetEntityType()@NotNull Iterator<Entity>iterator()-
Methods inherited from class org.molgenis.data.support.AbstractRepository
add, add, aggregate, close, count, delete, delete, deleteAll, deleteAll, deleteById, findAll, findAll, findAll, findOne, findOneById, findOneById, forEachBatched, getName, getQueryOperators, query, update, update
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface org.molgenis.data.Repository
forEachBatched, getExistingIDs, upsertBatch
-
-
-
-
Constructor Detail
-
CsvRepository
public CsvRepository(File file, EntityTypeFactory entityTypeFactory, AttributeFactory attrMetaFactory, @Nullable @CheckForNull List<CellProcessor> cellProcessors, Character separator)
-
CsvRepository
public CsvRepository(File file, EntityTypeFactory entityTypeFactory, AttributeFactory attrMetaFactory, @Nullable @CheckForNull List<CellProcessor> cellProcessors)
-
CsvRepository
public CsvRepository(File file, EntityTypeFactory entityTypeFactory, AttributeFactory attrMetaFactory, String sheetName, @Nullable @CheckForNull List<CellProcessor> cellProcessors)
-
-
Method Detail
-
getEntityType
public EntityType getEntityType()
-
addCellProcessor
public void addCellProcessor(CellProcessor cellProcessor)
-
getCapabilities
public Set<RepositoryCapability> getCapabilities()
-
count
public long count()
- Specified by:
countin interfaceRepository<Entity>- Overrides:
countin classAbstractRepository
-
-