VO-DML subsetting

Laurent Michel laurent.michel at astro.unistra.fr
Fri Jun 14 15:13:48 CEST 2019


Modelio 3.8 => add constraint => NullpointerException :-(

Problem submitted on the forum

https://www.modelio.org/forum/15-issues/4485-modelio-core-the-infrastructure-abstraction-metaclass-does-not-exist.html

I'll continue to investigate after I have a workaround.

Laurent

Le 14/06/2019 à 14:41, CresitelloDittmar, Mark a écrit :
> On the technical side, if you use Subset, you need to provide valid vo-dml ids to the stereotype in the UML.
> Subset:
>     Name = vo-dml id of the element being constrained (e.g.  meas:GenericPosition.coord )
>     Body  = vo-dml id of the type constraint (e.g. coords:CoordValue[1])
> I don't recall if both are verified or not, but this is the expectation on the UML for the xslt scripts.
> 
> Constraint: is easier
>     It applies to the object it is associated with, so no need to specify the vo-dml id in Name
>     Body = free text
> 
> Mark
> 
> 
> On Fri, Jun 14, 2019 at 6:32 AM Gerard Lemson <glemson1 at jhu.edu <mailto:glemson1 at jhu.edu>> wrote:
> 
>     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 <mailto:dm-bounces at ivoa.net> <dm-bounces at ivoa.net <mailto:dm-bounces at ivoa.net>> On Behalf Of
>     Laurent
>      > Michel
>      > Sent: Friday, June 14, 2019 5:25
>      > To: dm at ivoa.net <mailto: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