Changeset 459
- Timestamp:
- May 25, 2010, 12:05:59 PM (13 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/dbnp/studycapturing/TermEditorController.groovy
r456 r459 66 66 println params 67 67 def ontology = Ontology.findByNcboVersionedId( params.get('term-ontology_id') as int ) 68 def strTerm = params.get('term') 68 69 69 70 // do we have an ontology? … … 71 72 // TODO: if ontology is missing, create it 72 73 // pending possible addition to OntoCAT BioportalOntologyService API of search by versioned Ontology Id 74 println "Ontology is empty" 73 75 } 74 76 75 77 // instantiate term with parameters 76 78 def term = new Term( 77 name: params.get('term'),79 name: strTerm, 78 80 ontology: ontology, 79 81 accession: params.get('term-concept_id') … … 92 94 println it 93 95 } 94 flash.errors = term.errors95 96 error() 96 97 flash.message = "Term addition failed" -
trunk/grails-app/domain/dbnp/data/Term.groovy
r398 r459 24 24 accession(unique: 'ontology') // Accession should be unique within an ontology 25 25 name(unique: 'ontology') // Preferred name should be unique within an ontology 26 name(size: 1..255) // Name should be a non-empty string 26 27 } 27 28
Note: See TracChangeset
for help on using the changeset viewer.