VO-DML subsetting

Laurent Michel laurent.michel at astro.unistra.fr
Fri Jun 14 14:30:45 CEST 2019


Thanks Gerard,

This helps a lot.

Laurent

Le 14/06/2019 à 12:32, Gerard Lemson a écrit :
> Hi Laurent
> SubsettedRole is a special form of Constraint, one that merely indicates that on a subtype, the datatype of an inherited Role is a more specific version (subtype) of the datatype of that Role as defined on the supertype.
> You can actually define free form Constraint-s, see section 4.20 of the VO-DML spec.
> These are defined using "free" text in the description element of the Constraint, and is defined at the level of the type, not a Role.
> The modeler is free to make up their own computer readable constraint language if they wish.
> E.g.  as in the VO-DML/XML sample in that section :
> <constraint>
>      <description>-90&lt;=self.latitude.value&lt;=90 </description>
> </constraint>
> 
> Does this help?
> Cheers
> Gerard
> 
>> -----Original Message-----
>> From: dm-bounces at ivoa.net <dm-bounces at ivoa.net> On Behalf Of Laurent
>> Michel
>> Sent: Friday, June 14, 2019 5:25
>> To: dm at ivoa.net
>> Subject: VO-DML subsetting
>>
>>
>> Hello,
>>
>> In my model, I would like to put a constraint (SubsettedRole) on an attribute
>> value in the context of a specific class:
>>
>> Example:
>>     - SuperClass A(attribute: a:string)
>>     - SubClass B extends A (constraint: a='ImB')
>>
>> This is legal in UML since constraints are free text but the VO-DML validator
>> (schematron) disallow this.
>> The Schematron validates constraints by applying a regular expression on the
>> SubsettedRole which reject any sort of expression:
>>
>>     [a-zA-Z][a-zA-Z0-9\._\-]+:[a-zA-Z][a-zA-Z0-9\._]*
>>
>> This is fine to put a constraint on class name (Class B extends A (constraint: a is
>> instance of X)) , but nothing in the spec disallows to write an expression like
>> (Class B extends A (a is not null))
>>
>> How can I do this?
>>
>> Laurent
>> --
>> jesuischarlie/Tunis/Paris/Bruxelles/Berlin
>>
>> Laurent Michel
>> SSC XMM-Newton
>> Tél : +33 (0)3 68 85 24 37
>> Fax : +33 (0)3 )3 68 85 24 32
>> Université de Strasbourg <http://www.unistra.fr> Observatoire Astronomique
>> 11 Rue de l'Université
>> F - 67200 Strasbourg
>>
> 

-- 
jesuischarlie/Tunis/Paris/Bruxelles/Berlin

Laurent Michel
SSC XMM-Newton
Tél : +33 (0)3 68 85 24 37
Fax : +33 (0)3 )3 68 85 24 32
Université de Strasbourg <http://www.unistra.fr>
Observatoire Astronomique
11 Rue de l'Université
F - 67200 Strasbourg



More information about the dm mailing list