[47] | 1 | #-*- mode: python; mode: fold -*- |
---|
| 2 | # $Id: getWAeUPSchemas.py 152 2005-11-04 17:07:18Z joachim $ |
---|
| 3 | |
---|
| 4 | university_schema = { ###( |
---|
[45] | 5 | } |
---|
[47] | 6 | ###) |
---|
| 7 | |
---|
| 8 | students_folder_schema = { ###( |
---|
[45] | 9 | } |
---|
[47] | 10 | ###) |
---|
| 11 | |
---|
[113] | 12 | academics_folder_schema = { ###( |
---|
| 13 | } |
---|
| 14 | ###) |
---|
| 15 | |
---|
[47] | 16 | student_schema = { ###( |
---|
[19] | 17 | 'jamb_is_admitted': { |
---|
| 18 | 'type': 'CPS Boolean Field', |
---|
| 19 | 'data': { |
---|
| 20 | 'default_expr': 'python:False', |
---|
| 21 | 'is_searchabletext': 0, |
---|
| 22 | 'acl_read_permissions': '', |
---|
| 23 | 'acl_read_roles': '', |
---|
| 24 | 'acl_read_expr': '', |
---|
| 25 | 'acl_write_permissions': '', |
---|
| 26 | 'acl_write_roles': '', |
---|
| 27 | 'acl_write_expr': '', |
---|
| 28 | 'read_ignore_storage': False, |
---|
| 29 | 'read_process_expr': '', |
---|
| 30 | 'read_process_dependent_fields': (), |
---|
| 31 | 'write_ignore_storage': False, |
---|
| 32 | 'write_process_expr': '', |
---|
| 33 | }, |
---|
| 34 | }, |
---|
| 35 | 'faculty': { |
---|
| 36 | 'type': 'CPS String Field', |
---|
| 37 | 'data': { |
---|
| 38 | 'default_expr': 'string:', |
---|
| 39 | 'is_searchabletext': True, |
---|
| 40 | 'acl_read_permissions': '', |
---|
| 41 | 'acl_read_roles': '', |
---|
| 42 | 'acl_read_expr': '', |
---|
| 43 | 'acl_write_permissions': '', |
---|
| 44 | 'acl_write_roles': '', |
---|
| 45 | 'acl_write_expr': '', |
---|
| 46 | 'read_ignore_storage': False, |
---|
| 47 | 'read_process_expr': '', |
---|
| 48 | 'read_process_dependent_fields': (), |
---|
| 49 | 'write_ignore_storage': False, |
---|
| 50 | 'write_process_expr': '', |
---|
| 51 | }, |
---|
| 52 | }, |
---|
[106] | 53 | 'course': { |
---|
| 54 | 'type': 'CPS String Field', |
---|
| 55 | 'data': { |
---|
| 56 | 'default_expr': 'string:', |
---|
| 57 | 'is_searchabletext': True, |
---|
| 58 | 'acl_read_permissions': '', |
---|
| 59 | 'acl_read_roles': '', |
---|
| 60 | 'acl_read_expr': '', |
---|
| 61 | 'acl_write_permissions': '', |
---|
| 62 | 'acl_write_roles': '', |
---|
| 63 | 'acl_write_expr': '', |
---|
| 64 | 'read_ignore_storage': False, |
---|
| 65 | 'read_process_expr': '', |
---|
| 66 | 'read_process_dependent_fields': (), |
---|
| 67 | 'write_ignore_storage': False, |
---|
| 68 | 'write_process_expr': '', |
---|
| 69 | }, |
---|
| 70 | }, |
---|
[107] | 71 | 'accommodation_sc_id': { |
---|
[106] | 72 | 'type': 'CPS String Field', |
---|
| 73 | 'data': { |
---|
| 74 | 'default_expr': 'string:', |
---|
| 75 | 'is_searchabletext': True, |
---|
| 76 | 'acl_read_permissions': '', |
---|
| 77 | 'acl_read_roles': '', |
---|
| 78 | 'acl_read_expr': '', |
---|
| 79 | 'acl_write_permissions': '', |
---|
| 80 | 'acl_write_roles': '', |
---|
| 81 | 'acl_write_expr': '', |
---|
| 82 | 'read_ignore_storage': False, |
---|
| 83 | 'read_process_expr': '', |
---|
| 84 | 'read_process_dependent_fields': (), |
---|
| 85 | 'write_ignore_storage': False, |
---|
| 86 | 'write_process_expr': '', |
---|
| 87 | }, |
---|
| 88 | }, |
---|
[107] | 89 | 'accommodation_sc_pin': { |
---|
[106] | 90 | 'type': 'CPS String Field', |
---|
| 91 | 'data': { |
---|
| 92 | 'default_expr': 'string:', |
---|
| 93 | 'is_searchabletext': True, |
---|
| 94 | 'acl_read_permissions': '', |
---|
| 95 | 'acl_read_roles': '', |
---|
| 96 | 'acl_read_expr': '', |
---|
| 97 | 'acl_write_permissions': '', |
---|
| 98 | 'acl_write_roles': '', |
---|
| 99 | 'acl_write_expr': '', |
---|
| 100 | 'read_ignore_storage': False, |
---|
| 101 | 'read_process_expr': '', |
---|
| 102 | 'read_process_dependent_fields': (), |
---|
| 103 | 'write_ignore_storage': False, |
---|
| 104 | 'write_process_expr': '', |
---|
| 105 | }, |
---|
| 106 | }, |
---|
[47] | 107 | } |
---|
| 108 | # |
---|
| 109 | ###) |
---|
| 110 | |
---|
[152] | 111 | studylevel = { ###( |
---|
| 112 | } |
---|
| 113 | # |
---|
| 114 | ###) |
---|
| 115 | |
---|
[47] | 116 | student_personal_schema = { ###( |
---|
| 117 | 'firstname': { |
---|
| 118 | 'type': 'CPS String Field', |
---|
| 119 | 'data': { |
---|
| 120 | 'is_searchabletext': 1, |
---|
| 121 | }, |
---|
[20] | 122 | }, |
---|
[47] | 123 | 'middlename': { |
---|
| 124 | 'type': 'CPS String Field', |
---|
| 125 | 'data': { |
---|
| 126 | 'is_searchabletext': 1, |
---|
| 127 | }, |
---|
| 128 | }, |
---|
| 129 | 'lastname': { |
---|
| 130 | 'type': 'CPS String Field', |
---|
| 131 | 'data': { |
---|
| 132 | 'is_searchabletext': 1, |
---|
| 133 | }, |
---|
| 134 | }, |
---|
| 135 | 'sex': { |
---|
| 136 | 'type': 'CPS Boolean Field', |
---|
[68] | 137 | 'default_expr': 'python:True', |
---|
[47] | 138 | 'data': { |
---|
| 139 | 'is_searchabletext': 1, |
---|
| 140 | }, |
---|
| 141 | }, |
---|
| 142 | 'birthday': { |
---|
| 143 | 'type': 'CPS DateTime Field', |
---|
| 144 | 'data': { |
---|
| 145 | 'is_searchabletext': 1, |
---|
| 146 | }, |
---|
| 147 | }, |
---|
[57] | 148 | 'age': { |
---|
| 149 | 'type': 'CPS DateTime Field', |
---|
| 150 | 'data': { |
---|
| 151 | 'is_searchabletext': 1, |
---|
| 152 | }, |
---|
| 153 | }, |
---|
| 154 | 'state': { |
---|
| 155 | 'type': 'CPS DateTime Field', |
---|
| 156 | 'data': { |
---|
| 157 | 'is_searchabletext': 1, |
---|
| 158 | }, |
---|
| 159 | }, |
---|
[19] | 160 | } |
---|
[47] | 161 | ###) |
---|
| 162 | |
---|
| 163 | jamb_schema = { ###( |
---|
[19] | 164 | 'reg_nr': { |
---|
| 165 | 'type': 'CPS String Field', |
---|
| 166 | 'data': { |
---|
| 167 | 'default_expr': 'string:', |
---|
| 168 | 'is_searchabletext': True, |
---|
| 169 | }, |
---|
| 170 | }, |
---|
[47] | 171 | 'admission_sc_id': { |
---|
[19] | 172 | 'type': 'CPS String Field', |
---|
| 173 | 'data': { |
---|
| 174 | 'is_searchabletext': True, |
---|
| 175 | }, |
---|
| 176 | }, |
---|
[47] | 177 | 'admission_sc_pin': { |
---|
| 178 | 'type': 'CPS String Field', |
---|
[19] | 179 | 'data': { |
---|
[47] | 180 | 'is_searchabletext': True, |
---|
[19] | 181 | }, |
---|
| 182 | }, |
---|
[47] | 183 | 'admission_sc_pin_usage': { |
---|
| 184 | 'type': 'CPS Int Field', |
---|
[19] | 185 | 'data': { |
---|
[29] | 186 | 'default_expr': 'python:0', |
---|
[19] | 187 | 'is_searchabletext': False, |
---|
[57] | 188 | }, |
---|
| 189 | }, |
---|
| 190 | 'firstname': { |
---|
| 191 | 'type': 'CPS String Field', |
---|
| 192 | 'data': { |
---|
| 193 | 'is_searchabletext': 1, |
---|
[19] | 194 | }, |
---|
| 195 | }, |
---|
[57] | 196 | 'middlename': { |
---|
[19] | 197 | 'type': 'CPS String Field', |
---|
| 198 | 'data': { |
---|
[57] | 199 | 'is_searchabletext': 1, |
---|
[19] | 200 | }, |
---|
| 201 | }, |
---|
[57] | 202 | 'lastname': { |
---|
| 203 | 'type': 'CPS String Field', |
---|
| 204 | 'data': { |
---|
| 205 | 'is_searchabletext': 1, |
---|
| 206 | }, |
---|
| 207 | }, |
---|
[47] | 208 | 'age': { |
---|
| 209 | 'type': 'CPS Int Field', |
---|
[19] | 210 | 'data': { |
---|
[47] | 211 | 'default_expr': 'python:20', |
---|
| 212 | 'is_searchabletext': False, |
---|
[19] | 213 | }, |
---|
| 214 | }, |
---|
[47] | 215 | 'sex': { |
---|
| 216 | 'type': 'CPS Boolean Field', |
---|
[19] | 217 | 'data': { |
---|
[47] | 218 | 'default_expr': 'python:0', |
---|
[19] | 219 | 'is_searchabletext': False, |
---|
| 220 | }, |
---|
| 221 | }, |
---|
[57] | 222 | 'state': { |
---|
[19] | 223 | 'type': 'CPS String Field', |
---|
| 224 | 'data': { |
---|
| 225 | 'default_expr': 'string:', |
---|
[57] | 226 | 'is_searchabletext': False, |
---|
[19] | 227 | }, |
---|
| 228 | }, |
---|
[47] | 229 | 'exam_results': { |
---|
[19] | 230 | 'type': 'CPS String Field', |
---|
| 231 | 'data': { |
---|
| 232 | 'default_expr': 'string:', |
---|
| 233 | }, |
---|
| 234 | }, |
---|
[47] | 235 | 'aggregate': { |
---|
| 236 | 'type': 'CPS String Field', |
---|
[25] | 237 | 'data': { |
---|
[47] | 238 | 'default_expr': 'string:', |
---|
| 239 | 'is_searchabletext': False, |
---|
[25] | 240 | }, |
---|
[47] | 241 | }, |
---|
[57] | 242 | 'faculty': { |
---|
[25] | 243 | 'type': 'CPS String Field', |
---|
| 244 | 'data': { |
---|
[47] | 245 | 'default_expr': 'string:', |
---|
| 246 | 'is_searchabletext': False, |
---|
[25] | 247 | }, |
---|
| 248 | }, |
---|
[106] | 249 | 'course': { |
---|
| 250 | 'type': 'CPS String Field', |
---|
| 251 | 'data': { |
---|
| 252 | 'default_expr': 'string:', |
---|
| 253 | 'is_searchabletext': False, |
---|
| 254 | }, |
---|
| 255 | }, |
---|
[57] | 256 | 'listing_date': { |
---|
| 257 | 'type': 'CPS DateTime Field', |
---|
[25] | 258 | 'data': { |
---|
[57] | 259 | 'is_searchabletext': False, |
---|
[25] | 260 | }, |
---|
| 261 | }, |
---|
[57] | 262 | ## '2nd_choice': { ###( |
---|
| 263 | ## 'type': 'CPS String Field', |
---|
| 264 | ## 'data': { |
---|
| 265 | ## 'default_expr': 'string:', |
---|
| 266 | ## 'is_searchabletext': False, |
---|
| 267 | ## 'acl_read_permissions': '', |
---|
| 268 | ## 'acl_read_roles': '', |
---|
| 269 | ## 'acl_read_expr': '', |
---|
| 270 | ## 'acl_write_permissions': '', |
---|
| 271 | ## 'acl_write_roles': '', |
---|
| 272 | ## 'acl_write_expr': '', |
---|
| 273 | ## 'read_ignore_storage': False, |
---|
| 274 | ## 'read_process_expr': '', |
---|
| 275 | ## 'read_process_dependent_fields': (), |
---|
| 276 | ## 'write_ignore_storage': False, |
---|
| 277 | ## 'write_process_expr': '', |
---|
| 278 | ## }, |
---|
| 279 | ## }, |
---|
| 280 | ## '3rd_choice': { |
---|
| 281 | ## 'type': 'CPS String Field', |
---|
| 282 | ## 'data': { |
---|
| 283 | ## 'default_expr': 'string:', |
---|
| 284 | ## 'is_searchabletext': True, |
---|
| 285 | ## 'acl_read_permissions': '', |
---|
| 286 | ## 'acl_read_roles': '', |
---|
| 287 | ## 'acl_read_expr': '', |
---|
| 288 | ## 'acl_write_permissions': '', |
---|
| 289 | ## 'acl_write_roles': '', |
---|
| 290 | ## 'acl_write_expr': '', |
---|
| 291 | ## 'read_ignore_storage': False, |
---|
| 292 | ## 'read_process_expr': '', |
---|
| 293 | ## 'read_process_dependent_fields': (), |
---|
| 294 | ## 'write_ignore_storage': False, |
---|
| 295 | ## 'write_process_expr': '', |
---|
| 296 | ## }, |
---|
| 297 | ## }, |
---|
| 298 | ###) |
---|
[25] | 299 | } |
---|
[47] | 300 | |
---|
[57] | 301 | |
---|
[47] | 302 | ###) |
---|
| 303 | |
---|
[139] | 304 | course_results_schema = { ###( |
---|
| 305 | 'points': { |
---|
| 306 | 'type': 'CPS Int Field', |
---|
| 307 | 'data': { |
---|
| 308 | 'is_searchabletext': 0, |
---|
| 309 | }, |
---|
| 310 | }, |
---|
| 311 | 'grade': { |
---|
| 312 | 'type': 'CPS String Field', |
---|
| 313 | 'data': { |
---|
| 314 | 'is_searchabletext': 0, |
---|
| 315 | }, |
---|
| 316 | }, |
---|
| 317 | } |
---|
| 318 | # |
---|
| 319 | ###) |
---|
| 320 | |
---|
[68] | 321 | faculty_schema = { ###( |
---|
| 322 | }###) |
---|
| 323 | |
---|
| 324 | department_schema = { ###( |
---|
| 325 | }###) |
---|
| 326 | |
---|
| 327 | course_schema = { ###( |
---|
[144] | 328 | ## 'Title': { |
---|
| 329 | ## 'type': 'CPS String Field', |
---|
| 330 | ## 'data': { |
---|
| 331 | ## 'default_expr': '', |
---|
| 332 | ## 'is_searchabletext': True, |
---|
| 333 | ## }, |
---|
| 334 | ## }, |
---|
[96] | 335 | 'heading': { |
---|
| 336 | 'type': 'CPS String Field', |
---|
| 337 | 'data': { |
---|
| 338 | 'is_searchabletext': True, |
---|
| 339 | }, |
---|
| 340 | }, |
---|
| 341 | 'text': { |
---|
| 342 | 'type': 'CPS String Field', |
---|
| 343 | 'data': { |
---|
| 344 | 'is_searchabletext': True, |
---|
| 345 | }, |
---|
| 346 | }, |
---|
[68] | 347 | 'level': { |
---|
| 348 | 'type': 'CPS String Field', |
---|
| 349 | 'data': { |
---|
| 350 | 'default_expr': 'string:', |
---|
| 351 | 'is_searchabletext': True, |
---|
| 352 | }, |
---|
| 353 | }, |
---|
| 354 | 'code': { |
---|
| 355 | 'type': 'CPS String Field', |
---|
| 356 | 'data': { |
---|
| 357 | 'default_expr': 'string:', |
---|
| 358 | 'is_searchabletext': True, |
---|
| 359 | }, |
---|
| 360 | }, |
---|
| 361 | 'semester': { |
---|
| 362 | 'type': 'CPS Boolean Field', |
---|
| 363 | 'data': { |
---|
| 364 | 'default_expr': 'python:True', |
---|
| 365 | 'is_searchabletext': False, |
---|
| 366 | }, |
---|
| 367 | }, |
---|
| 368 | 'credit': { |
---|
| 369 | 'type': 'CPS Int Field', |
---|
| 370 | 'data': { |
---|
| 371 | 'default_expr': 'string:', |
---|
| 372 | 'is_searchabletext': False, |
---|
| 373 | }, |
---|
| 374 | }, |
---|
| 375 | 'core_elective': { |
---|
| 376 | 'type': 'CPS Boolean Field', |
---|
| 377 | 'data': { |
---|
| 378 | 'default_expr': 'python:True', |
---|
| 379 | 'is_searchabletext': False, |
---|
| 380 | }, |
---|
| 381 | }, |
---|
| 382 | }###) |
---|
| 383 | |
---|
[103] | 384 | accommodation = { ###( |
---|
[101] | 385 | 'heading': { |
---|
| 386 | 'type': 'CPS String Field', |
---|
| 387 | 'data': { |
---|
| 388 | 'is_searchabletext': True, |
---|
| 389 | }, |
---|
| 390 | }, |
---|
| 391 | 'text': { |
---|
| 392 | 'type': 'CPS String Field', |
---|
| 393 | 'data': { |
---|
| 394 | 'is_searchabletext': True, |
---|
| 395 | }, |
---|
| 396 | }, |
---|
[103] | 397 | 'which_sex': { |
---|
| 398 | 'type': 'CPS Boolean Field', |
---|
[101] | 399 | 'data': { |
---|
| 400 | 'is_searchabletext': True, |
---|
| 401 | }, |
---|
| 402 | }, |
---|
[103] | 403 | 'nr_of_blocks': { |
---|
| 404 | 'type': 'CPS Int Field', |
---|
[101] | 405 | 'data': { |
---|
[103] | 406 | 'is_searchabletext': False, |
---|
[101] | 407 | }, |
---|
| 408 | }, |
---|
[103] | 409 | 'nr_of_floors': { |
---|
| 410 | 'type': 'CPS Int Field', |
---|
[101] | 411 | 'data': { |
---|
| 412 | 'is_searchabletext': False, |
---|
| 413 | }, |
---|
| 414 | }, |
---|
[103] | 415 | 'rooms_per_floor': { |
---|
[101] | 416 | 'type': 'CPS Int Field', |
---|
| 417 | 'data': { |
---|
| 418 | 'is_searchabletext': False, |
---|
| 419 | }, |
---|
| 420 | }, |
---|
[103] | 421 | 'beds_per_room': { |
---|
| 422 | 'type': 'CPS Int Field', |
---|
[101] | 423 | 'data': { |
---|
| 424 | 'is_searchabletext': False, |
---|
| 425 | }, |
---|
| 426 | }, |
---|
[107] | 427 | 'beds_assigned': { |
---|
| 428 | 'type': 'CPS Int Field', |
---|
| 429 | 'data': { |
---|
| 430 | 'is_searchabletext': False, |
---|
| 431 | }, |
---|
| 432 | }, |
---|
| 433 | 'beds_assigned_list': { |
---|
| 434 | 'type': 'CPS String List Field', |
---|
| 435 | 'data': { |
---|
| 436 | 'is_searchabletext': False, |
---|
| 437 | }, |
---|
| 438 | }, |
---|
[101] | 439 | }###) |
---|
| 440 | |
---|
[47] | 441 | ##scratch_card = { ###( |
---|
| 442 | #### 'allow_discussion': { |
---|
| 443 | #### 'type': 'CPS Int Field', |
---|
| 444 | #### 'data': { |
---|
| 445 | #### 'default_expr': 'python:0', |
---|
| 446 | #### 'is_searchabletext': 0, |
---|
| 447 | #### }, |
---|
| 448 | #### }, |
---|
| 449 | ## 'sc_id': { |
---|
| 450 | ## 'type': 'CPS String Field', |
---|
| 451 | ## 'data': { |
---|
| 452 | ## 'default_expr': '', |
---|
| 453 | ## 'is_searchabletext': 0, |
---|
| 454 | ## 'acl_read_permissions': '', |
---|
| 455 | ## 'acl_read_roles': '', |
---|
| 456 | ## 'acl_read_expr': '', |
---|
| 457 | ## 'acl_write_permissions': '', |
---|
| 458 | ## 'acl_write_roles': '', |
---|
| 459 | ## 'acl_write_expr': '', |
---|
| 460 | ## 'read_ignore_storage': False, |
---|
| 461 | ## 'read_process_expr': '', |
---|
| 462 | ## 'read_process_dependent_fields': (), |
---|
| 463 | ## 'write_ignore_storage': False, |
---|
| 464 | ## 'write_process_expr': '', |
---|
| 465 | ## }, |
---|
| 466 | ## }, |
---|
| 467 | ## 'sc_pin': { |
---|
| 468 | ## 'type': 'CPS String Field', |
---|
| 469 | ## 'data': { |
---|
| 470 | ## 'default_expr': '', |
---|
| 471 | ## 'is_searchabletext': 0, |
---|
| 472 | ## 'acl_read_permissions': '', |
---|
| 473 | ## 'acl_read_roles': '', |
---|
| 474 | ## 'acl_read_expr': '', |
---|
| 475 | ## 'acl_write_permissions': '', |
---|
| 476 | ## 'acl_write_roles': '', |
---|
| 477 | ## 'acl_write_expr': '', |
---|
| 478 | ## 'read_ignore_storage': False, |
---|
| 479 | ## 'read_process_expr': '', |
---|
| 480 | ## 'read_process_dependent_fields': (), |
---|
| 481 | ## 'write_ignore_storage': False, |
---|
| 482 | ## 'write_process_expr': '', |
---|
| 483 | ## }, |
---|
| 484 | ## }, |
---|
| 485 | ##} |
---|
[19] | 486 | schemas = {} |
---|
[47] | 487 | ###) |
---|
| 488 | |
---|
[45] | 489 | schemas['university'] = university_schema |
---|
[113] | 490 | schemas['academics'] = academics_folder_schema |
---|
[45] | 491 | schemas['students'] = students_folder_schema |
---|
[19] | 492 | schemas['student'] = student_schema |
---|
[152] | 493 | schemas['studylevel'] = studylevel |
---|
[139] | 494 | schemas['course_results'] = course_results_schema |
---|
[47] | 495 | schemas['student_personal'] = student_personal_schema |
---|
[103] | 496 | schemas['accommodation'] = accommodation |
---|
[19] | 497 | schemas['jamb'] = jamb_schema |
---|
[78] | 498 | #schemas['scratch_card'] = scratch_card |
---|
| 499 | schemas['faculty'] = faculty_schema |
---|
| 500 | schemas['department'] = department_schema |
---|
[68] | 501 | schemas['course'] = course_schema |
---|
[19] | 502 | |
---|
| 503 | return schemas |
---|