ivoa / dm-usecases

The is repo gathers all the material to be used in the DM workshop 2020
The Unlicense
1 stars 3 forks source link

VODML Mapping vs ModelInstanceInVot #23

Open lmichel opened 3 years ago

lmichel commented 3 years ago

Both proposals (VOML Mapping, ModelInstanceInVot) have similar structures. There is nevertheless a major difference that is justified here.

Screenshot 2021-03-24 at 14 01 19

The advantage of the ModelInstanceInVot mapping structure is even more obvious for multi-table VOTables.

Screenshot 2021-03-24 at 14 01 29

mcdittmar commented 3 years ago

I'm taking a closer look to compare the annotation schemes today.

I notice that the preview PDF in the ModelInstanceInVot repository is not current (2020-08-18). The one under doc (2020-09-15) appears to match the current serializations.

Is that correct?

lmichel commented 3 years ago

The CI failed! I’ve been trying to run it again

I'm taking a closer look to compare the annotation schemes today.

I notice that the preview PDF https://github.com/ivoa-std/ModelInstanceInVot/releases/download/auto-pdf-preview/vodml-instance-vot-draft.pdf in the ModelInstanceInVot repository is not current (2020-08-18). The one under doc https://github.com/ivoa-std/ModelInstanceInVot/blob/master/doc/model-instance-in-vot.pdf (2020-09-15) appears to match the current serializations.

Is that correct?

yes, the one under the doc is always uptodate

Bonnarel commented 3 years ago

Good clarification Laurent, but I think there is a typo in your text above. TABLE_RAW_MAPPING shoukd write "TABLE_ROW-TEMPLATE", shouldn't it ?

lmichel commented 3 years ago

right, fixed

mcdittmar commented 3 years ago

I wrote this up some days ago.. forgot to push the green button!. I spent the day studying the ModelInstanceInVot syntax so that I could, hopefully, provide a more informed response.

General comment: One of the main reasons I'm using the Mapping syntax, is that it was designed/vetted against a set of requirements/cases covering the expectations on any syntax. To my knowledge, these requirements on our Annotation syntax have not changed, so I'm reviewing this scheme against my understanding of the Mapping syntax requirements. It is not quite fair to evaluate one document based on the requirements of another, but in this case, we are trying to determine what is gained/lost by the various options.

MODEL_INSTANCE: Your comments seem to come from the perspective that the annotation represents "the dataset". The Model_Instance description follows that view in that you can provide for no more than 1 'name' and 'uri' for "the mapped model.". It is further supported by INSTANCE with dmrole="root", which "can be used to tell the parser whic class has to be instanciated first.". If the annotation contains more than one "root" instance (eg: a MANGO and a Cube/TimeSeries), the MODEL_INSTANCE name and uri attributes have little meaning.

It is a specific goal of our Annotation Syntax to 'Annotate files to multiple models' (Mapping doc; Section 2.3.2). This can be either different products ( MANGO, Cube ) or different versions of the same model. I think this is a feature we want to preserve, and I am expecting the case in Issue #29 does just this?

GLOBALS/TEMPLATES in the Mapping syntax: GLOBALS holds 'direct instances' (COLUMN is not allowed under GLOBALS) so that each instance may be given an ID which can be referenced by other instances

TEMPLATES hold all instances which are created per row of the associated TABLE, so looks equivalent to the ModelInstanceInVot TABLE_ROW_TEMPLATE but at a higher level

So, in your first pair of diagrams.. you cannot consider the 1 TABLE to represent 1 Dataset, or even 1 'root' object. Instead, what the Mapping syntax does is separate the elements into sections where parsers must act differently to generate the instances

TABLE_MAPPING..(TABLE_TEMPLATE in diagrams?): This element confuses me.
The ModelInstanceInVot document states that the annotation is independent of the data structure

But this element appears to tie very directly with the VOTable serialization structure