Changeset 3486
- Timestamp:
- 09/08/10 15:17:33 (17 months ago)
- Location:
- biobank_search
- Files:
-
- 58 added
- 1 deleted
- 49 edited
-
.classpath (modified) (1 diff)
-
.project (modified) (1 diff)
-
.settings/org.eclipse.wst.ws.service.policy.prefs (added)
-
WebContent/WEB-INF/molgenis-rdf-mapping.n3 (modified) (1 diff)
-
WebContent/generated-doc/entitymodel.html (modified) (2 diffs)
-
WebContent/generated-doc/fileformat.html (modified) (3 diffs)
-
WebContent/generated-doc/objectmodel-uml-diagram-summary.dot (modified) (3 diffs)
-
WebContent/generated-doc/objectmodel-uml-diagram.dot (modified) (3 diffs)
-
WebContent/generated-doc/objectmodel.html (modified) (3 diffs)
-
WebContent/generated-doc/tabledoc.html (modified) (2 diffs)
-
WebContent/generated-doc/textUML.txt (modified) (1 diff)
-
generated/java/app/CsvExport.java (modified) (5 diffs)
-
generated/java/app/CsvImport.java (modified) (6 diffs)
-
generated/java/app/CsvImportById.java (modified) (6 diffs)
-
generated/java/app/ExcelExport.java (modified) (2 diffs)
-
generated/java/app/ExcelImport.java (modified) (6 diffs)
-
generated/java/app/ImportWizardExcelPrognosis.java (modified) (4 diffs)
-
generated/java/app/InMemoryDatabase.java (modified) (1 diff)
-
generated/java/app/JDBCDatabase.java (modified) (2 diffs)
-
generated/java/app/JDBCMetaDatabase.java (modified) (2 diffs)
-
generated/java/app/servlet/MolgenisServlet.java (modified) (1 diff)
-
generated/java/app/servlet/RestApi.java (modified) (2 diffs)
-
generated/java/app/servlet/SoapApi.java (modified) (4 diffs)
-
generated/java/app/servlet/source.R (modified) (2 diffs)
-
generated/java/app/ui/DBIndexPlugin.java (modified) (1 diff)
-
generated/java/app/ui/DataForm.java (modified) (1 diff)
-
generated/java/app/ui/ExcelUploadPluginPlugin.java (added)
-
generated/java/app/ui/GenericWizardPlugin.java (modified) (1 diff)
-
generated/java/app/ui/MainMenu.java (modified) (1 diff)
-
generated/java/app/ui/Molgenis_headerPlugin.java (modified) (1 diff)
-
generated/java/app/ui/OntoCatIndexPlugin2Plugin.java (modified) (1 diff)
-
generated/java/biobank_search/Data.java (modified) (2 diffs)
-
generated/java/biobank_search/Gene.java (added)
-
generated/java/biobank_search/OntologySource.java (added)
-
generated/java/biobank_search/OntologyTerm.java (added)
-
generated/java/biobank_search/Patient.java (added)
-
generated/java/biobank_search/Patient_GenesTested.java (added)
-
generated/java/biobank_search/Patient_Ontology.java (added)
-
generated/java/biobank_search/R/Data.R (modified) (1 diff)
-
generated/java/biobank_search/R/Gene.R (added)
-
generated/java/biobank_search/R/OntologySource.R (added)
-
generated/java/biobank_search/R/OntologyTerm.R (added)
-
generated/java/biobank_search/R/Patient.R (added)
-
generated/java/biobank_search/R/Patient_GenesTested.R (added)
-
generated/java/biobank_search/R/Patient_Ontology.R (added)
-
generated/java/biobank_search/R/User.R (added)
-
generated/java/biobank_search/User.java (added)
-
generated/java/biobank_search/csv/DataCsvReader.java (modified) (1 diff)
-
generated/java/biobank_search/csv/GeneCsvReader.java (added)
-
generated/java/biobank_search/csv/OntologySourceCsvReader.java (added)
-
generated/java/biobank_search/csv/OntologyTermCsvReader.java (added)
-
generated/java/biobank_search/csv/PatientCsvReader.java (added)
-
generated/java/biobank_search/csv/Patient_GenesTestedCsvReader.java (added)
-
generated/java/biobank_search/csv/Patient_OntologyCsvReader.java (added)
-
generated/java/biobank_search/csv/UserCsvReader.java (added)
-
generated/java/biobank_search/db/DataMapper.java (modified) (1 diff)
-
generated/java/biobank_search/db/GeneMapper.java (added)
-
generated/java/biobank_search/db/OntologySourceMapper.java (added)
-
generated/java/biobank_search/db/OntologyTermMapper.java (added)
-
generated/java/biobank_search/db/PatientMapper.java (added)
-
generated/java/biobank_search/db/Patient_GenesTestedMapper.java (added)
-
generated/java/biobank_search/db/Patient_OntologyMapper.java (added)
-
generated/java/biobank_search/db/UserMapper.java (added)
-
generated/java/biobank_search/excel/DataExcelReader.java (modified) (1 diff)
-
generated/java/biobank_search/excel/GeneExcelReader.java (added)
-
generated/java/biobank_search/excel/OntologySourceExcelReader.java (added)
-
generated/java/biobank_search/excel/OntologyTermExcelReader.java (added)
-
generated/java/biobank_search/excel/PatientExcelReader.java (added)
-
generated/java/biobank_search/excel/Patient_GenesTestedExcelReader.java (added)
-
generated/java/biobank_search/excel/Patient_OntologyExcelReader.java (added)
-
generated/java/biobank_search/excel/UserExcelReader.java (added)
-
generated/java/org (deleted)
-
generated/java/test/TestCsv.java (modified) (4 diffs)
-
generated/java/test/TestDataSet.java (modified) (5 diffs)
-
generated/java/test/TestDatabase.java (modified) (3 diffs)
-
generated/python/biobank_search/Data.py (modified) (1 diff)
-
generated/python/biobank_search/Gene.py (added)
-
generated/python/biobank_search/OntologySource.py (added)
-
generated/python/biobank_search/OntologyTerm.py (added)
-
generated/python/biobank_search/Patient.py (added)
-
generated/python/biobank_search/Patient_GenesTested.py (added)
-
generated/python/biobank_search/Patient_Ontology.py (added)
-
generated/python/biobank_search/User.py (added)
-
generated/sql/alter_tables.sql (modified) (2 diffs)
-
generated/sql/count_per_entity.sql (modified) (1 diff)
-
generated/sql/count_per_table.sql (modified) (1 diff)
-
generated/sql/create_tables.sql (modified) (2 diffs)
-
generated/sql/insert_metadata.sql (modified) (1 diff)
-
handwritten/documents/project_description.doc (modified) (previous)
-
handwritten/documents/proposal.doc (modified) (previous)
-
handwritten/java/GeneratorServlet.java (modified) (1 diff)
-
handwritten/java/plugins/DBIndexPlugin.java (modified) (1 diff)
-
handwritten/java/plugins/hvp_pilot2 (added)
-
handwritten/java/plugins/hvp_pilot2/DBIndexPlugin.ftl (added)
-
handwritten/java/plugins/hvp_pilot2/DBIndexPlugin.java (added)
-
handwritten/java/plugins/hvp_pilot2/LuceneIndexGen.java (added)
-
handwritten/java/plugins/hvp_pilot2/LuceneSearchPlugin.ftl (added)
-
handwritten/java/plugins/hvp_pilot2/LuceneSearchPlugin.java (added)
-
handwritten/java/plugins/hvp_pilot2/OntoCatIndexPlugin.ftl (added)
-
handwritten/java/plugins/hvp_pilot2/OntoCatIndexPlugin.java (added)
-
handwritten/java/plugins/hvp_pilot2/SearchPlugin.ftl (added)
-
handwritten/java/plugins/hvp_pilot2/SearchPlugin.java (added)
-
handwritten/java/plugins/hvp_pilot2/SolrJIndexing.ftl (added)
-
handwritten/java/plugins/hvp_pilot2/SolrJIndexing.java (added)
-
handwritten/java/plugins/hvp_pilot2/createIndex.java (added)
-
handwritten/java/plugins/hvp_pilot2/test_csv.java (added)
-
molgenis_db.xml (modified) (1 diff)
-
molgenis_ui.xml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
biobank_search/.classpath
r3425 r3486 4 4 <classpathentry kind="src" path="generated/sql"/> 5 5 <classpathentry kind="src" path="generated/java"/> 6 <classpathentry exported="true" kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/> 7 <classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> 8 <classpathentry exported="true" kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v6.0"/> 6 9 <classpathentry exported="true" kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/> 7 <classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> 8 <classpathentry exported="true" kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/> 9 <classpathentry exported="true" kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v6.0"/> 10 <classpathentry combineaccessrules="false" exported="true" kind="src" path="/molgenis"/> 10 <classpathentry combineaccessrules="false" exported="true" kind="src" path="/molgenis_3_3"/> 11 11 <classpathentry kind="output" path="build/classes"/> 12 12 </classpath> -
biobank_search/.project
r3198 r3486 4 4 <comment></comment> 5 5 <projects> 6 <project>molgenis_util</project> 7 <project>molgenis_language</project> 6 <project>FreeMarker</project> 7 <project>molgenis</project> 8 <project>molgenis_3_3</project> 8 9 <project>molgenis_assets</project> 9 10 <project>molgenis_generate</project> 10 <project>molgenis3_2</project> 11 <project>molgenis_3_3</project> 12 <project>molgenis</project> 13 <project>FreeMarker</project> 11 <project>molgenis_language</project> 12 <project>molgenis_util</project> 14 13 <project>ontoCAT</project> 15 14 </projects> -
biobank_search/WebContent/WEB-INF/molgenis-rdf-mapping.n3
r3425 r3486 28 28 jdbc:zeroDateTimeBehavior "convertToNull"; 29 29 . 30 # Entity User 31 map:User a d2rq:ClassMap; 32 d2rq:dataStorage map:database; 33 d2rq:uriPattern "User/@@User.user_id@@"; 34 d2rq:class vocab:User; 35 d2rq:classDefinitionLabel ""; 36 d2rq:classDefinitionComment ""; 37 . 38 # todo: use the xref labels if they are complete 39 # label for User using primary key 40 map:User__label a d2rq:PropertyBridge; 41 d2rq:belongsToClassMap map:User; 42 d2rq:property rdfs:label; 43 d2rq:pattern "User #@@User.user_id@@"; 44 . 45 map:User_user_id a d2rq:PropertyBridge; 46 d2rq:belongsToClassMap map:User; 47 d2rq:property vocab:User_user_id; 48 d2rq:propertyDefinitionLabel "user_id"; 49 d2rq:propertyDefinitionComment "user_id"; 50 d2rq:column "User.user_id"; 51 d2rq:datatype xsd:int; 52 . 53 map:User_loginname a d2rq:PropertyBridge; 54 d2rq:belongsToClassMap map:User; 55 d2rq:property vocab:User_loginname; 56 d2rq:propertyDefinitionLabel "loginname"; 57 d2rq:propertyDefinitionComment "loginname"; 58 d2rq:column "User.loginname"; 59 d2rq:datatype xsd:string; 60 . 61 map:User_firstname a d2rq:PropertyBridge; 62 d2rq:belongsToClassMap map:User; 63 d2rq:property vocab:User_Firstname; 64 d2rq:propertyDefinitionLabel "Firstname"; 65 d2rq:propertyDefinitionComment "Firstname"; 66 d2rq:column "User.Firstname"; 67 d2rq:datatype xsd:string; 68 . 69 map:User_midinitials a d2rq:PropertyBridge; 70 d2rq:belongsToClassMap map:User; 71 d2rq:property vocab:User_Midinitials; 72 d2rq:propertyDefinitionLabel "Mid initials"; 73 d2rq:propertyDefinitionComment "Mid initials"; 74 d2rq:column "User.Midinitials"; 75 d2rq:datatype xsd:string; 76 . 77 map:User_lastname a d2rq:PropertyBridge; 78 d2rq:belongsToClassMap map:User; 79 d2rq:property vocab:User_Lastname; 80 d2rq:propertyDefinitionLabel "Lastname"; 81 d2rq:propertyDefinitionComment "Lastname"; 82 d2rq:column "User.Lastname"; 83 d2rq:datatype xsd:string; 84 . 85 map:User_title a d2rq:PropertyBridge; 86 d2rq:belongsToClassMap map:User; 87 d2rq:property vocab:User_Title; 88 d2rq:propertyDefinitionLabel "Title"; 89 d2rq:propertyDefinitionComment "Title"; 90 d2rq:column "User.Title"; 91 d2rq:datatype xsd:string; 92 . 93 map:User_profession a d2rq:PropertyBridge; 94 d2rq:belongsToClassMap map:User; 95 d2rq:property vocab:User_Profession; 96 d2rq:propertyDefinitionLabel "Profession"; 97 d2rq:propertyDefinitionComment "Profession"; 98 d2rq:column "User.Profession"; 99 d2rq:datatype xsd:string; 100 . 101 map:User_instituteHospital a d2rq:PropertyBridge; 102 d2rq:belongsToClassMap map:User; 103 d2rq:property vocab:User_InstituteHospital; 104 d2rq:propertyDefinitionLabel "Institute/Hospital"; 105 d2rq:propertyDefinitionComment "Institute/Hospital"; 106 d2rq:column "User.InstituteHospital"; 107 d2rq:datatype xsd:string; 108 . 109 map:User_address a d2rq:PropertyBridge; 110 d2rq:belongsToClassMap map:User; 111 d2rq:property vocab:User_Address; 112 d2rq:propertyDefinitionLabel "Address"; 113 d2rq:propertyDefinitionComment "Address"; 114 d2rq:column "User.Address"; 115 d2rq:datatype xsd:string; 116 . 117 map:User_zipcode a d2rq:PropertyBridge; 118 d2rq:belongsToClassMap map:User; 119 d2rq:property vocab:User_Zipcode; 120 d2rq:propertyDefinitionLabel "Zipcode"; 121 d2rq:propertyDefinitionComment "Zipcode"; 122 d2rq:column "User.Zipcode"; 123 d2rq:datatype xsd:string; 124 . 125 map:User_city a d2rq:PropertyBridge; 126 d2rq:belongsToClassMap map:User; 127 d2rq:property vocab:User_City; 128 d2rq:propertyDefinitionLabel "City"; 129 d2rq:propertyDefinitionComment "City"; 130 d2rq:column "User.City"; 131 d2rq:datatype xsd:string; 132 . 133 map:User_country a d2rq:PropertyBridge; 134 d2rq:belongsToClassMap map:User; 135 d2rq:property vocab:User_Country; 136 d2rq:propertyDefinitionLabel "Country"; 137 d2rq:propertyDefinitionComment "Country"; 138 d2rq:column "User.Country"; 139 d2rq:datatype xsd:string; 140 . 141 map:User_phonenumber a d2rq:PropertyBridge; 142 d2rq:belongsToClassMap map:User; 143 d2rq:property vocab:User_Phonenumber; 144 d2rq:propertyDefinitionLabel "Phonenumber"; 145 d2rq:propertyDefinitionComment "Phonenumber"; 146 d2rq:column "User.Phonenumber"; 147 d2rq:datatype xsd:string; 148 . 149 map:User_faxnumber a d2rq:PropertyBridge; 150 d2rq:belongsToClassMap map:User; 151 d2rq:property vocab:User_Faxnumber; 152 d2rq:propertyDefinitionLabel "Faxnumber"; 153 d2rq:propertyDefinitionComment "Faxnumber"; 154 d2rq:column "User.Faxnumber"; 155 d2rq:datatype xsd:string; 156 . 157 map:User_email a d2rq:PropertyBridge; 158 d2rq:belongsToClassMap map:User; 159 d2rq:property vocab:User_Email; 160 d2rq:propertyDefinitionLabel "Email"; 161 d2rq:propertyDefinitionComment "Email"; 162 d2rq:column "User.Email"; 163 d2rq:datatype xsd:string; 164 . 165 # Entity Patient 166 map:Patient a d2rq:ClassMap; 167 d2rq:dataStorage map:database; 168 d2rq:uriPattern "Patient/@@Patient.PatientID@@"; 169 d2rq:class vocab:Patient; 170 d2rq:classDefinitionLabel ""; 171 d2rq:classDefinitionComment ""; 172 . 173 # todo: use the xref labels if they are complete 174 # label for Patient using primary key 175 map:Patient__label a d2rq:PropertyBridge; 176 d2rq:belongsToClassMap map:Patient; 177 d2rq:property rdfs:label; 178 d2rq:pattern "Patient #@@Patient.PatientID@@"; 179 . 180 map:Patient_user_id a d2rq:PropertyBridge; 181 d2rq:belongsToClassMap map:Patient; 182 d2rq:property vocab:Patient_user_id; 183 d2rq:propertyDefinitionLabel "user_id"; 184 d2rq:propertyDefinitionComment "user_id"; 185 d2rq:refersToClassMap map:User; 186 d2rq:join "Patient.user_id => User.user_id"; 187 . 188 map:Patient_patientID a d2rq:PropertyBridge; 189 d2rq:belongsToClassMap map:Patient; 190 d2rq:property vocab:Patient_PatientID; 191 d2rq:propertyDefinitionLabel "PatientID"; 192 d2rq:propertyDefinitionComment "PatientID"; 193 d2rq:column "Patient.PatientID"; 194 d2rq:datatype xsd:int; 195 . 196 map:Patient_ontology a d2rq:PropertyBridge; 197 d2rq:belongsToClassMap map:Patient; 198 d2rq:property vocab:Patient_Ontology; 199 d2rq:propertyDefinitionLabel "Ontology"; 200 d2rq:propertyDefinitionComment "Ontology"; 201 d2rq:refersToClassMap map:OntologyTerm; 202 d2rq:join "Patient.PatientID <= Patient_Ontology.Patient"; 203 d2rq:join "Patient_Ontology.Ontology => OntologyTerm.id"; 204 . 205 map:Patient_patientFileNumber a d2rq:PropertyBridge; 206 d2rq:belongsToClassMap map:Patient; 207 d2rq:property vocab:Patient_PatientFileNumber; 208 d2rq:propertyDefinitionLabel "PatientFileNumber"; 209 d2rq:propertyDefinitionComment "PatientFileNumber"; 210 d2rq:column "Patient.PatientFileNumber"; 211 d2rq:datatype xsd:string; 212 . 213 map:Patient_disease a d2rq:PropertyBridge; 214 d2rq:belongsToClassMap map:Patient; 215 d2rq:property vocab:Patient_Disease; 216 d2rq:propertyDefinitionLabel "Disease"; 217 d2rq:propertyDefinitionComment "Disease"; 218 d2rq:column "Patient.Disease"; 219 d2rq:datatype xsd:text; 220 . 221 map:Patient_numberOfFamilyMembersWithThisDisease a d2rq:PropertyBridge; 222 d2rq:belongsToClassMap map:Patient; 223 d2rq:property vocab:Patient_NumberOfFamilyMembersWithThisDisease; 224 d2rq:propertyDefinitionLabel "NumberOfFamilyMembersWithThisDisease"; 225 d2rq:propertyDefinitionComment "NumberOfFamilyMembersWithThisDisease"; 226 d2rq:column "Patient.NumberOfFamilyMembersWithThisDisease"; 227 d2rq:datatype xsd:string; 228 . 229 map:Patient_totalGenerations a d2rq:PropertyBridge; 230 d2rq:belongsToClassMap map:Patient; 231 d2rq:property vocab:Patient_TotalGenerations; 232 d2rq:propertyDefinitionLabel "TotalGenerations"; 233 d2rq:propertyDefinitionComment "TotalGenerations"; 234 d2rq:column "Patient.TotalGenerations"; 235 d2rq:datatype xsd:string; 236 . 237 map:Patient_possibleGeneticType a d2rq:PropertyBridge; 238 d2rq:belongsToClassMap map:Patient; 239 d2rq:property vocab:Patient_PossibleGeneticType; 240 d2rq:propertyDefinitionLabel "PossibleGeneticType"; 241 d2rq:propertyDefinitionComment "PossibleGeneticType"; 242 d2rq:column "Patient.PossibleGeneticType"; 243 d2rq:datatype xsd:string; 244 . 245 map:Patient_country a d2rq:PropertyBridge; 246 d2rq:belongsToClassMap map:Patient; 247 d2rq:property vocab:Patient_Country; 248 d2rq:propertyDefinitionLabel "Country"; 249 d2rq:propertyDefinitionComment "Country"; 250 d2rq:column "Patient.Country"; 251 d2rq:datatype xsd:string; 252 . 253 map:Patient_etnicBackground a d2rq:PropertyBridge; 254 d2rq:belongsToClassMap map:Patient; 255 d2rq:property vocab:Patient_EtnicBackground; 256 d2rq:propertyDefinitionLabel "EtnicBackground"; 257 d2rq:propertyDefinitionComment "EtnicBackground"; 258 d2rq:column "Patient.EtnicBackground"; 259 d2rq:datatype xsd:string; 260 . 261 map:Patient_familyResearch a d2rq:PropertyBridge; 262 d2rq:belongsToClassMap map:Patient; 263 d2rq:property vocab:Patient_FamilyResearch; 264 d2rq:propertyDefinitionLabel "FamilyResearch"; 265 d2rq:propertyDefinitionComment "FamilyResearch"; 266 d2rq:column "Patient.FamilyResearch"; 267 d2rq:datatype xsd:string; 268 . 269 map:Patient_hasDNA a d2rq:PropertyBridge; 270 d2rq:belongsToClassMap map:Patient; 271 d2rq:property vocab:Patient_hasDNA; 272 d2rq:propertyDefinitionLabel "hasDNA"; 273 d2rq:propertyDefinitionComment "hasDNA"; 274 d2rq:column "Patient.hasDNA"; 275 d2rq:datatype xsd:string; 276 . 277 map:Patient_hasRNA a d2rq:PropertyBridge; 278 d2rq:belongsToClassMap map:Patient; 279 d2rq:property vocab:Patient_hasRNA; 280 d2rq:propertyDefinitionLabel "hasRNA"; 281 d2rq:propertyDefinitionComment "hasRNA"; 282 d2rq:column "Patient.hasRNA"; 283 d2rq:datatype xsd:string; 284 . 285 map:Patient_dNAFromTissue a d2rq:PropertyBridge; 286 d2rq:belongsToClassMap map:Patient; 287 d2rq:property vocab:Patient_DNAFromTissue; 288 d2rq:propertyDefinitionLabel "DNAFromTissue"; 289 d2rq:propertyDefinitionComment "DNAFromTissue"; 290 d2rq:column "Patient.DNAFromTissue"; 291 d2rq:datatype xsd:string; 292 . 293 map:Patient_rNAFromTissue a d2rq:PropertyBridge; 294 d2rq:belongsToClassMap map:Patient; 295 d2rq:property vocab:Patient_RNAFromTissue; 296 d2rq:propertyDefinitionLabel "RNAFromTissue"; 297 d2rq:propertyDefinitionComment "RNAFromTissue"; 298 d2rq:column "Patient.RNAFromTissue"; 299 d2rq:datatype xsd:string; 300 . 301 map:Patient_dNAFromBlood a d2rq:PropertyBridge; 302 d2rq:belongsToClassMap map:Patient; 303 d2rq:property vocab:Patient_DNAFromBlood; 304 d2rq:propertyDefinitionLabel "DNAFromBlood"; 305 d2rq:propertyDefinitionComment "DNAFromBlood"; 306 d2rq:column "Patient.DNAFromBlood"; 307 d2rq:datatype xsd:string; 308 . 309 map:Patient_cellsAvailable a d2rq:PropertyBridge; 310 d2rq:belongsToClassMap map:Patient; 311 d2rq:property vocab:Patient_CellsAvailable; 312 d2rq:propertyDefinitionLabel "CellsAvailable"; 313 d2rq:propertyDefinitionComment "CellsAvailable"; 314 d2rq:column "Patient.CellsAvailable"; 315 d2rq:datatype xsd:string; 316 . 317 map:Patient_chromosomalResearch a d2rq:PropertyBridge; 318 d2rq:belongsToClassMap map:Patient; 319 d2rq:property vocab:Patient_ChromosomalResearch; 320 d2rq:propertyDefinitionLabel "ChromosomalResearch"; 321 d2rq:propertyDefinitionComment "ChromosomalResearch"; 322 d2rq:column "Patient.ChromosomalResearch"; 323 d2rq:datatype xsd:string; 324 . 325 map:Patient_wGA a d2rq:PropertyBridge; 326 d2rq:belongsToClassMap map:Patient; 327 d2rq:property vocab:Patient_WGA; 328 d2rq:propertyDefinitionLabel "WGA"; 329 d2rq:propertyDefinitionComment "WGA"; 330 d2rq:column "Patient.WGA"; 331 d2rq:datatype xsd:string; 332 . 333 map:Patient_literatureRef a d2rq:PropertyBridge; 334 d2rq:belongsToClassMap map:Patient; 335 d2rq:property vocab:Patient_LiteratureRef; 336 d2rq:propertyDefinitionLabel "LiteratureRef"; 337 d2rq:propertyDefinitionComment "LiteratureRef"; 338 d2rq:column "Patient.LiteratureRef"; 339 d2rq:datatype xsd:string; 340 . 341 map:Patient_pedigree a d2rq:PropertyBridge; 342 d2rq:belongsToClassMap map:Patient; 343 d2rq:property vocab:Patient_Pedigree; 344 d2rq:propertyDefinitionLabel "Pedigree"; 345 d2rq:propertyDefinitionComment "Pedigree"; 346 d2rq:column "Patient.Pedigree"; 347 d2rq:datatype xsd:url; 348 . 349 map:Patient_genesTested a d2rq:PropertyBridge; 350 d2rq:belongsToClassMap map:Patient; 351 d2rq:property vocab:Patient_GenesTested; 352 d2rq:propertyDefinitionLabel "GenesTested"; 353 d2rq:propertyDefinitionComment "GenesTested"; 354 d2rq:refersToClassMap map:Gene; 355 d2rq:join "Patient.PatientID <= Patient_GenesTested.Patient"; 356 d2rq:join "Patient_GenesTested.GenesTested => Gene.id"; 357 . 358 map:Patient_freeText a d2rq:PropertyBridge; 359 d2rq:belongsToClassMap map:Patient; 360 d2rq:property vocab:Patient_FreeText; 361 d2rq:propertyDefinitionLabel "FreeText"; 362 d2rq:propertyDefinitionComment "FreeText"; 363 d2rq:column "Patient.FreeText"; 364 d2rq:datatype xsd:text; 365 . 366 map:Patient_selectFreeText a d2rq:PropertyBridge; 367 d2rq:belongsToClassMap map:Patient; 368 d2rq:property vocab:Patient_SelectFreeText; 369 d2rq:propertyDefinitionLabel "SelectFreeText"; 370 d2rq:propertyDefinitionComment "SelectFreeText"; 371 d2rq:column "Patient.SelectFreeText"; 372 d2rq:datatype xsd:text; 373 . 374 # Entity Gene 375 map:Gene a d2rq:ClassMap; 376 d2rq:dataStorage map:database; 377 d2rq:uriPattern "Gene/@@Gene.id@@"; 378 d2rq:class vocab:Gene; 379 d2rq:classDefinitionLabel ""; 380 d2rq:classDefinitionComment ""; 381 . 382 # todo: use the xref labels if they are complete 383 # label for Gene using primary key 384 map:Gene__label a d2rq:PropertyBridge; 385 d2rq:belongsToClassMap map:Gene; 386 d2rq:property rdfs:label; 387 d2rq:pattern "Gene #@@Gene.id@@"; 388 . 389 map:Gene_id a d2rq:PropertyBridge; 390 d2rq:belongsToClassMap map:Gene; 391 d2rq:property vocab:Gene_id; 392 d2rq:propertyDefinitionLabel "id"; 393 d2rq:propertyDefinitionComment "id"; 394 d2rq:column "Gene.id"; 395 d2rq:datatype xsd:int; 396 . 397 map:Gene_geneName a d2rq:PropertyBridge; 398 d2rq:belongsToClassMap map:Gene; 399 d2rq:property vocab:Gene_GeneName; 400 d2rq:propertyDefinitionLabel "GeneName"; 401 d2rq:propertyDefinitionComment "GeneName"; 402 d2rq:column "Gene.GeneName"; 403 d2rq:datatype xsd:string; 404 . 405 map:Gene_chromosomeLocation a d2rq:PropertyBridge; 406 d2rq:belongsToClassMap map:Gene; 407 d2rq:property vocab:Gene_chromosomeLocation; 408 d2rq:propertyDefinitionLabel "chromosomeLocation"; 409 d2rq:propertyDefinitionComment "chromosomeLocation"; 410 d2rq:column "Gene.chromosomeLocation"; 411 d2rq:datatype xsd:string; 412 . 413 map:Gene_geneDescription a d2rq:PropertyBridge; 414 d2rq:belongsToClassMap map:Gene; 415 d2rq:property vocab:Gene_geneDescription; 416 d2rq:propertyDefinitionLabel "geneDescription"; 417 d2rq:propertyDefinitionComment "geneDescription"; 418 d2rq:column "Gene.geneDescription"; 419 d2rq:datatype xsd:text; 420 . 421 # Entity OntologySource 422 map:OntologySource a d2rq:ClassMap; 423 d2rq:dataStorage map:database; 424 d2rq:uriPattern "OntologySource/@@OntologySource.id@@"; 425 d2rq:class vocab:OntologySource; 426 d2rq:classDefinitionLabel ""; 427 d2rq:classDefinitionComment " The OntologySource class defines a reference to a an existing ontology or controlled vocabulary from which well-defined and stable (ontology) terms can be obtained. For instance: MO, GO, EFO, UMLS, etc. Use of existing ontologies/vocabularies is recommended to harmonize phenotypic descriptions. This class maps to FuGE::OntologySource, MAGE-TAB::TermSourceREF. "; 428 . 429 # todo: use the xref labels if they are complete 430 # label for OntologySource using primary key 431 map:OntologySource__label a d2rq:PropertyBridge; 432 d2rq:belongsToClassMap map:OntologySource; 433 d2rq:property rdfs:label; 434 d2rq:pattern "OntologySource #@@OntologySource.id@@"; 435 . 436 map:OntologySource_id a d2rq:PropertyBridge; 437 d2rq:belongsToClassMap map:OntologySource; 438 d2rq:property vocab:OntologySource_id; 439 d2rq:propertyDefinitionLabel "id"; 440 d2rq:propertyDefinitionComment "id"; 441 d2rq:column "OntologySource.id"; 442 d2rq:datatype xsd:int; 443 . 444 map:OntologySource_name a d2rq:PropertyBridge; 445 d2rq:belongsToClassMap map:OntologySource; 446 d2rq:property vocab:OntologySource_name; 447 d2rq:propertyDefinitionLabel "name"; 448 d2rq:propertyDefinitionComment "name"; 449 d2rq:column "OntologySource.name"; 450 d2rq:datatype xsd:string; 451 . 452 # Entity OntologyTerm 453 map:OntologyTerm a d2rq:ClassMap; 454 d2rq:dataStorage map:database; 455 d2rq:uriPattern "OntologyTerm/@@OntologyTerm.id@@"; 456 d2rq:class vocab:OntologyTerm; 457 d2rq:classDefinitionLabel ""; 458 d2rq:classDefinitionComment " The OntologyTerm class defines references to a single entry from an ontology or a controlled vocabulary. Other classes can reference to this OntologyTerm to harmonize naming of concepts. Each term should have a local, unique label. Good practice is to label it 'sourceid:term', e.g. 'MO:cell' If no suitable ontology term exists one can define new terms locally in which case there is no formal accession for the term. In those cases the local name should be repeated in both term and termAccession. Maps to FuGE::OntologyIndividual; in MAGE-TAB there is no separate entity to model terms. "; 459 . 460 # todo: use the xref labels if they are complete 461 # label for OntologyTerm using primary key 462 map:OntologyTerm__label a d2rq:PropertyBridge; 463 d2rq:belongsToClassMap map:OntologyTerm; 464 d2rq:property rdfs:label; 465 d2rq:pattern "OntologyTerm #@@OntologyTerm.id@@"; 466 . 467 map:OntologyTerm_id a d2rq:PropertyBridge; 468 d2rq:belongsToClassMap map:OntologyTerm; 469 d2rq:property vocab:OntologyTerm_id; 470 d2rq:propertyDefinitionLabel "id"; 471 d2rq:propertyDefinitionComment "id"; 472 d2rq:column "OntologyTerm.id"; 473 d2rq:datatype xsd:int; 474 . 475 map:OntologyTerm_term a d2rq:PropertyBridge; 476 d2rq:belongsToClassMap map:OntologyTerm; 477 d2rq:property vocab:OntologyTerm_term; 478 d2rq:propertyDefinitionLabel "term"; 479 d2rq:propertyDefinitionComment "The ontology term itself, also known as the 'local name' in some ontologies."; 480 d2rq:column "OntologyTerm.term"; 481 d2rq:datatype xsd:string; 482 . 483 map:OntologyTerm_description a d2rq:PropertyBridge; 484 d2rq:belongsToClassMap map:OntologyTerm; 485 d2rq:property vocab:OntologyTerm_description; 486 d2rq:propertyDefinitionLabel "description"; 487 d2rq:propertyDefinitionComment "Definition of the term."; 488 d2rq:column "OntologyTerm.description"; 489 d2rq:datatype xsd:text; 490 . 491 map:OntologyTerm_termAccession a d2rq:PropertyBridge; 492 d2rq:belongsToClassMap map:OntologyTerm; 493 d2rq:property vocab:OntologyTerm_termAccession; 494 d2rq:propertyDefinitionLabel "termAccession"; 495 d2rq:propertyDefinitionComment "The accession number assigned to the ontology term in the source ontology. If empty it is assumed to be a locally defined term."; 496 d2rq:column "OntologyTerm.termAccession"; 497 d2rq:datatype xsd:string; 498 . 499 map:OntologyTerm_termSource a d2rq:PropertyBridge; 500 d2rq:belongsToClassMap map:OntologyTerm; 501 d2rq:property vocab:OntologyTerm_termSource; 502 d2rq:propertyDefinitionLabel "termSource"; 503 d2rq:propertyDefinitionComment "The source ontology or controlled vocabulary list that ontology terms have been obtained from. One can define a local ontology if needed."; 504 d2rq:refersToClassMap map:OntologySource; 505 d2rq:join "OntologyTerm.termSource => OntologySource.id"; 506 . 30 507 # Entity data 31 508 map:data a d2rq:ClassMap; -
biobank_search/WebContent/generated-doc/entitymodel.html
r3425 r3486 67 67 68 68 <h1>Entities:</h1> 69 <a href="#User">User</a><br/> 70 <a href="#OntologySource">OntologySource</a><br/> 71 <a href="#Gene">Gene</a><br/> 72 <a href="#OntologyTerm">OntologyTerm</a><br/> 73 <a href="#Patient">Patient</a><br/> 69 74 <a href="#data">data</a><br/> 75 <h3><a name="User">User</a> 76 </h3> 77 <p></p> 78 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 79 <!-- table header --> 80 <tr><th class="tablehead" colspan="7">User 81 </th></tr> 82 <!-- column headers --> 83 <tr> 84 <th>field</th> 85 <th>type</th> 86 <th>description</th> 87 <th>constraints</th> 88 </tr> 89 90 <!-- all the fields --> 91 <tr > 92 <td style="color:#000000">user_id</td> 93 <td style="color:#000000">int</td> 94 <td style="color:#000000"> </td> 95 <td style="color:#000000"> 96 97 not null, 98 auto, </td> 99 </tr> 100 <tr > 101 <td style="color:#000000">loginname</td> 102 <td style="color:#000000">string</td> 103 <td style="color:#000000"> </td> 104 <td style="color:#000000"> 105 106 not null, 107 </td> 108 </tr> 109 <tr > 110 <td style="color:#000000">Firstname</td> 111 <td style="color:#000000">string</td> 112 <td style="color:#000000"> </td> 113 <td style="color:#000000"> 114 115 not null, 116 </td> 117 </tr> 118 <tr > 119 <td style="color:#000000">Midinitials</td> 120 <td style="color:#000000">string</td> 121 <td style="color:#000000">Label=Mid initials:Mid initials</td> 122 <td style="color:#000000"> 123 124 125 </td> 126 </tr> 127 <tr > 128 <td style="color:#000000">Lastname</td> 129 <td style="color:#000000">string</td> 130 <td style="color:#000000"> </td> 131 <td style="color:#000000"> 132 133 not null, 134 </td> 135 </tr> 136 <tr > 137 <td style="color:#000000">Title</td> 138 <td style="color:#000000">string</td> 139 <td style="color:#000000"> </td> 140 <td style="color:#000000"> 141 142 not null, 143 </td> 144 </tr> 145 <tr > 146 <td style="color:#000000">Profession</td> 147 <td style="color:#000000">string</td> 148 <td style="color:#000000"> </td> 149 <td style="color:#000000"> 150 151 not null, 152 </td> 153 </tr> 154 <tr > 155 <td style="color:#000000">InstituteHospital</td> 156 <td style="color:#000000">string</td> 157 <td style="color:#000000">Label=Institute/Hospital:Institute/Hospital</td> 158 <td style="color:#000000"> 159 160 not null, 161 </td> 162 </tr> 163 <tr > 164 <td style="color:#000000">Address</td> 165 <td style="color:#000000">string</td> 166 <td style="color:#000000"> </td> 167 <td style="color:#000000"> 168 169 not null, 170 </td> 171 </tr> 172 <tr > 173 <td style="color:#000000">Zipcode</td> 174 <td style="color:#000000">string</td> 175 <td style="color:#000000"> </td> 176 <td style="color:#000000"> 177 178 not null, 179 </td> 180 </tr> 181 <tr > 182 <td style="color:#000000">City</td> 183 <td style="color:#000000">string</td> 184 <td style="color:#000000"> </td> 185 <td style="color:#000000"> 186 187 not null, 188 </td> 189 </tr> 190 <tr > 191 <td style="color:#000000">Country</td> 192 <td style="color:#000000">string</td> 193 <td style="color:#000000"> </td> 194 <td style="color:#000000"> 195 196 not null, 197 </td> 198 </tr> 199 <tr > 200 <td style="color:#000000">Phonenumber</td> 201 <td style="color:#000000">string</td> 202 <td style="color:#000000"> </td> 203 <td style="color:#000000"> 204 205 206 </td> 207 </tr> 208 <tr > 209 <td style="color:#000000">Faxnumber</td> 210 <td style="color:#000000">string</td> 211 <td style="color:#000000"> </td> 212 <td style="color:#000000"> 213 214 215 </td> 216 </tr> 217 <tr > 218 <td style="color:#000000">Email</td> 219 <td style="color:#000000">string</td> 220 <td style="color:#000000"> </td> 221 <td style="color:#000000"> 222 223 not null, 224 </td> 225 </tr> 226 227 <!-- all the uniques --> 228 <tr> 229 <td colspan="2">primary key(user_id)</td> 230 <td colspan="2"> </td> 231 </tr> 232 <tr> 233 <td colspan="2">key(loginname)</td> 234 <td colspan="2"> </td> 235 </tr> 236 <!-- all the indices --> 237 238 </table> 239 *inherited field<br/> 240 <a href="#_top_of_page">go to top</a> 241 <p /> 242 <h3><a name="OntologySource">OntologySource</a> 243 </h3> 244 <p> 245 The OntologySource class defines a reference to a an existing 246 ontology or controlled vocabulary from which well-defined and stable 247 (ontology) terms can be obtained. For instance: MO, GO, EFO, UMLS, etc. Use 248 of existing ontologies/vocabularies is recommended to harmonize phenotypic 249 descriptions. This class maps to FuGE::OntologySource, 250 MAGE-TAB::TermSourceREF. 251 252 </p> 253 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 254 <!-- table header --> 255 <tr><th class="tablehead" colspan="7">OntologySource 256 </th></tr> 257 <!-- column headers --> 258 <tr> 259 <th>field</th> 260 <th>type</th> 261 <th>description</th> 262 <th>constraints</th> 263 </tr> 264 265 <!-- all the fields --> 266 <tr > 267 <td style="color:#000000">id</td> 268 <td style="color:#000000">int</td> 269 <td style="color:#000000"> </td> 270 <td style="color:#000000"> 271 272 not null, 273 auto, </td> 274 </tr> 275 <tr > 276 <td style="color:#000000">name</td> 277 <td style="color:#000000">string</td> 278 <td style="color:#000000"> </td> 279 <td style="color:#000000"> 280 281 not null, 282 </td> 283 </tr> 284 285 <!-- all the uniques --> 286 <tr> 287 <td colspan="2">primary key(id)</td> 288 <td colspan="2"> </td> 289 </tr> 290 <tr> 291 <td colspan="2">key(name)</td> 292 <td colspan="2">Name is unique</td> 293 </tr> 294 <!-- all the indices --> 295 296 </table> 297 *inherited field<br/> 298 <a href="#_top_of_page">go to top</a> 299 <p /> 300 <h3><a name="Gene">Gene</a> 301 </h3> 302 <p></p> 303 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 304 <!-- table header --> 305 <tr><th class="tablehead" colspan="7">Gene 306 </th></tr> 307 <!-- column headers --> 308 <tr> 309 <th>field</th> 310 <th>type</th> 311 <th>description</th> 312 <th>constraints</th> 313 </tr> 314 315 <!-- all the fields --> 316 <tr > 317 <td style="color:#000000">id</td> 318 <td style="color:#000000">int</td> 319 <td style="color:#000000"> </td> 320 <td style="color:#000000"> 321 322 not null, 323 auto, </td> 324 </tr> 325 <tr > 326 <td style="color:#000000">GeneName</td> 327 <td style="color:#000000">string</td> 328 <td style="color:#000000"> </td> 329 <td style="color:#000000"> 330 331 not null, 332 </td> 333 </tr> 334 <tr > 335 <td style="color:#000000">chromosomeLocation</td> 336 <td style="color:#000000">string</td> 337 <td style="color:#000000"> </td> 338 <td style="color:#000000"> 339 340 not null, 341 </td> 342 </tr> 343 <tr > 344 <td style="color:#000000">geneDescription</td> 345 <td style="color:#000000">text</td> 346 <td style="color:#000000"> </td> 347 <td style="color:#000000"> 348 349 not null, 350 </td> 351 </tr> 352 353 <!-- all the uniques --> 354 <tr> 355 <td colspan="2">primary key(id)</td> 356 <td colspan="2"> </td> 357 </tr> 358 <tr> 359 <td colspan="2">key(GeneName)</td> 360 <td colspan="2"> </td> 361 </tr> 362 <!-- all the indices --> 363 364 </table> 365 *inherited field<br/> 366 <a href="#_top_of_page">go to top</a> 367 <p /> 368 <h3><a name="OntologyTerm">OntologyTerm</a> 369 </h3> 370 <p> 371 The OntologyTerm class defines references to a single entry 372 from an ontology or a controlled vocabulary. Other classes can reference to 373 this OntologyTerm to harmonize naming of concepts. Each term should have a 374 local, unique label. Good practice is to label it 'sourceid:term', e.g. 375 'MO:cell' If no suitable ontology term exists one can define new terms 376 locally in which case there is no formal accession for the term. In those 377 cases the local name should be repeated in both term and termAccession. Maps 378 to FuGE::OntologyIndividual; in MAGE-TAB there is no separate entity to 379 model terms. 380 381 </p> 382 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 383 <!-- table header --> 384 <tr><th class="tablehead" colspan="7">OntologyTerm 385 </th></tr> 386 <!-- column headers --> 387 <tr> 388 <th>field</th> 389 <th>type</th> 390 <th>description</th> 391 <th>constraints</th> 392 </tr> 393 394 <!-- all the fields --> 395 <tr > 396 <td style="color:#000000">id</td> 397 <td style="color:#000000">int</td> 398 <td style="color:#000000"> </td> 399 <td style="color:#000000"> 400 401 not null, 402 auto, </td> 403 </tr> 404 <tr > 405 <td style="color:#000000">term</td> 406 <td style="color:#000000">string</td> 407 <td style="color:#000000">The ontology term itself, also known as the 'local name' in some ontologies.</td> 408 <td style="color:#000000"> 409 410 not null, 411 </td> 412 </tr> 413 <tr > 414 <td style="color:#000000">description</td> 415 <td style="color:#000000">text</td> 416 <td style="color:#000000">Definition of the term.</td> 417 <td style="color:#000000"> 418 419 420 </td> 421 </tr> 422 <tr > 423 <td style="color:#000000">termAccession</td> 424 <td style="color:#000000">string</td> 425 <td style="color:#000000">The accession number assigned to the ontology term in the source ontology. If empty it is assumed to be a locally defined term.</td> 426 <td style="color:#000000"> 427 428 429 </td> 430 </tr> 431 <tr > 432 <td style="color:#000000">termSource</td> 433 <td style="color:#000000">xref</td> 434 <td style="color:#000000">The source ontology or controlled vocabulary list that ontology terms have been obtained from. One can define a local ontology if needed.</td> 435 <td style="color:#000000"> 436 references(OntologySource.id), 437 438 not null, 439 </td> 440 </tr> 441 442 <!-- all the uniques --> 443 <tr> 444 <td colspan="2">primary key(id)</td> 445 <td colspan="2"> </td> 446 </tr> 447 <tr> 448 <td colspan="2">key(termSource, term)</td> 449 <td colspan="2">the local label of the OntologyTerm is unique within a data set.</td> 450 </tr> 451 <!-- all the indices --> 452 453 </table> 454 *inherited field<br/> 455 <a href="#_top_of_page">go to top</a> 456 <p /> 457 <h3><a name="Patient">Patient</a> 458 </h3> 459 <p></p> 460 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 461 <!-- table header --> 462 <tr><th class="tablehead" colspan="7">Patient 463 </th></tr> 464 <!-- column headers --> 465 <tr> 466 <th>field</th> 467 <th>type</th> 468 <th>description</th> 469 <th>constraints</th> 470 </tr> 471 472 <!-- all the fields --> 473 <tr > 474 <td style="color:#000000">user_id</td> 475 <td style="color:#000000">xref</td> 476 <td style="color:#000000"> </td> 477 <td style="color:#000000"> 478 references(User.user_id), 479 480 not null, 481 </td> 482 </tr> 483 <tr > 484 <td style="color:#000000">PatientID</td> 485 <td style="color:#000000">int</td> 486 <td style="color:#000000"> </td> 487 <td style="color:#000000"> 488 489 not null, 490 auto, </td> 491 </tr> 492 <tr > 493 <td style="color:#000000">Ontology</td> 494 <td style="color:#000000">mref</td> 495 <td style="color:#000000"> </td> 496 <td style="color:#000000"> 497 references-many(OntologyTerm.id), 498 not null, 499 </td> 500 </tr> 501 <tr > 502 <td style="color:#000000">PatientFileNumber</td> 503 <td style="color:#000000">string</td> 504 <td style="color:#000000"> </td> 505 <td style="color:#000000"> 506 507 508 </td> 509 </tr> 510 <tr > 511 <td style="color:#000000">Disease</td> 512 <td style="color:#000000">text</td> 513 <td style="color:#000000"> </td> 514 <td style="color:#000000"> 515 516 517 </td> 518 </tr> 519 <tr > 520 <td style="color:#000000">NumberOfFamilyMembersWithThisDisease</td> 521 <td style="color:#000000">string</td> 522 <td style="color:#000000"> </td> 523 <td style="color:#000000"> 524 525 526 </td> 527 </tr> 528 <tr > 529 <td style="color:#000000">TotalGenerations</td> 530 <td style="color:#000000">enum</td> 531 <td style="color:#000000"> </td> 532 <td style="color:#000000"> 533 534 535 enum_options: '0', '1', '2', '3', '4', '5', '6', '7', '8', 'unknown' 536 </td> 537 </tr> 538 <tr > 539 <td style="color:#000000">PossibleGeneticType</td> 540 <td style="color:#000000">enum</td> 541 <td style="color:#000000"> </td> 542 <td style="color:#000000"> 543 544 545 enum_options: 'AD', 'AR', 'XL', 'Mitochondrial', 'Imprinted', 'Multifact', 'Unknown' 546 </td> 547 </tr> 548 <tr > 549 <td style="color:#000000">Country</td> 550 <td style="color:#000000">string</td> 551 <td style="color:#000000"> </td> 552 <td style="color:#000000"> 553 554 555 </td> 556 </tr> 557 <tr > 558 <td style="color:#000000">EtnicBackground</td> 559 <td style="color:#000000">enum</td> 560 <td style="color:#000000"> </td> 561 <td style="color:#000000"> 562 563 564 enum_options: 'Caucasian', 'Asian', 'African', 'Latin', 'Ashkenasi' 565 </td> 566 </tr> 567 <tr > 568 <td style="color:#000000">FamilyResearch</td> 569 <td style="color:#000000">enum</td> 570 <td style="color:#000000"> </td> 571 <td style="color:#000000"> 572 573 574 enum_options: 'Yes', 'No' 575 </td> 576 </tr> 577 <tr > 578 <td style="color:#000000">hasDNA</td> 579 <td style="color:#000000">enum</td> 580 <td style="color:#000000"> </td> 581 <td style="color:#000000"> 582 583 584 enum_options: 'yes', 'no', 'unknown' 585 </td> 586 </tr> 587 <tr > 588 <td style="color:#000000">hasRNA</td> 589 <td style="color:#000000">enum</td> 590 <td style="color:#000000"> </td> 591 <td style="color:#000000"> 592 593 594 enum_options: 'yes', 'no', 'unknown' 595 </td> 596 </tr> 597 <tr > 598 <td style="color:#000000">DNAFromTissue</td> 599 <td style="color:#000000">enum</td> 600 <td style="color:#000000"> </td> 601 <td style="color:#000000"> 602 603 604 enum_options: 'Yes', 'No', 'Unknown' 605 </td> 606 </tr> 607 <tr > 608 <td style="color:#000000">RNAFromTissue</td> 609 <td style="color:#000000">enum</td> 610 <td style="color:#000000"> </td> 611 <td style="color:#000000"> 612 613 614 enum_options: 'Yes', 'No', 'Unknown' 615 </td> 616 </tr> 617 <tr > 618 <td style="color:#000000">DNAFromBlood</td> 619 <td style="color:#000000">enum</td> 620 <td style="color:#000000"> </td> 621 <td style="color:#000000"> 622 623 624 enum_options: 'Yes', 'No', 'Unknown' 625 </td> 626 </tr> 627 <tr > 628 <td style="color:#000000">CellsAvailable</td> 629 <td style="color:#000000">enum</td> 630 <td style="color:#000000"> </td> 631 <td style="color:#000000"> 632 633 634 enum_options: 'Fibroblasten', 'EBV immortalized lymphocytes', 'Unknown' 635 </td> 636 </tr> 637 <tr > 638 <td style="color:#000000">ChromosomalResearch</td> 639 <td style="color:#000000">enum</td> 640 <td style="color:#000000"> </td> 641 <td style="color:#000000"> 642 643 644 enum_options: 'Yes', 'No', 'Unknown' 645 </td> 646 </tr> 647 <tr > 648 <td style="color:#000000">WGA</td> 649 <td style="color:#000000">enum</td> 650 <td style="color:#000000"> </td> 651 <td style="color:#000000"> 652 653 654 enum_options: 'Yes', 'No', 'Unknown' 655 </td> 656 </tr> 657 <tr > 658 <td style="color:#000000">LiteratureRef</td> 659 <td style="color:#000000">string</td> 660 <td style="color:#000000"> </td> 661 <td style="color:#000000"> 662 663 664 </td> 665 </tr> 666 <tr > 667 <td style="color:#000000">Pedigree</td> 668 <td style="color:#000000">file</td> 669 <td style="color:#000000"> </td> 670 <td style="color:#000000"> 671 672 673 </td> 674 </tr> 675 <tr > 676 <td style="color:#000000">GenesTested</td> 677 <td style="color:#000000">mref</td> 678 <td style="color:#000000"> </td> 679 <td style="color:#000000"> 680 references-many(Gene.id), 681 682 </td> 683 </tr> 684 <tr > 685 <td style="color:#000000">FreeText</td> 686 <td style="color:#000000">text</td> 687 <td style="color:#000000"> </td> 688 <td style="color:#000000"> 689 690 691 </td> 692 </tr> 693 <tr > 694 <td style="color:#000000">SelectFreeText</td> 695 <td style="color:#000000">text</td> 696 <td style="color:#000000"> </td> 697 <td style="color:#000000"> 698 699 700 </td> 701 </tr> 702 703 <!-- all the uniques --> 704 <tr> 705 <td colspan="2">primary key(PatientID)</td> 706 <td colspan="2"> </td> 707 </tr> 708 <!-- all the indices --> 709 710 </table> 711 *inherited field<br/> 712 <a href="#_top_of_page">go to top</a> 713 <p /> 70 714 <h3><a name="data">data</a> 71 715 </h3> … … 202 846 <a href="#_top_of_page">go to top</a> 203 847 204 <div align="center">Documentation generated on August 20, 2010 by MOLGENIS <a href="http://www.molgenis.org">http://www.molgenis.org</a></div>848 <div align="center">Documentation generated on September 8, 2010 by MOLGENIS <a href="http://www.molgenis.org">http://www.molgenis.org</a></div> 205 849 </body></html> 206 850 -
biobank_search/WebContent/generated-doc/fileformat.html
r3425 r3486 69 69 <li><b>biobank_search</b> files: 70 70 <ul> 71 <li><a href="#user_entity">user.txt</a> 72 <li><a href="#patient_entity">patient.txt</a> 73 <li><a href="#gene_entity">gene.txt</a> 74 <li><a href="#ontologySource_entity">ontologysource.txt</a> 75 <li><a href="#ontologyTerm_entity">ontologyterm.txt</a> 71 76 <li><a href="#data_entity">data.txt</a> 72 77 </ul> … … 80 85 <!-- entities outside modules --> 81 86 <h2>biobank_search file types</h2> 87 <h3><a name="#user_entity">File: user.txt</a></h3> 88 89 <p/>Structure:<br/> 90 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 91 <!-- table header --> 92 <tr> 93 <th>column name</th> 94 <th>type</th> 95 <th>required?</th> 96 <th>auto/default</th> 97 <th>description</th> 98 </tr> 99 100 <!-- all required fields --> 101 <tr> 102 <td width="150">user_id</td> 103 <td width="50">int</td> 104 <td width="20"> </td> 105 <td width="50">n+1</td> 106 <td>user_id.<br/></td> 107 </tr> 108 <tr> 109 <td width="150">loginname</td> 110 <td width="50">string</td> 111 <td width="20">YES</td> 112 <td width="50"> </td> 113 <td>loginname.<br/></td> 114 </tr> 115 <tr> 116 <td width="150">firstname</td> 117 <td width="50">string</td> 118 <td width="20">YES</td> 119 <td width="50"> </td> 120 <td>Firstname.<br/></td> 121 </tr> 122 <tr> 123 <td width="150">midinitials</td> 124 <td width="50">string</td> 125 <td width="20"> </td> 126 <td width="50"> </td> 127 <td>Mid initials.<br/></td> 128 </tr> 129 <tr> 130 <td width="150">lastname</td> 131 <td width="50">string</td> 132 <td width="20">YES</td> 133 <td width="50"> </td> 134 <td>Lastname.<br/></td> 135 </tr> 136 <tr> 137 <td width="150">title</td> 138 <td width="50">string</td> 139 <td width="20">YES</td> 140 <td width="50"> </td> 141 <td>Title.<br/></td> 142 </tr> 143 <tr> 144 <td width="150">profession</td> 145 <td width="50">string</td> 146 <td width="20">YES</td> 147 <td width="50"> </td> 148 <td>Profession.<br/></td> 149 </tr> 150 <tr> 151 <td width="150">institutehospital</td> 152 <td width="50">string</td> 153 <td width="20">YES</td> 154 <td width="50"> </td> 155 <td>Institute/Hospital.<br/></td> 156 </tr> 157 <tr> 158 <td width="150">address</td> 159 <td width="50">string</td> 160 <td width="20">YES</td> 161 <td width="50"> </td> 162 <td>Address.<br/></td> 163 </tr> 164 <tr> 165 <td width="150">zipcode</td> 166 <td width="50">string</td> 167 <td width="20">YES</td> 168 <td width="50"> </td> 169 <td>Zipcode.<br/></td> 170 </tr> 171 <tr> 172 <td width="150">city</td> 173 <td width="50">string</td> 174 <td width="20">YES</td> 175 <td width="50"> </td> 176 <td>City.<br/></td> 177 </tr> 178 <tr> 179 <td width="150">country</td> 180 <td width="50">string</td> 181 <td width="20">YES</td> 182 <td width="50"> </td> 183 <td>Country.<br/></td> 184 </tr> 185 <tr> 186 <td width="150">phonenumber</td> 187 <td width="50">string</td> 188 <td width="20"> </td> 189 <td width="50"> </td> 190 <td>Phonenumber.<br/></td> 191 </tr> 192 <tr> 193 <td width="150">faxnumber</td> 194 <td width="50">string</td> 195 <td width="20"> </td> 196 <td width="50"> </td> 197 <td>Faxnumber.<br/></td> 198 </tr> 199 <tr> 200 <td width="150">email</td> 201 <td width="50">string</td> 202 <td width="20">YES</td> 203 <td width="50"> </td> 204 <td>Email.<br/></td> 205 </tr> 206 <!-- all optional fields --> 207 <!-- all the uniques --> 208 <tr><td colspan="5">Constraint: values in column loginname should unique.</td></tr> 209 </table> 210 </p> 211 212 213 <h3><a name="#patient_entity">File: patient.txt</a></h3> 214 215 <p/>Structure:<br/> 216 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 217 <!-- table header --> 218 <tr> 219 <th>column name</th> 220 <th>type</th> 221 <th>required?</th> 222 <th>auto/default</th> 223 <th>description</th> 224 </tr> 225 226 <!-- all required fields --> 227 <tr> 228 <td width="150">user_id_loginname<br/></td> 229 <td width="50">xref</td> 230 <td width="20">YES</td> 231 <td width="50"> </td> 232 <td>user_id. 233 This xref uses {user_id_loginname} to find related elements in file <a href="#user_entity">user.txt</a> based on unique column {loginname}. 234 </td> 235 </tr> 236 <tr> 237 <td width="150">patientid</td> 238 <td width="50">int</td> 239 <td width="20"> </td> 240 <td width="50">n+1</td> 241 <td>PatientID.<br/></td> 242 </tr> 243 <tr> 244 <td width="150">ontology_term<br/></td> 245 <td width="50">mref</td> 246 <td width="20">YES</td> 247 <td width="50"> </td> 248 <td>Ontology. 249 This mref uses {ontology_term} to find related elements in file <a href="#ontologyTerm_entity">ontologyTerm.txt</a> based on unique column {term}. 250 . More than one reference can be added separated by '|', for example: ref1|ref2|ref3.</td> 251 </tr> 252 <tr> 253 <td width="150">patientfilenumber</td> 254 <td width="50">string</td> 255 <td width="20"> </td> 256 <td width="50"> </td> 257 <td>PatientFileNumber.<br/></td> 258 </tr> 259 <tr> 260 <td width="150">disease</td> 261 <td width="50">text</td> 262 <td width="20"> </td> 263 <td width="50"> </td> 264 <td>Disease.<br/></td> 265 </tr> 266 <tr> 267 <td width="150">numberoffamilymemberswiththisdisease</td> 268 <td width="50">string</td> 269 <td width="20"> </td> 270 <td width="50"> </td> 271 <td>NumberOfFamilyMembersWithThisDisease.<br/></td> 272 </tr> 273 <tr> 274 <td width="150">totalgenerations</td> 275 <td width="50">enum</td> 276 <td width="20"> </td> 277 <td width="50"> </td> 278 <td>TotalGenerations.<br/></td> 279 </tr> 280 <tr> 281 <td width="150">possiblegenetictype</td> 282 <td width="50">enum</td> 283 <td width="20"> </td> 284 <td width="50"> </td> 285 <td>PossibleGeneticType.<br/></td> 286 </tr> 287 <tr> 288 <td width="150">country</td> 289 <td width="50">string</td> 290 <td width="20"> </td> 291 <td width="50"> </td> 292 <td>Country.<br/></td> 293 </tr> 294 <tr> 295 <td width="150">etnicbackground</td> 296 <td width="50">enum</td> 297 <td width="20"> </td> 298 <td width="50"> </td> 299 <td>EtnicBackground.<br/></td> 300 </tr> 301 <tr> 302 <td width="150">familyresearch</td> 303 <td width="50">enum</td> 304 <td width="20"> </td> 305 <td width="50"> </td> 306 <td>FamilyResearch.<br/></td> 307 </tr> 308 <tr> 309 <td width="150">hasdna</td> 310 <td width="50">enum</td> 311 <td width="20"> </td> 312 <td width="50"> </td> 313 <td>hasDNA.<br/></td> 314 </tr> 315 <tr> 316 <td width="150">hasrna</td> 317 <td width="50">enum</td> 318 <td width="20"> </td> 319 <td width="50"> </td> 320 <td>hasRNA.<br/></td> 321 </tr> 322 <tr> 323 <td width="150">dnafromtissue</td> 324 <td width="50">enum</td> 325 <td width="20"> </td> 326 <td width="50"> </td> 327 <td>DNAFromTissue.<br/></td> 328 </tr> 329 <tr> 330 <td width="150">rnafromtissue</td> 331 <td width="50">enum</td> 332 <td width="20"> </td> 333 <td width="50"> </td> 334 <td>RNAFromTissue.<br/></td> 335 </tr> 336 <tr> 337 <td width="150">dnafromblood</td> 338 <td width="50">enum</td> 339 <td width="20"> </td> 340 <td width="50"> </td> 341 <td>DNAFromBlood.<br/></td> 342 </tr> 343 <tr> 344 <td width="150">cellsavailable</td> 345 <td width="50">enum</td> 346 <td width="20"> </td> 347 <td width="50"> </td> 348 <td>CellsAvailable.<br/></td> 349 </tr> 350 <tr> 351 <td width="150">chromosomalresearch</td> 352 <td width="50">enum</td> 353 <td width="20"> </td> 354 <td width="50"> </td> 355 <td>ChromosomalResearch.<br/></td> 356 </tr> 357 <tr> 358 <td width="150">wga</td> 359 <td width="50">enum</td> 360 <td width="20"> </td> 361 <td width="50"> </td> 362 <td>WGA.<br/></td> 363 </tr> 364 <tr> 365 <td width="150">literatureref</td> 366 <td width="50">string</td> 367 <td width="20"> </td> 368 <td width="50"> </td> 369 <td>LiteratureRef.<br/></td> 370 </tr> 371 <tr> 372 <td width="150">pedigree</td> 373 <td width="50">file</td> 374 <td width="20"> </td> 375 <td width="50"> </td> 376 <td>Pedigree.<br/></td> 377 </tr> 378 <tr> 379 <td width="150">genestested_GeneName<br/></td> 380 <td width="50">mref</td> 381 <td width="20"> </td> 382 <td width="50"> </td> 383 <td>GenesTested. 384 This mref uses {genestested_genename} to find related elements in file <a href="#gene_entity">gene.txt</a> based on unique column {genename}. 385 . More than one reference can be added separated by '|', for example: ref1|ref2|ref3.</td> 386 </tr> 387 <tr> 388 <td width="150">freetext</td> 389 <td width="50">text</td> 390 <td width="20"> </td> 391 <td width="50"> </td> 392 <td>FreeText.<br/></td> 393 </tr> 394 <tr> 395 <td width="150">selectfreetext</td> 396 <td width="50">text</td> 397 <td width="20"> </td> 398 <td width="50"> </td> 399 <td>SelectFreeText.<br/></td> 400 </tr> 401 <!-- all optional fields --> 402 <!-- all the uniques --> 403 </table> 404 </p> 405 406 407 <h3><a name="#gene_entity">File: gene.txt</a></h3> 408 409 <p/>Structure:<br/> 410 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 411 <!-- table header --> 412 <tr> 413 <th>column name</th> 414 <th>type</th> 415 <th>required?</th> 416 <th>auto/default</th> 417 <th>description</th> 418 </tr> 419 420 <!-- all required fields --> 421 <tr> 422 <td width="150">id</td> 423 <td width="50">int</td> 424 <td width="20"> </td> 425 <td width="50">n+1</td> 426 <td>id.<br/></td> 427 </tr> 428 <tr> 429 <td width="150">genename</td> 430 <td width="50">string</td> 431 <td width="20">YES</td> 432 <td width="50"> </td> 433 <td>GeneName.<br/></td> 434 </tr> 435 <tr> 436 <td width="150">chromosomelocation</td> 437 <td width="50">string</td> 438 <td width="20">YES</td> 439 <td width="50"> </td> 440 <td>chromosomeLocation.<br/></td> 441 </tr> 442 <tr> 443 <td width="150">genedescription</td> 444 <td width="50">text</td> 445 <td width="20">YES</td> 446 <td width="50"> </td> 447 <td>geneDescription.<br/></td> 448 </tr> 449 <!-- all optional fields --> 450 <!-- all the uniques --> 451 <tr><td colspan="5">Constraint: values in column genename should unique.</td></tr> 452 </table> 453 </p> 454 455 456 <h3><a name="#ontologySource_entity">File: ontologysource.txt</a></h3> 457 <p>Contents:<br/> 458 The OntologySource class defines a reference to a an existing 459 ontology or controlled vocabulary from which well-defined and stable 460 (ontology) terms can be obtained. For instance: MO, GO, EFO, UMLS, etc. Use 461 of existing ontologies/vocabularies is recommended to harmonize phenotypic 462 descriptions. This class maps to FuGE::OntologySource, 463 MAGE-TAB::TermSourceREF. 464 465 .</p> 466 <p/>Structure:<br/> 467 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 468 <!-- table header --> 469 <tr> 470 <th>column name</th> 471 <th>type</th> 472 <th>required?</th> 473 <th>auto/default</th> 474 <th>description</th> 475 </tr> 476 477 <!-- all required fields --> 478 <tr> 479 <td width="150">id</td> 480 <td width="50">int</td> 481 <td width="20"> </td> 482 <td width="50">n+1</td> 483 <td>id.<br/></td> 484 </tr> 485 <tr> 486 <td width="150">name</td> 487 <td width="50">string</td> 488 <td width="20">YES</td> 489 <td width="50"> </td> 490 <td>name.<br/></td> 491 </tr> 492 <!-- all optional fields --> 493 <!-- all the uniques --> 494 <tr><td colspan="5">Constraint: values in column name should unique.</td></tr> 495 </table> 496 </p> 497 498 499 <h3><a name="#ontologyTerm_entity">File: ontologyterm.txt</a></h3> 500 <p>Contents:<br/> 501 The OntologyTerm class defines references to a single entry 502 from an ontology or a controlled vocabulary. Other classes can reference to 503 this OntologyTerm to harmonize naming of concepts. Each term should have a 504 local, unique label. Good practice is to label it 'sourceid:term', e.g. 505 'MO:cell' If no suitable ontology term exists one can define new terms 506 locally in which case there is no formal accession for the term. In those 507 cases the local name should be repeated in both term and termAccession. Maps 508 to FuGE::OntologyIndividual; in MAGE-TAB there is no separate entity to 509 model terms. 510 511 .</p> 512 <p/>Structure:<br/> 513 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 514 <!-- table header --> 515 <tr> 516 <th>column name</th> 517 <th>type</th> 518 <th>required?</th> 519 <th>auto/default</th> 520 <th>description</th> 521 </tr> 522 523 <!-- all required fields --> 524 <tr> 525 <td width="150">id</td> 526 <td width="50">int</td> 527 <td width="20"> </td> 528 <td width="50">n+1</td> 529 <td>id.<br/></td> 530 </tr> 531 <tr> 532 <td width="150">term</td> 533 <td width="50">string</td> 534 <td width="20">YES</td> 535 <td width="50"> </td> 536 <td>The ontology term itself, also known as the 'local name' in some ontologies..<br/></td> 537 </tr> 538 <tr> 539 <td width="150">description</td> 540 <td width="50">text</td> 541 <td width="20"> </td> 542 <td width="50"> </td> 543 <td>Definition of the term..<br/></td> 544 </tr> 545 <tr> 546 <td width="150">termaccession</td> 547 <td width="50">string</td> 548 <td width="20"> </td> 549 <td width="50"> </td> 550 <td>The accession number assigned to the ontology term in the source ontology. If empty it is assumed to be a locally defined term..<br/></td> 551 </tr> 552 <tr> 553 <td width="150">termsource_name<br/></td> 554 <td width="50">xref</td> 555 <td width="20">YES</td> 556 <td width="50"> </td> 557 <td>The source ontology or controlled vocabulary list that ontology terms have been obtained from. One can define a local ontology if needed.. 558 This xref uses {termsource_name} to find related elements in file <a href="#ontologySource_entity">ontologySource.txt</a> based on unique column {name}. 559 </td> 560 </tr> 561 <!-- all optional fields --> 562 <!-- all the uniques --> 563 <tr><td colspan="5">Contraint: values in the combined columns (termsource, term) should be unique.</td></tr> 564 </table> 565 </p> 566 567 82 568 <h3><a name="#data_entity">File: data.txt</a></h3> 83 569 … … 193 679 <h1>Appendix: documentation of the mref tables</h1> 194 680 <h2>biobank_search file types</h2> 681 <h3><a name="#patient_Ontology_entity">File: patient_ontology.txt</a></h3> 682 <p>Contents:<br/> Link table for many-to-many relationship 'Patient.Ontology'..</p> 683 <p/>Structure:<br/> 684 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 685 <!-- table header --> 686 <tr> 687 <th>column name</th> 688 <th>type</th> 689 <th>required?</th> 690 <th>auto/default</th> 691 <th>description</th> 692 </tr> 693 694 <!-- all required fields --> 695 <tr> 696 <td width="150">ontology_term<br/></td> 697 <td width="50">xref</td> 698 <td width="20">YES</td> 699 <td width="50"> </td> 700 <td> 701 This xref uses {ontology_term} to find related elements in file <a href="#ontologyTerm_entity">ontologyTerm.txt</a> based on unique column {term}. 702 </td> 703 </tr> 704 <tr> 705 <td width="150">patient_PatientID<br/></td> 706 <td width="50">xref</td> 707 <td width="20">YES</td> 708 <td width="50"> </td> 709 <td> 710 This xref uses {patient_patientid} to find related elements in file <a href="#patient_entity">patient.txt</a> based on unique column {patientid}. 711 </td> 712 </tr> 713 <!-- all optional fields --> 714 <!-- all the uniques --> 715 <tr><td colspan="5">Contraint: values in the combined columns (ontology, patient) should be unique.</td></tr> 716 </table> 717 </p> 718 719 720 <h3><a name="#patient_GenesTested_entity">File: patient_genestested.txt</a></h3> 721 <p>Contents:<br/> Link table for many-to-many relationship 'Patient.GenesTested'..</p> 722 <p/>Structure:<br/> 723 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 724 <!-- table header --> 725 <tr> 726 <th>column name</th> 727 <th>type</th> 728 <th>required?</th> 729 <th>auto/default</th> 730 <th>description</th> 731 </tr> 732 733 <!-- all required fields --> 734 <tr> 735 <td width="150">genestested_GeneName<br/></td> 736 <td width="50">xref</td> 737 <td width="20">YES</td> 738 <td width="50"> </td> 739 <td> 740 This xref uses {genestested_genename} to find related elements in file <a href="#gene_entity">gene.txt</a> based on unique column {genename}. 741 </td> 742 </tr> 743 <tr> 744 <td width="150">patient_PatientID<br/></td> 745 <td width="50">xref</td> 746 <td width="20">YES</td> 747 <td width="50"> </td> 748 <td> 749 This xref uses {patient_patientid} to find related elements in file <a href="#patient_entity">patient.txt</a> based on unique column {patientid}. 750 </td> 751 </tr> 752 <!-- all optional fields --> 753 <!-- all the uniques --> 754 <tr><td colspan="5">Contraint: values in the combined columns (genestested, patient) should be unique.</td></tr> 755 </table> 756 </p> 757 758 195 759 196 760 </body></html> -
biobank_search/WebContent/generated-doc/objectmodel-uml-diagram-summary.dot
r3198 r3486 33 33 34 34 /* entities outside modules*/ 35 "User" [ 36 style = "filled" 37 fillcolor = "white" 38 fontname = "Arial" 39 fontcolor = "black" 40 color = "black" 41 42 label = "{User}" 43 ] 44 45 "Patient" [ 46 style = "filled" 47 fillcolor = "white" 48 fontname = "Arial" 49 fontcolor = "black" 50 color = "black" 51 52 label = "{Patient}" 53 ] 54 55 "Gene" [ 56 style = "filled" 57 fillcolor = "white" 58 fontname = "Arial" 59 fontcolor = "black" 60 color = "black" 61 62 label = "{Gene}" 63 ] 64 65 "OntologySource" [ 66 style = "filled" 67 fillcolor = "white" 68 fontname = "Arial" 69 fontcolor = "black" 70 color = "black" 71 72 label = "{OntologySource}" 73 ] 74 75 "OntologyTerm" [ 76 style = "filled" 77 fillcolor = "white" 78 fontname = "Arial" 79 fontcolor = "black" 80 color = "black" 81 82 label = "{OntologyTerm}" 83 ] 84 35 85 "Data" [ 36 86 style = "filled" … … 62 112 color = "black" 63 113 ] 114 "Patient" -> "User" [ 115 headlabel = "1" 116 taillabel = "*" 117 ] 118 "OntologyTerm" -> "OntologySource" [ 119 headlabel = "1" 120 taillabel = "*" 121 ] 64 122 65 123 … … 73 131 constraint = false 74 132 ] 133 "OntologyTerm" -> "Patient"[ 134 ] 135 "Gene" -> "Patient"[ 136 ] 75 137 } -
biobank_search/WebContent/generated-doc/objectmodel-uml-diagram.dot
r3425 r3486 32 32 33 33 /* entities outside modules*/ 34 "User" [ 35 style = "filled" 36 fillcolor = "white" 37 fontname = "Arial" 38 fontcolor = "black" 39 color = "black" 40 41 label = "{User|user_id : int*\lloginname : string*\lfirstname : string*\lmidinitials : string\llastname : string*\ltitle : string*\lprofession : string*\linstituteHospital : string*\laddress : string*\lzipcode : string*\lcity : string*\lcountry : string*\lphonenumber : string\lfaxnumber : string\lemail : string*\l}" 42 ] 43 44 "Patient" [ 45 style = "filled" 46 fillcolor = "white" 47 fontname = "Arial" 48 fontcolor = "black" 49 color = "black" 50 51 label = "{Patient|user_id : xref->user*\lpatientID : int*\lontology : mref->ontologyTerm*\lpatientFileNumber : string\ldisease : text\lnumberOfFamilyMembersWithThisDisease : string\ltotalGenerations : enum\lpossibleGeneticType : enum\lcountry : string\letnicBackground : enum\lfamilyResearch : enum\lhasDNA : enum\lhasRNA : enum\ldNAFromTissue : enum\lrNAFromTissue : enum\ldNAFromBlood : enum\lcellsAvailable : enum\lchromosomalResearch : enum\lwGA : enum\lliteratureRef : string\lpedigree : file\lgenesTested : mref->gene\lfreeText : text\lselectFreeText : text\l}" 52 ] 53 54 "Gene" [ 55 style = "filled" 56 fillcolor = "white" 57 fontname = "Arial" 58 fontcolor = "black" 59 color = "black" 60 61 label = "{Gene|id : int*\lgeneName : string*\lchromosomeLocation : string*\lgeneDescription : text*\l}" 62 ] 63 64 "OntologySource" [ 65 style = "filled" 66 fillcolor = "white" 67 fontname = "Arial" 68 fontcolor = "black" 69 color = "black" 70 71 label = "{OntologySource|id : int*\lname : string*\l}" 72 ] 73 74 "OntologyTerm" [ 75 style = "filled" 76 fillcolor = "white" 77 fontname = "Arial" 78 fontcolor = "black" 79 color = "black" 80 81 label = "{OntologyTerm|id : int*\lterm : string*\ldescription : text\ltermAccession : string\ltermSource : xref->ontologySource*\l}" 82 ] 83 34 84 "Data" [ 35 85 style = "filled" … … 60 110 arrowsize = 0.6 61 111 ] 112 "Patient" -> "User" [ 113 headlabel = "1" 114 taillabel = "*" 115 ] 116 "OntologyTerm" -> "OntologySource" [ 117 headlabel = "1" 118 taillabel = "*" 119 ] 62 120 63 121 … … 70 128 arrowsize = 0.6 71 129 ] 130 "Patient" -> "OntologyTerm"[ 131 ] 132 "Patient" -> "Gene"[ 133 ] 72 134 } -
biobank_search/WebContent/generated-doc/objectmodel.html
r3425 r3486 68 68 <b><a href="#biobank_search_package">All entities in biobank_search</a></b>: 69 69 <ul> 70 <li><a href="#User">User</a></li> 71 <li><a href="#Patient">Patient</a></li> 72 <li><a href="#Gene">Gene</a></li> 73 <li><a href="#OntologySource">OntologySource</a></li> 74 <li><a href="#OntologyTerm">OntologyTerm</a></li> 70 75 <li><a href="#data">data</a></li> 71 76 </ul> … … 78 83 79 84 <h1><a name="biobank_search_package">biobank_search package</a></h1> 85 <h3><a name="User">User</a></h3> 86 <p style="margin-top: 0px; margin-bottom: 0px;"> 87 88 89 </p> 90 <p> 91 92 </p> 93 <p> 94 <u>Attributes:</u> 95 <table> 96 <tr> 97 <td > 98 <b>user_id</b>: int 99 (required) 100 </td> 101 </tr> 102 103 <tr> 104 <td > 105 <b>loginname</b>: string 106 (required) 107 </td> 108 </tr> 109 110 <tr> 111 <td > 112 <b>Firstname</b>: string 113 (required) 114 </td> 115 </tr> 116 117 <tr> 118 <td > 119 <b>Midinitials</b>: string 120 (optional) 121 </td> 122 </tr> 123 <tr><td style="padding-left: 50px;">Mid initials 124 </td></tr> 125 <tr> 126 <td > 127 <b>Lastname</b>: string 128 (required) 129 </td> 130 </tr> 131 132 <tr> 133 <td > 134 <b>Title</b>: string 135 (required) 136 </td> 137 </tr> 138 139 <tr> 140 <td > 141 <b>Profession</b>: string 142 (required) 143 </td> 144 </tr> 145 146 <tr> 147 <td > 148 <b>InstituteHospital</b>: string 149 (required) 150 </td> 151 </tr> 152 <tr><td style="padding-left: 50px;">Institute/Hospital 153 </td></tr> 154 <tr> 155 <td > 156 <b>Address</b>: string 157 (required) 158 </td> 159 </tr> 160 161 <tr> 162 <td > 163 <b>Zipcode</b>: string 164 (required) 165 </td> 166 </tr> 167 168 <tr> 169 <td > 170 <b>City</b>: string 171 (required) 172 </td> 173 </tr> 174 175 <tr> 176 <td > 177 <b>Country</b>: string 178 (required) 179 </td> 180 </tr> 181 182 <tr> 183 <td > 184 <b>Phonenumber</b>: string 185 (optional) 186 </td> 187 </tr> 188 189 <tr> 190 <td > 191 <b>Faxnumber</b>: string 192 (optional) 193 </td> 194 </tr> 195 196 <tr> 197 <td > 198 <b>Email</b>: string 199 (required) 200 </td> 201 </tr> 202 203 </table> 204 <p> 205 <u>Constraints:</u> 206 <table> 207 <tr> 208 <td > 209 <b>unique(user_id)</b>: 210 </td> 211 </tr> 212 <tr><td style="padding-left: 50px;"> 213 Field user_id is unique within an User. 214 </td></tr> 215 <tr> 216 <td > 217 <b>unique(loginname)</b>: 218 </td> 219 </tr> 220 <tr><td style="padding-left: 50px;"> 221 Field loginname is unique within an User. 222 </td></tr> 223 </p> 224 </table> 225 <h3><a name="Patient">Patient</a></h3> 226 <p style="margin-top: 0px; margin-bottom: 0px;"> 227 228 229 </p> 230 <p> 231 232 </p> 233 <p> 234 <u>Attributes:</u> 235 <table> 236 <tr> 237 <td > 238 <b>PatientID</b>: int 239 (required) 240 </td> 241 </tr> 242 243 <tr> 244 <td > 245 <b>PatientFileNumber</b>: string 246 (optional) 247 </td> 248 </tr> 249 250 <tr> 251 <td > 252 <b>Disease</b>: text 253 (optional) 254 </td> 255 </tr> 256 257 <tr> 258 <td > 259 <b>NumberOfFamilyMembersWithThisDisease</b>: string 260 (optional) 261 </td> 262 </tr> 263 264 <tr> 265 <td > 266 <b>TotalGenerations</b>: enum 267 (optional) 268 </td> 269 </tr> 270 271 <tr> 272 <td > 273 <b>PossibleGeneticType</b>: enum 274 (optional) 275 </td> 276 </tr> 277 278 <tr> 279 <td > 280 <b>Country</b>: string 281 (optional) 282 </td> 283 </tr> 284 285 <tr> 286 <td > 287 <b>EtnicBackground</b>: enum 288 (optional) 289 </td> 290 </tr> 291 292 <tr> 293 <td > 294 <b>FamilyResearch</b>: enum 295 (optional) 296 </td> 297 </tr> 298 299 <tr> 300 <td > 301 <b>hasDNA</b>: enum 302 (optional) 303 </td> 304 </tr> 305 306 <tr> 307 <td > 308 <b>hasRNA</b>: enum 309 (optional) 310 </td> 311 </tr> 312 313 <tr> 314 <td > 315 <b>DNAFromTissue</b>: enum 316 (optional) 317 </td> 318 </tr> 319 320 <tr> 321 <td > 322 <b>RNAFromTissue</b>: enum 323 (optional) 324 </td> 325 </tr> 326 327 <tr> 328 <td > 329 <b>DNAFromBlood</b>: enum 330 (optional) 331 </td> 332 </tr> 333 334 <tr> 335 <td > 336 <b>CellsAvailable</b>: enum 337 (optional) 338 </td> 339 </tr> 340 341 <tr> 342 <td > 343 <b>ChromosomalResearch</b>: enum 344 (optional) 345 </td> 346 </tr> 347 348 <tr> 349 <td > 350 <b>WGA</b>: enum 351 (optional) 352 </td> 353 </tr> 354 355 <tr> 356 <td > 357 <b>LiteratureRef</b>: string 358 (optional) 359 </td> 360 </tr> 361 362 <tr> 363 <td > 364 <b>Pedigree</b>: file 365 (optional) 366 </td> 367 </tr> 368 369 <tr> 370 <td > 371 <b>FreeText</b>: text 372 (optional) 373 </td> 374 </tr> 375 376 <tr> 377 <td > 378 <b>SelectFreeText</b>: text 379 (optional) 380 </td> 381 </tr> 382 383 </table> 384 <p> 385 <u>Associations:</u> 386 <table> 387 <tr> 388 <td > 389 <b>user_id</b>: 390 User (1..1) 391 392 </td> 393 </tr> 394 395 <tr> 396 <td > 397 <b>Ontology</b>: OntologyTerm (1..n) 398 </td> 399 </tr> 400 401 <tr> 402 <td > 403 <b>GenesTested</b>: Gene (0..n) 404 </td> 405 </tr> 406 407 </table> 408 <p> 409 <u>Constraints:</u> 410 <table> 411 <tr> 412 <td > 413 <b>unique(PatientID)</b>: 414 </td> 415 </tr> 416 <tr><td style="padding-left: 50px;"> 417 Field PatientID is unique within an Patient. 418 </td></tr> 419 </p> 420 </table> 421 <h3><a name="Gene">Gene</a></h3> 422 <p style="margin-top: 0px; margin-bottom: 0px;"> 423 424 425 </p> 426 <p> 427 428 </p> 429 <p> 430 <u>Attributes:</u> 431 <table> 432 <tr> 433 <td > 434 <b>id</b>: int 435 (required) 436 </td> 437 </tr> 438 439 <tr> 440 <td > 441 <b>GeneName</b>: string 442 (required) 443 </td> 444 </tr> 445 446 <tr> 447 <td > 448 <b>chromosomeLocation</b>: string 449 (required) 450 </td> 451 </tr> 452 453 <tr> 454 <td > 455 <b>geneDescription</b>: text 456 (required) 457 </td> 458 </tr> 459 460 </table> 461 <p> 462 <u>Constraints:</u> 463 <table> 464 <tr> 465 <td > 466 <b>unique(id)</b>: 467 </td> 468 </tr> 469 <tr><td style="padding-left: 50px;"> 470 Field id is unique within an Gene. 471 </td></tr> 472 <tr> 473 <td > 474 <b>unique(GeneName)</b>: 475 </td> 476 </tr> 477 <tr><td style="padding-left: 50px;"> 478 Field GeneName is unique within an Gene. 479 </td></tr> 480 </p> 481 </table> 482 <h3><a name="OntologySource">OntologySource</a></h3> 483 <p style="margin-top: 0px; margin-bottom: 0px;"> 484 485 486 </p> 487 <p> 488 489 The OntologySource class defines a reference to a an existing 490 ontology or controlled vocabulary from which well-defined and stable 491 (ontology) terms can be obtained. For instance: MO, GO, EFO, UMLS, etc. Use 492 of existing ontologies/vocabularies is recommended to harmonize phenotypic 493 descriptions. This class maps to FuGE::OntologySource, 494 MAGE-TAB::TermSourceREF. 495 496 497 </p> 498 <p> 499 <u>Attributes:</u> 500 <table> 501 <tr> 502 <td > 503 <b>id</b>: int 504 (required) 505 </td> 506 </tr> 507 508 <tr> 509 <td > 510 <b>name</b>: string 511 (required) 512 </td> 513 </tr> 514 515 </table> 516 <p> 517 <u>Constraints:</u> 518 <table> 519 <tr> 520 <td > 521 <b>unique(id)</b>: 522 </td> 523 </tr> 524 <tr><td style="padding-left: 50px;"> 525 Field id is unique within an OntologySource. 526 </td></tr> 527 <tr> 528 <td > 529 <b>unique(name)</b>: 530 </td> 531 </tr> 532 <tr><td style="padding-left: 50px;"> 533 Name is unique. 534 </td></tr> 535 </p> 536 </table> 537 <h3><a name="OntologyTerm">OntologyTerm</a></h3> 538 <p style="margin-top: 0px; margin-bottom: 0px;"> 539 540 541 </p> 542 <p> 543 544 The OntologyTerm class defines references to a single entry 545 from an ontology or a controlled vocabulary. Other classes can reference to 546 this OntologyTerm to harmonize naming of concepts. Each term should have a 547 local, unique label. Good practice is to label it 'sourceid:term', e.g. 548 'MO:cell' If no suitable ontology term exists one can define new terms 549 locally in which case there is no formal accession for the term. In those 550 cases the local name should be repeated in both term and termAccession. Maps 551 to FuGE::OntologyIndividual; in MAGE-TAB there is no separate entity to 552 model terms. 553 554 555 </p> 556 <p> 557 <u>Attributes:</u> 558 <table> 559 <tr> 560 <td > 561 <b>id</b>: int 562 (required) 563 </td> 564 </tr> 565 566 <tr> 567 <td > 568 <b>term</b>: string 569 (required) 570 </td> 571 </tr> 572 <tr><td style="padding-left: 50px;">The ontology term itself, also known as the 'local name' in some ontologies. 573 </td></tr> 574 <tr> 575 <td > 576 <b>description</b>: text 577 (optional) 578 </td> 579 </tr> 580 <tr><td style="padding-left: 50px;">Definition of the term. 581 </td></tr> 582 <tr> 583 <td > 584 <b>termAccession</b>: string 585 (optional) 586 </td> 587 </tr> 588 <tr><td style="padding-left: 50px;">The accession number assigned to the ontology term in the source ontology. If empty it is assumed to be a locally defined term. 589 </td></tr> 590 </table> 591 <p> 592 <u>Associations:</u> 593 <table> 594 <tr> 595 <td > 596 <b>termSource</b>: 597 OntologySource (1..1) 598 599 </td> 600 </tr> 601 <tr><td style="padding-left: 50px;">The source ontology or controlled vocabulary list that ontology terms have been obtained from. One can define a local ontology if needed.</td></tr> 602 </table> 603 <p> 604 <u>Constraints:</u> 605 <table> 606 <tr> 607 <td > 608 <b>unique(id)</b>: 609 </td> 610 </tr> 611 <tr><td style="padding-left: 50px;"> 612 Field id is unique within an OntologyTerm. 613 </td></tr> 614 <tr> 615 <td > 616 <b>unique(termSource, term)</b>: 617 </td> 618 </tr> 619 <tr><td style="padding-left: 50px;"> 620 the local label of the OntologyTerm is unique within a data set.. 621 </td></tr> 622 </p> 623 </table> 80 624 <h3><a name="data">data</a></h3> 81 625 <p style="margin-top: 0px; margin-bottom: 0px;"> … … 189 733 <a href="#_top_of_page">go to top</a> 190 734 191 <div align="center">Documentation generated on August 20, 2010 by MOLGENIS <a href="http://www.molgenis.org">http://www.molgenis.org</a></div>735 <div align="center">Documentation generated on September 8, 2010 by MOLGENIS <a href="http://www.molgenis.org">http://www.molgenis.org</a></div> 192 736 </body></html> 193 737 -
biobank_search/WebContent/generated-doc/tabledoc.html
r3425 r3486 55 55 <h2>Entities:</h2> 56 56 <ol> 57 <li><a href="#User">User</a> 58 <li><a href="#Patient">Patient</a> 59 <li><a href="#Gene">Gene</a> 60 <li><a href="#OntologySource">OntologySource</a> 61 <li><a href="#OntologyTerm">OntologyTerm</a> 57 62 <li><a href="#data">data</a> 63 <li><a href="#Patient_Ontology">Patient_Ontology</a> 64 <li><a href="#Patient_GenesTested">Patient_GenesTested</a> 58 65 </ol> 66 <h2>Table: <a name="User">User</a> 67 </h2> 68 <p></p> 69 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 70 <!-- table header --> 71 <tr><th class="tablehead" colspan="6">User 72 </th></tr> 73 <!-- column headers --> 74 <tr> 75 <th>attribute</th> 76 <th>type</th> 77 <th>NULL?</th> 78 <th>AUTO?</th> 79 <th>constraints</th> 80 <th>description</th> 81 </tr> 82 83 <!-- all the fields --> 84 <tr> 85 <td width="150">user_id</td> 86 <td width="50">int</td> 87 <td width="20"> </td> 88 <td width="20">Y</td> 89 <td width=""> 90 91 </td> 92 <td>user_id</td> 93 </tr> 94 <tr> 95 <td width="150">loginname</td> 96 <td width="50">string</td> 97 <td width="20"> </td> 98 <td width="20"> </td> 99 <td width=""> 100 101 </td> 102 <td>loginname</td> 103 </tr> 104 <tr> 105 <td width="150">Firstname</td> 106 <td width="50">string</td> 107 <td width="20"> </td> 108 <td width="20"> </td> 109 <td width=""> 110 111 </td> 112 <td>Firstname</td> 113 </tr> 114 <tr> 115 <td width="150">Midinitials</td> 116 <td width="50">string</td> 117 <td width="20">Y</td> 118 <td width="20"> </td> 119 <td width=""> 120 121 </td> 122 <td>Mid initials</td> 123 </tr> 124 <tr> 125 <td width="150">Lastname</td> 126 <td width="50">string</td> 127 <td width="20"> </td> 128 <td width="20"> </td> 129 <td width=""> 130 131 </td> 132 <td>Lastname</td> 133 </tr> 134 <tr> 135 <td width="150">Title</td> 136 <td width="50">string</td> 137 <td width="20"> </td> 138 <td width="20"> </td> 139 <td width=""> 140 141 </td> 142 <td>Title</td> 143 </tr> 144 <tr> 145 <td width="150">Profession</td> 146 <td width="50">string</td> 147 <td width="20"> </td> 148 <td width="20"> </td> 149 <td width=""> 150 151 </td> 152 <td>Profession</td> 153 </tr> 154 <tr> 155 <td width="150">InstituteHospital</td> 156 <td width="50">string</td> 157 <td width="20"> </td> 158 <td width="20"> </td> 159 <td width=""> 160 161 </td> 162 <td>Institute/Hospital</td> 163 </tr> 164 <tr> 165 <td width="150">Address</td> 166 <td width="50">string</td> 167 <td width="20"> </td> 168 <td width="20"> </td> 169 <td width=""> 170 171 </td> 172 <td>Address</td> 173 </tr> 174 <tr> 175 <td width="150">Zipcode</td> 176 <td width="50">string</td> 177 <td width="20"> </td> 178 <td width="20"> </td> 179 <td width=""> 180 181 </td> 182 <td>Zipcode</td> 183 </tr> 184 <tr> 185 <td width="150">City</td> 186 <td width="50">string</td> 187 <td width="20"> </td> 188 <td width="20"> </td> 189 <td width=""> 190 191 </td> 192 <td>City</td> 193 </tr> 194 <tr> 195 <td width="150">Country</td> 196 <td width="50">string</td> 197 <td width="20"> </td> 198 <td width="20"> </td> 199 <td width=""> 200 201 </td> 202 <td>Country</td> 203 </tr> 204 <tr> 205 <td width="150">Phonenumber</td> 206 <td width="50">string</td> 207 <td width="20">Y</td> 208 <td width="20"> </td> 209 <td width=""> 210 211 </td> 212 <td>Phonenumber</td> 213 </tr> 214 <tr> 215 <td width="150">Faxnumber</td> 216 <td width="50">string</td> 217 <td width="20">Y</td> 218 <td width="20"> </td> 219 <td width=""> 220 221 </td> 222 <td>Faxnumber</td> 223 </tr> 224 <tr> 225 <td width="150">Email</td> 226 <td width="50">string</td> 227 <td width="20"> </td> 228 <td width="20"> </td> 229 <td width=""> 230 231 </td> 232 <td>Email</td> 233 </tr> 234 235 <!-- all the uniques --> 236 <tr> 237 <td colspan="5">Primary key(user_id)</td> 238 <td> </td> 239 </tr> 240 <tr> 241 <td colspan="5">Secondary key(loginname)</td> 242 <td> </td> 243 </tr> 244 <!-- all the indices --> 245 246 </table> 247 <a href="#_top_of_page">go to top</a> 248 <p /> 249 <h2>Table: <a name="Patient">Patient</a> 250 </h2> 251 <p></p> 252 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 253 <!-- table header --> 254 <tr><th class="tablehead" colspan="6">Patient 255 </th></tr> 256 <!-- column headers --> 257 <tr> 258 <th>attribute</th> 259 <th>type</th> 260 <th>NULL?</th> 261 <th>AUTO?</th> 262 <th>constraints</th> 263 <th>description</th> 264 </tr> 265 266 <!-- all the fields --> 267 <tr> 268 <td width="150">user_id</td> 269 <td width="50">xref</td> 270 <td width="20"> </td> 271 <td width="20"> </td> 272 <td width=""> 273 References(User) 274 </td> 275 <td>user_id</td> 276 </tr> 277 <tr> 278 <td width="150">PatientID</td> 279 <td width="50">int</td> 280 <td width="20"> </td> 281 <td width="20">Y</td> 282 <td width=""> 283 284 </td> 285 <td>PatientID</td> 286 </tr> 287 <tr> 288 <td width="150">Ontology</td> 289 <td width="50">mref</td> 290 <td width="20"> </td> 291 <td width="20"> </td> 292 <td width=""> 293 References(OntologyTerm) via linktable. 294 </td> 295 <td>Ontology</td> 296 </tr> 297 <tr> 298 <td width="150">PatientFileNumber</td> 299 <td width="50">string</td> 300 <td width="20">Y</td> 301 <td width="20"> </td> 302 <td width=""> 303 304 </td> 305 <td>PatientFileNumber</td> 306 </tr> 307 <tr> 308 <td width="150">Disease</td> 309 <td width="50">text</td> 310 <td width="20">Y</td> 311 <td width="20"> </td> 312 <td width=""> 313 314 </td> 315 <td>Disease</td> 316 </tr> 317 <tr> 318 <td width="150">NumberOfFamilyMembersWithThisDisease</td> 319 <td width="50">string</td> 320 <td width="20">Y</td> 321 <td width="20"> </td> 322 <td width=""> 323 324 </td> 325 <td>NumberOfFamilyMembersWithThisDisease</td> 326 </tr> 327 <tr> 328 <td width="150">TotalGenerations</td> 329 <td width="50">enum</td> 330 <td width="20">Y</td> 331 <td width="20"> </td> 332 <td width=""> 333 ENUM options: '0', '1', '2', '3', '4', '5', '6', '7', '8', 'unknown' 334 </td> 335 <td>TotalGenerations</td> 336 </tr> 337 <tr> 338 <td width="150">PossibleGeneticType</td> 339 <td width="50">enum</td> 340 <td width="20">Y</td> 341 <td width="20"> </td> 342 <td width=""> 343 ENUM options: 'AD', 'AR', 'XL', 'Mitochondrial', 'Imprinted', 'Multifact', 'Unknown' 344 </td> 345 <td>PossibleGeneticType</td> 346 </tr> 347 <tr> 348 <td width="150">Country</td> 349 <td width="50">string</td> 350 <td width="20">Y</td> 351 <td width="20"> </td> 352 <td width=""> 353 354 </td> 355 <td>Country</td> 356 </tr> 357 <tr> 358 <td width="150">EtnicBackground</td> 359 <td width="50">enum</td> 360 <td width="20">Y</td> 361 <td width="20"> </td> 362 <td width=""> 363 ENUM options: 'Caucasian', 'Asian', 'African', 'Latin', 'Ashkenasi' 364 </td> 365 <td>EtnicBackground</td> 366 </tr> 367 <tr> 368 <td width="150">FamilyResearch</td> 369 <td width="50">enum</td> 370 <td width="20">Y</td> 371 <td width="20"> </td> 372 <td width=""> 373 ENUM options: 'Yes', 'No' 374 </td> 375 <td>FamilyResearch</td> 376 </tr> 377 <tr> 378 <td width="150">hasDNA</td> 379 <td width="50">enum</td> 380 <td width="20">Y</td> 381 <td width="20"> </td> 382 <td width=""> 383 ENUM options: 'yes', 'no', 'unknown' 384 </td> 385 <td>hasDNA</td> 386 </tr> 387 <tr> 388 <td width="150">hasRNA</td> 389 <td width="50">enum</td> 390 <td width="20">Y</td> 391 <td width="20"> </td> 392 <td width=""> 393 ENUM options: 'yes', 'no', 'unknown' 394 </td> 395 <td>hasRNA</td> 396 </tr> 397 <tr> 398 <td width="150">DNAFromTissue</td> 399 <td width="50">enum</td> 400 <td width="20">Y</td> 401 <td width="20"> </td> 402 <td width=""> 403 ENUM options: 'Yes', 'No', 'Unknown' 404 </td> 405 <td>DNAFromTissue</td> 406 </tr> 407 <tr> 408 <td width="150">RNAFromTissue</td> 409 <td width="50">enum</td> 410 <td width="20">Y</td> 411 <td width="20"> </td> 412 <td width=""> 413 ENUM options: 'Yes', 'No', 'Unknown' 414 </td> 415 <td>RNAFromTissue</td> 416 </tr> 417 <tr> 418 <td width="150">DNAFromBlood</td> 419 <td width="50">enum</td> 420 <td width="20">Y</td> 421 <td width="20"> </td> 422 <td width=""> 423 ENUM options: 'Yes', 'No', 'Unknown' 424 </td> 425 <td>DNAFromBlood</td> 426 </tr> 427 <tr> 428 <td width="150">CellsAvailable</td> 429 <td width="50">enum</td> 430 <td width="20">Y</td> 431 <td width="20"> </td> 432 <td width=""> 433 ENUM options: 'Fibroblasten', 'EBV immortalized lymphocytes', 'Unknown' 434 </td> 435 <td>CellsAvailable</td> 436 </tr> 437 <tr> 438 <td width="150">ChromosomalResearch</td> 439 <td width="50">enum</td> 440 <td width="20">Y</td> 441 <td width="20"> </td> 442 <td width=""> 443 ENUM options: 'Yes', 'No', 'Unknown' 444 </td> 445 <td>ChromosomalResearch</td> 446 </tr> 447 <tr> 448 <td width="150">WGA</td> 449 <td width="50">enum</td> 450 <td width="20">Y</td> 451 <td width="20"> </td> 452 <td width=""> 453 ENUM options: 'Yes', 'No', 'Unknown' 454 </td> 455 <td>WGA</td> 456 </tr> 457 <tr> 458 <td width="150">LiteratureRef</td> 459 <td width="50">string</td> 460 <td width="20">Y</td> 461 <td width="20"> </td> 462 <td width=""> 463 464 </td> 465 <td>LiteratureRef</td> 466 </tr> 467 <tr> 468 <td width="150">Pedigree</td> 469 <td width="50">file</td> 470 <td width="20">Y</td> 471 <td width="20"> </td> 472 <td width=""> 473 474 </td> 475 <td>Pedigree</td> 476 </tr> 477 <tr> 478 <td width="150">GenesTested</td> 479 <td width="50">mref</td> 480 <td width="20">Y</td> 481 <td width="20"> </td> 482 <td width=""> 483 References(Gene) via linktable. 484 </td> 485 <td>GenesTested</td> 486 </tr> 487 <tr> 488 <td width="150">FreeText</td> 489 <td width="50">text</td> 490 <td width="20">Y</td> 491 <td width="20"> </td> 492 <td width=""> 493 494 </td> 495 <td>FreeText</td> 496 </tr> 497 <tr> 498 <td width="150">SelectFreeText</td> 499 <td width="50">text</td> 500 <td width="20">Y</td> 501 <td width="20"> </td> 502 <td width=""> 503 504 </td> 505 <td>SelectFreeText</td> 506 </tr> 507 508 <!-- all the uniques --> 509 <tr> 510 <td colspan="5">Primary key(PatientID)</td> 511 <td> </td> 512 </tr> 513 <!-- all the indices --> 514 515 </table> 516 <a href="#_top_of_page">go to top</a> 517 <p /> 518 <h2>Table: <a name="Gene">Gene</a> 519 </h2> 520 <p></p> 521 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 522 <!-- table header --> 523 <tr><th class="tablehead" colspan="6">Gene 524 </th></tr> 525 <!-- column headers --> 526 <tr> 527 <th>attribute</th> 528 <th>type</th> 529 <th>NULL?</th> 530 <th>AUTO?</th> 531 <th>constraints</th> 532 <th>description</th> 533 </tr> 534 535 <!-- all the fields --> 536 <tr> 537 <td width="150">id</td> 538 <td width="50">int</td> 539 <td width="20"> </td> 540 <td width="20">Y</td> 541 <td width=""> 542 543 </td> 544 <td>id</td> 545 </tr> 546 <tr> 547 <td width="150">GeneName</td> 548 <td width="50">string</td> 549 <td width="20"> </td> 550 <td width="20"> </td> 551 <td width=""> 552 553 </td> 554 <td>GeneName</td> 555 </tr> 556 <tr> 557 <td width="150">chromosomeLocation</td> 558 <td width="50">string</td> 559 <td width="20"> </td> 560 <td width="20"> </td> 561 <td width=""> 562 563 </td> 564 <td>chromosomeLocation</td> 565 </tr> 566 <tr> 567 <td width="150">geneDescription</td> 568 <td width="50">text</td> 569 <td width="20"> </td> 570 <td width="20"> </td> 571 <td width=""> 572 573 </td> 574 <td>geneDescription</td> 575 </tr> 576 577 <!-- all the uniques --> 578 <tr> 579 <td colspan="5">Primary key(id)</td> 580 <td> </td> 581 </tr> 582 <tr> 583 <td colspan="5">Secondary key(GeneName)</td> 584 <td> </td> 585 </tr> 586 <!-- all the indices --> 587 588 </table> 589 <a href="#_top_of_page">go to top</a> 590 <p /> 591 <h2>Table: <a name="OntologySource">OntologySource</a> 592 </h2> 593 <p> 594 The OntologySource class defines a reference to a an existing 595 ontology or controlled vocabulary from which well-defined and stable 596 (ontology) terms can be obtained. For instance: MO, GO, EFO, UMLS, etc. Use 597 of existing ontologies/vocabularies is recommended to harmonize phenotypic 598 descriptions. This class maps to FuGE::OntologySource, 599 MAGE-TAB::TermSourceREF. 600 601 </p> 602 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 603 <!-- table header --> 604 <tr><th class="tablehead" colspan="6">OntologySource 605 </th></tr> 606 <!-- column headers --> 607 <tr> 608 <th>attribute</th> 609 <th>type</th> 610 <th>NULL?</th> 611 <th>AUTO?</th> 612 <th>constraints</th> 613 <th>description</th> 614 </tr> 615 616 <!-- all the fields --> 617 <tr> 618 <td width="150">id</td> 619 <td width="50">int</td> 620 <td width="20"> </td> 621 <td width="20">Y</td> 622 <td width=""> 623 624 </td> 625 <td>id</td> 626 </tr> 627 <tr> 628 <td width="150">name</td> 629 <td width="50">string</td> 630 <td width="20"> </td> 631 <td width="20"> </td> 632 <td width=""> 633 634 </td> 635 <td>name</td> 636 </tr> 637 638 <!-- all the uniques --> 639 <tr> 640 <td colspan="5">Primary key(id)</td> 641 <td> </td> 642 </tr> 643 <tr> 644 <td colspan="5">Secondary key(name)</td> 645 <td> </td> 646 </tr> 647 <!-- all the indices --> 648 649 </table> 650 <a href="#_top_of_page">go to top</a> 651 <p /> 652 <h2>Table: <a name="OntologyTerm">OntologyTerm</a> 653 </h2> 654 <p> 655 The OntologyTerm class defines references to a single entry 656 from an ontology or a controlled vocabulary. Other classes can reference to 657 this OntologyTerm to harmonize naming of concepts. Each term should have a 658 local, unique label. Good practice is to label it 'sourceid:term', e.g. 659 'MO:cell' If no suitable ontology term exists one can define new terms 660 locally in which case there is no formal accession for the term. In those 661 cases the local name should be repeated in both term and termAccession. Maps 662 to FuGE::OntologyIndividual; in MAGE-TAB there is no separate entity to 663 model terms. 664 665 </p> 666 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 667 <!-- table header --> 668 <tr><th class="tablehead" colspan="6">OntologyTerm 669 </th></tr> 670 <!-- column headers --> 671 <tr> 672 <th>attribute</th> 673 <th>type</th> 674 <th>NULL?</th> 675 <th>AUTO?</th> 676 <th>constraints</th> 677 <th>description</th> 678 </tr> 679 680 <!-- all the fields --> 681 <tr> 682 <td width="150">id</td> 683 <td width="50">int</td> 684 <td width="20"> </td> 685 <td width="20">Y</td> 686 <td width=""> 687 688 </td> 689 <td>id</td> 690 </tr> 691 <tr> 692 <td width="150">term</td> 693 <td width="50">string</td> 694 <td width="20"> </td> 695 <td width="20"> </td> 696 <td width=""> 697 698 </td> 699 <td>The ontology term itself, also known as the 'local name' in some ontologies.</td> 700 </tr> 701 <tr> 702 <td width="150">description</td> 703 <td width="50">text</td> 704 <td width="20">Y</td> 705 <td width="20"> </td> 706 <td width=""> 707 708 </td> 709 <td>Definition of the term.</td> 710 </tr> 711 <tr> 712 <td width="150">termAccession</td> 713 <td width="50">string</td> 714 <td width="20">Y</td> 715 <td width="20"> </td> 716 <td width=""> 717 718 </td> 719 <td>The accession number assigned to the ontology term in the source ontology. If empty it is assumed to be a locally defined term.</td> 720 </tr> 721 <tr> 722 <td width="150">termSource</td> 723 <td width="50">xref</td> 724 <td width="20"> </td> 725 <td width="20"> </td> 726 <td width=""> 727 References(OntologySource) 728 </td> 729 <td>The source ontology or controlled vocabulary list that ontology terms have been obtained from. One can define a local ontology if needed.</td> 730 </tr> 731 732 <!-- all the uniques --> 733 <tr> 734 <td colspan="5">Primary key(id)</td> 735 <td> </td> 736 </tr> 737 <tr> 738 <td colspan="5">Secondary key(termSource, term)</td> 739 <td> </td> 740 </tr> 741 <!-- all the indices --> 742 743 </table> 744 <a href="#_top_of_page">go to top</a> 745 <p /> 59 746 <h2>Table: <a name="data">data</a> 60 747 </h2> … … 196 883 <a href="#_top_of_page">go to top</a> 197 884 <p /> 885 <h2>Table: <a name="Patient_Ontology">Patient_Ontology</a> 886 </h2> 887 <p>Link table for many-to-many relationship 'Patient.Ontology'.</p> 888 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 889 <!-- table header --> 890 <tr><th class="tablehead" colspan="6">Patient_Ontology 891 </th></tr> 892 <!-- column headers --> 893 <tr> 894 <th>attribute</th> 895 <th>type</th> 896 <th>NULL?</th> 897 <th>AUTO?</th> 898 <th>constraints</th> 899 <th>description</th> 900 </tr> 901 902 <!-- all the fields --> 903 <tr> 904 <td width="150">autoid</td> 905 <td width="50">int</td> 906 <td width="20"> </td> 907 <td width="20">Y</td> 908 <td width=""> 909 910 </td> 911 <td>automatic id field to ensure ordering of mrefs</td> 912 </tr> 913 <tr> 914 <td width="150">Ontology</td> 915 <td width="50">xref</td> 916 <td width="20"> </td> 917 <td width="20"> </td> 918 <td width=""> 919 References(OntologyTerm) 920 </td> 921 <td></td> 922 </tr> 923 <tr> 924 <td width="150">Patient</td> 925 <td width="50">xref</td> 926 <td width="20"> </td> 927 <td width="20"> </td> 928 <td width=""> 929 References(Patient) 930 </td> 931 <td></td> 932 </tr> 933 934 <!-- all the uniques --> 935 <tr> 936 <td colspan="5">Primary key(autoid)</td> 937 <td> </td> 938 </tr> 939 <tr> 940 <td colspan="5">Secondary key(Ontology, Patient)</td> 941 <td> </td> 942 </tr> 943 <!-- all the indices --> 944 945 </table> 946 <a href="#_top_of_page">go to top</a> 947 <p /> 948 <h2>Table: <a name="Patient_GenesTested">Patient_GenesTested</a> 949 </h2> 950 <p>Link table for many-to-many relationship 'Patient.GenesTested'.</p> 951 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 952 <!-- table header --> 953 <tr><th class="tablehead" colspan="6">Patient_GenesTested 954 </th></tr> 955 <!-- column headers --> 956 <tr> 957 <th>attribute</th> 958 <th>type</th> 959 <th>NULL?</th> 960 <th>AUTO?</th> 961 <th>constraints</th> 962 <th>description</th> 963 </tr> 964 965 <!-- all the fields --> 966 <tr> 967 <td width="150">autoid</td> 968 <td width="50">int</td> 969 <td width="20"> </td> 970 <td width="20">Y</td> 971 <td width=""> 972 973 </td> 974 <td>automatic id field to ensure ordering of mrefs</td> 975 </tr> 976 <tr> 977 <td width="150">GenesTested</td> 978 <td width="50">xref</td> 979 <td width="20"> </td> 980 <td width="20"> </td> 981 <td width=""> 982 References(Gene) 983 </td> 984 <td></td> 985 </tr> 986 <tr> 987 <td width="150">Patient</td> 988 <td width="50">xref</td> 989 <td width="20"> </td> 990 <td width="20"> </td> 991 <td width=""> 992 References(Patient) 993 </td> 994 <td></td> 995 </tr> 996 997 <!-- all the uniques --> 998 <tr> 999 <td colspan="5">Primary key(autoid)</td> 1000 <td> </td> 1001 </tr> 1002 <tr> 1003 <td colspan="5">Secondary key(GenesTested, Patient)</td> 1004 <td> </td> 1005 </tr> 1006 <!-- all the indices --> 1007 1008 </table> 1009 <a href="#_top_of_page">go to top</a> 1010 <p /> 198 1011 199 1012 </body></html> -
biobank_search/WebContent/generated-doc/textUML.txt
r3425 r3486 14 14 15 15 package biobank_search; 16 17 (**) 18 class User 19 attribute user_id : dataType::int; 20 attribute loginname : dataType::string; 21 attribute Firstname : dataType::string; 22 attribute Midinitials : dataType::string; 23 attribute Lastname : dataType::string; 24 attribute Title : dataType::string; 25 attribute Profession : dataType::string; 26 attribute InstituteHospital : dataType::string; 27 attribute Address : dataType::string; 28 attribute Zipcode : dataType::string; 29 attribute City : dataType::string; 30 attribute Country : dataType::string; 31 attribute Phonenumber : dataType::string; 32 attribute Faxnumber : dataType::string; 33 attribute Email : dataType::string; 34 end; 35 36 (**) 37 class Patient 38 attribute PatientID : dataType::int; 39 attribute PatientFileNumber : dataType::string; 40 attribute Disease : dataType::text; 41 attribute NumberOfFamilyMembersWithThisDisease : dataType::string; 42 attribute TotalGenerations : dataType::enum; 43 attribute PossibleGeneticType : dataType::enum; 44 attribute Country : dataType::string; 45 attribute EtnicBackground : dataType::enum; 46 attribute FamilyResearch : dataType::enum; 47 attribute hasDNA : dataType::enum; 48 attribute hasRNA : dataType::enum; 49 attribute DNAFromTissue : dataType::enum; 50 attribute RNAFromTissue : dataType::enum; 51 attribute DNAFromBlood : dataType::enum; 52 attribute CellsAvailable : dataType::enum; 53 attribute ChromosomalResearch : dataType::enum; 54 attribute WGA : dataType::enum; 55 attribute LiteratureRef : dataType::string; 56 attribute Pedigree : dataType::file; 57 attribute FreeText : dataType::text; 58 attribute SelectFreeText : dataType::text; 59 end; 60 61 (**) 62 class Gene 63 attribute id : dataType::int; 64 attribute GeneName : dataType::string; 65 attribute chromosomeLocation : dataType::string; 66 attribute geneDescription : dataType::text; 67 end; 68 69 (*The OntologySource class defines a reference to a an existing 70 ontology or controlled vocabulary from which well-defined and stable 71 (ontology) terms can be obtained. For instance: MO, GO, EFO, UMLS, etc. Use 72 of existing ontologies/vocabularies is recommended to harmonize phenotypic 73 descriptions. This class maps to FuGE::OntologySource, 74 MAGE-TAB::TermSourceREF.*) 75 class OntologySource 76 attribute id : dataType::int; 77 attribute name : dataType::string; 78 end; 79 80 (*The OntologyTerm class defines references to a single entry 81 from an ontology or a controlled vocabulary. Other classes can reference to 82 this OntologyTerm to harmonize naming of concepts. Each term should have a 83 local, unique label. Good practice is to label it 'sourceid:term', e.g. 84 'MO:cell' If no suitable ontology term exists one can define new terms 85 locally in which case there is no formal accession for the term. In those 86 cases the local name should be repeated in both term and termAccession. Maps 87 to FuGE::OntologyIndividual; in MAGE-TAB there is no separate entity to 88 model terms.*) 89 class OntologyTerm 90 attribute id : dataType::int; 91 attribute term : dataType::string; 92 attribute description : dataType::text; 93 attribute termAccession : dataType::string; 94 end; 16 95 17 96 (**) -
biobank_search/generated/java/app/CsvExport.java
r3425 r3486 1 1 2 /* Date: August 20, 20102 /* Date: September 8, 2010 3 3 * 4 4 * generator: org.molgenis.generators.csv.CsvExportGen 3.3.2-testing … … 26 26 import org.molgenis.util.CsvFileWriter; 27 27 28 import biobank_search.User; 29 30 import biobank_search.User; 31 import biobank_search.OntologyTerm; 32 import biobank_search.Patient_Ontology; 33 import biobank_search.Gene; 34 import biobank_search.Patient_GenesTested; 35 import biobank_search.Patient; 36 37 import biobank_search.Gene; 38 39 import biobank_search.OntologySource; 40 41 import biobank_search.OntologySource; 42 import biobank_search.OntologyTerm; 43 28 44 import biobank_search.Data; 29 45 … … 78 94 public void exportAll(File directory, Database db, boolean skipAutoId, QueryRule ... rules) throws Exception 79 95 { 96 exportUser(db, new File(directory+"/user.txt"), skipAutoId ? Arrays.asList(new String[]{"loginname","Firstname","Midinitials","Lastname","Title","Profession","InstituteHospital","Address","Zipcode","City","Country","Phonenumber","Faxnumber","Email"}) : null, rules); 97 exportOntologySource(db, new File(directory+"/ontologysource.txt"), skipAutoId ? Arrays.asList(new String[]{"name"}) : null, rules); 98 exportGene(db, new File(directory+"/gene.txt"), skipAutoId ? Arrays.asList(new String[]{"GeneName","chromosomeLocation","geneDescription"}) : null, rules); 99 exportOntologyTerm(db, new File(directory+"/ontologyterm.txt"), skipAutoId ? Arrays.asList(new String[]{"term","description","termAccession","termSource_name"}) : null, rules); 100 exportPatient(db, new File(directory+"/patient.txt"), skipAutoId ? Arrays.asList(new String[]{"user_id_loginname","Ontology_term","PatientFileNumber","Disease","NumberOfFamilyMembersWithThisDisease","TotalGenerations","PossibleGeneticType","Country","EtnicBackground","FamilyResearch","hasDNA","hasRNA","DNAFromTissue","RNAFromTissue","DNAFromBlood","CellsAvailable","ChromosomalResearch","WGA","LiteratureRef","Pedigree","GenesTested_GeneName","FreeText","SelectFreeText"}) : null, rules); 80 101 exportData(db, new File(directory+"/data.txt"), skipAutoId ? Arrays.asList(new String[]{"name","investigation","inv_name","description","ontologyReference","ontologyReference_ontology_name","ontologyReference_term","unit","unit_ontology_name","unit_term"}) : null, rules); 81 102 … … 87 108 for(List l: entityLists) if(l.size()>0) 88 109 { 110 if(l.get(0).getClass().equals(User.class)) 111 exportUser(l, new File(directory+"/user.txt")); 112 if(l.get(0).getClass().equals(OntologySource.class)) 113 exportOntologySource(l, new File(directory+"/ontologysource.txt")); 114 if(l.get(0).getClass().equals(Gene.class)) 115 exportGene(l, new File(directory+"/gene.txt")); 116 if(l.get(0).getClass().equals(OntologyTerm.class)) 117 exportOntologyTerm(l, new File(directory+"/ontologyterm.txt")); 118 if(l.get(0).getClass().equals(Patient.class)) 119 exportPatient(l, new File(directory+"/patient.txt")); 89 120 if(l.get(0).getClass().equals(Data.class)) 90 121 exportData(l, new File(directory+"/data.txt")); … … 119 150 120 151 /** 152 * export User to file. 153 * @param db the database to export from. 154 * @param f the file to export to. 155 */ 156 public void exportUser(Database db, File f, List<String> fieldsToExport, QueryRule ... rules) throws DatabaseException, IOException, ParseException, MolgenisModelException 157 { 158 if(db.count(User.class) > 0) 159 { 160 161 Query query = db.query(User.class); 162 163 QueryRule[] newRules = matchQueryRulesToEntity(db.getMetaData().getEntity("User"), rules); 164 query.addRules(newRules); 165 int count = query.count(); 166 if(count > 0){ 167 CsvFileWriter userWriter = new CsvFileWriter(f); 168 query.find(userWriter, fieldsToExport); 169 userWriter.close(); 170 } 171 } 172 } 173 174 public void exportUser(List<User> entities, File file) throws IOException 175 { 176 if(entities.size()>0) 177 { 178 //filter nulls 179 List<String> fields = entities.get(0).getFields(); 180 List<String> notNulls = new ArrayList<String>(); 181 182 for(String f: fields) 183 { 184 for(User e: entities) 185 { 186 if(e.get(f) != null) notNulls.add(f); 187 break; 188 } 189 } 190 191 //write 192 CsvFileWriter userWriter = new CsvFileWriter(file, notNulls); 193 userWriter.writeHeader(); 194 for(User e: entities) 195 { 196 userWriter.writeRow(e); 197 } 198 userWriter.close(); 199 } 200 } 201 /** 202 * export OntologySource to file. 203 * @param db the database to export from. 204 * @param f the file to export to. 205 */ 206 public void exportOntologySource(Database db, File f, List<String> fieldsToExport, QueryRule ... rules) throws DatabaseException, IOException, ParseException, MolgenisModelException 207 { 208 if(db.count(OntologySource.class) > 0) 209 { 210 211 Query query = db.query(OntologySource.class); 212 213 QueryRule[] newRules = matchQueryRulesToEntity(db.getMetaData().getEntity("OntologySource"), rules); 214 query.addRules(newRules); 215 int count = query.count(); 216 if(count > 0){ 217 CsvFileWriter ontologySourceWriter = new CsvFileWriter(f); 218 query.find(ontologySourceWriter, fieldsToExport); 219 ontologySourceWriter.close(); 220 } 221 } 222 } 223 224 public void exportOntologySource(List<OntologySource> entities, File file) throws IOException 225 { 226 if(entities.size()>0) 227 { 228 //filter nulls 229 List<String> fields = entities.get(0).getFields(); 230 List<String> notNulls = new ArrayList<String>(); 231 232 for(String f: fields) 233 { 234 for(OntologySource e: entities) 235 { 236 if(e.get(f) != null) notNulls.add(f); 237 break; 238 } 239 } 240 241 //write 242 CsvFileWriter ontologySourceWriter = new CsvFileWriter(file, notNulls); 243 ontologySourceWriter.writeHeader(); 244 for(OntologySource e: entities) 245 { 246 ontologySourceWriter.writeRow(e); 247 } 248 ontologySourceWriter.close(); 249 } 250 } 251 /** 252 * export Gene to file. 253 * @param db the database to export from. 254 * @param f the file to export to. 255 */ 256 public void exportGene(Database db, File f, List<String> fieldsToExport, QueryRule ... rules) throws DatabaseException, IOException, ParseException, MolgenisModelException 257 { 258 if(db.count(Gene.class) > 0) 259 { 260 261 Query query = db.query(Gene.class); 262 263 QueryRule[] newRules = matchQueryRulesToEntity(db.getMetaData().getEntity("Gene"), rules); 264 query.addRules(newRules); 265 int count = query.count(); 266 if(count > 0){ 267 CsvFileWriter geneWriter = new CsvFileWriter(f); 268 query.find(geneWriter, fieldsToExport); 269 geneWriter.close(); 270 } 271 } 272 } 273 274 public void exportGene(List<Gene> entities, File file) throws IOException 275 { 276 if(entities.size()>0) 277 { 278 //filter nulls 279 List<String> fields = entities.get(0).getFields(); 280 List<String> notNulls = new ArrayList<String>(); 281 282 for(String f: fields) 283 { 284 for(Gene e: entities) 285 { 286 if(e.get(f) != null) notNulls.add(f); 287 break; 288 } 289 } 290 291 //write 292 CsvFileWriter geneWriter = new CsvFileWriter(file, notNulls); 293 geneWriter.writeHeader(); 294 for(Gene e: entities) 295 { 296 geneWriter.writeRow(e); 297 } 298 geneWriter.close(); 299 } 300 } 301 /** 302 * export OntologyTerm to file. 303 * @param db the database to export from. 304 * @param f the file to export to. 305 */ 306 public void exportOntologyTerm(Database db, File f, List<String> fieldsToExport, QueryRule ... rules) throws DatabaseException, IOException, ParseException, MolgenisModelException 307 { 308 if(db.count(OntologyTerm.class) > 0) 309 { 310 311 Query query = db.query(OntologyTerm.class); 312 313 QueryRule[] newRules = matchQueryRulesToEntity(db.getMetaData().getEntity("OntologyTerm"), rules); 314 query.addRules(newRules); 315 int count = query.count(); 316 if(count > 0){ 317 CsvFileWriter ontologyTermWriter = new CsvFileWriter(f); 318 query.find(ontologyTermWriter, fieldsToExport); 319 ontologyTermWriter.close(); 320 } 321 } 322 } 323 324 public void exportOntologyTerm(List<OntologyTerm> entities, File file) throws IOException 325 { 326 if(entities.size()>0) 327 { 328 //filter nulls 329 List<String> fields = entities.get(0).getFields(); 330 List<String> notNulls = new ArrayList<String>(); 331 332 for(String f: fields) 333 { 334 for(OntologyTerm e: entities) 335 { 336 if(e.get(f) != null) notNulls.add(f); 337 break; 338 } 339 } 340 341 //write 342 CsvFileWriter ontologyTermWriter = new CsvFileWriter(file, notNulls); 343 ontologyTermWriter.writeHeader(); 344 for(OntologyTerm e: entities) 345 { 346 ontologyTermWriter.writeRow(e); 347 } 348 ontologyTermWriter.close(); 349 } 350 } 351 /** 352 * export Patient to file. 353 * @param db the database to export from. 354 * @param f the file to export to. 355 */ 356 public void exportPatient(Database db, File f, List<String> fieldsToExport, QueryRule ... rules) throws DatabaseException, IOException, ParseException, MolgenisModelException 357 { 358 if(db.count(Patient.class) > 0) 359 { 360 361 Query query = db.query(Patient.class); 362 363 QueryRule[] newRules = matchQueryRulesToEntity(db.getMetaData().getEntity("Patient"), rules); 364 query.addRules(newRules); 365 int count = query.count(); 366 if(count > 0){ 367 CsvFileWriter patientWriter = new CsvFileWriter(f); 368 query.find(patientWriter, fieldsToExport); 369 patientWriter.close(); 370 } 371 } 372 } 373 374 public void exportPatient(List<Patient> entities, File file) throws IOException 375 { 376 if(entities.size()>0) 377 { 378 //filter nulls 379 List<String> fields = entities.get(0).getFields(); 380 List<String> notNulls = new ArrayList<String>(); 381 382 for(String f: fields) 383 { 384 for(Patient e: entities) 385 { 386 if(e.get(f) != null) notNulls.add(f); 387 break; 388 } 389 } 390 391 //write 392 CsvFileWriter patientWriter = new CsvFileWriter(file, notNulls); 393 patientWriter.writeHeader(); 394 for(Patient e: entities) 395 { 396 patientWriter.writeRow(e); 397 } 398 patientWriter.close(); 399 } 400 } 401 /** 121 402 * export Data to file. 122 403 * @param db the database to export from. -
biobank_search/generated/java/app/CsvImport.java
r3425 r3486 1 1 2 /* Date: August 20, 20102 /* Date: September 8, 2010 3 3 * 4 4 * generator: org.molgenis.generators.csv.CsvImportGen 3.3.2-testing … … 32 32 import org.molgenis.framework.db.CsvToDatabase.ImportResult; 33 33 34 import biobank_search.csv.UserCsvReader; 35 import biobank_search.csv.PatientCsvReader; 36 import biobank_search.csv.GeneCsvReader; 37 import biobank_search.csv.OntologySourceCsvReader; 38 import biobank_search.csv.OntologyTermCsvReader; 34 39 import biobank_search.csv.DataCsvReader; 40 import biobank_search.csv.Patient_OntologyCsvReader; 41 import biobank_search.csv.Patient_GenesTestedCsvReader; 35 42 36 43 public class CsvImport … … 86 93 { 87 94 //reverse xref dependency order for remove 95 if (result.getErrorItem().equals("no error found") && (components == null || components.contains("patient_genestested"))) 96 { 97 try { 98 int count = new Patient_GenesTestedCsvReader().importCsv(db, new File(directory+"/patient_genestested.txt"), defaults, dbAction, missingValue); 99 result.getProgressLog().add("patient_genestested"); 100 result.getMessages().put("patient_genestested", "evaluated "+count+" patient_genestested elements"); 101 } catch (Exception e) { 102 result.setErrorItem("patient_genestested"); 103 result.getMessages().put("patient_genestested", e.getMessage() != null ? e.getMessage() : "null"); 104 throw e; 105 } 106 } 107 if (result.getErrorItem().equals("no error found") && (components == null || components.contains("patient_ontology"))) 108 { 109 try { 110 int count = new Patient_OntologyCsvReader().importCsv(db, new File(directory+"/patient_ontology.txt"), defaults, dbAction, missingValue); 111 result.getProgressLog().add("patient_ontology"); 112 result.getMessages().put("patient_ontology", "evaluated "+count+" patient_ontology elements"); 113 } catch (Exception e) { 114 result.setErrorItem("patient_ontology"); 115 result.getMessages().put("patient_ontology", e.getMessage() != null ? e.getMessage() : "null"); 116 throw e; 117 } 118 } 88 119 if (result.getErrorItem().equals("no error found") && (components == null || components.contains("data"))) 89 120 { … … 95 126 result.setErrorItem("data"); 96 127 result.getMessages().put("data", e.getMessage() != null ? e.getMessage() : "null"); 128 throw e; 129 } 130 } 131 if (result.getErrorItem().equals("no error found") && (components == null || components.contains("patient"))) 132 { 133 try { 134 int count = new PatientCsvReader().importCsv(db, new File(directory+"/patient.txt"), defaults, dbAction, missingValue); 135 result.getProgressLog().add("patient"); 136 result.getMessages().put("patient", "evaluated "+count+" patient elements"); 137 } catch (Exception e) { 138 result.setErrorItem("patient"); 139 result.getMessages().put("patient", e.getMessage() != null ? e.getMessage() : "null"); 140 throw e; 141 } 142 } 143 if (result.getErrorItem().equals("no error found") && (components == null || components.contains("ontologyterm"))) 144 { 145 try { 146 int count = new OntologyTermCsvReader().importCsv(db, new File(directory+"/ontologyterm.txt"), defaults, dbAction, missingValue); 147 result.getProgressLog().add("ontologyterm"); 148 result.getMessages().put("ontologyterm", "evaluated "+count+" ontologyterm elements"); 149 } catch (Exception e) { 150 result.setErrorItem("ontologyterm"); 151 result.getMessages().put("ontologyterm", e.getMessage() != null ? e.getMessage() : "null"); 152 throw e; 153 } 154 } 155 if (result.getErrorItem().equals("no error found") && (components == null || components.contains("gene"))) 156 { 157 try { 158 int count = new GeneCsvReader().importCsv(db, new File(directory+"/gene.txt"), defaults, dbAction, missingValue); 159 result.getProgressLog().add("gene"); 160 result.getMessages().put("gene", "evaluated "+count+" gene elements"); 161 } catch (Exception e) { 162 result.setErrorItem("gene"); 163 result.getMessages().put("gene", e.getMessage() != null ? e.getMessage() : "null"); 164 throw e; 165 } 166 } 167 if (result.getErrorItem().equals("no error found") && (components == null || components.contains("ontologysource"))) 168 { 169 try { 170 int count = new OntologySourceCsvReader().importCsv(db, new File(directory+"/ontologysource.txt"), defaults, dbAction, missingValue); 171 result.getProgressLog().add("ontologysource"); 172 result.getMessages().put("ontologysource", "evaluated "+count+" ontologysource elements"); 173 } catch (Exception e) { 174 result.setErrorItem("ontologysource"); 175 result.getMessages().put("ontologysource", e.getMessage() != null ? e.getMessage() : "null"); 176 throw e; 177 } 178 } 179 if (result.getErrorItem().equals("no error found") && (components == null || components.contains("user"))) 180 { 181 try { 182 int count = new UserCsvReader().importCsv(db, new File(directory+"/user.txt"), defaults, dbAction, missingValue); 183 result.getProgressLog().add("user"); 184 result.getMessages().put("user", "evaluated "+count+" user elements"); 185 } catch (Exception e) { 186 result.setErrorItem("user"); 187 result.getMessages().put("user", e.getMessage() != null ? e.getMessage() : "null"); 97 188 throw e; 98 189 } … … 102 193 { 103 194 //follow xref dependency order 195 if (result.getErrorItem().equals("no error found") && (components == null || components.contains("user"))) 196 { 197 try { 198 int count = new UserCsvReader().importCsv(db, new File(directory+"/user.txt"), defaults, dbAction, missingValue); 199 result.getProgressLog().add("user"); 200 result.getMessages().put("user", "evaluated "+count+" user elements"); 201 } catch (Exception e) { 202 result.setErrorItem("user"); 203 result.getMessages().put("user", e.getMessage() != null ? e.getMessage() : "null"); 204 throw e; 205 } 206 } 207 if (result.getErrorItem().equals("no error found") && (components == null || components.contains("ontologysource"))) 208 { 209 try { 210 int count = new OntologySourceCsvReader().importCsv(db, new File(directory+"/ontologysource.txt"), defaults, dbAction, missingValue); 211 result.getProgressLog().add("ontologysource"); 212 result.getMessages().put("ontologysource", "evaluated "+count+" ontologysource elements"); 213 } catch (Exception e) { 214 result.setErrorItem("ontologysource"); 215 result.getMessages().put("ontologysource", e.getMessage() != null ? e.getMessage() : "null"); 216 throw e; 217 } 218 } 219 if (result.getErrorItem().equals("no error found") && (components == null || components.contains("gene"))) 220 { 221 try { 222 int count = new GeneCsvReader().importCsv(db, new File(directory+"/gene.txt"), defaults, dbAction, missingValue); 223 result.getProgressLog().add("gene"); 224 result.getMessages().put("gene", "evaluated "+count+" gene elements"); 225 } catch (Exception e) { 226 result.setErrorItem("gene"); 227 result.getMessages().put("gene", e.getMessage() != null ? e.getMessage() : "null"); 228 throw e; 229 } 230 } 231 if (result.getErrorItem().equals("no error found") && (components == null || components.contains("ontologyterm"))) 232 { 233 try { 234 int count = new OntologyTermCsvReader().importCsv(db, new File(directory+"/ontologyterm.txt"), defaults, dbAction, missingValue); 235 result.getProgressLog().add("ontologyterm"); 236 result.getMessages().put("ontologyterm", "evaluated "+count+" ontologyterm elements"); 237 } catch (Exception e) { 238 result.setErrorItem("ontologyterm"); 239 result.getMessages().put("ontologyterm", e.getMessage() != null ? e.getMessage() : "null"); 240 throw e; 241 } 242 } 243 if (result.getErrorItem().equals("no error found") && (components == null || components.contains("patient"))) 244 { 245 try { 246 int count = new PatientCsvReader().importCsv(db, new File(directory+"/patient.txt"), defaults, dbAction, missingValue); 247 result.getProgressLog().add("patient"); 248 result.getMessages().put("patient", "evaluated "+count+" patient elements"); 249 } catch (Exception e) { 250 result.setErrorItem("patient"); 251 result.getMessages().put("patient", e.getMessage() != null ? e.getMessage() : "null"); 252 throw e; 253 } 254 } 104 255 if (result.getErrorItem().equals("no error found") && (components == null || components.contains("data"))) 105 256 { … … 111 262 result.setErrorItem("data"); 112 263 result.getMessages().put("data", e.getMessage() != null ? e.getMessage() : "null"); 264 throw e; 265 } 266 } 267 if (result.getErrorItem().equals("no error found") && (components == null || components.contains("patient_ontology"))) 268 { 269 try { 270 int count = new Patient_OntologyCsvReader().importCsv(db, new File(directory+"/patient_ontology.txt"), defaults, dbAction, missingValue); 271 result.getProgressLog().add("patient_ontology"); 272 result.getMessages().put("patient_ontology", "evaluated "+count+" patient_ontology elements"); 273 } catch (Exception e) { 274 result.setErrorItem("patient_ontology"); 275 result.getMessages().put("patient_ontology", e.getMessage() != null ? e.getMessage() : "null"); 276 throw e; 277 } 278 } 279 if (result.getErrorItem().equals("no error found") && (components == null || components.contains("patient_genestested"))) 280 { 281 try { 282 int count = new Patient_GenesTestedCsvReader().importCsv(db, new File(directory+"/patient_genestested.txt"), defaults, dbAction, missingValue); 283 result.getProgressLog().add("patient_genestested"); 284 result.getMessages().put("patient_genestested", "evaluated "+count+" patient_genestested elements"); 285 } catch (Exception e) { 286 result.setErrorItem("patient_genestested"); 287 result.getMessages().put("patient_genestested", e.getMessage() != null ? e.getMessage() : "null"); 113 288 throw e; 114 289 } -
biobank_search/generated/java/app/CsvImportById.java
r3425 r3486 1 1 2 /* Date: August 20, 20102 /* Date: September 8, 2010 3 3 * 4 4 * generator: org.molgenis.generators.csv.CsvImportByIdGen 3.3.2-testing … … 23 23 import org.molgenis.util.CsvFileReader; 24 24 25 import biobank_search.User; 26 27 import biobank_search.User; 28 import biobank_search.OntologyTerm; 29 import biobank_search.Patient_Ontology; 30 import biobank_search.Gene; 31 import biobank_search.Patient_GenesTested; 32 import biobank_search.Patient; 33 34 import biobank_search.Gene; 35 36 import biobank_search.OntologySource; 37 38 import biobank_search.OntologySource; 39 import biobank_search.OntologyTerm; 40 25 41 import biobank_search.Data; 42 43 import biobank_search.OntologyTerm; 44 import biobank_search.Patient; 45 import biobank_search.Patient_Ontology; 46 47 import biobank_search.Gene; 48 import biobank_search.Patient; 49 import biobank_search.Patient_GenesTested; 26 50 27 51 … … 32 56 //mappings between imported and internally assigned ids 33 57 //only necessary for automatic ids 58 static Map<Integer,Integer> userIdMap = new TreeMap<Integer,Integer>(); 59 static Map<Integer,Integer> ontologySourceIdMap = new TreeMap<Integer,Integer>(); 60 static Map<Integer,Integer> geneIdMap = new TreeMap<Integer,Integer>(); 61 static Map<Integer,Integer> ontologyTermIdMap = new TreeMap<Integer,Integer>(); 62 static Map<Integer,Integer> patientIdMap = new TreeMap<Integer,Integer>(); 34 63 static Map<Integer,Integer> dataIdMap = new TreeMap<Integer,Integer>(); 64 static Map<Integer,Integer> patient_OntologyIdMap = new TreeMap<Integer,Integer>(); 65 static Map<Integer,Integer> patient_GenesTestedIdMap = new TreeMap<Integer,Integer>(); 35 66 36 67 /** … … 44 75 db.beginTx(); 45 76 77 importUser(db, new File(directory + "/user.txt")); 78 importOntologySource(db, new File(directory + "/ontologysource.txt")); 79 importGene(db, new File(directory + "/gene.txt")); 80 importOntologyTerm(db, new File(directory + "/ontologyterm.txt")); 81 importPatient(db, new File(directory + "/patient.txt")); 46 82 importData(db, new File(directory + "/data.txt")); 83 importPatient_Ontology(db, new File(directory + "/patient_ontology.txt")); 84 importPatient_GenesTested(db, new File(directory + "/patient_genestested.txt")); 47 85 48 86 // insert back again... … … 63 101 } 64 102 103 /** 104 * Imports User from tab/comma delimited File. 105 * @param UserFile a tab delimited file with User data. 106 */ 107 private static void importUser(Database db, File UserFile) throws DatabaseException, IOException, Exception 108 { 109 logger.debug("trying to import "+UserFile); 110 if( !UserFile.exists() ) 111 { 112 logger.warn("User.txt file is missing, skipped import"); 113 } 114 else 115 { 116 //read User from file 117 CsvReader reader = new CsvFileReader(UserFile); 118 List<User> userList = db.toList(User.class, reader, Integer.MAX_VALUE); //should have no limit 119 logger.debug("loaded "+userList.size()+" User objects"); 120 121 //redirect incoming and outgoing fkeys 122 List<Integer> userIds = new ArrayList<Integer>(); //also doesn't scale 123 for(int i = 0; i < userList.size(); i++ ) //sorry, not a real list so need to put back!! 124 { 125 User object = userList.get(i); 126 127 //remember index of this id for incoming fkeys 128 userIds.add(object.getUser_id()); 129 130 //redirect outgoing fkeys 131 132 //add assay back to list 133 userList.set(i, object); 134 } 135 //add to database 136 db.add(userList); 137 for(int i = 0; i < userList.size(); i++) 138 { 139 userIdMap.put(userIds.get(i), userList.get(i).getUser_id()); 140 } 141 } 142 } 143 /** 144 * Imports OntologySource from tab/comma delimited File. 145 * @param OntologySourceFile a tab delimited file with OntologySource data. 146 */ 147 private static void importOntologySource(Database db, File OntologySourceFile) throws DatabaseException, IOException, Exception 148 { 149 logger.debug("trying to import "+OntologySourceFile); 150 if( !OntologySourceFile.exists() ) 151 { 152 logger.warn("OntologySource.txt file is missing, skipped import"); 153 } 154 else 155 { 156 //read OntologySource from file 157 CsvReader reader = new CsvFileReader(OntologySourceFile); 158 List<OntologySource> ontologySourceList = db.toList(OntologySource.class, reader, Integer.MAX_VALUE); //should have no limit 159 logger.debug("loaded "+ontologySourceList.size()+" OntologySource objects"); 160 161 //redirect incoming and outgoing fkeys 162 List<Integer> ontologySourceIds = new ArrayList<Integer>(); //also doesn't scale 163 for(int i = 0; i < ontologySourceList.size(); i++ ) //sorry, not a real list so need to put back!! 164 { 165 OntologySource object = ontologySourceList.get(i); 166 167 //remember index of this id for incoming fkeys 168 ontologySourceIds.add(object.getId()); 169 170 //redirect outgoing fkeys 171 172 //add assay back to list 173 ontologySourceList.set(i, object); 174 } 175 //add to database 176 db.add(ontologySourceList); 177 for(int i = 0; i < ontologySourceList.size(); i++) 178 { 179 ontologySourceIdMap.put(ontologySourceIds.get(i), ontologySourceList.get(i).getId()); 180 } 181 } 182 } 183 /** 184 * Imports Gene from tab/comma delimited File. 185 * @param GeneFile a tab delimited file with Gene data. 186 */ 187 private static void importGene(Database db, File GeneFile) throws DatabaseException, IOException, Exception 188 { 189 logger.debug("trying to import "+GeneFile); 190 if( !GeneFile.exists() ) 191 { 192 logger.warn("Gene.txt file is missing, skipped import"); 193 } 194 else 195 { 196 //read Gene from file 197 CsvReader reader = new CsvFileReader(GeneFile); 198 List<Gene> geneList = db.toList(Gene.class, reader, Integer.MAX_VALUE); //should have no limit 199 logger.debug("loaded "+geneList.size()+" Gene objects"); 200 201 //redirect incoming and outgoing fkeys 202 List<Integer> geneIds = new ArrayList<Integer>(); //also doesn't scale 203 for(int i = 0; i < geneList.size(); i++ ) //sorry, not a real list so need to put back!! 204 { 205 Gene object = geneList.get(i); 206 207 //remember index of this id for incoming fkeys 208 geneIds.add(object.getId()); 209 210 //redirect outgoing fkeys 211 212 //add assay back to list 213 geneList.set(i, object); 214 } 215 //add to database 216 db.add(geneList); 217 for(int i = 0; i < geneList.size(); i++) 218 { 219 geneIdMap.put(geneIds.get(i), geneList.get(i).getId()); 220 } 221 } 222 } 223 /** 224 * Imports OntologyTerm from tab/comma delimited File. 225 * @param OntologyTermFile a tab delimited file with OntologyTerm data. 226 */ 227 private static void importOntologyTerm(Database db, File OntologyTermFile) throws DatabaseException, IOException, Exception 228 { 229 logger.debug("trying to import "+OntologyTermFile); 230 if( !OntologyTermFile.exists() ) 231 { 232 logger.warn("OntologyTerm.txt file is missing, skipped import"); 233 } 234 else 235 { 236 //read OntologyTerm from file 237 CsvReader reader = new CsvFileReader(OntologyTermFile); 238 List<OntologyTerm> ontologyTermList = db.toList(OntologyTerm.class, reader, Integer.MAX_VALUE); //should have no limit 239 logger.debug("loaded "+ontologyTermList.size()+" OntologyTerm objects"); 240 241 //redirect incoming and outgoing fkeys 242 List<Integer> ontologyTermIds = new ArrayList<Integer>(); //also doesn't scale 243 for(int i = 0; i < ontologyTermList.size(); i++ ) //sorry, not a real list so need to put back!! 244 { 245 OntologyTerm object = ontologyTermList.get(i); 246 247 //remember index of this id for incoming fkeys 248 ontologyTermIds.add(object.getId()); 249 250 //redirect outgoing fkeys 251 if(object.getTermSource() != null) object.setTermSource(ontologySourceIdMap.get(object.getTermSource())); 252 253 //add assay back to list 254 ontologyTermList.set(i, object); 255 } 256 //add to database 257 db.add(ontologyTermList); 258 for(int i = 0; i < ontologyTermList.size(); i++) 259 { 260 ontologyTermIdMap.put(ontologyTermIds.get(i), ontologyTermList.get(i).getId()); 261 } 262 } 263 } 264 /** 265 * Imports Patient from tab/comma delimited File. 266 * @param PatientFile a tab delimited file with Patient data. 267 */ 268 private static void importPatient(Database db, File PatientFile) throws DatabaseException, IOException, Exception 269 { 270 logger.debug("trying to import "+PatientFile); 271 if( !PatientFile.exists() ) 272 { 273 logger.warn("Patient.txt file is missing, skipped import"); 274 } 275 else 276 { 277 //read Patient from file 278 CsvReader reader = new CsvFileReader(PatientFile); 279 List<Patient> patientList = db.toList(Patient.class, reader, Integer.MAX_VALUE); //should have no limit 280 logger.debug("loaded "+patientList.size()+" Patient objects"); 281 282 //redirect incoming and outgoing fkeys 283 List<Integer> patientIds = new ArrayList<Integer>(); //also doesn't scale 284 for(int i = 0; i < patientList.size(); i++ ) //sorry, not a real list so need to put back!! 285 { 286 Patient object = patientList.get(i); 287 288 //remember index of this id for incoming fkeys 289 patientIds.add(object.getPatientID()); 290 291 //redirect outgoing fkeys 292 if(object.getUser_id() != null) object.setUser_id(userIdMap.get(object.getUser_id())); 293 List<Integer > ontologyIds = new ArrayList<Integer>(); 294 for(Integer id: object.getOntology()) 295 { 296 ontologyIds.add(ontologyTermIdMap.get(id)); 297 } 298 List<Integer > genesTestedIds = new ArrayList<Integer>(); 299 for(Integer id: object.getGenesTested()) 300 { 301 genesTestedIds.add(geneIdMap.get(id)); 302 } 303 304 //add assay back to list 305 patientList.set(i, object); 306 } 307 //add to database 308 db.add(patientList); 309 for(int i = 0; i < patientList.size(); i++) 310 { 311 patientIdMap.put(patientIds.get(i), patientList.get(i).getPatientID()); 312 } 313 } 314 } 65 315 /** 66 316 * Imports Data from tab/comma delimited File. … … 103 353 } 104 354 } 355 /** 356 * Imports Patient_Ontology from tab/comma delimited File. 357 * @param Patient_OntologyFile a tab delimited file with Patient_Ontology data. 358 */ 359 private static void importPatient_Ontology(Database db, File Patient_OntologyFile) throws DatabaseException, IOException, Exception 360 { 361 logger.debug("trying to import "+Patient_OntologyFile); 362 if( !Patient_OntologyFile.exists() ) 363 { 364 logger.warn("Patient_Ontology.txt file is missing, skipped import"); 365 } 366 else 367 { 368 //read Patient_Ontology from file 369 CsvReader reader = new CsvFileReader(Patient_OntologyFile); 370 List<Patient_Ontology> patient_OntologyList = db.toList(Patient_Ontology.class, reader, Integer.MAX_VALUE); //should have no limit 371 logger.debug("loaded "+patient_OntologyList.size()+" Patient_Ontology objects"); 372 373 //redirect incoming and outgoing fkeys 374 List<Integer> patient_OntologyIds = new ArrayList<Integer>(); //also doesn't scale 375 for(int i = 0; i < patient_OntologyList.size(); i++ ) //sorry, not a real list so need to put back!! 376 { 377 Patient_Ontology object = patient_OntologyList.get(i); 378 379 //remember index of this id for incoming fkeys 380 patient_OntologyIds.add(object.getAutoid()); 381 382 //redirect outgoing fkeys 383 if(object.getOntology() != null) object.setOntology(ontologyTermIdMap.get(object.getOntology())); 384 if(object.getPatient() != null) object.setPatient(patientIdMap.get(object.getPatient())); 385 386 //add assay back to list 387 patient_OntologyList.set(i, object); 388 } 389 //add to database 390 db.add(patient_OntologyList); 391 for(int i = 0; i < patient_OntologyList.size(); i++) 392 { 393 patient_OntologyIdMap.put(patient_OntologyIds.get(i), patient_OntologyList.get(i).getAutoid()); 394 } 395 } 396 } 397 /** 398 * Imports Patient_GenesTested from tab/comma delimited File. 399 * @param Patient_GenesTestedFile a tab delimited file with Patient_GenesTested data. 400 */ 401 private static void importPatient_GenesTested(Database db, File Patient_GenesTestedFile) throws DatabaseException, IOException, Exception 402 { 403 logger.debug("trying to import "+Patient_GenesTestedFile); 404 if( !Patient_GenesTestedFile.exists() ) 405 { 406 logger.warn("Patient_GenesTested.txt file is missing, skipped import"); 407 } 408 else 409 { 410 //read Patient_GenesTested from file 411 CsvReader reader = new CsvFileReader(Patient_GenesTestedFile); 412 List<Patient_GenesTested> patient_GenesTestedList = db.toList(Patient_GenesTested.class, reader, Integer.MAX_VALUE); //should have no limit 413 logger.debug("loaded "+patient_GenesTestedList.size()+" Patient_GenesTested objects"); 414 415 //redirect incoming and outgoing fkeys 416 List<Integer> patient_GenesTestedIds = new ArrayList<Integer>(); //also doesn't scale 417 for(int i = 0; i < patient_GenesTestedList.size(); i++ ) //sorry, not a real list so need to put back!! 418 { 419 Patient_GenesTested object = patient_GenesTestedList.get(i); 420 421 //remember index of this id for incoming fkeys 422 patient_GenesTestedIds.add(object.getAutoid()); 423 424 //redirect outgoing fkeys 425 if(object.getGenesTested() != null) object.setGenesTested(geneIdMap.get(object.getGenesTested())); 426 if(object.getPatient() != null) object.setPatient(patientIdMap.get(object.getPatient())); 427 428 //add assay back to list 429 patient_GenesTestedList.set(i, object); 430 } 431 //add to database 432 db.add(patient_GenesTestedList); 433 for(int i = 0; i < patient_GenesTestedList.size(); i++) 434 { 435 patient_GenesTestedIdMap.put(patient_GenesTestedIds.get(i), patient_GenesTestedList.get(i).getAutoid()); 436 } 437 } 438 } 105 439 } -
biobank_search/generated/java/app/ExcelExport.java
r3425 r3486 1 1 2 /* Date: August 20, 20102 /* Date: September 8, 2010 3 3 * 4 4 * generator: org.molgenis.generators.excel.ExcelExportGen 3.3.2-testing … … 114 114 115 115 // Variable: copy file contents to the workbook sheets 116 copyCsvToWorkbook("User", new File(directory+"/user.txt"), workbook, headerFormat, cellFormat); 117 copyCsvToWorkbook("OntologySource", new File(directory+"/ontologysource.txt"), workbook, headerFormat, cellFormat); 118 copyCsvToWorkbook("Gene", new File(directory+"/gene.txt"), workbook, headerFormat, cellFormat); 119 copyCsvToWorkbook("OntologyTerm", new File(directory+"/ontologyterm.txt"), workbook, headerFormat, cellFormat); 120 copyCsvToWorkbook("Patient", new File(directory+"/patient.txt"), workbook, headerFormat, cellFormat); 116 121 copyCsvToWorkbook("data", new File(directory+"/data.txt"), workbook, headerFormat, cellFormat); 117 122 -
biobank_search/generated/java/app/ExcelImport.java
r3425 r3486 1 1 2 /* Date: August 20, 20102 /* Date: September 8, 2010 3 3 * 4 4 * generator: org.molgenis.generators.excel.ExcelImportGen 3.3.2-testing … … 23 23 import org.molgenis.util.Tuple; 24 24 25 import biobank_search.excel.UserExcelReader; 26 import biobank_search.excel.PatientExcelReader; 27 import biobank_search.excel.GeneExcelReader; 28 import biobank_search.excel.OntologySourceExcelReader; 29 import biobank_search.excel.OntologyTermExcelReader; 25 30 import biobank_search.excel.DataExcelReader; 31 import biobank_search.excel.Patient_OntologyExcelReader; 32 import biobank_search.excel.Patient_GenesTestedExcelReader; 26 33 27 34 public class ExcelImport … … 57 64 { 58 65 //reverse xref dependency order for remove 66 if (result.getErrorItem().equals("no error found") && (components == null || components.contains("patient_genestested"))) 67 { 68 try { 69 int count = 0; 70 if(sheetNames.contains("patient_genestested")){ 71 count = new Patient_GenesTestedExcelReader().importSheet(db, workbook.getSheet(sheetNames.indexOf("patient_genestested")), defaults, dbAction, missingValue); 72 } 73 result.getProgressLog().add("patient_genestested"); 74 result.getMessages().put("patient_genestested", "evaluated "+count+" patient_genestested elements"); 75 } catch (Exception e) { 76 result.setErrorItem("patient_genestested"); 77 result.getMessages().put("patient_genestested", e.getMessage() != null ? e.getMessage() : "null"); 78 throw e; 79 } 80 } 81 if (result.getErrorItem().equals("no error found") && (components == null || components.contains("patient_ontology"))) 82 { 83 try { 84 int count = 0; 85 if(sheetNames.contains("patient_ontology")){ 86 count = new Patient_OntologyExcelReader().importSheet(db, workbook.getSheet(sheetNames.indexOf("patient_ontology")), defaults, dbAction, missingValue); 87 } 88 result.getProgressLog().add("patient_ontology"); 89 result.getMessages().put("patient_ontology", "evaluated "+count+" patient_ontology elements"); 90 } catch (Exception e) { 91 result.setErrorItem("patient_ontology"); 92 result.getMessages().put("patient_ontology", e.getMessage() != null ? e.getMessage() : "null"); 93 throw e; 94 } 95 } 59 96 if (result.getErrorItem().equals("no error found") && (components == null || components.contains("data"))) 60 97 { … … 69 106 result.setErrorItem("data"); 70 107 result.getMessages().put("data", e.getMessage() != null ? e.getMessage() : "null"); 108 throw e; 109 } 110 } 111 if (result.getErrorItem().equals("no error found") && (components == null || components.contains("patient"))) 112 { 113 try { 114 int count = 0; 115 if(sheetNames.contains("patient")){ 116 count = new PatientExcelReader().importSheet(db, workbook.getSheet(sheetNames.indexOf("patient")), defaults, dbAction, missingValue); 117 } 118 result.getProgressLog().add("patient"); 119 result.getMessages().put("patient", "evaluated "+count+" patient elements"); 120 } catch (Exception e) { 121 result.setErrorItem("patient"); 122 result.getMessages().put("patient", e.getMessage() != null ? e.getMessage() : "null"); 123 throw e; 124 } 125 } 126 if (result.getErrorItem().equals("no error found") && (components == null || components.contains("ontologyterm"))) 127 { 128 try { 129 int count = 0; 130 if(sheetNames.contains("ontologyterm")){ 131 count = new OntologyTermExcelReader().importSheet(db, workbook.getSheet(sheetNames.indexOf("ontologyterm")), defaults, dbAction, missingValue); 132 } 133 result.getProgressLog().add("ontologyterm"); 134 result.getMessages().put("ontologyterm", "evaluated "+count+" ontologyterm elements"); 135 } catch (Exception e) { 136 result.setErrorItem("ontologyterm"); 137 result.getMessages().put("ontologyterm", e.getMessage() != null ? e.getMessage() : "null"); 138 throw e; 139 } 140 } 141 if (result.getErrorItem().equals("no error found") && (components == null || components.contains("gene"))) 142 { 143 try { 144 int count = 0; 145 if(sheetNames.contains("gene")){ 146 count = new GeneExcelReader().importSheet(db, workbook.getSheet(sheetNames.indexOf("gene")), defaults, dbAction, missingValue); 147 } 148 result.getProgressLog().add("gene"); 149 result.getMessages().put("gene", "evaluated "+count+" gene elements"); 150 } catch (Exception e) { 151 result.setErrorItem("gene"); 152 result.getMessages().put("gene", e.getMessage() != null ? e.getMessage() : "null"); 153 throw e; 154 } 155 } 156 if (result.getErrorItem().equals("no error found") && (components == null || components.contains("ontologysource"))) 157 { 158 try { 159 int count = 0; 160 if(sheetNames.contains("ontologysource")){ 161 count = new OntologySourceExcelReader().importSheet(db, workbook.getSheet(sheetNames.indexOf("ontologysource")), defaults, dbAction, missingValue); 162 } 163 result.getProgressLog().add("ontologysource"); 164 result.getMessages().put("ontologysource", "evaluated "+count+" ontologysource elements"); 165 } catch (Exception e) { 166 result.setErrorItem("ontologysource"); 167 result.getMessages().put("ontologysource", e.getMessage() != null ? e.getMessage() : "null"); 168 throw e; 169 } 170 } 171 if (result.getErrorItem().equals("no error found") && (components == null || components.contains("user"))) 172 { 173 try { 174 int count = 0; 175 if(sheetNames.contains("user")){ 176 count = new UserExcelReader().importSheet(db, workbook.getSheet(sheetNames.indexOf("user")), defaults, dbAction, missingValue); 177 } 178 result.getProgressLog().add("user"); 179 result.getMessages().put("user", "evaluated "+count+" user elements"); 180 } catch (Exception e) { 181 result.setErrorItem("user"); 182 result.getMessages().put("user", e.getMessage() != null ? e.getMessage() : "null"); 71 183 throw e; 72 184 } … … 76 188 { 77 189 //follow xref dependency order 190 if (result.getErrorItem().equals("no error found") && (components == null || components.contains("user"))) 191 { 192 try { 193 int count = 0; 194 if(sheetNames.contains("user")){ 195 count = new UserExcelReader().importSheet(db, workbook.getSheet(sheetNames.indexOf("user")), defaults, dbAction, missingValue); 196 } 197 result.getProgressLog().add("user"); 198 result.getMessages().put("user", "evaluated "+count+" user elements"); 199 } catch (Exception e) { 200 result.setErrorItem("user"); 201 result.getMessages().put("user", e.getMessage() != null ? e.getMessage() : "null"); 202 throw e; 203 } 204 } 205 if (result.getErrorItem().equals("no error found") && (components == null || components.contains("ontologysource"))) 206 { 207 try { 208 int count = 0; 209 if(sheetNames.contains("ontologysource")){ 210 count = new OntologySourceExcelReader().importSheet(db, workbook.getSheet(sheetNames.indexOf("ontologysource")), defaults, dbAction, missingValue); 211 } 212 result.getProgressLog().add("ontologysource"); 213 result.getMessages().put("ontologysource", "evaluated "+count+" ontologysource elements"); 214 } catch (Exception e) { 215 result.setErrorItem("ontologysource"); 216 result.getMessages().put("ontologysource", e.getMessage() != null ? e.getMessage() : "null"); 217 throw e; 218 } 219 } 220 if (result.getErrorItem().equals("no error found") && (components == null || components.contains("gene"))) 221 { 222 try { 223 int count = 0; 224 if(sheetNames.contains("gene")){ 225 count = new GeneExcelReader().importSheet(db, workbook.getSheet(sheetNames.indexOf("gene")), defaults, dbAction, missingValue); 226 } 227 result.getProgressLog().add("gene"); 228 result.getMessages().put("gene", "evaluated "+count+" gene elements"); 229 } catch (Exception e) { 230 result.setErrorItem("gene"); 231 result.getMessages().put("gene", e.getMessage() != null ? e.getMessage() : "null"); 232 throw e; 233 } 234 } 235 if (result.getErrorItem().equals("no error found") && (components == null || components.contains("ontologyterm"))) 236 { 237 try { 238 int count = 0; 239 if(sheetNames.contains("ontologyterm")){ 240 count = new OntologyTermExcelReader().importSheet(db, workbook.getSheet(sheetNames.indexOf("ontologyterm")), defaults, dbAction, missingValue); 241 } 242 result.getProgressLog().add("ontologyterm"); 243 result.getMessages().put("ontologyterm", "evaluated "+count+" ontologyterm elements"); 244 } catch (Exception e) { 245 result.setErrorItem("ontologyterm"); 246 result.getMessages().put("ontologyterm", e.getMessage() != null ? e.getMessage() : "null"); 247 throw e; 248 } 249 } 250 if (result.getErrorItem().equals("no error found") && (components == null || components.contains("patient"))) 251 { 252 try { 253 int count = 0; 254 if(sheetNames.contains("patient")){ 255 count = new PatientExcelReader().importSheet(db, workbook.getSheet(sheetNames.indexOf("patient")), defaults, dbAction, missingValue); 256 } 257 result.getProgressLog().add("patient"); 258 result.getMessages().put("patient", "evaluated "+count+" patient elements"); 259 } catch (Exception e) { 260 result.setErrorItem("patient"); 261 result.getMessages().put("patient", e.getMessage() != null ? e.getMessage() : "null"); 262 throw e; 263 } 264 } 78 265 if (result.getErrorItem().equals("no error found") && (components == null || components.contains("data"))) 79 266 { … … 88 275 result.setErrorItem("data"); 89 276 result.getMessages().put("data", e.getMessage() != null ? e.getMessage() : "null"); 277 throw e; 278 } 279 } 280 if (result.getErrorItem().equals("no error found") && (components == null || components.contains("patient_ontology"))) 281 { 282 try { 283 int count = 0; 284 if(sheetNames.contains("patient_ontology")){ 285 count = new Patient_OntologyExcelReader().importSheet(db, workbook.getSheet(sheetNames.indexOf("patient_ontology")), defaults, dbAction, missingValue); 286 } 287 result.getProgressLog().add("patient_ontology"); 288 result.getMessages().put("patient_ontology", "evaluated "+count+" patient_ontology elements"); 289 } catch (Exception e) { 290 result.setErrorItem("patient_ontology"); 291 result.getMessages().put("patient_ontology", e.getMessage() != null ? e.getMessage() : "null"); 292 throw e; 293 } 294 } 295 if (result.getErrorItem().equals("no error found") && (components == null || components.contains("patient_genestested"))) 296 { 297 try { 298 int count = 0; 299 if(sheetNames.contains("patient_genestested")){ 300 count = new Patient_GenesTestedExcelReader().importSheet(db, workbook.getSheet(sheetNames.indexOf("patient_genestested")), defaults, dbAction, missingValue); 301 } 302 result.getProgressLog().add("patient_genestested"); 303 result.getMessages().put("patient_genestested", "evaluated "+count+" patient_genestested elements"); 304 } catch (Exception e) { 305 result.setErrorItem("patient_genestested"); 306 result.getMessages().put("patient_genestested", e.getMessage() != null ? e.getMessage() : "null"); 90 307 throw e; 91 308 } -
biobank_search/generated/java/app/ImportWizardExcelPrognosis.java
r3425 r3486 1 1 2 /* Date: August 20, 20102 /* Date: September 8, 2010 3 3 * 4 4 * generator: org.molgenis.generators.excel.ImportWizardExcelPrognosisGen 3.3.2-testing … … 19 19 import jxl.Sheet; 20 20 import jxl.Workbook; 21 import biobank_search.User; 22 import biobank_search.excel.UserExcelReader; 23 import biobank_search.Patient; 24 import biobank_search.excel.PatientExcelReader; 25 import biobank_search.Gene; 26 import biobank_search.excel.GeneExcelReader; 27 import biobank_search.OntologySource; 28 import biobank_search.excel.OntologySourceExcelReader; 29 import biobank_search.OntologyTerm; 30 import biobank_search.excel.OntologyTermExcelReader; 21 31 import biobank_search.Data; 22 32 import biobank_search.excel.DataExcelReader; 33 import biobank_search.Patient_Ontology; 34 import biobank_search.excel.Patient_OntologyExcelReader; 35 import biobank_search.Patient_GenesTested; 36 import biobank_search.excel.Patient_GenesTestedExcelReader; 23 37 24 38 public class ImportWizardExcelPrognosis { … … 50 64 51 65 int sheetIndex = 0; 66 if (lowercasedSheetNames.contains("user")) { 67 String originalSheetname = lowerToOriginalName.get("user"); 68 Sheet sheet = workbook.getSheet(originalSheetname); 69 UserExcelReader<User> excelReader = new UserExcelReader<User>(); 70 List<String> allHeaders = excelReader.getNonEmptyHeaders(sheet); 71 User entity = new User(); 72 headersToMaps(originalSheetname, allHeaders, entity.getFields()); 73 sheetIndex++; 74 } 75 if (lowercasedSheetNames.contains("ontologysource")) { 76 String originalSheetname = lowerToOriginalName.get("ontologysource"); 77 Sheet sheet = workbook.getSheet(originalSheetname); 78 OntologySourceExcelReader<OntologySource> excelReader = new OntologySourceExcelReader<OntologySource>(); 79 List<String> allHeaders = excelReader.getNonEmptyHeaders(sheet); 80 OntologySource entity = new OntologySource(); 81 headersToMaps(originalSheetname, allHeaders, entity.getFields()); 82 sheetIndex++; 83 } 84 if (lowercasedSheetNames.contains("gene")) { 85 String originalSheetname = lowerToOriginalName.get("gene"); 86 Sheet sheet = workbook.getSheet(originalSheetname); 87 GeneExcelReader<Gene> excelReader = new GeneExcelReader<Gene>(); 88 List<String> allHeaders = excelReader.getNonEmptyHeaders(sheet); 89 Gene entity = new Gene(); 90 headersToMaps(originalSheetname, allHeaders, entity.getFields()); 91 sheetIndex++; 92 } 93 if (lowercasedSheetNames.contains("ontologyterm")) { 94 String originalSheetname = lowerToOriginalName.get("ontologyterm"); 95 Sheet sheet = workbook.getSheet(originalSheetname); 96 OntologyTermExcelReader<OntologyTerm> excelReader = new OntologyTermExcelReader<OntologyTerm>(); 97 List<String> allHeaders = excelReader.getNonEmptyHeaders(sheet); 98 OntologyTerm entity = new OntologyTerm(); 99 headersToMaps(originalSheetname, allHeaders, entity.getFields()); 100 sheetIndex++; 101 } 102 if (lowercasedSheetNames.contains("patient")) { 103 String originalSheetname = lowerToOriginalName.get("patient"); 104 Sheet sheet = workbook.getSheet(originalSheetname); 105 PatientExcelReader<Patient> excelReader = new PatientExcelReader<Patient>(); 106 List<String> allHeaders = excelReader.getNonEmptyHeaders(sheet); 107 Patient entity = new Patient(); 108 headersToMaps(originalSheetname, allHeaders, entity.getFields()); 109 sheetIndex++; 110 } 52 111 if (lowercasedSheetNames.contains("data")) { 53 112 String originalSheetname = lowerToOriginalName.get("data"); … … 56 115 List<String> allHeaders = excelReader.getNonEmptyHeaders(sheet); 57 116 Data entity = new Data(); 117 headersToMaps(originalSheetname, allHeaders, entity.getFields()); 118 sheetIndex++; 119 } 120 if (lowercasedSheetNames.contains("patient_ontology")) { 121 String originalSheetname = lowerToOriginalName.get("patient_ontology"); 122 Sheet sheet = workbook.getSheet(originalSheetname); 123 Patient_OntologyExcelReader<Patient_Ontology> excelReader = new Patient_OntologyExcelReader<Patient_Ontology>(); 124 List<String> allHeaders = excelReader.getNonEmptyHeaders(sheet); 125 Patient_Ontology entity = new Patient_Ontology(); 126 headersToMaps(originalSheetname, allHeaders, entity.getFields()); 127 sheetIndex++; 128 } 129 if (lowercasedSheetNames.contains("patient_genestested")) { 130 String originalSheetname = lowerToOriginalName.get("patient_genestested"); 131 Sheet sheet = workbook.getSheet(originalSheetname); 132 Patient_GenesTestedExcelReader<Patient_GenesTested> excelReader = new Patient_GenesTestedExcelReader<Patient_GenesTested>(); 133 List<String> allHeaders = excelReader.getNonEmptyHeaders(sheet); 134 Patient_GenesTested entity = new Patient_GenesTested(); 58 135 headersToMaps(originalSheetname, allHeaders, entity.getFields()); 59 136 sheetIndex++; -
biobank_search/generated/java/app/InMemoryDatabase.java
r3425 r3486 1 1 /* File: biobank_search/model/JDBCDatabase 2 2 * Copyright: GBIC 2000-2010, all rights reserved 3 * Date: August 20, 20103 * Date: September 8, 2010 4 4 * 5 5 * generator: org.molgenis.generators.db.InMemoryDatabaseGen 3.3.2-testing -
biobank_search/generated/java/app/JDBCDatabase.java
r3425 r3486 1 1 /* File: biobank_search/model/JDBCDatabase 2 2 * Copyright: GBIC 2000-2010, all rights reserved 3 * Date: August 20, 20103 * Date: September 8, 2010 4 4 * 5 5 * generator: org.molgenis.generators.db.JDBCDatabaseGen 3.3.2-testing … … 61 61 private void setup() 62 62 { 63 this.putMapper(biobank_search.User.class, new biobank_search.db.UserMapper(this)); 64 this.putMapper(biobank_search.Patient.class, new biobank_search.db.PatientMapper(this)); 65 this.putMapper(biobank_search.Gene.class, new biobank_search.db.GeneMapper(this)); 66 this.putMapper(biobank_search.OntologySource.class, new biobank_search.db.OntologySourceMapper(this)); 67 this.putMapper(biobank_search.OntologyTerm.class, new biobank_search.db.OntologyTermMapper(this)); 63 68 this.putMapper(biobank_search.Data.class, new biobank_search.db.DataMapper(this)); 69 this.putMapper(biobank_search.Patient_Ontology.class, new biobank_search.db.Patient_OntologyMapper(this)); 70 this.putMapper(biobank_search.Patient_GenesTested.class, new biobank_search.db.Patient_GenesTestedMapper(this)); 64 71 } 65 72 } -
biobank_search/generated/java/app/JDBCMetaDatabase.java
r3425 r3486 1 1 /* File: biobank_search/model/JDBCDatabase 2 2 * Copyright: Inventory 2000-2010, GBIC 2002-2010, all rights reserved 3 * Date: August 20, 20103 * Date: September 8, 2010 4 4 * 5 5 * generator: org.molgenis.generators.db.JDBCMetaDatabaseGen 3.3.2-testing … … 32 32 { 33 33 34 Entity user_entity = new Entity("User",this.getDatabase()); 35 Field user_user_id_field = new Field(user_entity, "user_id", Field.Type.getType("int")); 36 user_user_id_field.setAuto(true); 37 38 user_entity.addField(user_user_id_field); 39 Field user_loginname_field = new Field(user_entity, "loginname", Field.Type.getType("string")); 40 41 user_entity.addField(user_loginname_field); 42 Field user_firstname_field = new Field(user_entity, "Firstname", Field.Type.getType("string")); 43 44 user_entity.addField(user_firstname_field); 45 Field user_midinitials_field = new Field(user_entity, "Midinitials", Field.Type.getType("string")); 46 47 user_entity.addField(user_midinitials_field); 48 Field user_lastname_field = new Field(user_entity, "Lastname", Field.Type.getType("string")); 49 50 user_entity.addField(user_lastname_field); 51 Field user_title_field = new Field(user_entity, "Title", Field.Type.getType("string")); 52 53 user_entity.addField(user_title_field); 54 Field user_profession_field = new Field(user_entity, "Profession", Field.Type.getType("string")); 55 56 user_entity.addField(user_profession_field); 57 Field user_instituteHospital_field = new Field(user_entity, "InstituteHospital", Field.Type.getType("string")); 58 59 user_entity.addField(user_instituteHospital_field); 60 Field user_address_field = new Field(user_entity, "Address", Field.Type.getType("string")); 61 62 user_entity.addField(user_address_field); 63 Field user_zipcode_field = new Field(user_entity, "Zipcode", Field.Type.getType("string")); 64 65 user_entity.addField(user_zipcode_field); 66 Field user_city_field = new Field(user_entity, "City", Field.Type.getType("string")); 67 68 user_entity.addField(user_city_field); 69 Field user_country_field = new Field(user_entity, "Country", Field.Type.getType("string")); 70 71 user_entity.addField(user_country_field); 72 Field user_phonenumber_field = new Field(user_entity, "Phonenumber", Field.Type.getType("string")); 73 74 user_entity.addField(user_phonenumber_field); 75 Field user_faxnumber_field = new Field(user_entity, "Faxnumber", Field.Type.getType("string")); 76 77 user_entity.addField(user_faxnumber_field); 78 Field user_email_field = new Field(user_entity, "Email", Field.Type.getType("string")); 79 80 user_entity.addField(user_email_field); 81 user_entity.addKey(Arrays.asList(new String[]{"user_id"}),false,""); 82 user_entity.addKey(Arrays.asList(new String[]{"loginname"}),false,""); 83 Entity ontologySource_entity = new Entity("OntologySource",this.getDatabase()); 84 Field ontologySource_id_field = new Field(ontologySource_entity, "id", Field.Type.getType("int")); 85 ontologySource_id_field.setAuto(true); 86 87 ontologySource_entity.addField(ontologySource_id_field); 88 Field ontologySource_name_field = new Field(ontologySource_entity, "name", Field.Type.getType("string")); 89 90 ontologySource_entity.addField(ontologySource_name_field); 91 ontologySource_entity.addKey(Arrays.asList(new String[]{"id"}),false,""); 92 ontologySource_entity.addKey(Arrays.asList(new String[]{"name"}),false,""); 93 Entity gene_entity = new Entity("Gene",this.getDatabase()); 94 Field gene_id_field = new Field(gene_entity, "id", Field.Type.getType("int")); 95 gene_id_field.setAuto(true); 96 97 gene_entity.addField(gene_id_field); 98 Field gene_geneName_field = new Field(gene_entity, "GeneName", Field.Type.getType("string")); 99 100 gene_entity.addField(gene_geneName_field); 101 Field gene_chromosomeLocation_field = new Field(gene_entity, "chromosomeLocation", Field.Type.getType("string")); 102 103 gene_entity.addField(gene_chromosomeLocation_field); 104 Field gene_geneDescription_field = new Field(gene_entity, "geneDescription", Field.Type.getType("text")); 105 106 gene_entity.addField(gene_geneDescription_field); 107 gene_entity.addKey(Arrays.asList(new String[]{"id"}),false,""); 108 gene_entity.addKey(Arrays.asList(new String[]{"GeneName"}),false,""); 109 Entity ontologyTerm_entity = new Entity("OntologyTerm",this.getDatabase()); 110 Field ontologyTerm_id_field = new Field(ontologyTerm_entity, "id", Field.Type.getType("int")); 111 ontologyTerm_id_field.setAuto(true); 112 113 ontologyTerm_entity.addField(ontologyTerm_id_field); 114 Field ontologyTerm_term_field = new Field(ontologyTerm_entity, "term", Field.Type.getType("string")); 115 116 ontologyTerm_entity.addField(ontologyTerm_term_field); 117 Field ontologyTerm_description_field = new Field(ontologyTerm_entity, "description", Field.Type.getType("text")); 118 119 ontologyTerm_entity.addField(ontologyTerm_description_field); 120 Field ontologyTerm_termAccession_field = new Field(ontologyTerm_entity, "termAccession", Field.Type.getType("string")); 121 122 ontologyTerm_entity.addField(ontologyTerm_termAccession_field); 123 Field ontologyTerm_termSource_field = new Field(ontologyTerm_entity, "termSource", Field.Type.getType("xref")); 124 ontologyTerm_termSource_field.setXRefVariables("OntologySource", "id",Arrays.asList(new String[]{"name"})); 125 ontologyTerm_entity.addField(ontologyTerm_termSource_field); 126 ontologyTerm_entity.addKey(Arrays.asList(new String[]{"id"}),false,""); 127 ontologyTerm_entity.addKey(Arrays.asList(new String[]{"termSource","term"}),false,""); 128 Entity patient_entity = new Entity("Patient",this.getDatabase()); 129 Field patient_user_id_field = new Field(patient_entity, "user_id", Field.Type.getType("xref")); 130 patient_user_id_field.setXRefVariables("User", "user_id",Arrays.asList(new String[]{"loginname"})); 131 patient_entity.addField(patient_user_id_field); 132 Field patient_patientID_field = new Field(patient_entity, "PatientID", Field.Type.getType("int")); 133 patient_patientID_field.setAuto(true); 134 135 patient_entity.addField(patient_patientID_field); 136 Field patient_ontology_field = new Field(patient_entity, "Ontology", Field.Type.getType("mref")); 137 patient_ontology_field.setXRefVariables("OntologyTerm", "id",Arrays.asList(new String[]{"term"})); 138 patient_entity.addField(patient_ontology_field); 139 Field patient_patientFileNumber_field = new Field(patient_entity, "PatientFileNumber", Field.Type.getType("string")); 140 141 patient_entity.addField(patient_patientFileNumber_field); 142 Field patient_disease_field = new Field(patient_entity, "Disease", Field.Type.getType("text")); 143 144 patient_entity.addField(patient_disease_field); 145 Field patient_numberOfFamilyMembersWithThisDisease_field = new Field(patient_entity, "NumberOfFamilyMembersWithThisDisease", Field.Type.getType("string")); 146 147 patient_entity.addField(patient_numberOfFamilyMembersWithThisDisease_field); 148 Field patient_totalGenerations_field = new Field(patient_entity, "TotalGenerations", Field.Type.getType("enum")); 149 150 patient_entity.addField(patient_totalGenerations_field); 151 Field patient_possibleGeneticType_field = new Field(patient_entity, "PossibleGeneticType", Field.Type.getType("enum")); 152 153 patient_entity.addField(patient_possibleGeneticType_field); 154 Field patient_country_field = new Field(patient_entity, "Country", Field.Type.getType("string")); 155 156 patient_entity.addField(patient_country_field); 157 Field patient_etnicBackground_field = new Field(patient_entity, "EtnicBackground", Field.Type.getType("enum")); 158 159 patient_entity.addField(patient_etnicBackground_field); 160 Field patient_familyResearch_field = new Field(patient_entity, "FamilyResearch", Field.Type.getType("enum")); 161 162 patient_entity.addField(patient_familyResearch_field); 163 Field patient_hasDNA_field = new Field(patient_entity, "hasDNA", Field.Type.getType("enum")); 164 165 patient_entity.addField(patient_hasDNA_field); 166 Field patient_hasRNA_field = new Field(patient_entity, "hasRNA", Field.Type.getType("enum")); 167 168 patient_entity.addField(patient_hasRNA_field); 169 Field patient_dNAFromTissue_field = new Field(patient_entity, "DNAFromTissue", Field.Type.getType("enum")); 170 171 patient_entity.addField(patient_dNAFromTissue_field); 172 Field patient_rNAFromTissue_field = new Field(patient_entity, "RNAFromTissue", Field.Type.getType("enum")); 173 174 patient_entity.addField(patient_rNAFromTissue_field); 175 Field patient_dNAFromBlood_field = new Field(patient_entity, "DNAFromBlood", Field.Type.getType("enum")); 176 177 patient_entity.addField(patient_dNAFromBlood_field); 178 Field patient_cellsAvailable_field = new Field(patient_entity, "CellsAvailable", Field.Type.getType("enum")); 179 180 patient_entity.addField(patient_cellsAvailable_field); 181 Field patient_chromosomalResearch_field = new Field(patient_entity, "ChromosomalResearch", Field.Type.getType("enum")); 182 183 patient_entity.addField(patient_chromosomalResearch_field); 184 Field patient_wGA_field = new Field(patient_entity, "WGA", Field.Type.getType("enum")); 185 186 patient_entity.addField(patient_wGA_field); 187 Field patient_literatureRef_field = new Field(patient_entity, "LiteratureRef", Field.Type.getType("string")); 188 189 patient_entity.addField(patient_literatureRef_field); 190 Field patient_pedigree_field = new Field(patient_entity, "Pedigree", Field.Type.getType("file")); 191 192 patient_entity.addField(patient_pedigree_field); 193 Field patient_genesTested_field = new Field(patient_entity, "GenesTested", Field.Type.getType("mref")); 194 patient_genesTested_field.setXRefVariables("Gene", "id",Arrays.asList(new String[]{"GeneName"})); 195 patient_entity.addField(patient_genesTested_field); 196 Field patient_freeText_field = new Field(patient_entity, "FreeText", Field.Type.getType("text")); 197 198 patient_entity.addField(patient_freeText_field); 199 Field patient_selectFreeText_field = new Field(patient_entity, "SelectFreeText", Field.Type.getType("text")); 200 201 patient_entity.addField(patient_selectFreeText_field); 202 patient_entity.addKey(Arrays.asList(new String[]{"PatientID"}),false,""); 34 203 Entity data_entity = new Entity("data",this.getDatabase()); 35 204 Field data_id_field = new Field(data_entity, "id", Field.Type.getType("int")); -
biobank_search/generated/java/app/servlet/MolgenisServlet.java
r3425 r3486 1 1 /* 2 2 * Created by: org.molgenis.generators.server.MolgenisServletGen 3 * Date: August 20, 20103 * Date: September 8, 2010 4 4 */ 5 5 -
biobank_search/generated/java/app/servlet/RestApi.java
r3425 r3486 26 26 import org.molgenis.framework.db.DatabaseException; 27 27 28 import biobank_search.User; 29 import biobank_search.Patient; 30 import biobank_search.Gene; 31 import biobank_search.OntologySource; 32 import biobank_search.OntologyTerm; 28 33 import biobank_search.Data; 34 import biobank_search.Patient_Ontology; 35 import biobank_search.Patient_GenesTested; 29 36 30 37 /* … … 57 64 58 65 @GET 66 @Path("/json/user") 67 @Produces("application/json") 68 public UserList findUserJson(String query) throws DatabaseException, NamingException, IOException 69 { 70 return new UserList(getDatabase().find(User.class)); 71 } 72 73 @XmlRootElement(name="user") 74 @XmlAccessorType(XmlAccessType.FIELD) 75 public static class UserList 76 { 77 public UserList() 78 { 79 } 80 public UserList(List<User> list) 81 { 82 this.list = list; 83 } 84 @XmlElement(name="user") 85 public List<User> list; 86 } 87 88 @POST 89 @Path("/json/user") 90 @Produces("application/json") 91 public User addUserJson(@FormParam("") User object) throws DatabaseException, NamingException, IOException 92 { 93 if(getDatabase().add(object) > 0) 94 return object; 95 return null; 96 } 97 98 @GET 99 @Path("/json/user/{user_id}") 100 @Produces("application/json") 101 public User getUserJson(@PathParam("user_id") Integer user_id) throws DatabaseException, NamingException 102 { 103 return getDatabase().findById(User.class, user_id); 104 } 105 106 @PUT 107 @Path("/json/user/{user_id}") 108 @Produces("application/json") 109 public User updateUserJson(@PathParam("user_id") Integer user_id, @FormParam("") User object) throws DatabaseException, NamingException, IOException 110 { 111 if(getDatabase().update(object)>0) return object; 112 return null; 113 } 114 115 @DELETE 116 @Path("/json/user/{user_id}") 117 @Produces("application/json") 118 public void removeUserJson(@PathParam("user_id") Integer user_id) throws DatabaseException, NamingException, IOException 119 { 120 getDatabase().remove(getDatabase().findById(User.class, user_id)); 121 } 122 123 @GET 124 @Path("/json/patient") 125 @Produces("application/json") 126 public PatientList findPatientJson(String query) throws DatabaseException, NamingException, IOException 127 { 128 return new PatientList(getDatabase().find(Patient.class)); 129 } 130 131 @XmlRootElement(name="patient") 132 @XmlAccessorType(XmlAccessType.FIELD) 133 public static class PatientList 134 { 135 public PatientList() 136 { 137 } 138 public PatientList(List<Patient> list) 139 { 140 this.list = list; 141 } 142 @XmlElement(name="patient") 143 public List<Patient> list; 144 } 145 146 @POST 147 @Path("/json/patient") 148 @Produces("application/json") 149 public Patient addPatientJson(@FormParam("") Patient object) throws DatabaseException, NamingException, IOException 150 { 151 if(getDatabase().add(object) > 0) 152 return object; 153 return null; 154 } 155 156 @GET 157 @Path("/json/patient/{PatientID}") 158 @Produces("application/json") 159 public Patient getPatientJson(@PathParam("PatientID") Integer PatientID) throws DatabaseException, NamingException 160 { 161 return getDatabase().findById(Patient.class, PatientID); 162 } 163 164 @PUT 165 @Path("/json/patient/{PatientID}") 166 @Produces("application/json") 167 public Patient updatePatientJson(@PathParam("PatientID") Integer PatientID, @FormParam("") Patient object) throws DatabaseException, NamingException, IOException 168 { 169 if(getDatabase().update(object)>0) return object; 170 return null; 171 } 172 173 @DELETE 174 @Path("/json/patient/{PatientID}") 175 @Produces("application/json") 176 public void removePatientJson(@PathParam("PatientID") Integer PatientID) throws DatabaseException, NamingException, IOException 177 { 178 getDatabase().remove(getDatabase().findById(Patient.class, PatientID)); 179 } 180 181 @GET 182 @Path("/json/gene") 183 @Produces("application/json") 184 public GeneList findGeneJson(String query) throws DatabaseException, NamingException, IOException 185 { 186 return new GeneList(getDatabase().find(Gene.class)); 187 } 188 189 @XmlRootElement(name="gene") 190 @XmlAccessorType(XmlAccessType.FIELD) 191 public static class GeneList 192 { 193 public GeneList() 194 { 195 } 196 public GeneList(List<Gene> list) 197 { 198 this.list = list; 199 } 200 @XmlElement(name="gene") 201 public List<Gene> list; 202 } 203 204 @POST 205 @Path("/json/gene") 206 @Produces("application/json") 207 public Gene addGeneJson(@FormParam("") Gene object) throws DatabaseException, NamingException, IOException 208 { 209 if(getDatabase().add(object) > 0) 210 return object; 211 return null; 212 } 213 214 @GET 215 @Path("/json/gene/{id}") 216 @Produces("application/json") 217 public Gene getGeneJson(@PathParam("id") Integer id) throws DatabaseException, NamingException 218 { 219 return getDatabase().findById(Gene.class, id); 220 } 221 222 @PUT 223 @Path("/json/gene/{id}") 224 @Produces("application/json") 225 public Gene updateGeneJson(@PathParam("id") Integer id, @FormParam("") Gene object) throws DatabaseException, NamingException, IOException 226 { 227 if(getDatabase().update(object)>0) return object; 228 return null; 229 } 230 231 @DELETE 232 @Path("/json/gene/{id}") 233 @Produces("application/json") 234 public void removeGeneJson(@PathParam("id") Integer id) throws DatabaseException, NamingException, IOException 235 { 236 getDatabase().remove(getDatabase().findById(Gene.class, id)); 237 } 238 239 @GET 240 @Path("/json/ontologySource") 241 @Produces("application/json") 242 public OntologySourceList findOntologySourceJson(String query) throws DatabaseException, NamingException, IOException 243 { 244 return new OntologySourceList(getDatabase().find(OntologySource.class)); 245 } 246 247 @XmlRootElement(name="ontologySource") 248 @XmlAccessorType(XmlAccessType.FIELD) 249 public static class OntologySourceList 250 { 251 public OntologySourceList() 252 { 253 } 254 public OntologySourceList(List<OntologySource> list) 255 { 256 this.list = list; 257 } 258 @XmlElement(name="ontologySource") 259 public List<OntologySource> list; 260 } 261 262 @POST 263 @Path("/json/ontologySource") 264 @Produces("application/json") 265 public OntologySource addOntologySourceJson(@FormParam("") OntologySource object) throws DatabaseException, NamingException, IOException 266 { 267 if(getDatabase().add(object) > 0) 268 return object; 269 return null; 270 } 271 272 @GET 273 @Path("/json/ontologySource/{id}") 274 @Produces("application/json") 275 public OntologySource getOntologySourceJson(@PathParam("id") Integer id) throws DatabaseException, NamingException 276 { 277 return getDatabase().findById(OntologySource.class, id); 278 } 279 280 @PUT 281 @Path("/json/ontologySource/{id}") 282 @Produces("application/json") 283 public OntologySource updateOntologySourceJson(@PathParam("id") Integer id, @FormParam("") OntologySource object) throws DatabaseException, NamingException, IOException 284 { 285 if(getDatabase().update(object)>0) return object; 286 return null; 287 } 288 289 @DELETE 290 @Path("/json/ontologySource/{id}") 291 @Produces("application/json") 292 public void removeOntologySourceJson(@PathParam("id") Integer id) throws DatabaseException, NamingException, IOException 293 { 294 getDatabase().remove(getDatabase().findById(OntologySource.class, id)); 295 } 296 297 @GET 298 @Path("/json/ontologyTerm") 299 @Produces("application/json") 300 public OntologyTermList findOntologyTermJson(String query) throws DatabaseException, NamingException, IOException 301 { 302 return new OntologyTermList(getDatabase().find(OntologyTerm.class)); 303 } 304 305 @XmlRootElement(name="ontologyTerm") 306 @XmlAccessorType(XmlAccessType.FIELD) 307 public static class OntologyTermList 308 { 309 public OntologyTermList() 310 { 311 } 312 public OntologyTermList(List<OntologyTerm> list) 313 { 314 this.list = list; 315 } 316 @XmlElement(name="ontologyTerm") 317 public List<OntologyTerm> list; 318 } 319 320 @POST 321 @Path("/json/ontologyTerm") 322 @Produces("application/json") 323 public OntologyTerm addOntologyTermJson(@FormParam("") OntologyTerm object) throws DatabaseException, NamingException, IOException 324 { 325 if(getDatabase().add(object) > 0) 326 return object; 327 return null; 328 } 329 330 @GET 331 @Path("/json/ontologyTerm/{id}") 332 @Produces("application/json") 333 public OntologyTerm getOntologyTermJson(@PathParam("id") Integer id) throws DatabaseException, NamingException 334 { 335 return getDatabase().findById(OntologyTerm.class, id); 336 } 337 338 @PUT 339 @Path("/json/ontologyTerm/{id}") 340 @Produces("application/json") 341 public OntologyTerm updateOntologyTermJson(@PathParam("id") Integer id, @FormParam("") OntologyTerm object) throws DatabaseException, NamingException, IOException 342 { 343 if(getDatabase().update(object)>0) return object; 344 return null; 345 } 346 347 @DELETE 348 @Path("/json/ontologyTerm/{id}") 349 @Produces("application/json") 350 public void removeOntologyTermJson(@PathParam("id") Integer id) throws DatabaseException, NamingException, IOException 351 { 352 getDatabase().remove(getDatabase().findById(OntologyTerm.class, id)); 353 } 354 355 @GET 59 356 @Path("/json/data") 60 357 @Produces("application/json") -
biobank_search/generated/java/app/servlet/SoapApi.java
r3425 r3486 15 15 import javax.naming.NamingException; 16 16 17 import biobank_search.User; 18 import biobank_search.Patient; 19 import biobank_search.Gene; 20 import biobank_search.OntologySource; 21 import biobank_search.OntologyTerm; 17 22 import biobank_search.Data; 23 import biobank_search.Patient_Ontology; 24 import biobank_search.Patient_GenesTested; 18 25 19 26 import org.apache.commons.dbcp.BasicDataSource; … … 35 42 // GET SERVICES (for each entity) 36 43 @WebMethod() 44 @WebResult(name = "userList") 45 public User getUser(@WebParam(name = "user_id")Integer pkey) 46 { 47 try 48 { 49 Database database = getDatabase(); 50 List<User> _result = database.query(User.class).equals("user_id", pkey).find(); 51 if(_result.size() == 1) 52 return _result.get(0);//.toString()+"\n"; 53 return null; 54 } 55 catch (Exception e) 56 { 57 e.printStackTrace(); 58 return null; 59 } 60 } 61 @WebMethod() 62 @WebResult(name = "patientList") 63 public Patient getPatient(@WebParam(name = "PatientID")Integer pkey) 64 { 65 try 66 { 67 Database database = getDatabase(); 68 List<Patient> _result = database.query(Patient.class).equals("PatientID", pkey).find(); 69 if(_result.size() == 1) 70 return _result.get(0);//.toString()+"\n"; 71 return null; 72 } 73 catch (Exception e) 74 { 75 e.printStackTrace(); 76 return null; 77 } 78 } 79 @WebMethod() 80 @WebResult(name = "geneList") 81 public Gene getGene(@WebParam(name = "id")Integer pkey) 82 { 83 try 84 { 85 Database database = getDatabase(); 86 List<Gene> _result = database.query(Gene.class).equals("id", pkey).find(); 87 if(_result.size() == 1) 88 return _result.get(0);//.toString()+"\n"; 89 return null; 90 } 91 catch (Exception e) 92 { 93 e.printStackTrace(); 94 return null; 95 } 96 } 97 @WebMethod() 98 @WebResult(name = "ontologySourceList") 99 public OntologySource getOntologySource(@WebParam(name = "id")Integer pkey) 100 { 101 try 102 { 103 Database database = getDatabase(); 104 List<OntologySource> _result = database.query(OntologySource.class).equals("id", pkey).find(); 105 if(_result.size() == 1) 106 return _result.get(0);//.toString()+"\n"; 107 return null; 108 } 109 catch (Exception e) 110 { 111 e.printStackTrace(); 112 return null; 113 } 114 } 115 @WebMethod() 116 @WebResult(name = "ontologyTermList") 117 public OntologyTerm getOntologyTerm(@WebParam(name = "id")Integer pkey) 118 { 119 try 120 { 121 Database database = getDatabase(); 122 List<OntologyTerm> _result = database.query(OntologyTerm.class).equals("id", pkey).find(); 123 if(_result.size() == 1) 124 return _result.get(0);//.toString()+"\n"; 125 return null; 126 } 127 catch (Exception e) 128 { 129 e.printStackTrace(); 130 return null; 131 } 132 } 133 @WebMethod() 37 134 @WebResult(name = "dataList") 38 135 public Data getData(@WebParam(name = "id")Integer pkey) … … 54 151 55 152 //FIND SERVICES (for each entity) 153 @WebMethod() 154 @WebResult(name = "userList") 155 public List<User> findUser( 156 @WebParam(name = "user_id") Integer user_id, 157 @WebParam(name = "loginname") String loginname, 158 @WebParam(name = "firstname") String firstname, 159 @WebParam(name = "midinitials") String midinitials, 160 @WebParam(name = "lastname") String lastname, 161 @WebParam(name = "title") String title, 162 @WebParam(name = "profession") String profession, 163 @WebParam(name = "instituteHospital") String instituteHospital, 164 @WebParam(name = "address") String address, 165 @WebParam(name = "zipcode") String zipcode, 166 @WebParam(name = "city") String city, 167 @WebParam(name = "country") String country, 168 @WebParam(name = "phonenumber") String phonenumber, 169 @WebParam(name = "faxnumber") String faxnumber, 170 @WebParam(name = "email") String email) 171 { 172 try 173 { 174 Query q = getDatabase().query(User.class); 175 if(user_id != null) q.equals("user_id", user_id); 176 if(loginname != null) q.equals("loginname", loginname); 177 if(firstname != null) q.equals("firstname", firstname); 178 if(midinitials != null) q.equals("midinitials", midinitials); 179 if(lastname != null) q.equals("lastname", lastname); 180 if(title != null) q.equals("title", title); 181 if(profession != null) q.equals("profession", profession); 182 if(instituteHospital != null) q.equals("instituteHospital", instituteHospital); 183 if(address != null) q.equals("address", address); 184 if(zipcode != null) q.equals("zipcode", zipcode); 185 if(city != null) q.equals("city", city); 186 if(country != null) q.equals("country", country); 187 if(phonenumber != null) q.equals("phonenumber", phonenumber); 188 if(faxnumber != null) q.equals("faxnumber", faxnumber); 189 if(email != null) q.equals("email", email); 190 return q.limit(1000).find(); //safety net of 1000 191 } 192 catch (Exception e) 193 { 194 e.printStackTrace(); 195 return null; 196 } 197 } 198 199 @WebMethod() 200 @WebResult(name = "userCsv") 201 public String findUserCsv( 202 @WebParam(name = "user_id") Integer user_id, 203 @WebParam(name = "loginname") String loginname, 204 @WebParam(name = "firstname") String firstname, 205 @WebParam(name = "midinitials") String midinitials, 206 @WebParam(name = "lastname") String lastname, 207 @WebParam(name = "title") String title, 208 @WebParam(name = "profession") String profession, 209 @WebParam(name = "instituteHospital") String instituteHospital, 210 @WebParam(name = "address") String address, 211 @WebParam(name = "zipcode") String zipcode, 212 @WebParam(name = "city") String city, 213 @WebParam(name = "country") String country, 214 @WebParam(name = "phonenumber") String phonenumber, 215 @WebParam(name = "faxnumber") String faxnumber, 216 @WebParam(name = "email") String email) 217 { 218 try 219 { 220 ByteArrayOutputStream _result = new ByteArrayOutputStream(); 221 PrintWriter out = new PrintWriter(_result); 222 Query q = getDatabase().query(User.class); 223 if(user_id != null) q.equals("user_id", user_id); 224 if(loginname != null) q.equals("loginname", loginname); 225 if(firstname != null) q.equals("firstname", firstname); 226 if(midinitials != null) q.equals("midinitials", midinitials); 227 if(lastname != null) q.equals("lastname", lastname); 228 if(title != null) q.equals("title", title); 229 if(profession != null) q.equals("profession", profession); 230 if(instituteHospital != null) q.equals("instituteHospital", instituteHospital); 231 if(address != null) q.equals("address", address); 232 if(zipcode != null) q.equals("zipcode", zipcode); 233 if(city != null) q.equals("city", city); 234 if(country != null) q.equals("country", country); 235 if(phonenumber != null) q.equals("phonenumber", phonenumber); 236 if(faxnumber != null) q.equals("faxnumber", faxnumber); 237 if(email != null) q.equals("email", email); 238 q.limit(1000).find(new CsvWriter(out)); //safety net of 1000 239 out.close(); 240 return _result.toString(); 241 } 242 catch (Exception e) 243 { 244 e.printStackTrace(); 245 return null; 246 } 247 } 248 @WebMethod() 249 @WebResult(name = "patientList") 250 public List<Patient> findPatient( 251 @WebParam(name = "user_id") Integer user_id, 252 @WebParam(name = "user_id_loginname") Integer user_id_loginname, 253 @WebParam(name = "patientID") Integer patientID, 254 @WebParam(name = "ontology") java.util.List<Integer> ontology, 255 @WebParam(name = "ontology_term") java.util.List<Integer> ontology_term, 256 @WebParam(name = "patientFileNumber") String patientFileNumber, 257 @WebParam(name = "disease") String disease, 258 @WebParam(name = "numberOfFamilyMembersWithThisDisease") String numberOfFamilyMembersWithThisDisease, 259 @WebParam(name = "totalGenerations") String totalGenerations, 260 @WebParam(name = "possibleGeneticType") String possibleGeneticType, 261 @WebParam(name = "country") String country, 262 @WebParam(name = "etnicBackground") String etnicBackground, 263 @WebParam(name = "familyResearch") String familyResearch, 264 @WebParam(name = "hasDNA") String hasDNA, 265 @WebParam(name = "hasRNA") String hasRNA, 266 @WebParam(name = "dNAFromTissue") String dNAFromTissue, 267 @WebParam(name = "rNAFromTissue") String rNAFromTissue, 268 @WebParam(name = "dNAFromBlood") String dNAFromBlood, 269 @WebParam(name = "cellsAvailable") String cellsAvailable, 270 @WebParam(name = "chromosomalResearch") String chromosomalResearch, 271 @WebParam(name = "wGA") String wGA, 272 @WebParam(name = "literatureRef") String literatureRef, 273 @WebParam(name = "pedigree") String pedigree, 274 @WebParam(name = "genesTested") java.util.List<Integer> genesTested, 275 @WebParam(name = "genesTested_GeneName") java.util.List<Integer> genesTested_GeneName, 276 @WebParam(name = "freeText") String freeText, 277 @WebParam(name = "selectFreeText") String selectFreeText) 278 { 279 try 280 { 281 Query q = getDatabase().query(Patient.class); 282 if(user_id != null) q.equals("user_id", user_id); 283 if(patientID != null) q.equals("patientID", patientID); 284 if(ontology != null) q.equals("ontology", ontology); 285 if(patientFileNumber != null) q.equals("patientFileNumber", patientFileNumber); 286 if(disease != null) q.equals("disease", disease); 287 if(numberOfFamilyMembersWithThisDisease != null) q.equals("numberOfFamilyMembersWithThisDisease", numberOfFamilyMembersWithThisDisease); 288 if(totalGenerations != null) q.equals("totalGenerations", totalGenerations); 289 if(possibleGeneticType != null) q.equals("possibleGeneticType", possibleGeneticType); 290 if(country != null) q.equals("country", country); 291 if(etnicBackground != null) q.equals("etnicBackground", etnicBackground); 292 if(familyResearch != null) q.equals("familyResearch", familyResearch); 293 if(hasDNA != null) q.equals("hasDNA", hasDNA); 294 if(hasRNA != null) q.equals("hasRNA", hasRNA); 295 if(dNAFromTissue != null) q.equals("dNAFromTissue", dNAFromTissue); 296 if(rNAFromTissue != null) q.equals("rNAFromTissue", rNAFromTissue); 297 if(dNAFromBlood != null) q.equals("dNAFromBlood", dNAFromBlood); 298 if(cellsAvailable != null) q.equals("cellsAvailable", cellsAvailable); 299 if(chromosomalResearch != null) q.equals("chromosomalResearch", chromosomalResearch); 300 if(wGA != null) q.equals("wGA", wGA); 301 if(literatureRef != null) q.equals("literatureRef", literatureRef); 302 if(pedigree != null) q.equals("pedigree", pedigree); 303 if(genesTested != null) q.equals("genesTested", genesTested); 304 if(freeText != null) q.equals("freeText", freeText); 305 if(selectFreeText != null) q.equals("selectFreeText", selectFreeText); 306 return q.limit(1000).find(); //safety net of 1000 307 } 308 catch (Exception e) 309 { 310 e.printStackTrace(); 311 return null; 312 } 313 } 314 315 @WebMethod() 316 @WebResult(name = "patientCsv") 317 public String findPatientCsv( 318 @WebParam(name = "user_id") Integer user_id, 319 @WebParam(name = "user_id_loginname") Integer user_id_loginname, 320 @WebParam(name = "patientID") Integer patientID, 321 @WebParam(name = "ontology") java.util.List<Integer> ontology, 322 @WebParam(name = "ontology_term") java.util.List<Integer> ontology_term, 323 @WebParam(name = "patientFileNumber") String patientFileNumber, 324 @WebParam(name = "disease") String disease, 325 @WebParam(name = "numberOfFamilyMembersWithThisDisease") String numberOfFamilyMembersWithThisDisease, 326 @WebParam(name = "totalGenerations") String totalGenerations, 327 @WebParam(name = "possibleGeneticType") String possibleGeneticType, 328 @WebParam(name = "country") String country, 329 @WebParam(name = "etnicBackground") String etnicBackground, 330 @WebParam(name = "familyResearch") String familyResearch, 331 @WebParam(name = "hasDNA") String hasDNA, 332 @WebParam(name = "hasRNA") String hasRNA, 333 @WebParam(name = "dNAFromTissue") String dNAFromTissue, 334 @WebParam(name = "rNAFromTissue") String rNAFromTissue, 335 @WebParam(name = "dNAFromBlood") String dNAFromBlood, 336 @WebParam(name = "cellsAvailable") String cellsAvailable, 337 @WebParam(name = "chromosomalResearch") String chromosomalResearch, 338 @WebParam(name = "wGA") String wGA, 339 @WebParam(name = "literatureRef") String literatureRef, 340 @WebParam(name = "pedigree") String pedigree, 341 @WebParam(name = "genesTested") java.util.List<Integer> genesTested, 342 @WebParam(name = "genesTested_GeneName") java.util.List<Integer> genesTested_GeneName, 343 @WebParam(name = "freeText") String freeText, 344 @WebParam(name = "selectFreeText") String selectFreeText) 345 { 346 try 347 { 348 ByteArrayOutputStream _result = new ByteArrayOutputStream(); 349 PrintWriter out = new PrintWriter(_result); 350 Query q = getDatabase().query(Patient.class); 351 if(user_id != null) q.equals("user_id", user_id); 352 if(patientID != null) q.equals("patientID", patientID); 353 if(ontology != null) q.equals("ontology", ontology); 354 if(patientFileNumber != null) q.equals("patientFileNumber", patientFileNumber); 355 if(disease != null) q.equals("disease", disease); 356 if(numberOfFamilyMembersWithThisDisease != null) q.equals("numberOfFamilyMembersWithThisDisease", numberOfFamilyMembersWithThisDisease); 357 if(totalGenerations != null) q.equals("totalGenerations", totalGenerations); 358 if(possibleGeneticType != null) q.equals("possibleGeneticType", possibleGeneticType); 359 if(country != null) q.equals("country", country); 360 if(etnicBackground != null) q.equals("etnicBackground", etnicBackground); 361 if(familyResearch != null) q.equals("familyResearch", familyResearch); 362 if(hasDNA != null) q.equals("hasDNA", hasDNA); 363 if(hasRNA != null) q.equals("hasRNA", hasRNA); 364 if(dNAFromTissue != null) q.equals("dNAFromTissue", dNAFromTissue); 365 if(rNAFromTissue != null) q.equals("rNAFromTissue", rNAFromTissue); 366 if(dNAFromBlood != null) q.equals("dNAFromBlood", dNAFromBlood); 367 if(cellsAvailable != null) q.equals("cellsAvailable", cellsAvailable); 368 if(chromosomalResearch != null) q.equals("chromosomalResearch", chromosomalResearch); 369 if(wGA != null) q.equals("wGA", wGA); 370 if(literatureRef != null) q.equals("literatureRef", literatureRef); 371 if(pedigree != null) q.equals("pedigree", pedigree); 372 if(genesTested != null) q.equals("genesTested", genesTested); 373 if(freeText != null) q.equals("freeText", freeText); 374 if(selectFreeText != null) q.equals("selectFreeText", selectFreeText); 375 q.limit(1000).find(new CsvWriter(out)); //safety net of 1000 376 out.close(); 377 return _result.toString(); 378 } 379 catch (Exception e) 380 { 381 e.printStackTrace(); 382 return null; 383 } 384 } 385 @WebMethod() 386 @WebResult(name = "geneList") 387 public List<Gene> findGene( 388 @WebParam(name = "id") Integer id, 389 @WebParam(name = "geneName") String geneName, 390 @WebParam(name = "chromosomeLocation") String chromosomeLocation, 391 @WebParam(name = "geneDescription") String geneDescription) 392 { 393 try 394 { 395 Query q = getDatabase().query(Gene.class); 396 if(id != null) q.equals("id", id); 397 if(geneName != null) q.equals("geneName", geneName); 398 if(chromosomeLocation != null) q.equals("chromosomeLocation", chromosomeLocation); 399 if(geneDescription != null) q.equals("geneDescription", geneDescription); 400 return q.limit(1000).find(); //safety net of 1000 401 } 402 catch (Exception e) 403 { 404 e.printStackTrace(); 405 return null; 406 } 407 } 408 409 @WebMethod() 410 @WebResult(name = "geneCsv") 411 public String findGeneCsv( 412 @WebParam(name = "id") Integer id, 413 @WebParam(name = "geneName") String geneName, 414 @WebParam(name = "chromosomeLocation") String chromosomeLocation, 415 @WebParam(name = "geneDescription") String geneDescription) 416 { 417 try 418 { 419 ByteArrayOutputStream _result = new ByteArrayOutputStream(); 420 PrintWriter out = new PrintWriter(_result); 421 Query q = getDatabase().query(Gene.class); 422 if(id != null) q.equals("id", id); 423 if(geneName != null) q.equals("geneName", geneName); 424 if(chromosomeLocation != null) q.equals("chromosomeLocation", chromosomeLocation); 425 if(geneDescription != null) q.equals("geneDescription", geneDescription); 426 q.limit(1000).find(new CsvWriter(out)); //safety net of 1000 427 out.close(); 428 return _result.toString(); 429 } 430 catch (Exception e) 431 { 432 e.printStackTrace(); 433 return null; 434 } 435 } 436 @WebMethod() 437 @WebResult(name = "ontologySourceList") 438 public List<OntologySource> findOntologySource( 439 @WebParam(name = "id") Integer id, 440 @WebParam(name = "name") String name) 441 { 442 try 443 { 444 Query q = getDatabase().query(OntologySource.class); 445 if(id != null) q.equals("id", id); 446 if(name != null) q.equals("name", name); 447 return q.limit(1000).find(); //safety net of 1000 448 } 449 catch (Exception e) 450 { 451 e.printStackTrace(); 452 return null; 453 } 454 } 455 456 @WebMethod() 457 @WebResult(name = "ontologySourceCsv") 458 public String findOntologySourceCsv( 459 @WebParam(name = "id") Integer id, 460 @WebParam(name = "name") String name) 461 { 462 try 463 { 464 ByteArrayOutputStream _result = new ByteArrayOutputStream(); 465 PrintWriter out = new PrintWriter(_result); 466 Query q = getDatabase().query(OntologySource.class); 467 if(id != null) q.equals("id", id); 468 if(name != null) q.equals("name", name); 469 q.limit(1000).find(new CsvWriter(out)); //safety net of 1000 470 out.close(); 471 return _result.toString(); 472 } 473 catch (Exception e) 474 { 475 e.printStackTrace(); 476 return null; 477 } 478 } 479 @WebMethod() 480 @WebResult(name = "ontologyTermList") 481 public List<OntologyTerm> findOntologyTerm( 482 @WebParam(name = "id") Integer id, 483 @WebParam(name = "term") String term, 484 @WebParam(name = "description") String description, 485 @WebParam(name = "termAccession") String termAccession, 486 @WebParam(name = "termSource") Integer termSource, 487 @WebParam(name = "termSource_name") Integer termSource_name) 488 { 489 try 490 { 491 Query q = getDatabase().query(OntologyTerm.class); 492 if(id != null) q.equals("id", id); 493 if(term != null) q.equals("term", term); 494 if(description != null) q.equals("description", description); 495 if(termAccession != null) q.equals("termAccession", termAccession); 496 if(termSource != null) q.equals("termSource", termSource); 497 return q.limit(1000).find(); //safety net of 1000 498 } 499 catch (Exception e) 500 { 501 e.printStackTrace(); 502 return null; 503 } 504 } 505 506 @WebMethod() 507 @WebResult(name = "ontologyTermCsv") 508 public String findOntologyTermCsv( 509 @WebParam(name = "id") Integer id, 510 @WebParam(name = "term") String term, 511 @WebParam(name = "description") String description, 512 @WebParam(name = "termAccession") String termAccession, 513 @WebParam(name = "termSource") Integer termSource, 514 @WebParam(name = "termSource_name") Integer termSource_name) 515 { 516 try 517 { 518 ByteArrayOutputStream _result = new ByteArrayOutputStream(); 519 PrintWriter out = new PrintWriter(_result); 520 Query q = getDatabase().query(OntologyTerm.class); 521 if(id != null) q.equals("id", id); 522 if(term != null) q.equals("term", term); 523 if(description != null) q.equals("description", description); 524 if(termAccession != null) q.equals("termAccession", termAccession); 525 if(termSource != null) q.equals("termSource", termSource); 526 q.limit(1000).find(new CsvWriter(out)); //safety net of 1000 527 out.close(); 528 return _result.toString(); 529 } 530 catch (Exception e) 531 { 532 e.printStackTrace(); 533 return null; 534 } 535 } 56 536 @WebMethod() 57 537 @WebResult(name = "dataList") … … 133 613 } 134 614 } 615 @WebMethod() 616 @WebResult(name = "patient_OntologyList") 617 public List<Patient_Ontology> findPatient_Ontology( 618 @WebParam(name = "autoid") Integer autoid, 619 @WebParam(name = "ontology") Integer ontology, 620 @WebParam(name = "ontology_term") Integer ontology_term, 621 @WebParam(name = "patient") Integer patient) 622 { 623 try 624 { 625 Query q = getDatabase().query(Patient_Ontology.class); 626 if(autoid != null) q.equals("autoid", autoid); 627 if(ontology != null) q.equals("ontology", ontology); 628 if(patient != null) q.equals("patient", patient); 629 return q.limit(1000).find(); //safety net of 1000 630 } 631 catch (Exception e) 632 { 633 e.printStackTrace(); 634 return null; 635 } 636 } 637 638 @WebMethod() 639 @WebResult(name = "patient_OntologyCsv") 640 public String findPatient_OntologyCsv( 641 @WebParam(name = "autoid") Integer autoid, 642 @WebParam(name = "ontology") Integer ontology, 643 @WebParam(name = "ontology_term") Integer ontology_term, 644 @WebParam(name = "patient") Integer patient) 645 { 646 try 647 { 648 ByteArrayOutputStream _result = new ByteArrayOutputStream(); 649 PrintWriter out = new PrintWriter(_result); 650 Query q = getDatabase().query(Patient_Ontology.class); 651 if(autoid != null) q.equals("autoid", autoid); 652 if(ontology != null) q.equals("ontology", ontology); 653 if(patient != null) q.equals("patient", patient); 654 q.limit(1000).find(new CsvWriter(out)); //safety net of 1000 655 out.close(); 656 return _result.toString(); 657 } 658 catch (Exception e) 659 { 660 e.printStackTrace(); 661 return null; 662 } 663 } 664 @WebMethod() 665 @WebResult(name = "patient_GenesTestedList") 666 public List<Patient_GenesTested> findPatient_GenesTested( 667 @WebParam(name = "autoid") Integer autoid, 668 @WebParam(name = "genesTested") Integer genesTested, 669 @WebParam(name = "genesTested_GeneName") Integer genesTested_GeneName, 670 @WebParam(name = "patient") Integer patient) 671 { 672 try 673 { 674 Query q = getDatabase().query(Patient_GenesTested.class); 675 if(autoid != null) q.equals("autoid", autoid); 676 if(genesTested != null) q.equals("genesTested", genesTested); 677 if(patient != null) q.equals("patient", patient); 678 return q.limit(1000).find(); //safety net of 1000 679 } 680 catch (Exception e) 681 { 682 e.printStackTrace(); 683 return null; 684 } 685 } 686 687 @WebMethod() 688 @WebResult(name = "patient_GenesTestedCsv") 689 public String findPatient_GenesTestedCsv( 690 @WebParam(name = "autoid") Integer autoid, 691 @WebParam(name = "genesTested") Integer genesTested, 692 @WebParam(name = "genesTested_GeneName") Integer genesTested_GeneName, 693 @WebParam(name = "patient") Integer patient) 694 { 695 try 696 { 697 ByteArrayOutputStream _result = new ByteArrayOutputStream(); 698 PrintWriter out = new PrintWriter(_result); 699 Query q = getDatabase().query(Patient_GenesTested.class); 700 if(autoid != null) q.equals("autoid", autoid); 701 if(genesTested != null) q.equals("genesTested", genesTested); 702 if(patient != null) q.equals("patient", patient); 703 q.limit(1000).find(new CsvWriter(out)); //safety net of 1000 704 out.close(); 705 return _result.toString(); 706 } 707 catch (Exception e) 708 { 709 e.printStackTrace(); 710 return null; 711 } 712 } 135 713 136 714 //CUSTOM SERVICES (defined by 'method' entries in MOLGENIS xml) -
biobank_search/generated/java/app/servlet/source.R
r3425 r3486 2 2 # File: biobank_search/R/generated/java/app/servlet/source.R 3 3 # Copyright: GBIC 2000-2010, all rights reserved 4 # Date: August 20, 20104 # Date: September 8, 2010 5 5 # 6 6 # generator: org.molgenis.generators.R.RApiGen 3.3.2-testing … … 15 15 16 16 #entities 17 source(paste(molgenispath,"biobank_search/R/User.R", sep="")) 18 source(paste(molgenispath,"biobank_search/R/Patient.R", sep="")) 19 source(paste(molgenispath,"biobank_search/R/Gene.R", sep="")) 20 source(paste(molgenispath,"biobank_search/R/OntologySource.R", sep="")) 21 source(paste(molgenispath,"biobank_search/R/OntologyTerm.R", sep="")) 17 22 source(paste(molgenispath,"biobank_search/R/Data.R", sep="")) 18 23 -
biobank_search/generated/java/app/ui/DBIndexPlugin.java
r3425 r3486 1 1 /* File: Biobank_search/screen/DBIndex.java 2 2 * Copyright: GBIC 2000-2010, all rights reserved 3 * Date: August 20, 20103 * Date: September 8, 2010 4 4 * 5 5 * generator: org.molgenis.generators.ui.PluginScreenGen 3.3.2-testing -
biobank_search/generated/java/app/ui/DataForm.java
r3425 r3486 1 1 /* File: Biobank_search/screen/Data.java 2 2 * Copyright: GBIC 2000-2010, all rights reserved 3 * Date: August 20, 20103 * Date: September 8, 2010 4 4 * 5 5 * generator: org.molgenis.generators.ui.FormScreenGen 3.3.2-testing -
biobank_search/generated/java/app/ui/GenericWizardPlugin.java
r3425 r3486 1 1 /* File: Biobank_search/screen/GenericWizard.java 2 2 * Copyright: GBIC 2000-2010, all rights reserved 3 * Date: August 20, 20103 * Date: September 8, 2010 4 4 * 5 5 * generator: org.molgenis.generators.ui.PluginScreenGen 3.3.2-testing -
biobank_search/generated/java/app/ui/MainMenu.java
r3425 r3486 1 1 /* File: Biobank_search/screen/Main.java 2 2 * Copyright: GBIC 2000-2010, all rights reserved 3 * Date: August 20, 20103 * Date: September 8, 2010 4 4 * 5 5 * generator: org.molgenis.generators.ui.MenuScreenGen 3.3.2-testing -
biobank_search/generated/java/app/ui/Molgenis_headerPlugin.java
r3425 r3486 1 1 /* File: Biobank_search/screen/molgenis_header.java 2 2 * Copyright: GBIC 2000-2010, all rights reserved 3 * Date: August 20, 20103 * Date: September 8, 2010 4 4 * 5 5 * generator: org.molgenis.generators.ui.PluginScreenGen 3.3.2-testing -
biobank_search/generated/java/app/ui/OntoCatIndexPlugin2Plugin.java
r3425 r3486 1 1 /* File: Biobank_search/screen/OntoCatIndexPlugin2.java 2 2 * Copyright: GBIC 2000-2010, all rights reserved 3 * Date: August 20, 20103 * Date: September 8, 2010 4 4 * 5 5 * generator: org.molgenis.generators.ui.PluginScreenGen 3.3.2-testing -
biobank_search/generated/java/biobank_search/Data.java
r3425 r3486 2 2 /* File: biobank_search/model/data.java 3 3 * Copyright: GBIC 2000-2010, all rights reserved 4 * Date: August 20, 20104 * Date: September 8, 2010 5 5 * Generator: org.molgenis.generators.DataTypeGen 3.3.2-testing 6 6 * … … 32 32 /** 33 33 * Data: . 34 * @version August 20, 201034 * @version September 8, 2010 35 35 * @author MOLGENIS generator 36 36 */ -
biobank_search/generated/java/biobank_search/R/Data.R
r3425 r3486 2 2 # File: biobank_search/R/generated/java/biobank_search/R/Data.R 3 3 # Copyright: GBIC 2000-2010, all rights reserved 4 # Date: August 20, 20104 # Date: September 8, 2010 5 5 # 6 6 # generator: org.molgenis.generators.R.REntityGen 3.3.2-testing -
biobank_search/generated/java/biobank_search/csv/DataCsvReader.java
r3425 r3486 2 2 /* File: biobank_search/model/data.java 3 3 * Copyright: GBIC 2000-2010, all rights reserved 4 * Date: August 20, 20104 * Date: September 8, 2010 5 5 * 6 6 * generator: org.molgenis.generators.csv.CsvReaderGen 3.3.2-testing -
biobank_search/generated/java/biobank_search/db/DataMapper.java
r3425 r3486 1 1 /* File: biobank_search/model/data.java 2 2 * Copyright: GBIC 2000-2010, all rights reserved 3 * Date: August 20, 20103 * Date: September 8, 2010 4 4 * Template: MultiqueryMapperGen.java.ftl 5 5 * generator: org.molgenis.generators.db.MultiqueryMapperGen 3.3.2-testing -
biobank_search/generated/java/biobank_search/excel/DataExcelReader.java
r3425 r3486 2 2 /* File: biobank_search/model/data.java 3 3 * Copyright: GBIC 2000-2010, all rights reserved 4 * Date: August 20, 20104 * Date: September 8, 2010 5 5 * 6 6 * generator: org.molgenis.generators.excel.ExcelReaderGen 3.3.2-testing -
biobank_search/generated/java/test/TestCsv.java
r3425 r3486 1 1 /* File: app/JUnitTest.java 2 2 * Copyright: GBIC 2000-2010, all rights reserved 3 * Date: August 20, 20103 * Date: September 8, 2010 4 4 * 5 5 * generator: org.molgenis.generators.tests.TestCsvGen 3.3.2-testing … … 35 35 import org.testng.annotations.Test; 36 36 37 import biobank_search.User; 38 import biobank_search.Patient; 39 import biobank_search.Gene; 40 import biobank_search.OntologySource; 41 import biobank_search.OntologyTerm; 37 42 import biobank_search.Data; 43 import biobank_search.Patient_Ontology; 44 import biobank_search.Patient_GenesTested; 38 45 39 46 /** … … 75 82 File dir1 = new File(dir + "/dir1"); 76 83 dir1.mkdirs(); 77 new CsvExport().exportAll(dir1, set1. data);84 new CsvExport().exportAll(dir1, set1.user,set1.patient,set1.gene,set1.ontologySource,set1.ontologyTerm,set1.data,set1.patient_Ontology,set1.patient_GenesTested); 78 85 79 86 //import dir1 into database … … 131 138 { 132 139 TestDataSet copy = new TestDataSet(); 140 copy.user = db.find(User.class); 141 copy.patient = db.find(Patient.class); 142 copy.gene = db.find(Gene.class); 143 copy.ontologySource = db.find(OntologySource.class); 144 copy.ontologyTerm = db.find(OntologyTerm.class); 133 145 copy.data = db.find(Data.class); 134 146 return copy; -
biobank_search/generated/java/test/TestDataSet.java
r3425 r3486 1 1 /* File: app/JUnitTest.java 2 2 * Copyright: GBIC 2000-2010, all rights reserved 3 * Date: August 20, 20103 * Date: September 8, 2010 4 4 * 5 5 * generator: org.molgenis.generators.tests.TestDataSetGen 3.3.2-testing … … 37 37 import org.testng.annotations.Test; 38 38 39 import biobank_search.User; 40 import biobank_search.Patient; 41 import biobank_search.Gene; 42 import biobank_search.OntologySource; 43 import biobank_search.OntologyTerm; 39 44 import biobank_search.Data; 45 import biobank_search.Patient_Ontology; 46 import biobank_search.Patient_GenesTested; 40 47 41 48 /** … … 58 65 public TestDataSet(int size, int mrefSize) 59 66 { 67 //generating User data: 68 for(Integer i = 0; i < size; i++) 69 { 70 User e = new User(); 71 //assign field loginname 72 e.setLoginname("User_loginname"+i); 73 //assign field Firstname 74 e.setFirstname("User_Firstname"+i); 75 //assign field Midinitials 76 e.setMidinitials("User_Midinitials"+i); 77 //assign field Lastname 78 e.setLastname("User_Lastname"+i); 79 //assign field Title 80 e.setTitle("User_Title"+i); 81 //assign field Profession 82 e.setProfession("User_Profession"+i); 83 //assign field InstituteHospital 84 e.setInstituteHospital("User_InstituteHospital"+i); 85 //assign field Address 86 e.setAddress("User_Address"+i); 87 //assign field Zipcode 88 e.setZipcode("User_Zipcode"+i); 89 //assign field City 90 e.setCity("User_City"+i); 91 //assign field Country 92 e.setCountry("User_Country"+i); 93 //assign field Phonenumber 94 e.setPhonenumber("User_Phonenumber"+i); 95 //assign field Faxnumber 96 e.setFaxnumber("User_Faxnumber"+i); 97 //assign field Email 98 e.setEmail("User_Email"+i); 99 this.user.add(e); 100 } 101 //generating OntologySource data: 102 for(Integer i = 0; i < size; i++) 103 { 104 OntologySource e = new OntologySource(); 105 //assign field name 106 e.setName("OntologySource_name"+i); 107 this.ontologySource.add(e); 108 } 109 //generating Gene data: 110 for(Integer i = 0; i < size; i++) 111 { 112 Gene e = new Gene(); 113 //assign field GeneName 114 e.setGeneName("Gene_GeneName"+i); 115 //assign field chromosomeLocation 116 e.setChromosomeLocation("Gene_chromosomeLocation"+i); 117 //assign field geneDescription 118 e.setGeneDescription("Gene_geneDescription"+i); 119 this.gene.add(e); 120 } 121 //generating OntologyTerm data: 122 for(Integer i = 0; i < size; i++) 123 { 124 OntologyTerm e = new OntologyTerm(); 125 //assign field term 126 e.setTerm("OntologyTerm_term"+i); 127 //assign field description 128 e.setDescription("OntologyTerm_description"+i); 129 //assign field termAccession 130 e.setTermAccession("OntologyTerm_termAccession"+i); 131 //assign field termSource 132 if( this.ontologySource.size() > 0) 133 { 134 OntologySource ref = this.ontologySource.get(random(this.ontologySource.size())); 135 e.setTermSource_name(ref.getName() ); 136 } 137 this.ontologyTerm.add(e); 138 } 139 //generating Patient data: 140 for(Integer i = 0; i < size; i++) 141 { 142 Patient e = new Patient(); 143 //assign field user_id 144 if( this.user.size() > 0) 145 { 146 User ref = this.user.get(random(this.user.size())); 147 e.setUser_id_loginname(ref.getLoginname() ); 148 } 149 //assign field Ontology 150 if( this.ontologyTerm.size() > 0) 151 { 152 //get a set of unique entity indexes 153 Set<Integer> indexes = new LinkedHashSet(); 154 for(int j = 0; j < mrefSize; j++) 155 { 156 indexes.add(random(this.ontologyTerm.size())); 157 } 158 List<String> termList = new ArrayList<String>(); 159 for(Integer index: indexes) 160 { 161 termList.add( this.ontologyTerm.get(index).getTerm() ); 162 } 163 e.setOntology_term( termList ); 164 } 165 //assign field PatientFileNumber 166 e.setPatientFileNumber("Patient_PatientFileNumber"+i); 167 //assign field Disease 168 e.setDisease("Patient_Disease"+i); 169 //assign field NumberOfFamilyMembersWithThisDisease 170 e.setNumberOfFamilyMembersWithThisDisease("Patient_NumberOfFamilyMembersWithThisDisease"+i); 171 //assign field TotalGenerations 172 e.setTotalGenerations(randomEnum(new String[]{"0","1","2","3","4","5","6","7","8","unknown"})); 173 //assign field PossibleGeneticType 174 e.setPossibleGeneticType(randomEnum(new String[]{"AD","AR","XL","Mitochondrial","Imprinted","Multifact","Unknown"})); 175 //assign field Country 176 e.setCountry("Patient_Country"+i); 177 //assign field EtnicBackground 178 e.setEtnicBackground(randomEnum(new String[]{"Caucasian","Asian","African","Latin","Ashkenasi"})); 179 //assign field FamilyResearch 180 e.setFamilyResearch(randomEnum(new String[]{"Yes","No"})); 181 //assign field hasDNA 182 e.setHasDNA(randomEnum(new String[]{"yes","no","unknown"})); 183 //assign field hasRNA 184 e.setHasRNA(randomEnum(new String[]{"yes","no","unknown"})); 185 //assign field DNAFromTissue 186 e.setDNAFromTissue(randomEnum(new String[]{"Yes","No","Unknown"})); 187 //assign field RNAFromTissue 188 e.setRNAFromTissue(randomEnum(new String[]{"Yes","No","Unknown"})); 189 //assign field DNAFromBlood 190 e.setDNAFromBlood(randomEnum(new String[]{"Yes","No","Unknown"})); 191 //assign field CellsAvailable 192 e.setCellsAvailable(randomEnum(new String[]{"Fibroblasten","EBV immortalized lymphocytes","Unknown"})); 193 //assign field ChromosomalResearch 194 e.setChromosomalResearch(randomEnum(new String[]{"Yes","No","Unknown"})); 195 //assign field WGA 196 e.setWGA(randomEnum(new String[]{"Yes","No","Unknown"})); 197 //assign field LiteratureRef 198 e.setLiteratureRef("Patient_LiteratureRef"+i); 199 //assign field Pedigree 200 e.setPedigree("Patient_Pedigree"+i); 201 //assign field GenesTested 202 if( this.gene.size() > 0) 203 { 204 //get a set of unique entity indexes 205 Set<Integer> indexes = new LinkedHashSet(); 206 for(int j = 0; j < mrefSize; j++) 207 { 208 indexes.add(random(this.gene.size())); 209 } 210 List<String> GeneNameList = new ArrayList<String>(); 211 for(Integer index: indexes) 212 { 213 GeneNameList.add( this.gene.get(index).getGeneName() ); 214 } 215 e.setGenesTested_GeneName( GeneNameList ); 216 } 217 //assign field FreeText 218 e.setFreeText("Patient_FreeText"+i); 219 //assign field SelectFreeText 220 e.setSelectFreeText("Patient_SelectFreeText"+i); 221 this.patient.add(e); 222 } 60 223 //generating data data: 61 224 for(Integer i = 0; i < size; i++) … … 110 273 TestDataSet set = (TestDataSet) other; 111 274 275 if ( this.user == null ? set.user != null : !this.user.equals( set.user ) ) 276 return false; 277 if ( this.patient == null ? set.patient != null : !this.patient.equals( set.patient ) ) 278 return false; 279 if ( this.gene == null ? set.gene != null : !this.gene.equals( set.gene ) ) 280 return false; 281 if ( this.ontologySource == null ? set.ontologySource != null : !this.ontologySource.equals( set.ontologySource ) ) 282 return false; 283 if ( this.ontologyTerm == null ? set.ontologyTerm != null : !this.ontologyTerm.equals( set.ontologyTerm ) ) 284 return false; 112 285 if ( this.data == null ? set.data != null : !this.data.equals( set.data ) ) 286 return false; 287 if ( this.patient_Ontology == null ? set.patient_Ontology != null : !this.patient_Ontology.equals( set.patient_Ontology ) ) 288 return false; 289 if ( this.patient_GenesTested == null ? set.patient_GenesTested != null : !this.patient_GenesTested.equals( set.patient_GenesTested ) ) 113 290 return false; 114 291 … … 120 297 { 121 298 int hash = 1; 299 hash = hash * 31 + (this.user == null ? 0 : user.hashCode()); 300 hash = hash * 31 + (this.patient == null ? 0 : patient.hashCode()); 301 hash = hash * 31 + (this.gene == null ? 0 : gene.hashCode()); 302 hash = hash * 31 + (this.ontologySource == null ? 0 : ontologySource.hashCode()); 303 hash = hash * 31 + (this.ontologyTerm == null ? 0 : ontologyTerm.hashCode()); 122 304 hash = hash * 31 + (this.data == null ? 0 : data.hashCode()); 305 hash = hash * 31 + (this.patient_Ontology == null ? 0 : patient_Ontology.hashCode()); 306 hash = hash * 31 + (this.patient_GenesTested == null ? 0 : patient_GenesTested.hashCode()); 123 307 return hash; 124 308 } 125 309 310 public List<User> user = new ArrayList<User>(); 311 public List<Patient> patient = new ArrayList<Patient>(); 312 public List<Gene> gene = new ArrayList<Gene>(); 313 public List<OntologySource> ontologySource = new ArrayList<OntologySource>(); 314 public List<OntologyTerm> ontologyTerm = new ArrayList<OntologyTerm>(); 126 315 public List<Data> data = new ArrayList<Data>(); 316 public List<Patient_Ontology> patient_Ontology = new ArrayList<Patient_Ontology>(); 317 public List<Patient_GenesTested> patient_GenesTested = new ArrayList<Patient_GenesTested>(); 127 318 } -
biobank_search/generated/java/test/TestDatabase.java
r3425 r3486 1 1 /* File: app/JUnitTest.java 2 2 * Copyright: GBIC 2000-2010, all rights reserved 3 * Date: August 20, 20103 * Date: September 8, 2010 4 4 * 5 5 * generator: org.molgenis.generators.tests.TestDatabaseGen 3.3.2-testing … … 35 35 import org.testng.annotations.Test; 36 36 37 import biobank_search.User; 38 import biobank_search.Patient; 39 import biobank_search.Gene; 40 import biobank_search.OntologySource; 41 import biobank_search.OntologyTerm; 37 42 import biobank_search.Data; 43 import biobank_search.Patient_Ontology; 44 import biobank_search.Patient_GenesTested; 38 45 39 46 public class TestDatabase … … 67 74 68 75 76 @Test 77 public void testUser() throws DatabaseException, IOException, ParseException 78 { 79 //create entities 80 List<User> entities = new ArrayList<User>(); 81 82 //retrieve xref entity candidates 83 84 for(Integer i = 0; i < total; i++) 85 { 86 User e = new User(); 87 e.setLoginname("User_loginname_"+i); 88 e.setFirstname("User_Firstname_"+i); 89 e.setMidinitials("User_Midinitials_"+i); 90 e.setLastname("User_Lastname_"+i); 91 e.setTitle("User_Title_"+i); 92 e.setProfession("User_Profession_"+i); 93 e.setInstituteHospital("User_InstituteHospital_"+i); 94 e.setAddress("User_Address_"+i); 95 e.setZipcode("User_Zipcode_"+i); 96 e.setCity("User_City_"+i); 97 e.setCountry("User_Country_"+i); 98 e.setPhonenumber("User_Phonenumber_"+i); 99 e.setFaxnumber("User_Faxnumber_"+i); 100 e.setEmail("User_Email_"+i); 101 102 entities.add(e); 103 } 104 105 //add entities and check counts 106 db.add(entities); 107 Query<User> q = db.query(User.class); 108 assertEquals(total, q.count()); 109 List<User> entitiesDb = q.sortASC("user_id").find(); 110 assertEquals(total, entitiesDb.size()); 111 112 //compare entities against insert (assumes sorting by id) 113 for(int i = 0; i < total; i++) 114 { 115 assertNotNull(entities.get(i).getUser_id()); 116 assertEquals(entities.get(i).getLoginname(), entitiesDb.get(i).getLoginname()); 117 assertEquals(entities.get(i).getFirstname(), entitiesDb.get(i).getFirstname()); 118 assertEquals(entities.get(i).getMidinitials(), entitiesDb.get(i).getMidinitials()); 119 assertEquals(entities.get(i).getLastname(), entitiesDb.get(i).getLastname()); 120 assertEquals(entities.get(i).getTitle(), entitiesDb.get(i).getTitle()); 121 assertEquals(entities.get(i).getProfession(), entitiesDb.get(i).getProfession()); 122 assertEquals(entities.get(i).getInstituteHospital(), entitiesDb.get(i).getInstituteHospital()); 123 assertEquals(entities.get(i).getAddress(), entitiesDb.get(i).getAddress()); 124 assertEquals(entities.get(i).getZipcode(), entitiesDb.get(i).getZipcode()); 125 assertEquals(entities.get(i).getCity(), entitiesDb.get(i).getCity()); 126 assertEquals(entities.get(i).getCountry(), entitiesDb.get(i).getCountry()); 127 assertEquals(entities.get(i).getPhonenumber(), entitiesDb.get(i).getPhonenumber()); 128 assertEquals(entities.get(i).getFaxnumber(), entitiesDb.get(i).getFaxnumber()); 129 assertEquals(entities.get(i).getEmail(), entitiesDb.get(i).getEmail()); 130 } 131 132 //test the query capabilities by finding on all fields 133 for(User entity: entitiesDb) 134 { 135 //test field 'user_id' 136 { 137 Query<User> q2 = db.query(User.class); 138 q2.equals("user_id",entity.getUser_id()); 139 List<User> results = q2.find(); 140 assertEquals(results.size(),1); 141 for(User r: results) 142 { 143 assertEquals(r.getUser_id(),entity.getUser_id()); 144 } 145 } 146 } 147 } 148 149 @Test 150 public void testOntologySource() throws DatabaseException, IOException, ParseException 151 { 152 //create entities 153 List<OntologySource> entities = new ArrayList<OntologySource>(); 154 155 //retrieve xref entity candidates 156 157 for(Integer i = 0; i < total; i++) 158 { 159 OntologySource e = new OntologySource(); 160 e.setName("OntologySource_name_"+i); 161 162 entities.add(e); 163 } 164 165 //add entities and check counts 166 db.add(entities); 167 Query<OntologySource> q = db.query(OntologySource.class); 168 assertEquals(total, q.count()); 169 List<OntologySource> entitiesDb = q.sortASC("id").find(); 170 assertEquals(total, entitiesDb.size()); 171 172 //compare entities against insert (assumes sorting by id) 173 for(int i = 0; i < total; i++) 174 { 175 assertNotNull(entities.get(i).getId()); 176 assertEquals(entities.get(i).getName(), entitiesDb.get(i).getName()); 177 } 178 179 //test the query capabilities by finding on all fields 180 for(OntologySource entity: entitiesDb) 181 { 182 //test field 'id' 183 { 184 Query<OntologySource> q2 = db.query(OntologySource.class); 185 q2.equals("id",entity.getId()); 186 List<OntologySource> results = q2.find(); 187 assertEquals(results.size(),1); 188 for(OntologySource r: results) 189 { 190 assertEquals(r.getId(),entity.getId()); 191 } 192 } 193 } 194 } 195 196 @Test 197 public void testGene() throws DatabaseException, IOException, ParseException 198 { 199 //create entities 200 List<Gene> entities = new ArrayList<Gene>(); 201 202 //retrieve xref entity candidates 203 204 for(Integer i = 0; i < total; i++) 205 { 206 Gene e = new Gene(); 207 e.setGeneName("Gene_GeneName_"+i); 208 e.setChromosomeLocation("Gene_chromosomeLocation_"+i); 209 e.setGeneDescription("Gene_geneDescription_"+i); 210 211 entities.add(e); 212 } 213 214 //add entities and check counts 215 db.add(entities); 216 Query<Gene> q = db.query(Gene.class); 217 assertEquals(total, q.count()); 218 List<Gene> entitiesDb = q.sortASC("id").find(); 219 assertEquals(total, entitiesDb.size()); 220 221 //compare entities against insert (assumes sorting by id) 222 for(int i = 0; i < total; i++) 223 { 224 assertNotNull(entities.get(i).getId()); 225 assertEquals(entities.get(i).getGeneName(), entitiesDb.get(i).getGeneName()); 226 assertEquals(entities.get(i).getChromosomeLocation(), entitiesDb.get(i).getChromosomeLocation()); 227 assertEquals(entities.get(i).getGeneDescription(), entitiesDb.get(i).getGeneDescription()); 228 } 229 230 //test the query capabilities by finding on all fields 231 for(Gene entity: entitiesDb) 232 { 233 //test field 'id' 234 { 235 Query<Gene> q2 = db.query(Gene.class); 236 q2.equals("id",entity.getId()); 237 List<Gene> results = q2.find(); 238 assertEquals(results.size(),1); 239 for(Gene r: results) 240 { 241 assertEquals(r.getId(),entity.getId()); 242 } 243 } 244 } 245 } 246 247 @Test(dependsOnMethods = {"testOntologySource"}) 248 public void testOntologyTerm() throws DatabaseException, IOException, ParseException 249 { 250 //create entities 251 List<OntologyTerm> entities = new ArrayList<OntologyTerm>(); 252 253 //retrieve xref entity candidates 254 List<OntologySource> termSourceXrefs = db.query(OntologySource.class).find(); 255 256 for(Integer i = 0; i < total; i++) 257 { 258 OntologyTerm e = new OntologyTerm(); 259 e.setTerm("OntologyTerm_term_"+i); 260 e.setDescription("OntologyTerm_description_"+i); 261 e.setTermAccession("OntologyTerm_termAccession_"+i); 262 if(termSourceXrefs.size() > 0) e.setTermSource( termSourceXrefs.get(i).getId() ); 263 264 entities.add(e); 265 } 266 267 //add entities and check counts 268 db.add(entities); 269 Query<OntologyTerm> q = db.query(OntologyTerm.class); 270 assertEquals(total, q.count()); 271 List<OntologyTerm> entitiesDb = q.sortASC("id").find(); 272 assertEquals(total, entitiesDb.size()); 273 274 //compare entities against insert (assumes sorting by id) 275 for(int i = 0; i < total; i++) 276 { 277 assertNotNull(entities.get(i).getId()); 278 assertEquals(entities.get(i).getTerm(), entitiesDb.get(i).getTerm()); 279 assertEquals(entities.get(i).getDescription(), entitiesDb.get(i).getDescription()); 280 assertEquals(entities.get(i).getTermAccession(), entitiesDb.get(i).getTermAccession()); 281 assertEquals(entities.get(i).getTermSource(), entitiesDb.get(i).getTermSource()); 282 } 283 284 //test the query capabilities by finding on all fields 285 for(OntologyTerm entity: entitiesDb) 286 { 287 //test field 'id' 288 { 289 Query<OntologyTerm> q2 = db.query(OntologyTerm.class); 290 q2.equals("id",entity.getId()); 291 List<OntologyTerm> results = q2.find(); 292 assertEquals(results.size(),1); 293 for(OntologyTerm r: results) 294 { 295 assertEquals(r.getId(),entity.getId()); 296 } 297 } 298 } 299 } 300 301 @Test(dependsOnMethods = {"testUser"}) 302 public void testPatient() throws DatabaseException, IOException, ParseException 303 { 304 //create entities 305 List<Patient> entities = new ArrayList<Patient>(); 306 307 //retrieve xref entity candidates 308 List<User> user_idXrefs = db.query(User.class).find(); 309 List<OntologyTerm> ontologyXrefs = db.query(OntologyTerm.class).find(); 310 List<Gene> genesTestedXrefs = db.query(Gene.class).find(); 311 312 for(Integer i = 0; i < total; i++) 313 { 314 Patient e = new Patient(); 315 if(user_idXrefs.size() > 0) e.setUser_id( user_idXrefs.get(i).getUser_id() ); 316 if(ontologyXrefs.size() > 0) 317 { 318 e.getOntology().add( ontologyXrefs.get(i).getId() ); 319 //e.getOntology().add( random(ontologyXrefs).getId() ); 320 } 321 e.setPatientFileNumber("Patient_PatientFileNumber_"+i); 322 e.setDisease("Patient_Disease_"+i); 323 e.setNumberOfFamilyMembersWithThisDisease("Patient_NumberOfFamilyMembersWithThisDisease_"+i); 324 e.setTotalGenerations(randomEnum(new String[]{"0","1","2","3","4","5","6","7","8","unknown"})); 325 e.setPossibleGeneticType(randomEnum(new String[]{"AD","AR","XL","Mitochondrial","Imprinted","Multifact","Unknown"})); 326 e.setCountry("Patient_Country_"+i); 327 e.setEtnicBackground(randomEnum(new String[]{"Caucasian","Asian","African","Latin","Ashkenasi"})); 328 e.setFamilyResearch(randomEnum(new String[]{"Yes","No"})); 329 e.setHasDNA(randomEnum(new String[]{"yes","no","unknown"})); 330 e.setHasRNA(randomEnum(new String[]{"yes","no","unknown"})); 331 e.setDNAFromTissue(randomEnum(new String[]{"Yes","No","Unknown"})); 332 e.setRNAFromTissue(randomEnum(new String[]{"Yes","No","Unknown"})); 333 e.setDNAFromBlood(randomEnum(new String[]{"Yes","No","Unknown"})); 334 e.setCellsAvailable(randomEnum(new String[]{"Fibroblasten","EBV immortalized lymphocytes","Unknown"})); 335 e.setChromosomalResearch(randomEnum(new String[]{"Yes","No","Unknown"})); 336 e.setWGA(randomEnum(new String[]{"Yes","No","Unknown"})); 337 e.setLiteratureRef("Patient_LiteratureRef_"+i); 338 e.setPedigree("Patient_Pedigree_"+i); 339 if(genesTestedXrefs.size() > 0) 340 { 341 e.getGenesTested().add( genesTestedXrefs.get(i).getId() ); 342 //e.getGenesTested().add( random(genesTestedXrefs).getId() ); 343 } 344 e.setFreeText("Patient_FreeText_"+i); 345 e.setSelectFreeText("Patient_SelectFreeText_"+i); 346 347 entities.add(e); 348 } 349 350 //add entities and check counts 351 db.add(entities); 352 Query<Patient> q = db.query(Patient.class); 353 assertEquals(total, q.count()); 354 List<Patient> entitiesDb = q.sortASC("PatientID").find(); 355 assertEquals(total, entitiesDb.size()); 356 357 //compare entities against insert (assumes sorting by id) 358 for(int i = 0; i < total; i++) 359 { 360 assertNotNull(entities.get(i).getPatientID()); 361 assertEquals(entities.get(i).getUser_id(), entitiesDb.get(i).getUser_id()); 362 assertEquals(entities.get(i).getOntology(), entitiesDb.get(i).getOntology()); 363 assertEquals(entities.get(i).getPatientFileNumber(), entitiesDb.get(i).getPatientFileNumber()); 364 assertEquals(entities.get(i).getDisease(), entitiesDb.get(i).getDisease()); 365 assertEquals(entities.get(i).getNumberOfFamilyMembersWithThisDisease(), entitiesDb.get(i).getNumberOfFamilyMembersWithThisDisease()); 366 assertEquals(entities.get(i).getTotalGenerations(), entitiesDb.get(i).getTotalGenerations()); 367 assertEquals(entities.get(i).getPossibleGeneticType(), entitiesDb.get(i).getPossibleGeneticType()); 368 assertEquals(entities.get(i).getCountry(), entitiesDb.get(i).getCountry()); 369 assertEquals(entities.get(i).getEtnicBackground(), entitiesDb.get(i).getEtnicBackground()); 370 assertEquals(entities.get(i).getFamilyResearch(), entitiesDb.get(i).getFamilyResearch()); 371 assertEquals(entities.get(i).getHasDNA(), entitiesDb.get(i).getHasDNA()); 372 assertEquals(entities.get(i).getHasRNA(), entitiesDb.get(i).getHasRNA()); 373 assertEquals(entities.get(i).getDNAFromTissue(), entitiesDb.get(i).getDNAFromTissue()); 374 assertEquals(entities.get(i).getRNAFromTissue(), entitiesDb.get(i).getRNAFromTissue()); 375 assertEquals(entities.get(i).getDNAFromBlood(), entitiesDb.get(i).getDNAFromBlood()); 376 assertEquals(entities.get(i).getCellsAvailable(), entitiesDb.get(i).getCellsAvailable()); 377 assertEquals(entities.get(i).getChromosomalResearch(), entitiesDb.get(i).getChromosomalResearch()); 378 assertEquals(entities.get(i).getWGA(), entitiesDb.get(i).getWGA()); 379 assertEquals(entities.get(i).getLiteratureRef(), entitiesDb.get(i).getLiteratureRef()); 380 assertEquals(entities.get(i).getPedigree(), entitiesDb.get(i).getPedigree()); 381 assertEquals(entities.get(i).getGenesTested(), entitiesDb.get(i).getGenesTested()); 382 assertEquals(entities.get(i).getFreeText(), entitiesDb.get(i).getFreeText()); 383 assertEquals(entities.get(i).getSelectFreeText(), entitiesDb.get(i).getSelectFreeText()); 384 } 385 386 //test the query capabilities by finding on all fields 387 for(Patient entity: entitiesDb) 388 { 389 //test field 'PatientID' 390 { 391 Query<Patient> q2 = db.query(Patient.class); 392 q2.equals("patientID",entity.getPatientID()); 393 List<Patient> results = q2.find(); 394 assertEquals(results.size(),1); 395 for(Patient r: results) 396 { 397 assertEquals(r.getPatientID(),entity.getPatientID()); 398 } 399 } 400 } 401 } 402 69 403 @Test 70 404 public void testData() throws DatabaseException, IOException, ParseException -
biobank_search/generated/python/biobank_search/Data.py
r3425 r3486 2 2 # File: biobank_search/model/data.py 3 3 # Copyright: GBIC 2000-2010, all rights reserved 4 # Date: August 20, 20104 # Date: September 8, 2010 5 5 # Generator: org.molgenis.generators.python.PythonDataTypeGen 3.3.2-testing 6 6 # -
biobank_search/generated/sql/alter_tables.sql
r3425 r3486 1 1 /* 2 2 * Created by: org.molgenis.generators.sql.MySqlAlterSubclassPerTableGen 3 * Date: August 20, 20103 * Date: September 8, 2010 4 4 */ 5 5 6 6 /**********CREATE TABLES**********/ 7 7 SET FOREIGN_KEY_CHECKS = 0; ##allows us to drop fkeyed tables 8 9 /*user*/ 10 #create the table if not exists 11 CREATE TABLE User ( 12 user_id INTEGER NOT NULL AUTO_INCREMENT 13 , loginname VARCHAR(255) NOT NULL 14 , Firstname VARCHAR(255) NOT NULL 15 , Midinitials VARCHAR(255) NULL 16 , Lastname VARCHAR(255) NOT NULL 17 , Title VARCHAR(255) NOT NULL 18 , Profession VARCHAR(255) NOT NULL 19 , InstituteHospital VARCHAR(255) NOT NULL 20 , Address VARCHAR(255) NOT NULL 21 , Zipcode VARCHAR(255) NOT NULL 22 , City VARCHAR(255) NOT NULL 23 , Country VARCHAR(255) NOT NULL 24 , Phonenumber VARCHAR(255) NULL 25 , Faxnumber VARCHAR(255) NULL 26 , Email VARCHAR(255) NOT NULL 27 , PRIMARY KEY(user_id) 28 , UNIQUE(loginname) 29 ) ENGINE=InnoDB; 30 31 #strip dropped columns from constraints (keep data to be sure) 32 ALTER TABLE 33 34 #modify the existing columns, simply fail if missing 35 ALTER TABLE User MODIFY COLUMN user_id INTEGER NOT NULL AUTO_INCREMENT IF EXISTS; 36 37 #add missing columns, simply fail if exist 38 ALTER TABLE User ADD COLUMN user_id INTEGER NOT NULL AUTO_INCREMENT IF NOT EXISTS; 39 #strip dropped columns from constraints (keep data to be sure) 40 ALTER TABLE 41 42 #modify the existing columns, simply fail if missing 43 ALTER TABLE User , MODIFY COLUMN loginname VARCHAR(255) NOT NULL IF EXISTS; 44 45 #add missing columns, simply fail if exist 46 ALTER TABLE User , ADD COLUMN loginname VARCHAR(255) NOT NULL IF NOT EXISTS; 47 #strip dropped columns from constraints (keep data to be sure) 48 ALTER TABLE 49 50 #modify the existing columns, simply fail if missing 51 ALTER TABLE User , MODIFY COLUMN Firstname VARCHAR(255) NOT NULL IF EXISTS; 52 53 #add missing columns, simply fail if exist 54 ALTER TABLE User , ADD COLUMN Firstname VARCHAR(255) NOT NULL IF NOT EXISTS; 55 #strip dropped columns from constraints (keep data to be sure) 56 ALTER TABLE 57 58 #modify the existing columns, simply fail if missing 59 ALTER TABLE User , MODIFY COLUMN Midinitials VARCHAR(255) NULL IF EXISTS; 60 61 #add missing columns, simply fail if exist 62 ALTER TABLE User , ADD COLUMN Midinitials VARCHAR(255) NULL IF NOT EXISTS; 63 #strip dropped columns from constraints (keep data to be sure) 64 ALTER TABLE 65 66 #modify the existing columns, simply fail if missing 67 ALTER TABLE User , MODIFY COLUMN Lastname VARCHAR(255) NOT NULL IF EXISTS; 68 69 #add missing columns, simply fail if exist 70 ALTER TABLE User , ADD COLUMN Lastname VARCHAR(255) NOT NULL IF NOT EXISTS; 71 #strip dropped columns from constraints (keep data to be sure) 72 ALTER TABLE 73 74 #modify the existing columns, simply fail if missing 75 ALTER TABLE User , MODIFY COLUMN Title VARCHAR(255) NOT NULL IF EXISTS; 76 77 #add missing columns, simply fail if exist 78 ALTER TABLE User , ADD COLUMN Title VARCHAR(255) NOT NULL IF NOT EXISTS; 79 #strip dropped columns from constraints (keep data to be sure) 80 ALTER TABLE 81 82 #modify the existing columns, simply fail if missing 83 ALTER TABLE User , MODIFY COLUMN Profession VARCHAR(255) NOT NULL IF EXISTS; 84 85 #add missing columns, simply fail if exist 86 ALTER TABLE User , ADD COLUMN Profession VARCHAR(255) NOT NULL IF NOT EXISTS; 87 #strip dropped columns from constraints (keep data to be sure) 88 ALTER TABLE 89 90 #modify the existing columns, simply fail if missing 91 ALTER TABLE User , MODIFY COLUMN InstituteHospital VARCHAR(255) NOT NULL IF EXISTS; 92 93 #add missing columns, simply fail if exist 94 ALTER TABLE User , ADD COLUMN InstituteHospital VARCHAR(255) NOT NULL IF NOT EXISTS; 95 #strip dropped columns from constraints (keep data to be sure) 96 ALTER TABLE 97 98 #modify the existing columns, simply fail if missing 99 ALTER TABLE User , MODIFY COLUMN Address VARCHAR(255) NOT NULL IF EXISTS; 100 101 #add missing columns, simply fail if exist 102 ALTER TABLE User , ADD COLUMN Address VARCHAR(255) NOT NULL IF NOT EXISTS; 103 #strip dropped columns from constraints (keep data to be sure) 104 ALTER TABLE 105 106 #modify the existing columns, simply fail if missing 107 ALTER TABLE User , MODIFY COLUMN Zipcode VARCHAR(255) NOT NULL IF EXISTS; 108 109 #add missing columns, simply fail if exist 110 ALTER TABLE User , ADD COLUMN Zipcode VARCHAR(255) NOT NULL IF NOT EXISTS; 111 #strip dropped columns from constraints (keep data to be sure) 112 ALTER TABLE 113 114 #modify the existing columns, simply fail if missing 115 ALTER TABLE User , MODIFY COLUMN City VARCHAR(255) NOT NULL IF EXISTS; 116 117 #add missing columns, simply fail if exist 118 ALTER TABLE User , ADD COLUMN City VARCHAR(255) NOT NULL IF NOT EXISTS; 119 #strip dropped columns from constraints (keep data to be sure) 120 ALTER TABLE 121 122 #modify the existing columns, simply fail if missing 123 ALTER TABLE User , MODIFY COLUMN Country VARCHAR(255) NOT NULL IF EXISTS; 124 125 #add missing columns, simply fail if exist 126 ALTER TABLE User , ADD COLUMN Country VARCHAR(255) NOT NULL IF NOT EXISTS; 127 #strip dropped columns from constraints (keep data to be sure) 128 ALTER TABLE 129 130 #modify the existing columns, simply fail if missing 131 ALTER TABLE User , MODIFY COLUMN Phonenumber VARCHAR(255) NULL IF EXISTS; 132 133 #add missing columns, simply fail if exist 134 ALTER TABLE User , ADD COLUMN Phonenumber VARCHAR(255) NULL IF NOT EXISTS; 135 #strip dropped columns from constraints (keep data to be sure) 136 ALTER TABLE 137 138 #modify the existing columns, simply fail if missing 139 ALTER TABLE User , MODIFY COLUMN Faxnumber VARCHAR(255) NULL IF EXISTS; 140 141 #add missing columns, simply fail if exist 142 ALTER TABLE User , ADD COLUMN Faxnumber VARCHAR(255) NULL IF NOT EXISTS; 143 #strip dropped columns from constraints (keep data to be sure) 144 ALTER TABLE 145 146 #modify the existing columns, simply fail if missing 147 ALTER TABLE User , MODIFY COLUMN Email VARCHAR(255) NOT NULL IF EXISTS; 148 149 #add missing columns, simply fail if exist 150 ALTER TABLE User , ADD COLUMN Email VARCHAR(255) NOT NULL IF NOT EXISTS; 151 152 153 #else modify an existing table 154 #make dropped column names nullable, not auto 155 156 157 #add the new columns 158 159 160 /*ontologySource*/ 161 #create the table if not exists 162 CREATE TABLE OntologySource ( 163 id INTEGER NOT NULL AUTO_INCREMENT 164 , name VARCHAR(255) NOT NULL 165 , PRIMARY KEY(id) 166 , UNIQUE(name) 167 ) ENGINE=InnoDB; 168 169 #strip dropped columns from constraints (keep data to be sure) 170 ALTER TABLE 171 172 #modify the existing columns, simply fail if missing 173 ALTER TABLE OntologySource MODIFY COLUMN id INTEGER NOT NULL AUTO_INCREMENT IF EXISTS; 174 175 #add missing columns, simply fail if exist 176 ALTER TABLE OntologySource ADD COLUMN id INTEGER NOT NULL AUTO_INCREMENT IF NOT EXISTS; 177 #strip dropped columns from constraints (keep data to be sure) 178 ALTER TABLE 179 180 #modify the existing columns, simply fail if missing 181 ALTER TABLE OntologySource , MODIFY COLUMN name VARCHAR(255) NOT NULL IF EXISTS; 182 183 #add missing columns, simply fail if exist 184 ALTER TABLE OntologySource , ADD COLUMN name VARCHAR(255) NOT NULL IF NOT EXISTS; 185 186 187 #else modify an existing table 188 #make dropped column names nullable, not auto 189 190 191 #add the new columns 192 193 194 /*gene*/ 195 #create the table if not exists 196 CREATE TABLE Gene ( 197 id INTEGER NOT NULL AUTO_INCREMENT 198 , GeneName VARCHAR(255) NOT NULL 199 , chromosomeLocation VARCHAR(255) NOT NULL 200 , geneDescription TEXT NOT NULL 201 , PRIMARY KEY(id) 202 , UNIQUE(GeneName) 203 ) ENGINE=InnoDB; 204 205 #strip dropped columns from constraints (keep data to be sure) 206 ALTER TABLE 207 208 #modify the existing columns, simply fail if missing 209 ALTER TABLE Gene MODIFY COLUMN id INTEGER NOT NULL AUTO_INCREMENT IF EXISTS; 210 211 #add missing columns, simply fail if exist 212 ALTER TABLE Gene ADD COLUMN id INTEGER NOT NULL AUTO_INCREMENT IF NOT EXISTS; 213 #strip dropped columns from constraints (keep data to be sure) 214 ALTER TABLE 215 216 #modify the existing columns, simply fail if missing 217 ALTER TABLE Gene , MODIFY COLUMN GeneName VARCHAR(255) NOT NULL IF EXISTS; 218 219 #add missing columns, simply fail if exist 220 ALTER TABLE Gene , ADD COLUMN GeneName VARCHAR(255) NOT NULL IF NOT EXISTS; 221 #strip dropped columns from constraints (keep data to be sure) 222 ALTER TABLE 223 224 #modify the existing columns, simply fail if missing 225 ALTER TABLE Gene , MODIFY COLUMN chromosomeLocation VARCHAR(255) NOT NULL IF EXISTS; 226 227 #add missing columns, simply fail if exist 228 ALTER TABLE Gene , ADD COLUMN chromosomeLocation VARCHAR(255) NOT NULL IF NOT EXISTS; 229 #strip dropped columns from constraints (keep data to be sure) 230 ALTER TABLE 231 232 #modify the existing columns, simply fail if missing 233 ALTER TABLE Gene , MODIFY COLUMN geneDescription TEXT NOT NULL IF EXISTS; 234 235 #add missing columns, simply fail if exist 236 ALTER TABLE Gene , ADD COLUMN geneDescription TEXT NOT NULL IF NOT EXISTS; 237 238 239 #else modify an existing table 240 #make dropped column names nullable, not auto 241 242 243 #add the new columns 244 245 246 /*ontologyTerm*/ 247 #create the table if not exists 248 CREATE TABLE OntologyTerm ( 249 id INTEGER NOT NULL AUTO_INCREMENT 250 , term VARCHAR(255) NOT NULL 251 , description TEXT NULL 252 , termAccession VARCHAR(255) NULL 253 , termSource INTEGER NOT NULL 254 , PRIMARY KEY(id) 255 , UNIQUE(termSource,term) 256 ) ENGINE=InnoDB; 257 258 #strip dropped columns from constraints (keep data to be sure) 259 ALTER TABLE 260 261 #modify the existing columns, simply fail if missing 262 ALTER TABLE OntologyTerm MODIFY COLUMN id INTEGER NOT NULL AUTO_INCREMENT IF EXISTS; 263 264 #add missing columns, simply fail if exist 265 ALTER TABLE OntologyTerm ADD COLUMN id INTEGER NOT NULL AUTO_INCREMENT IF NOT EXISTS; 266 #strip dropped columns from constraints (keep data to be sure) 267 ALTER TABLE 268 269 #modify the existing columns, simply fail if missing 270 ALTER TABLE OntologyTerm , MODIFY COLUMN term VARCHAR(255) NOT NULL IF EXISTS; 271 272 #add missing columns, simply fail if exist 273 ALTER TABLE OntologyTerm , ADD COLUMN term VARCHAR(255) NOT NULL IF NOT EXISTS; 274 #strip dropped columns from constraints (keep data to be sure) 275 ALTER TABLE 276 277 #modify the existing columns, simply fail if missing 278 ALTER TABLE OntologyTerm , MODIFY COLUMN description TEXT NULL IF EXISTS; 279 280 #add missing columns, simply fail if exist 281 ALTER TABLE OntologyTerm , ADD COLUMN description TEXT NULL IF NOT EXISTS; 282 #strip dropped columns from constraints (keep data to be sure) 283 ALTER TABLE 284 285 #modify the existing columns, simply fail if missing 286 ALTER TABLE OntologyTerm , MODIFY COLUMN termAccession VARCHAR(255) NULL IF EXISTS; 287 288 #add missing columns, simply fail if exist 289 ALTER TABLE OntologyTerm , ADD COLUMN termAccession VARCHAR(255) NULL IF NOT EXISTS; 290 #strip dropped columns from constraints (keep data to be sure) 291 ALTER TABLE 292 293 #modify the existing columns, simply fail if missing 294 ALTER TABLE OntologyTerm , MODIFY COLUMN termSource INTEGER NOT NULL IF EXISTS; 295 296 #add missing columns, simply fail if exist 297 ALTER TABLE OntologyTerm , ADD COLUMN termSource INTEGER NOT NULL IF NOT EXISTS; 298 299 300 #else modify an existing table 301 #make dropped column names nullable, not auto 302 303 304 #add the new columns 305 306 307 /*patient*/ 308 #create the table if not exists 309 CREATE TABLE Patient ( 310 user_id INTEGER NOT NULL 311 , PatientID INTEGER NOT NULL AUTO_INCREMENT 312 , PatientFileNumber VARCHAR(255) NULL 313 , Disease TEXT NULL 314 , NumberOfFamilyMembersWithThisDisease VARCHAR(255) NULL 315 , TotalGenerations ENUM('0','1','2','3','4','5','6','7','8','unknown') NULL 316 , PossibleGeneticType ENUM('AD','AR','XL','Mitochondrial','Imprinted','Multifact','Unknown') NULL 317 , Country VARCHAR(255) NULL 318 , EtnicBackground ENUM('Caucasian','Asian','African','Latin','Ashkenasi') NULL 319 , FamilyResearch ENUM('Yes','No') NULL 320 , hasDNA ENUM('yes','no','unknown') NULL 321 , hasRNA ENUM('yes','no','unknown') NULL 322 , DNAFromTissue ENUM('Yes','No','Unknown') NULL 323 , RNAFromTissue ENUM('Yes','No','Unknown') NULL 324 , DNAFromBlood ENUM('Yes','No','Unknown') NULL 325 , CellsAvailable ENUM('Fibroblasten','EBV immortalized lymphocytes','Unknown') NULL 326 , ChromosomalResearch ENUM('Yes','No','Unknown') NULL 327 , WGA ENUM('Yes','No','Unknown') NULL 328 , LiteratureRef VARCHAR(255) NULL 329 , Pedigree VARCHAR(1024) NULL 330 , FreeText TEXT NULL 331 , SelectFreeText TEXT NULL 332 , PRIMARY KEY(PatientID) 333 ) ENGINE=InnoDB; 334 335 #strip dropped columns from constraints (keep data to be sure) 336 ALTER TABLE 337 338 #modify the existing columns, simply fail if missing 339 ALTER TABLE Patient MODIFY COLUMN user_id INTEGER NOT NULL IF EXISTS; 340 341 #add missing columns, simply fail if exist 342 ALTER TABLE Patient ADD COLUMN user_id INTEGER NOT NULL IF NOT EXISTS; 343 #strip dropped columns from constraints (keep data to be sure) 344 ALTER TABLE 345 346 #modify the existing columns, simply fail if missing 347 ALTER TABLE Patient , MODIFY COLUMN PatientID INTEGER NOT NULL AUTO_INCREMENT IF EXISTS; 348 349 #add missing columns, simply fail if exist 350 ALTER TABLE Patient , ADD COLUMN PatientID INTEGER NOT NULL AUTO_INCREMENT IF NOT EXISTS; 351 #strip dropped columns from constraints (keep data to be sure) 352 ALTER TABLE 353 354 #modify the existing columns, simply fail if missing 355 ALTER TABLE Patient , MODIFY COLUMN PatientFileNumber VARCHAR(255) NULL IF EXISTS; 356 357 #add missing columns, simply fail if exist 358 ALTER TABLE Patient , ADD COLUMN PatientFileNumber VARCHAR(255) NULL IF NOT EXISTS; 359 #strip dropped columns from constraints (keep data to be sure) 360 ALTER TABLE 361 362 #modify the existing columns, simply fail if missing 363 ALTER TABLE Patient , MODIFY COLUMN Disease TEXT NULL IF EXISTS; 364 365 #add missing columns, simply fail if exist 366 ALTER TABLE Patient , ADD COLUMN Disease TEXT NULL IF NOT EXISTS; 367 #strip dropped columns from constraints (keep data to be sure) 368 ALTER TABLE 369 370 #modify the existing columns, simply fail if missing 371 ALTER TABLE Patient , MODIFY COLUMN NumberOfFamilyMembersWithThisDisease VARCHAR(255) NULL IF EXISTS; 372 373 #add missing columns, simply fail if exist 374 ALTER TABLE Patient , ADD COLUMN NumberOfFamilyMembersWithThisDisease VARCHAR(255) NULL IF NOT EXISTS; 375 #strip dropped columns from constraints (keep data to be sure) 376 ALTER TABLE 377 378 #modify the existing columns, simply fail if missing 379 ALTER TABLE Patient , MODIFY COLUMN TotalGenerations ENUM('0','1','2','3','4','5','6','7','8','unknown') NULL IF EXISTS; 380 381 #add missing columns, simply fail if exist 382 ALTER TABLE Patient , ADD COLUMN TotalGenerations ENUM('0','1','2','3','4','5','6','7','8','unknown') NULL IF NOT EXISTS; 383 #strip dropped columns from constraints (keep data to be sure) 384 ALTER TABLE 385 386 #modify the existing columns, simply fail if missing 387 ALTER TABLE Patient , MODIFY COLUMN PossibleGeneticType ENUM('AD','AR','XL','Mitochondrial','Imprinted','Multifact','Unknown') NULL IF EXISTS; 388 389 #add missing columns, simply fail if exist 390 ALTER TABLE Patient , ADD COLUMN PossibleGeneticType ENUM('AD','AR','XL','Mitochondrial','Imprinted','Multifact','Unknown') NULL IF NOT EXISTS; 391 #strip dropped columns from constraints (keep data to be sure) 392 ALTER TABLE 393 394 #modify the existing columns, simply fail if missing 395 ALTER TABLE Patient , MODIFY COLUMN Country VARCHAR(255) NULL IF EXISTS; 396 397 #add missing columns, simply fail if exist 398 ALTER TABLE Patient , ADD COLUMN Country VARCHAR(255) NULL IF NOT EXISTS; 399 #strip dropped columns from constraints (keep data to be sure) 400 ALTER TABLE 401 402 #modify the existing columns, simply fail if missing 403 ALTER TABLE Patient , MODIFY COLUMN EtnicBackground ENUM('Caucasian','Asian','African','Latin','Ashkenasi') NULL IF EXISTS; 404 405 #add missing columns, simply fail if exist 406 ALTER TABLE Patient , ADD COLUMN EtnicBackground ENUM('Caucasian','Asian','African','Latin','Ashkenasi') NULL IF NOT EXISTS; 407 #strip dropped columns from constraints (keep data to be sure) 408 ALTER TABLE 409 410 #modify the existing columns, simply fail if missing 411 ALTER TABLE Patient , MODIFY COLUMN FamilyResearch ENUM('Yes','No') NULL IF EXISTS; 412 413 #add missing columns, simply fail if exist 414 ALTER TABLE Patient , ADD COLUMN FamilyResearch ENUM('Yes','No') NULL IF NOT EXISTS; 415 #strip dropped columns from constraints (keep data to be sure) 416 ALTER TABLE 417 418 #modify the existing columns, simply fail if missing 419 ALTER TABLE Patient , MODIFY COLUMN hasDNA ENUM('yes','no','unknown') NULL IF EXISTS; 420 421 #add missing columns, simply fail if exist 422 ALTER TABLE Patient , ADD COLUMN hasDNA ENUM('yes','no','unknown') NULL IF NOT EXISTS; 423 #strip dropped columns from constraints (keep data to be sure) 424 ALTER TABLE 425 426 #modify the existing columns, simply fail if missing 427 ALTER TABLE Patient , MODIFY COLUMN hasRNA ENUM('yes','no','unknown') NULL IF EXISTS; 428 429 #add missing columns, simply fail if exist 430 ALTER TABLE Patient , ADD COLUMN hasRNA ENUM('yes','no','unknown') NULL IF NOT EXISTS; 431 #strip dropped columns from constraints (keep data to be sure) 432 ALTER TABLE 433 434 #modify the existing columns, simply fail if missing 435 ALTER TABLE Patient , MODIFY COLUMN DNAFromTissue ENUM('Yes','No','Unknown') NULL IF EXISTS; 436 437 #add missing columns, simply fail if exist 438 ALTER TABLE Patient , ADD COLUMN DNAFromTissue ENUM('Yes','No','Unknown') NULL IF NOT EXISTS; 439 #strip dropped columns from constraints (keep data to be sure) 440 ALTER TABLE 441 442 #modify the existing columns, simply fail if missing 443 ALTER TABLE Patient , MODIFY COLUMN RNAFromTissue ENUM('Yes','No','Unknown') NULL IF EXISTS; 444 445 #add missing columns, simply fail if exist 446 ALTER TABLE Patient , ADD COLUMN RNAFromTissue ENUM('Yes','No','Unknown') NULL IF NOT EXISTS; 447 #strip dropped columns from constraints (keep data to be sure) 448 ALTER TABLE 449 450 #modify the existing columns, simply fail if missing 451 ALTER TABLE Patient , MODIFY COLUMN DNAFromBlood ENUM('Yes','No','Unknown') NULL IF EXISTS; 452 453 #add missing columns, simply fail if exist 454 ALTER TABLE Patient , ADD COLUMN DNAFromBlood ENUM('Yes','No','Unknown') NULL IF NOT EXISTS; 455 #strip dropped columns from constraints (keep data to be sure) 456 ALTER TABLE 457 458 #modify the existing columns, simply fail if missing 459 ALTER TABLE Patient , MODIFY COLUMN CellsAvailable ENUM('Fibroblasten','EBV immortalized lymphocytes','Unknown') NULL IF EXISTS; 460 461 #add missing columns, simply fail if exist 462 ALTER TABLE Patient , ADD COLUMN CellsAvailable ENUM('Fibroblasten','EBV immortalized lymphocytes','Unknown') NULL IF NOT EXISTS; 463 #strip dropped columns from constraints (keep data to be sure) 464 ALTER TABLE 465 466 #modify the existing columns, simply fail if missing 467 ALTER TABLE Patient , MODIFY COLUMN ChromosomalResearch ENUM('Yes','No','Unknown') NULL IF EXISTS; 468 469 #add missing columns, simply fail if exist 470 ALTER TABLE Patient , ADD COLUMN ChromosomalResearch ENUM('Yes','No','Unknown') NULL IF NOT EXISTS; 471 #strip dropped columns from constraints (keep data to be sure) 472 ALTER TABLE 473 474 #modify the existing columns, simply fail if missing 475 ALTER TABLE Patient , MODIFY COLUMN WGA ENUM('Yes','No','Unknown') NULL IF EXISTS; 476 477 #add missing columns, simply fail if exist 478 ALTER TABLE Patient , ADD COLUMN WGA ENUM('Yes','No','Unknown') NULL IF NOT EXISTS; 479 #strip dropped columns from constraints (keep data to be sure) 480 ALTER TABLE 481 482 #modify the existing columns, simply fail if missing 483 ALTER TABLE Patient , MODIFY COLUMN LiteratureRef VARCHAR(255) NULL IF EXISTS; 484 485 #add missing columns, simply fail if exist 486 ALTER TABLE Patient , ADD COLUMN LiteratureRef VARCHAR(255) NULL IF NOT EXISTS; 487 #strip dropped columns from constraints (keep data to be sure) 488 ALTER TABLE 489 490 #modify the existing columns, simply fail if missing 491 ALTER TABLE Patient , MODIFY COLUMN Pedigree VARCHAR(1024) NULL IF EXISTS; 492 493 #add missing columns, simply fail if exist 494 ALTER TABLE Patient , ADD COLUMN Pedigree VARCHAR(1024) NULL IF NOT EXISTS; 495 #strip dropped columns from constraints (keep data to be sure) 496 ALTER TABLE 497 498 #modify the existing columns, simply fail if missing 499 ALTER TABLE Patient , MODIFY COLUMN FreeText TEXT NULL IF EXISTS; 500 501 #add missing columns, simply fail if exist 502 ALTER TABLE Patient , ADD COLUMN FreeText TEXT NULL IF NOT EXISTS; 503 #strip dropped columns from constraints (keep data to be sure) 504 ALTER TABLE 505 506 #modify the existing columns, simply fail if missing 507 ALTER TABLE Patient , MODIFY COLUMN SelectFreeText TEXT NULL IF EXISTS; 508 509 #add missing columns, simply fail if exist 510 ALTER TABLE Patient , ADD COLUMN SelectFreeText TEXT NULL IF NOT EXISTS; 511 512 513 #else modify an existing table 514 #make dropped column names nullable, not auto 515 516 517 #add the new columns 518 8 519 9 520 /*data*/ … … 120 631 #add the new columns 121 632 633 634 /*patient_Ontology*/ 635 #create the table if not exists 636 CREATE TABLE Patient_Ontology ( 637 autoid INTEGER NOT NULL AUTO_INCREMENT 638 , Ontology INTEGER NOT NULL 639 , Patient INTEGER NOT NULL 640 , PRIMARY KEY(autoid) 641 , UNIQUE(Ontology,Patient) 642 ) ENGINE=InnoDB; 643 644 #strip dropped columns from constraints (keep data to be sure) 645 ALTER TABLE 646 647 #modify the existing columns, simply fail if missing 648 ALTER TABLE Patient_Ontology MODIFY COLUMN autoid INTEGER NOT NULL AUTO_INCREMENT IF EXISTS; 649 650 #add missing columns, simply fail if exist 651 ALTER TABLE Patient_Ontology ADD COLUMN autoid INTEGER NOT NULL AUTO_INCREMENT IF NOT EXISTS; 652 #strip dropped columns from constraints (keep data to be sure) 653 ALTER TABLE 654 655 #modify the existing columns, simply fail if missing 656 ALTER TABLE Patient_Ontology , MODIFY COLUMN Ontology INTEGER NOT NULL IF EXISTS; 657 658 #add missing columns, simply fail if exist 659 ALTER TABLE Patient_Ontology , ADD COLUMN Ontology INTEGER NOT NULL IF NOT EXISTS; 660 #strip dropped columns from constraints (keep data to be sure) 661 ALTER TABLE 662 663 #modify the existing columns, simply fail if missing 664 ALTER TABLE Patient_Ontology , MODIFY COLUMN Patient INTEGER NOT NULL IF EXISTS; 665 666 #add missing columns, simply fail if exist 667 ALTER TABLE Patient_Ontology , ADD COLUMN Patient INTEGER NOT NULL IF NOT EXISTS; 668 669 670 #else modify an existing table 671 #make dropped column names nullable, not auto 672 673 674 #add the new columns 675 676 677 /*patient_GenesTested*/ 678 #create the table if not exists 679 CREATE TABLE Patient_GenesTested ( 680 autoid INTEGER NOT NULL AUTO_INCREMENT 681 , GenesTested INTEGER NOT NULL 682 , Patient INTEGER NOT NULL 683 , PRIMARY KEY(autoid) 684 , UNIQUE(GenesTested,Patient) 685 ) ENGINE=InnoDB; 686 687 #strip dropped columns from constraints (keep data to be sure) 688 ALTER TABLE 689 690 #modify the existing columns, simply fail if missing 691 ALTER TABLE Patient_GenesTested MODIFY COLUMN autoid INTEGER NOT NULL AUTO_INCREMENT IF EXISTS; 692 693 #add missing columns, simply fail if exist 694 ALTER TABLE Patient_GenesTested ADD COLUMN autoid INTEGER NOT NULL AUTO_INCREMENT IF NOT EXISTS; 695 #strip dropped columns from constraints (keep data to be sure) 696 ALTER TABLE 697 698 #modify the existing columns, simply fail if missing 699 ALTER TABLE Patient_GenesTested , MODIFY COLUMN GenesTested INTEGER NOT NULL IF EXISTS; 700 701 #add missing columns, simply fail if exist 702 ALTER TABLE Patient_GenesTested , ADD COLUMN GenesTested INTEGER NOT NULL IF NOT EXISTS; 703 #strip dropped columns from constraints (keep data to be sure) 704 ALTER TABLE 705 706 #modify the existing columns, simply fail if missing 707 ALTER TABLE Patient_GenesTested , MODIFY COLUMN Patient INTEGER NOT NULL IF EXISTS; 708 709 #add missing columns, simply fail if exist 710 ALTER TABLE Patient_GenesTested , ADD COLUMN Patient INTEGER NOT NULL IF NOT EXISTS; 711 712 713 #else modify an existing table 714 #make dropped column names nullable, not auto 715 716 717 #add the new columns 718 122 719 SET FOREIGN_KEY_CHECKS = 1; 123 720 124 721 /**********ADD/UPDATE FOREIGN KEYS**********/ 125 722 723 ALTER TABLE OntologyTerm ADD FOREIGN KEY (termSource) REFERENCES OntologySource (id) ON DELETE RESTRICT; 724 ALTER TABLE Patient ADD FOREIGN KEY (user_id) REFERENCES User (user_id) ON DELETE RESTRICT; 725 ALTER TABLE Patient_Ontology ADD FOREIGN KEY (Ontology) REFERENCES OntologyTerm (id) ON DELETE RESTRICT; 726 ALTER TABLE Patient_Ontology ADD FOREIGN KEY (Patient) REFERENCES Patient (PatientID) ON DELETE RESTRICT; 727 ALTER TABLE Patient_GenesTested ADD FOREIGN KEY (GenesTested) REFERENCES Gene (id) ON DELETE RESTRICT; 728 ALTER TABLE Patient_GenesTested ADD FOREIGN KEY (Patient) REFERENCES Patient (PatientID) ON DELETE RESTRICT; -
biobank_search/generated/sql/count_per_entity.sql
r3198 r3486 1 SELECT 'User' AS entity, count(*) AS count FROM User 2 UNION 3 SELECT 'Patient' AS entity, count(*) AS count FROM Patient 4 UNION 5 SELECT 'Gene' AS entity, count(*) AS count FROM Gene 6 UNION 7 SELECT 'OntologySource' AS entity, count(*) AS count FROM OntologySource 8 UNION 9 SELECT 'OntologyTerm' AS entity, count(*) AS count FROM OntologyTerm 10 UNION 1 11 SELECT 'data' AS entity, count(*) AS count FROM data 12 UNION 13 SELECT 'Patient_Ontology' AS entity, count(*) AS count FROM Patient_Ontology 14 UNION 15 SELECT 'Patient_GenesTested' AS entity, count(*) AS count FROM Patient_GenesTested 2 16 3 17 ; -
biobank_search/generated/sql/count_per_table.sql
r3198 r3486 1 SELECT 'User' AS entity, count(*) AS count FROM user 2 UNION 3 SELECT 'Patient' AS entity, count(*) AS count FROM patient 4 UNION 5 SELECT 'Gene' AS entity, count(*) AS count FROM gene 6 UNION 7 SELECT 'OntologySource' AS entity, count(*) AS count FROM ontologySource 8 UNION 9 SELECT 'OntologyTerm' AS entity, count(*) AS count FROM ontologyTerm 10 UNION 1 11 SELECT 'data' AS entity, count(*) AS count FROM data 12 UNION 13 SELECT 'Patient_Ontology' AS entity, count(*) AS count FROM patient_Ontology 14 UNION 15 SELECT 'Patient_GenesTested' AS entity, count(*) AS count FROM patient_GenesTested 2 16 3 17 ; -
biobank_search/generated/sql/create_tables.sql
r3425 r3486 1 1 /* 2 2 * Created by: org.molgenis.generators.sql.MySqlCreateSubclassPerTableGen 3 * Date: August 20, 20103 * Date: September 8, 2010 4 4 */ 5 5 6 6 /**********CREATE TABLES**********/ 7 7 SET FOREIGN_KEY_CHECKS = 0; ##allows us to drop fkeyed tables 8 9 /*user*/ 10 DROP TABLE IF EXISTS User; 11 CREATE TABLE User ( 12 user_id INTEGER NOT NULL AUTO_INCREMENT 13 , loginname VARCHAR(255) NOT NULL 14 , Firstname VARCHAR(255) NOT NULL 15 , Midinitials VARCHAR(255) NULL 16 , Lastname VARCHAR(255) NOT NULL 17 , Title VARCHAR(255) NOT NULL 18 , Profession VARCHAR(255) NOT NULL 19 , InstituteHospital VARCHAR(255) NOT NULL 20 , Address VARCHAR(255) NOT NULL 21 , Zipcode VARCHAR(255) NOT NULL 22 , City VARCHAR(255) NOT NULL 23 , Country VARCHAR(255) NOT NULL 24 , Phonenumber VARCHAR(255) NULL 25 , Faxnumber VARCHAR(255) NULL 26 , Email VARCHAR(255) NOT NULL 27 , PRIMARY KEY(user_id) 28 ) CHARACTER SET latin1 COLLATE latin1_general_cs ENGINE=InnoDB; 29 30 /*ontologySource*/ 31 DROP TABLE IF EXISTS OntologySource; 32 CREATE TABLE OntologySource ( 33 id INTEGER NOT NULL AUTO_INCREMENT 34 , name VARCHAR(255) NOT NULL 35 , PRIMARY KEY(id) 36 ) CHARACTER SET latin1 COLLATE latin1_general_cs ENGINE=InnoDB; 37 38 /*gene*/ 39 DROP TABLE IF EXISTS Gene; 40 CREATE TABLE Gene ( 41 id INTEGER NOT NULL AUTO_INCREMENT 42 , GeneName VARCHAR(255) NOT NULL 43 , chromosomeLocation VARCHAR(255) NOT NULL 44 , geneDescription TEXT NOT NULL 45 , PRIMARY KEY(id) 46 ) CHARACTER SET latin1 COLLATE latin1_general_cs ENGINE=InnoDB; 47 48 /*ontologyTerm*/ 49 DROP TABLE IF EXISTS OntologyTerm; 50 CREATE TABLE OntologyTerm ( 51 id INTEGER NOT NULL AUTO_INCREMENT 52 , term VARCHAR(255) NOT NULL 53 , description TEXT NULL 54 , termAccession VARCHAR(255) NULL 55 , termSource INTEGER NOT NULL 56 , PRIMARY KEY(id) 57 ) CHARACTER SET latin1 COLLATE latin1_general_cs ENGINE=InnoDB; 58 59 /*patient*/ 60 DROP TABLE IF EXISTS Patient; 61 CREATE TABLE Patient ( 62 user_id INTEGER NOT NULL 63 , PatientID INTEGER NOT NULL AUTO_INCREMENT 64 , PatientFileNumber VARCHAR(255) NULL 65 , Disease TEXT NULL 66 , NumberOfFamilyMembersWithThisDisease VARCHAR(255) NULL 67 , TotalGenerations ENUM('0','1','2','3','4','5','6','7','8','unknown') NULL 68 , PossibleGeneticType ENUM('AD','AR','XL','Mitochondrial','Imprinted','Multifact','Unknown') NULL 69 , Country VARCHAR(255) NULL 70 , EtnicBackground ENUM('Caucasian','Asian','African','Latin','Ashkenasi') NULL 71 , FamilyResearch ENUM('Yes','No') NULL 72 , hasDNA ENUM('yes','no','unknown') NULL 73 , hasRNA ENUM('yes','no','unknown') NULL 74 , DNAFromTissue ENUM('Yes','No','Unknown') NULL 75 , RNAFromTissue ENUM('Yes','No','Unknown') NULL 76 , DNAFromBlood ENUM('Yes','No','Unknown') NULL 77 , CellsAvailable ENUM('Fibroblasten','EBV immortalized lymphocytes','Unknown') NULL 78 , ChromosomalResearch ENUM('Yes','No','Unknown') NULL 79 , WGA ENUM('Yes','No','Unknown') NULL 80 , LiteratureRef VARCHAR(255) NULL 81 , Pedigree VARCHAR(1024) NULL 82 , FreeText TEXT NULL 83 , SelectFreeText TEXT NULL 84 , PRIMARY KEY(PatientID) 85 ) CHARACTER SET latin1 COLLATE latin1_general_cs ENGINE=InnoDB; 8 86 9 87 /*data*/ … … 23 101 , PRIMARY KEY(id) 24 102 ) CHARACTER SET latin1 COLLATE latin1_general_cs ENGINE=InnoDB; 103 104 /*patient_Ontology*/ 105 DROP TABLE IF EXISTS Patient_Ontology; 106 CREATE TABLE Patient_Ontology ( 107 autoid INTEGER NOT NULL AUTO_INCREMENT 108 , Ontology INTEGER NOT NULL 109 , Patient INTEGER NOT NULL 110 , PRIMARY KEY(autoid) 111 ) CHARACTER SET latin1 COLLATE latin1_general_cs ENGINE=InnoDB; 112 113 /*patient_GenesTested*/ 114 DROP TABLE IF EXISTS Patient_GenesTested; 115 CREATE TABLE Patient_GenesTested ( 116 autoid INTEGER NOT NULL AUTO_INCREMENT 117 , GenesTested INTEGER NOT NULL 118 , Patient INTEGER NOT NULL 119 , PRIMARY KEY(autoid) 120 ) CHARACTER SET latin1 COLLATE latin1_general_cs ENGINE=InnoDB; 25 121 SET FOREIGN_KEY_CHECKS = 1; 26 122 27 123 /**********ADD FOREIGN KEYS**********/ 28 124 125 ALTER TABLE OntologyTerm ADD FOREIGN KEY (termSource) REFERENCES OntologySource (id) ON DELETE RESTRICT; 126 ALTER TABLE Patient ADD FOREIGN KEY (user_id) REFERENCES User (user_id) ON DELETE RESTRICT; 127 ALTER TABLE Patient_Ontology ADD FOREIGN KEY (Ontology) REFERENCES OntologyTerm (id) ON DELETE RESTRICT; 128 ALTER TABLE Patient_Ontology ADD FOREIGN KEY (Patient) REFERENCES Patient (PatientID) ON DELETE RESTRICT; 129 ALTER TABLE Patient_GenesTested ADD FOREIGN KEY (GenesTested) REFERENCES Gene (id) ON DELETE RESTRICT; 130 ALTER TABLE Patient_GenesTested ADD FOREIGN KEY (Patient) REFERENCES Patient (PatientID) ON DELETE RESTRICT; 29 131 30 132 /**********ADD UNIQUE CONSTRANTS**********/ 133 ALTER TABLE User ADD UNIQUE loginname(loginname); 134 ALTER TABLE OntologySource ADD UNIQUE name(name); 135 ALTER TABLE Gene ADD UNIQUE GeneName(GeneName); 136 ALTER TABLE OntologyTerm ADD UNIQUE termSource_term(termSource,term); 137 ALTER TABLE Patient_Ontology ADD UNIQUE Ontology_Patient(Ontology,Patient); 138 ALTER TABLE Patient_GenesTested ADD UNIQUE GenesTested_Patient(GenesTested,Patient); -
biobank_search/generated/sql/insert_metadata.sql
r3198 r3486 1 1 INSERT INTO molgenisuser(name,password,superuser,active) values ("admin","admin",true,true); 2 INSERT INTO molgenisentity(name,classname) values ("User","biobank_search.User"); 3 INSERT INTO molgenisentity(name,classname) values ("Patient","biobank_search.Patient"); 4 INSERT INTO molgenisentity(name,classname) values ("Gene","biobank_search.Gene"); 5 INSERT INTO molgenisentity(name,classname) values ("OntologySource","biobank_search.OntologySource"); 6 INSERT INTO molgenisentity(name,classname) values ("OntologyTerm","biobank_search.OntologyTerm"); 2 7 INSERT INTO molgenisentity(name,classname) values ("Data","biobank_search.Data"); 8 INSERT INTO molgenisentity(name,classname) values ("Patient_Ontology","biobank_search.Patient_Ontology"); 9 INSERT INTO molgenisentity(name,classname) values ("Patient_GenesTested","biobank_search.Patient_GenesTested"); -
biobank_search/handwritten/java/GeneratorServlet.java
r3194 r3486 26 26 public class GeneratorServlet extends HttpServlet 27 27 { 28 /** 29 * 30 */ 31 private static final long serialVersionUID = 1L; 28 32 static Logger logger = Logger.getLogger(GeneratorServlet.class); 29 33 -
biobank_search/handwritten/java/plugins/DBIndexPlugin.java
r3484 r3486 189 189 Field fullTextField = new Field("fulltext", fullText, Field.Store.NO, Field.Index.ANALYZED); 190 190 document1.add(fullTextField); 191 //System.out.println("All : FULLTEXT ( fulltext as anotherField inserted in Index" + fullTextField.toString());191 System.out.println("All : FULLTEXT ( fulltext as anotherField inserted in Index" + fullTextField.toString()); 192 192 } 193 193 writer.addDocument(document1); -
biobank_search/molgenis_db.xml
r3411 r3486 8 8 <molgenis name="biobank_search"> 9 9 <description>HVP pilot: including Lucene Index creation searching.</description> 10 11 <entity name="User"> 12 <field name="user_id" type="autoid" /> 13 <field name="loginname" unique="true" /> 14 <field name="Firstname" type="string" nillable="false" /> 15 <field name="Midinitials" label="Mid initials" type="string" nillable="true" /> 16 <field name="Lastname" type="string" nillable="false" /> 17 <field name="Title" type="string" nillable="false"/> 18 <field name="Profession" type="string" nillable="false" /> 19 <field name="InstituteHospital" label="Institute/Hospital" type="string" nillable="false" /> 20 <field name="Address" type="string" nillable="false" /> 21 <field name="Zipcode" type="string" nillable="false" /> 22 <field name="City" type="string" nillable="false" /> 23 <field name="Country" type="string" nillable="false" /> 24 <field name="Phonenumber" type="string" nillable="true" /> 25 <field name="Faxnumber" type="string" nillable="true" /> 26 <field name="Email" type="string" nillable="false" /> 27 </entity> 28 29 <entity name="Patient"> 30 <field name="user_id" type="xref" xref_field="User.user_id" 31 xref_label="loginname" /> 32 <field name="PatientID" type="autoid" /> 33 <field name="Ontology" type="mref" xref_entity="OntologyTerm" xref_field="id" xref_label="term"/> 34 <field name="PatientFileNumber" type="string" nillable="true" /> 35 <field name="Disease" type="text" nillable="true" /> 36 <field name="NumberOfFamilyMembersWithThisDisease" type="string" 37 nillable="true" /> 38 <field name="TotalGenerations" type="enum" enum_options="0,1,2,3,4,5,6,7,8,unknown" nillable="true"/> 39 <field name="PossibleGeneticType" type="enum" 40 enum_options="AD,AR,XL,Mitochondrial,Imprinted,Multifact,Unknown" nillable="true" /> 41 <field name="Country" type="string" nillable="true" /> 42 <field name="EtnicBackground" type="enum" 43 enum_options="Caucasian,Asian,African,Latin,Ashkenasi" nillable="true"/> 44 <field name="FamilyResearch" type="enum" enum_options="Yes,No" nillable="true" /> 45 <field name="hasDNA" type="enum" enum_options="yes,no,unknown" nillable="true" /> 46 <field name="hasRNA" type="enum" enum_options="yes,no,unknown" nillable="true" /> 47 <field name="DNAFromTissue" type="enum" enum_options="Yes,No,Unknown" nillable="true"/> 48 <field name="RNAFromTissue" type="enum" enum_options="Yes,No,Unknown" nillable="true"/> 49 <field name="DNAFromBlood" type="enum" enum_options="Yes,No,Unknown" nillable="true"/> 50 <field name="CellsAvailable" type="enum" 51 enum_options="Fibroblasten,EBV immortalized lymphocytes,Unknown" nillable="true"/> 52 <field name="ChromosomalResearch" type="enum" enum_options="Yes,No,Unknown" nillable="true"/> 53 <field name="WGA" type="enum" enum_options="Yes,No,Unknown" nillable="true"/> 54 <field name="LiteratureRef" type="string" nillable="true"/> 55 <field name="Pedigree" type="file" nillable="true"/> 56 <field name="GenesTested" type="mref" xref_entity="Gene" xref_field="id" xref_label="GeneName" nillable="true" /> 57 <field name="FreeText" type="text" nillable="true"/> 58 <field name="SelectFreeText" type="text" nillable="true"/> 59 </entity> 60 61 <entity name="Gene"> 62 <field name="id" type="autoid" /> 63 <field name="GeneName" unique="true" /> 64 <field name="chromosomeLocation" /> 65 <field name="geneDescription" type="text" /> 66 </entity> 67 68 <entity name="OntologySource"> 69 <description> 70 The OntologySource class defines a reference to a an existing 71 ontology or controlled vocabulary from which well-defined and stable 72 (ontology) terms can be obtained. For instance: MO, GO, EFO, UMLS, etc. Use 73 of existing ontologies/vocabularies is recommended to harmonize phenotypic 74 descriptions. This class maps to FuGE::OntologySource, 75 MAGE-TAB::TermSourceREF. 76 </description> 77 <field name="id" type="autoid"/> 78 <field name="name"/> 79 <unique fields="name" description="Name is unique"/> 80 </entity> 81 <entity name="OntologyTerm"> 82 <description> 83 The OntologyTerm class defines references to a single entry 84 from an ontology or a controlled vocabulary. Other classes can reference to 85 this OntologyTerm to harmonize naming of concepts. Each term should have a 86 local, unique label. Good practice is to label it 'sourceid:term', e.g. 87 'MO:cell' If no suitable ontology term exists one can define new terms 88 locally in which case there is no formal accession for the term. In those 89 cases the local name should be repeated in both term and termAccession. Maps 90 to FuGE::OntologyIndividual; in MAGE-TAB there is no separate entity to 91 model terms. 92 </description> 93 <field name="id" type="autoid"/> 94 <field nillable="false" auto="false" name="term" type="varchar" 95 description="The ontology term itself, also known as the 'local name' in some ontologies."/> 96 <field name="description" type="text" 97 description="Definition of the term." nillable="true"/> 98 <field nillable="true" auto="false" name="termAccession" type="varchar" 99 description="The accession number assigned to the ontology term in the source ontology. If empty it is assumed to be a locally defined term. "/> 100 <field auto="false" name="termSource" type="xref" 101 description="The source ontology or controlled vocabulary list that ontology terms have been obtained from. One can define a local ontology if needed." 102 xref_field="OntologySource.id" xref_label="name"/> 103 <unique fields="termSource,term" 104 description="the local label of the OntologyTerm is unique within a data set."/> 105 </entity> 10 106 11 107 <entity name="data"> -
biobank_search/molgenis_ui.xml
r3411 r3486 12 12 <plugin name="GenericWizard" type="plugin.genericwizard.GenericWizard" label="Excel upload"/> 13 13 <plugin name="OntoCatIndexPlugin2" label="Index OntoCAT" type="plugins.OntoCatIndexPlugin2" /> 14 14 15 15 16 </menu>
Note: See TracChangeset
for help on using the changeset viewer.