Changeset 1103 for trunk/grails-app/services/dbnp
- Timestamp:
- Nov 9, 2010, 10:14:23 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/services/dbnp/importer/ImporterService.groovy
r1093 r1103 258 258 def saveCorrectedCells(datamatrix, failedcells, correctedcells) { 259 259 // Loop through all failed cells 260 260 261 failedcells.each { mcrecord -> 261 262 mcrecord.each { mappingcolumn -> … … 265 266 // Find the record in the table which the mappingcolumn belongs to 266 267 def tablerecord = datamatrix.find { it.hashCode() == mcrecord.key } 267 268 268 269 // Loop through all entities in the record 269 270 tablerecord.each { rec -> 270 rec.each { entity -> 271 rec.each { entity -> 271 272 try { 272 273 // Update the entity field … … 280 281 } // end of table record 281 282 } // end of mapping record 282 } // end of failed cells loop 283 } // end of failed cells loop 283 284 } 284 285 … … 425 426 def df = new DataFormatter() 426 427 def template = Template.get(template_id) 428 def tft = TemplateFieldType 427 429 def record = [] // list of entities and the read values 428 430 def failed = [] // list of failed columns [mappingcolumn] with the value which couldn't be mapped into the entity … … 449 451 } 450 452 453 454 //println "temateplfedielfdtype=" + mc.templatefieldtype 455 // Are we trying to map an ontology term which is empty? Then it is a failed cell 456 /*if (value=="") { 457 println "empty term" 458 def temp = new MappingColumn() 459 //temp.properties = mc.properties 460 temp.value = "undefined" 461 failed.add(temp) 462 }*/ 463 464 451 465 try { 466 /*if ((mc.templatefieldtype == TemplateFieldType.ONTOLOGYTERM) && (value == "")) 467 { 468 def temp = new MappingColumn() 469 temp.properties = mc.properties 470 temp.value="unknown" 471 failed.add(temp) 472 }*/ 452 473 453 474 // which entity does the current cell (field) belong to? … … 476 497 def temp = new MappingColumn() 477 498 temp.properties = mc.properties 478 temp.value = value 499 temp.value = value 479 500 failed.add(temp) 480 501 }
Note: See TracChangeset
for help on using the changeset viewer.