[vodml] EnumLiterals and vodml-id
Gerard Lemson
glemson1 at jhu.edu
Fri Jan 15 15:19:34 CET 2016
Hi Mark
>...
>
> These models we are working (DatasetMetadata, STC2, etc) are working
> to be vo-dml compliant to facilitate this path, but must also serve the present
> and near-term, where we have model aware, but not vodml aware software.
>
I would be very interested to see examples of this Model aware software, for I think this has been sorely missing so far. Examples of software that "code against a model". I'm meeting with Tom today to talk about precisely that.
>
> So, if I define vo-dml compliant enumeration in the DatasetMetadata
> model
>
> SpectralBand
> + Radio
> + XRay
>
>
> what value would a data provider need to give in order for model
> aware, but not vo-dml aware software to be able to instantiate the proper
> literal instance on
>
> myObject.band:SpectralBand[1]
This depends on the implementation of the model in the software, something VO-DML is silent about.
It also depends on what you mean by being "model aware".
Even if the software aims to represent the model 1-1 there are still going to be implementation and language dependent choices that must be made.
Now I have XSLT that transforms a VO-DML model to POJO Java classes, though I have not kept it up-to-date with latest changes. There an Enumeration is mapped to a Java 'enum' and the EnumLiterals directly to the literals in the enum. I.e. similar to the example I sent yesterday in reply to Laurent's comments
and the values to be used to set appropriately typed attributes would be these literals.
But everyone is free to use their own implementation in principle.
I think the issue is mainly important if the software is to be interoperable with other resources. If messages need to be sent between them.
Now it depends on the serialization that is chosen to represent instances of the data model. Annotated VOTable is one way to do so, and the only one we're currently explicitly working on. Software that makes particular choices for representing the model will have to be able to interact with such representations and in general will have to map from the annotated VOTable to its internal representation. This in fact is what Tom and I are trying to work on.
>
>
>
>
> Or.. in an annotated world, if we have a table whose column is populated with
> enumerated values ('band' column in obstap table?). The data product has a
> string field, that field is annotated with its vo-dml id , the vo-dml aware
> software can resolve this to see that the values represent instances of the
> SpectralBand enumeration..
>
> what are the field values? Maybe there is a way of annotating each record?
>
In the latest version of the mapping document this question is addressed. It allows one to create mappings for <VALUES> elements that identify (via a VODMLREF annotation) which enumliteral a certain <OPTION> corresponds to. The details need further scrutiny, but that's the gist.
Cheers
Gerard
>
> mark
>
>
>
>
>
>
>
>
>
More information about the dm
mailing list