[vodml] EnumLiterals and vodml-id

Gerard Lemson glemson1 at jhu.edu
Sat Jan 9 00:25:08 CET 2016


Hi Mark
Good catch, thanks.But realize that the vodml-id generation from UML is a utility, not a part of the spec. 
What we can/should do in the UML is to add explicit vodml-ids for enumeration literals whose name is not compliant with the vodml-id standard.
My generation code should respect predefined vodml-ids in the UML and use those rather than generating them form the name. 
I'll try it out in your Modelio diagrams when I get to them.
Cheers
Gerard

> -----Original Message-----
> From: dm-bounces at ivoa.net [mailto:dm-bounces at ivoa.net] On Behalf Of
> CresitelloDittmar, Mark
> Sent: Friday, January 08, 2016 3:10 PM
> To: Data Models mailing list <dm at ivoa.net>
> Subject: [vodml] EnumLiterals and vodml-id
> 
> Gerard,
> 
> I am working on processing the DatasetMetadata model through the vo-dml
> scripts and am getting a validation error for some enumeration literals which I
> think point to a conflict in the doc or a missing step in the vodml-id generation in
> the scripts.
> 
> 
> Section 4.9.1 literal: EnumLiteral
> 
>    "literals are modeled as strings, as the actual value of an enumeration literal is
> not important,"
> 
> 
> However, the value is used to generate the vodml-id for the element, and
> vodml-id has a rule:
> 
> 
> Section 4.1.1 vodml-id: ElementID
> 
>    "This element MUST be formatted according to the regular expression in the
> XML schema: '[\w\._-]+' "
> 
> 
> 
> In the DatasetMetadata document we have values like:
> 
>   Enumeration         Literal                    vodml-id
>   CreationType     "spectral extraction"  dataset.CreationType.spectral extraction
>   SpectralBandType "X-ray"                dataset.SpectralBandType.X-ray
> 
> 
> 
> 
> The space in the first, and '-' in the second violate the vodml-id pattern.
> 
> 
> Mark



More information about the dm mailing list