org.molgenis.omx.core.db
Class MolgenisFileEntityImporter
java.lang.Object
org.molgenis.omx.core.db.MolgenisFileEntityImporter
- All Implemented Interfaces:
- EntityImporter
public class MolgenisFileEntityImporter
- extends Object
- implements EntityImporter
Reads MolgenisFile from a delimited (csv) file, resolving xrefs to ids where needed, that is the tricky bit ;-)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MolgenisFileEntityImporter
public MolgenisFileEntityImporter()
importEntity
public int importEntity(TupleReader reader,
Database db,
Database.DatabaseAction dbAction)
throws IOException,
DatabaseException
- Imports MolgenisFile from tab/comma delimited File
- Specified by:
importEntity in interface EntityImporter
- Parameters:
db - database to import intoreader - csv reader to load data fromdefaults - to set default values for each rowdbAction - indicating wether to add,update,remove etcmissingValues - indicating what value in the csv is treated as 'null' (e.g. "" or "NA")
- Returns:
- number of elements imported
- Throws:
IOException
DatabaseException
Copyright © 2013. All Rights Reserved.