Changeset 1058 for trunk/grails-app/services/dbnp/importer
- Timestamp:
- Nov 3, 2010, 2:03:20 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/services/dbnp/importer/ImporterService.groovy
r1050 r1058 31 31 32 32 class ImporterService { 33 def AuthenticationService 33 34 34 35 boolean transactional = true … … 236 237 * 237 238 * @param datamatrix two dimensional array containing entities and possibly also failed cells 238 * @return array of failed cells 239 * @return array of failed cells in [rownum:n, value:xxx] format 239 240 * */ 240 241 def getFailedCells(datamatrix) { … … 244 245 record.each { column -> 245 246 column.each { 246 if (it.getClass().getName().equals('java.util.LinkedHashMap$Entry')) { 247 println it.key 248 println it.value 247 if (it.getClass().getName().equals('java.util.LinkedHashMap$Entry')) { 249 248 failedcells.add(it) 250 249 } … … 274 273 switch (entity.getClass()) { 275 274 case Study : print "Persisting Study `" + entity + "`: " 275 entity.owner = AuthenticationService.getLoggedInUser() 276 276 if (persistEntity(entity)) validatedSuccesfully++ 277 277 break … … 447 447 } catch (IllegalArgumentException iae) { 448 448 // leave the field empty and let the user choose the ontology manually in a later step 449 failed.put(mc, value)450 println "failed ("+mc.templatefieldtype+"`" + value + "`"449 failed.put(mc, [rownum:excelrow.getRowNum(), value:value]) 450 //println "failed ("+mc.templatefieldtype+"`" + value + "`" 451 451 } 452 452 } // end
Note: See TracChangeset
for help on using the changeset viewer.