Ignore:
Timestamp:
Apr 19, 2010, 3:45:35 PM (9 years ago)
Author:
keesvb
Message:

added ontology/term properties, getting code to work from clean build: removed Protocol and EventDescription? controllers, cleaned up Protocol code from ImporterService?, commented out EventDescription? code in WizardController?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/services/dbnp/importer/ImporterService.groovy

    r334 r350  
    1919import org.apache.poi.poifs.filesystem.POIFSFileSystem
    2020import org.apache.poi.ss.usermodel.DataFormatter
    21 import org.apache.poi.hssf.usermodel.HSSFDateUtil
     21
    2222import dbnp.studycapturing.TemplateFieldType
    2323import dbnp.studycapturing.Template
     
    2525import dbnp.studycapturing.Subject
    2626import dbnp.studycapturing.Event
    27 import dbnp.studycapturing.Protocol
     27
    2828import dbnp.studycapturing.Sample
    2929
    30 import dbnp.data.Ontology
    3130import dbnp.data.Term
    3231
     
    223222                                    persistEntity(entity)
    224223                                    break
    225                     case Protocol:  print "Persisting Protocol `" + entity.name + "`: "
    226                                     persistEntity(entity)
    227                                     break
    228224                    case Sample  :  print "Persisting Sample `" + entity.name +"`: "
    229225                                    persistEntity(entity)
     
    264260        def subject = new Subject(name:"New subject", species:Term.findByName("Homo sapiens"), template:template)
    265261        def event = new Event(eventdescription:"New event", template:template)
    266         def protocol = new Protocol(name:"New protocol", template:template)
    267262        def sample = new Sample(name:"New sample", template:template)
    268263
     
    283278                                    if (mc.identifier) { event.eventdescription = value; break }
    284279                                    event.setFieldValue(mc.property.name, value)
    285                                     break
    286                 case Protocol   :   (record.any {it.getClass()==mc.entity}) ? 0 : record.add(protocol)
    287                                     if (mc.identifier) { protocol.name = value; break }
    288                                     protocol.setFieldValue(mc.property.name, value)
    289280                                    break
    290281                case Sample     :   (record.any {it.getClass()==mc.entity}) ? record.add(sample) : 0
Note: See TracChangeset for help on using the changeset viewer.