Changes between Version 96 and Version 97 of DASISH/XSD and XML


Ignore:
Timestamp:
08/19/13 08:05:00 (11 years ago)
Author:
olhsha
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DASISH/XSD and XML

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