Skip to content

Commit 29a8995

Browse files
authored
Merge pull request #52 from msdemlei/add-json-xtype
Adding text for the json xtype
2 parents 79b0713 + 873c570 commit 29a8995

File tree

1 file changed

+62
-40
lines changed

1 file changed

+62
-40
lines changed

DALI.tex

Lines changed: 62 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ \subsection{Synchronous Execution: DALI-sync}
267267
A concrete DAL service specification will specify zero or more synchronous job
268268
submission resources and whether they are mandatory or optional. It may mandate
269269
a specific resource name to support simple client use, or it can allow the
270-
resource name to be described in the service capability metadata
270+
resource name to be described in the service capability metadata
271271
(Section~\ref{sec:vosi-capabilities}).
272272

273273
\subsection{DALI-examples}
@@ -289,7 +289,7 @@ \subsection{DALI-examples}
289289
$$
290290

291291
DAL services may implement the /examples resource and include it in the
292-
capabilities described by the VOSI-capabilities resource
292+
capabilities described by the VOSI-capabilities resource
293293
(Section~\ref{sec:vosi-capabilities}); if they
294294
do not, retrieving its URL must yield a 404 HTTP error code.
295295

@@ -588,12 +588,18 @@ \section{Data Types and Literal Values}
588588
\emph{point}, \emph{circle}, \emph{range}, \emph{polygon}, \emph{moc},
589589
\emph{multipolygon}, \emph{shape}, \emph{uri}, and \emph{uuid} (see below).
590590

591-
In the following, where we say \verb|datatype="char"| we also allow the VOTable
592-
\verb|datatype="unicodeChar"|. Where we say \verb|arraysize="*"| we also allow
593-
providers to be more explicit by using a fixed size (e.g. \verb|20|) or fixed
591+
A special case is the \emph{json} xtype: It allows publishers to, in
592+
effect, embed complex, structured data in VOTables. Publishers
593+
intending to use it are encouraged to carefully review whether
594+
interoperable and metadata-rich VOTable constructs can be employed
595+
instead.
596+
597+
In the following, where we say \verb|datatype="char"| we also allow the VOTable
598+
\verb|datatype="unicodeChar"|. Where we say \verb|arraysize="*"| we also allow
599+
providers to be more explicit by using a fixed size (e.g. \verb|20|) or fixed
594600
with a limit (e.g. \verb|20*|) when applicable.
595601

596-
In the following, where we say "VOTable type metadata", we mean either VOTable
602+
In the following, where we say "VOTable type metadata", we mean either VOTable
597603
\xmlel{FIELD} or \xmlel{PARAM} elements.
598604

599605
Services may use non-standard \xmlel{xtype} values for non-standard datatypes, but if they
@@ -613,7 +619,7 @@ \subsection{Boolean}
613619
values in service parameters, the serialization for \xmlel{TABLEDATA} must be used.
614620

615621
\subsection{Timestamp}
616-
Timestamp values serialised in VOTable or described in service parameters must have
622+
Timestamp values serialised in VOTable or described in service parameters must have
617623
the following VOTable type metadata:
618624

619625
\begin{verbatim}
@@ -680,15 +686,15 @@ \subsection{Intervals}
680686
intervals have one or both bounding values that are infinite. Intervals with two identical values
681687
are equivalent to a scalar value but must still be serialised as a pair of values.
682688

683-
Floating point interval values serialised in VOTable or described in service parameters must have
689+
Floating point interval values serialised in VOTable or described in service parameters must have
684690
the following VOTable type metadata:
685691

686692
\begin{verbatim}
687693
datatype="double" arraysize="2" xtype="interval"
688694
\end{verbatim}
689695
\noindent where \verb|float| is also permitted.
690696

691-
Integer interval values serialised in VOTable or described in service parameters must have the
697+
Integer interval values serialised in VOTable or described in service parameters must have the
692698
following VOTable type metadata:
693699

694700
\begin{verbatim}
@@ -724,7 +730,7 @@ \subsection{Intervals}
724730
upper bound of interval(s) respectively.
725731

726732
\subsection{Sexagesimal Coordinates}
727-
Coordinate values expressed in sexagesimal form can be described using the
733+
Coordinate values expressed in sexagesimal form can be described using the
728734
following VOTable type metadata. For right ascension:
729735

730736
\begin{verbatim}
@@ -741,25 +747,25 @@ \subsection{Sexagesimal Coordinates}
741747
values and seconds is a real value. All hours must fall within [0,24], degrees
742748
(latitude) must fall within [-90,90], minutes must fall within [0,60), and seconds
743749
must fall within [0,60). Leading zeros are permitted so that values of minutes and the integer
744-
part of seconds can be expressed as 2-digit numbers. Valid values for \verb|xtype="hms"| are
750+
part of seconds can be expressed as 2-digit numbers. Valid values for \verb|xtype="hms"| are
745751
from 00:00:00 to 24:00:00.
746752
Valid values for \verb|xtype="dms"| are from -90:00:00 to 90:00:00; an optional + sign at
747-
the start is allowed (e.g. +10:20:30) but not required. The upper bound on minutes
748-
and seconds is not part of the valid range; for example 12:34:60 is not allowed and must
753+
the start is allowed (e.g. +10:20:30) but not required. The upper bound on minutes
754+
and seconds is not part of the valid range; for example 12:34:60 is not allowed and must
749755
be expressed as 12:35:00 instead.
750756

751757
\subsection{Point}
752758
Geometry values are two-dimensional; although they are usually longitude and
753759
latitude values in spherical coordinates this is specified in the coordinate
754760
metadata and not in the values.
755761

756-
Point values serialised in VOTable or described in service parameters must have following
762+
Point values serialised in VOTable or described in service parameters must have following
757763
VOTable type metadata:
758764

759765
\begin{verbatim}
760766
datatype="double" arraysize="2" xtype="point"
761767
\end{verbatim}
762-
\noindent where \verb|float| is also allowed.
768+
\noindent where \verb|float| is also allowed.
763769

764770
For points in a spherical coordinate system, the values are ordered as: longitude latitude. For example:
765771

@@ -769,7 +775,7 @@ \subsection{Point}
769775

770776
Coordinate values are not limited to fall within a defined valid range; this is a change from
771777
DALI 1.1 where equatorial coordinates were explicitly limited. Software may have
772-
to perform range reduction in some coordinate systems (for example, spherical coordinates) in
778+
to perform range reduction in some coordinate systems (for example, spherical coordinates) in
773779
order to correctly interpret or use the coordinate values. Coordinate values are more likely to
774780
work as expected if they are expressed in the simplest form and do not require range reduction.
775781
For example, in spherical coordinates, \verb|362.0 2.0| is equivalent to \verb|2.0 2.0|, but the
@@ -783,7 +789,7 @@ \subsection{Circle}
783789
\begin{verbatim}
784790
datatype="double" arraysize="3" xtype="circle"
785791
\end{verbatim}
786-
\noindent where \verb|float| is also allowed.
792+
\noindent where \verb|float| is also allowed.
787793

788794
The values are ordered as a point followed by a radius. For example:
789795

@@ -808,11 +814,11 @@ \subsection{Circle}
808814
more limited context.
809815

810816
\subsection{Range}
811-
Range values serialised in VOTable or described in service parameters must have the following VOTable type metadata:
817+
Range values serialised in VOTable or described in service parameters must have the following VOTable type metadata:
812818
\begin{verbatim}
813819
datatype="double" arraysize="4" xtype="range"
814820
\end{verbatim}
815-
\noindent where \verb|float| is also allowed.
821+
\noindent where \verb|float| is also allowed.
816822

817823
A range is a coordinate bounding box specified
818824
as two pairs of coordinate values: min-coordinate1 max-coordinate1 min-coordinate2 max-coordinate2.
@@ -825,11 +831,11 @@ \subsection{Range}
825831
\noindent
826832
includes values from 10 to 11 (coordinate1) and from 20 to 21 (coordinate2).
827833

828-
Valid coordinate value limits are specified by \verb|xtype="point"| above.
829-
This range form is used as part of the value of the POS parameter in
830-
\citep{2015ivoa.spec.1223D} and \citep{2017ivoa.spec.0517B} (see also "shape" below).
834+
Valid coordinate value limits are specified by \verb|xtype="point"| above.
835+
This range form is used as part of the value of the POS parameter in
836+
\citep{2015ivoa.spec.1223D} and \citep{2017ivoa.spec.0517B} (see also "shape" below).
831837
For example, a range can span the meridian (longitude 0): 359 1 -1 1 is interpreted
832-
as the small (2x2 degree) coordinate range from 359 across the meridian to 1 degree
838+
as the small (2x2 degree) coordinate range from 359 across the meridian to 1 degree
833839
longitude.
834840

835841
Range-valued service parameters may include additional metadata like minimum and
@@ -845,13 +851,13 @@ \subsection{Range}
845851
more limited context.
846852

847853
\subsection{Polygon}
848-
Polygon values serialised in VOTable or described in service parameters must have the
854+
Polygon values serialised in VOTable or described in service parameters must have the
849855
following VOTable type metadata:
850856

851857
\begin{verbatim}
852858
datatype="double" arraysize="*" xtype="polygon"
853859
\end{verbatim}
854-
\noindent where \verb|float| is also allowed.
860+
\noindent where \verb|float| is also allowed.
855861

856862
The array holds a sequence of vertices (points) (e.g. longitude latitude longitude
857863
latitude ...) with an even number of values and at least three (3) points (six
@@ -864,7 +870,7 @@ \subsection{Polygon}
864870
10.0 10.0 10.2 10.0 10.2 10.2 10.0 10.2
865871
\end{verbatim}
866872

867-
Valid coordinate value limits are specified by \verb|xtype="point"| above.
873+
Valid coordinate value limits are specified by \verb|xtype="point"| above.
868874
Vertices must be ordered such that the polygon
869875
winding direction is counter-clockwise (when viewed from the origin toward the
870876
sky) as described in \citep{2007ivoa.spec.1030R}.
@@ -946,7 +952,7 @@ \subsection{Shape}
946952
polygon 10.0 10.0 10.2 10.0 10.2 10.2 10.0 10.2
947953
\end{verbatim}
948954

949-
The interpretation and constraints on the coordinate values are as specified
955+
The interpretation and constraints on the coordinate values are as specified
950956
for the individual xtypes above.
951957

952958
The shape xtype provides a compatible description of the POS parameter in
@@ -988,44 +994,59 @@ \subsection{Shape}
988994
more limited context.
989995

990996
\subsection{URI}
991-
URI values \citep{std:RFC3986} serialised in VOTable or described in service parameters
992-
should have the following VOTable type metadata:
997+
URI values \citep{std:RFC3986} serialised in VOTable or described in service parameters
998+
should have the type following metadata:
993999

9941000
\begin{verbatim}
9951001
datatype="char" arraysize="*" xtype="uri"
9961002
\end{verbatim}
9971003

9981004
\subsection{UUID}
999-
Universal Unique Identifier (UUID) values serialised in VOTable or described in service parameters
1005+
Universal Unique Identifier (UUID) values serialised in VOTable or described in service parameters
10001006
should have the following VOTable type metadata:
10011007

10021008
\begin{verbatim}
10031009
datatype="char" arraysize="*" xtype="uuid"
10041010
\end{verbatim}
10051011

1006-
UUID values \citep{std:RFC4122} are serialised using the canonical ascii (hex)
1012+
UUID values \citep{std:RFC4122} are serialised using the canonical ascii (hex)
10071013
representation, for example: e0b895ca-2ee4-4f0f-b595-cbd83be40b04.
10081014

1015+
\subsection{JSON}
1016+
1017+
For complex data blobs that are not intended to be queriable, publishers
1018+
may choose to store them as serialised JSON \citep{std:JSON} strings in
1019+
VOTables. Note that in general, an appropriate VOTable serialisation
1020+
(e.g., as a \xmlel{GROUP} for a \xmlel{PARAM} or as unrolled
1021+
\xmlel{FIELD}\/s or a separate table for table cells) is preferred.
1022+
1023+
JSON values serialised in VOTable or described in service parameters should have
1024+
the following VOTable type metadata:
1025+
1026+
\begin{verbatim}
1027+
datatype="char" arraysize="*" xtype="json"
1028+
\end{verbatim}
1029+
10091030
\subsection{Unsupported Types}
10101031

10111032
Support for any specific \xmlel{xtype} in implementations (client or service) is specified in
10121033
the service standard document. However, support for a specific \xmlel{xtype} as input (params
1013-
and uploaded content) should generally be considered optional. Implementations should
1014-
be able to read and write the underlying data type without knowing the semantics added
1015-
by the \xmlel{xtype}. In cases where understanding the meaning of an \xmlel{xtype} is required (for
1016-
example, the POS param in SODA) and a service does not support the serialized value,
1017-
the service should issue an error message that starts with the following text with the
1034+
and uploaded content) should generally be considered optional. Implementations should
1035+
be able to read and write the underlying data type without knowing the semantics added
1036+
by the \xmlel{xtype}. In cases where understanding the meaning of an \xmlel{xtype} is required (for
1037+
example, the POS param in SODA) and a service does not support the serialized value,
1038+
the service should issue an error message that starts with the following text with the
10181039
most specific \xmlel{xtype} noted:
10191040
\begin{verbatim}
10201041
unsupported-xtype: {xtype} [optional detail here]
10211042
\end{verbatim}
10221043
and may include additional detail where noted. For example, the value of the SODA POS parameter
1023-
is a \verb|xtype="shape"|, but if the implementation does not support the "range" construct, it
1044+
is a \verb|xtype="shape"|, but if the implementation does not support the "range" construct, it
10241045
would respond (minimally) with:
10251046
\begin{verbatim}
10261047
unsupported-xtype: range
10271048
\end{verbatim}
1028-
This behaviour will allow for new \xmlel{xtype}s to be introduced and for \verb|xtype="shape"|
1049+
This behaviour will allow for new \xmlel{xtype}s to be introduced and for \verb|xtype="shape"|
10291050
to be extended to include additional subtypes in the future.
10301051

10311052
\section{Parameters}
@@ -1128,7 +1149,7 @@ \subsubsection{RESPONSEFORMAT}
11281149
In some cases, the specification for a specific format may be parameterised
11291150
(e.g., the media type may include optional semi-colon and additional key-value
11301151
parameters). A DAL service must accept a RESPONSEFORMAT parameter indicating a
1131-
format that the service supports and should fail (Section~\ref{sec:response-error})
1152+
format that the service supports and should fail (Section~\ref{sec:response-error})
11321153
where the RESPONSEFORMAT parameter specifies a format not supported by the service
11331154
implementation.
11341155

@@ -1561,7 +1582,8 @@ \subsection{PR-DALI-1.2}
15611582
\begin{itemize}
15621583
\item clarified that truncation indicated by OVERFLOW can occur independent of
15631584
MAXREC
1564-
\item added new xtypes: hms, dms, moc, multipolygon, range, shape, uri, uuid
1585+
\item added new xtypes: hms, dms, moc, multipolygon, range, shape, uri,
1586+
uuid, json
15651587
\item changed VOSI-availability to optional
15661588
\item changed VOSI-capability so it is only required for registered services
15671589
\item clarified use of VOTable serialisation for numbers and boolean

0 commit comments

Comments
 (0)