ivoa: DM type system

CresitelloDittmar, Mark mdittmar at cfa.harvard.edu
Mon Apr 17 17:51:06 CEST 2017


On Mon, Apr 17, 2017 at 11:12 AM, Gerard Lemson <gerard.lemson at gmail.com>
wrote:

>
> <https://volute.g-vo.org/svn/trunk/projects/dm/STC-2.0/doc/diagrams/alt/ivoa%20types%20diagram.png>
>
> This is technically illegal in VO-DML. Though ValueType is a common base
> class of PrimitiveType, Enumeration and DataType, it is abstract and cannot
> be explicitly instantiated. Hence if you'd want to define ivoa:anyType, it
> must be one of the three concrete value types.
>
> IF we'd make ValueType concrete and "allow" a <valuetype> instantiation
> for it in VO-DML, we could define a common super type for all value types.
>
> This anyType would basically be the only reason to allow this I think, so
> rather ugly.
>
> Alternatively we could follow the UML treatment of value types, which is
> to have DataType be the common base class, and have enumeration and
> primitiveType be subtypes of this, where the inheritance relations should
> be seen as a kind of restriction. But a weird one, adding the implicit
> value, and removing any roles. I'd almost prefer making ValueType concrete.
>
I don't think this needs to be complicated, so let's put these on the back
burner.


>>     * Quantity and datetime would not have a common ancestor, so we could
not define a TimeStamp
>>       which would allow time represented as a RealQuantity OR datetime.
>>       https://volute.g-vo.org/svn/trunk/projects/dm/STC-
<https://volute.g-vo.org/svn/trunk/projects/dm/STC-2.0/doc/diagrams/alt/temporal%20domain%20diagram.png>
2.0/doc/diagrams/alt/temporal%20domain%20diagram.png
<https://volute.g-vo.org/svn/trunk/projects/dm/STC-2.0/doc/diagrams/alt/temporal%20domain%20diagram.png>
>>

>So are you saying you'd like a DatetimeQuantity? With only a "datetime
unit" being sufficient?
>I had hoped   'ivoa:datetime' would be sufficient and the precise
representation would be left to the mapping.

This sounds like you are suggesting that 'ivoa:datetime' should suffice for
all uses.
   MJDREF  = 50814.02               / [d] zero point for times - MJD
   TSTART  = 84244214.7546979934    / [s] Observation start time
   DATE-OBS= "2000-09-02T01:10:14"  / Date and time of observation start

I want all of these to be a TimeStamp type (abstract).
  * datetime = has vodml/html description:  "Represents a moment in time
using a date+timestamp."
which covers 'DATE-OBS', the other 2 are satisfied by RealQuantity.

But.. since RealQuantity and datetime do not have a common ancestor, I
cannot define TimeStamp without either an anyType or a DateQuantity.

Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ivoa.net/pipermail/dm/attachments/20170417/22cd25e0/attachment.html>


More information about the dm mailing list