| 514 | |
| 515 | |
| 516 | = Issues with the schema = |
| 517 | == Possible namespace pollution: Ticket 348 to be discussed with Peter == |
| 518 | |
| 519 | Peter: |
| 520 | "It looks like there might be some namespace pollution or some other anomaly that causes the jaxb a |
| 521 | uto generated classes to omit the getter for notebooks from the ObjectFactory. This is an issue |
| 522 | when a jaxb root node is required, such as in the rest interface. A work around has been added |
| 523 | which makes it clear where the issue is and why the ObjectFactory is required, but this needs to |
| 524 | be replaced when the schema is updated." |
| 525 | |
| 526 | |
| 527 | == External_id (DataBase) vs URI (schema) vs UUID-based class (Java code) == |
| 528 | |
| 529 | For the time being I treat them as "the same": URI is external_id. Both are strings. |
| 530 | |
| 531 | Moreover, there is a class "DasishIdentifier" (with a bunch of superclasses, for each reasoure), |
| 532 | extending UUI. It "envelopes" external_id" into UUID. |
| 533 | |
| 534 | |
| 535 | == Body: must be some serialization/deserialization mechanism == |
| 536 | |
| 537 | -- "body" in the DB it is just a text |
| 538 | -- "body" in schema-generated class it is a list of objects |
| 539 | |
| 540 | For now, I use simple "serialize" and "deserialize" Helpers' procedures which should be replaced by |
| 541 | some proper marshalling-demarshalling. For simple serialization I treat the first element of the list |
| 542 | of objects above as a text whcich corresponds to the DB column "body_xml" |
| 543 | |
| 544 | |
| 545 | == Source == |
| 546 | |
| 547 | Misprint in timeStamp: timeSatmp. |
| 548 | |
| 549 | |
| 550 | |
| 551 | == Cached Representation Info == |
| 552 | |
| 553 | Missing in the schema: the attribute/elememt "where_is_the_file" which actually points to the location |
| 554 | where the file can be download. It is necessary to fulfill |
| 555 | |
| 556 | GET api/sources/<sid>/cached/<cid>/content |
| 557 | |
| 558 | == Version == |
| 559 | |
| 560 | MISSING in the schema: attribute URI (corresponding to the external_id in the DB) is absent. Therefore it does not appear |
| 561 | in the JAXB-generated class "Version" and the java class has one attribute less than the DB table "version" |
| 562 | |
| 563 | {{{ |
| 564 | CREATE TABLE version ( |
| 565 | version_id SERIAL UNIQUE NOT NULL, |
| 566 | external_id UUID UNIQUE NOT NULL, |
| 567 | version text, |
| 568 | ); |
| 569 | }}} |
| 570 | |
| 571 | For now I'm using attrribute "version:String" now to keep "external_id/URI" in the java |
| 572 | class "Version". |
| 573 | |
| 574 | |
| 575 | == LISTS of Resources, like "PermissionS" and "CachedRepresentationS", |
| 576 | and version-siblingS connected to a particular source |
| 577 | cannot be standalone tables in the relational DB == |
| 578 | |
| 579 | According to the schema: a list of Cached representations is declared as a standalone resource |
| 580 | of type "CachedRepresentations". Every version referres to its own list of cached representations. |
| 581 | Every such list has it own ID. |
| 582 | |
| 583 | According to the Rel. database: it looks a bit strange to have such lists. Instead, i have made |
| 584 | a common joint table (verson_id, cached_representation_id). A pair (a, b) is listed in this table iff |
| 585 | the version with the internal id "a" has cahced representation with intrenal id "b". |