[vodml] EnumLiterals and vodml-id
CresitelloDittmar, Mark
mdittmar at cfa.harvard.edu
Tue Jan 12 22:14:50 CET 2016
All,
Sorry for being a thorn about this, I'm just concerned that an important
detail might be getting lost.
Correct me if I'm wrong, but I believe the UML EnumerationLiteral has no
restriction on the value.
All of the examples which fail the vo-dml validation are fine by UML
standards.
You asked:
>Why all-caps for enumliteral names?
Why not..
Once vo-dml imposes a restriction to the value (name), it stops being the
literal, and becomes a code representing the literal. vo-dml could impose
an all-caps restriction as easily as the VODMLName pattern. The form of
the restriction is arbitrary. As such, the value of that field becomes
arbitrary. As you say, a simple list of values would do.
So, where then, is the literal?
The purpose of vo-dml is..
>Which is primarily annotation of data sets for use by software.
which, I agree, only requires the 'name'. So, from that perspective:
(please forgive the ad-hoc serialization here)
<GROUP name=SomeObject vodml-id="model:package.SomeObject" >
<PARAM datatype="char" name="att1"
vodml-id="model:myTypes.SpectralBand.XRAY" value="X-Ray" arraysize="*">
<DESCRIPTION>"0.1 Angstrom <= wavelength <= 100 Angstrom"
</DESCRIPTION>
<PARAM datatype="char" name="att2"
vodml-id="model:myTypes.SpectralBand.XRAY" value="bob" arraysize="*">
<DESCRIPTION>"0.1 Angstrom <= wavelength <= 100 Angstrom"
</DESCRIPTION>
Both would be valid mappings from the user since they are both tagged with
the proper vo-dml EnumLiteral even
though they have different values.
But, for a model aware, but not vo-dml savvy piece of software, it would
not be possible to instantiate the
proper SpectralBand enumeration instances. This requires the literal to be
defined in the model and used here.
In the vast majority of cases, the literal == code, but not always. Maybe
another example.. if/when we model Observation better, and
include observatory location, may have country enum:
Country.USA = "United States",
Country.NZ = "New Zealand"
Country.PNG = "Papua New Guinea"
The difference between this and other types, is that the EnumLiteral vo-dml
tag should be associated with one and only 1 value (the literal),
which is specified by the model. If the name is arbitrary, then this must
be provided by another field.. label|title.
So, maybe the label isn't needed in vo-dml, just at the model level.
I could define the XRAY EnumerationLiteral and tag it with a label="X-Ray"
and those reading the PDF will get this information.
But it wouldn't be conveyed to the HTML description produced by the xslt
scripts, because it is not a recognized field of the vo-dml element.
Enough for now.
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ivoa.net/pipermail/dm/attachments/20160112/49535a85/attachment.html>
More information about the dm
mailing list