[Volute] r3514 - trunk/projects/dm/vo-dml/mapping

Volute commit messages volutecommits at g-vo.org
Wed Oct 26 18:05:44 CEST 2016


Author: gerard.lemson
Date: Thu Aug 18 17:35:34 2016
New Revision: 3514

Log:
added table mapping example to samples and started writing a README explainin ghte samples.

Added:
   trunk/projects/dm/vo-dml/mapping/test4.votable.xml
Modified:
   trunk/projects/dm/vo-dml/mapping/README.txt

Modified: trunk/projects/dm/vo-dml/mapping/README.txt
==============================================================================
--- trunk/projects/dm/vo-dml/mapping/README.txt	Thu Aug 18 17:21:05 2016	(r3513)
+++ trunk/projects/dm/vo-dml/mapping/README.txt	Thu Aug 18 17:35:34 2016	(r3514)
@@ -2,4 +2,20 @@
 
 VOTable schema with mapping extensions in ../xsd/ext/VOTable-1.3_vodml.xsd
 
-Sample VOTable documents with annotation in TBD
+This folder contains a collection of sample VOTable documents with VO-DML annotations.
+
+starting from test1... they become more complex, highlighting dfferent mapping patterns.
+The votables named testNeM.votable.xml, with N and M integers, are variants of the testN.votable.xml document 
+with errors introduced that a paresre should be able to discover.
+
+Next should come a description of each test votable, with the aspect it focuses on:
+:::::
+
+- test1: model annotation
+- test1e1: model annotaiton, illegal ROLE on a vodml-map:Model
+
+- test2: "singleton"/"standalone" object-as-a-GROUP (here PhotometryFilter from the sample/filter/FIlter model)
+
+- test3: singleton object, here a filter:PhotometrySystem, containing some contained PhotometryFilter objects in its filter:PhotometricSystem.photometryFilter collection
+
+- test4: table mapping (should possibly come a bit later in the sequence of samples)
\ No newline at end of file

Added: trunk/projects/dm/vo-dml/mapping/test4.votable.xml
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/projects/dm/vo-dml/mapping/test4.votable.xml	Thu Aug 18 17:35:34 2016	(r3514)
@@ -0,0 +1,449 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  
+Example of a VOTable annotated with VODML elements mapping its contents to the 
+simple/sample Source and Filter data models used in the VO-DML and Mapping documents.
+
+This sample contains mapping to a TABLE.
+
+ -->
+<VOTABLE xmlns="http://www.ivoa.net/xml/VOTable/v1.3_vodml">
+<!-- 
+Declaration of VO-DML modes that are used in this annotated VOTable.
+See $7.1.
+-->
+	<GROUP>
+		<VODML><TYPE>vodml-map:Model</TYPE></VODML>
+		
+		<PARAM name="name" datatype="char" arraysize="*" value="ivoa">
+			<VODML><ROLE>vodml-map:Model.name</ROLE><TYPE>ivoa:string</TYPE></VODML>
+		</PARAM>
+		
+		<PARAM name="url" datatype="char" arraysize="*"
+			value="http://volute.g-vo.org/svn/trunk/projects/dm/vo-dml/models/ivoa/IVOA.vo-dml.xml">
+			<VODML><ROLE>vodml-map:Model.url</ROLE><TYPE>ivoa:anyURI</TYPE></VODML>
+		</PARAM>
+
+	</GROUP>
+	
+	<GROUP>
+		<VODML><TYPE>vodml-map:Model</TYPE></VODML>
+		<PARAM name="url" datatype="char" arraysize="*"
+			value="http://volute.g-vo.org/svn/trunk/projects/dm/vo-dml/models/vodml-map/vodml-map.vo-dml.xml">
+			<VODML><ROLE>vodml-map:Model.url</ROLE><TYPE>ivoa:anyURI</TYPE></VODML>
+		</PARAM>
+		<PARAM name="name" datatype="char" arraysize="*" value="vodml-map">
+			<VODML><ROLE>vodml-map:Model.name</ROLE><TYPE>ivoa:string</TYPE></VODML>
+		</PARAM>
+	</GROUP>
+	
+	<GROUP>
+		<VODML><TYPE>vodml-map:Model</TYPE></VODML>
+		<PARAM name="url" datatype="char" arraysize="*"
+			value="http://volute.g-vo.org/svn/trunk/projects/dm/vo-dml/models/sample/filter/Filter.vo-dml.xml">
+			<VODML><ROLE>vodml-map:Model.url</ROLE><TYPE>ivoa:anyURI</TYPE></VODML>
+		</PARAM>
+		
+		<PARAM name="identifier" datatype="char" arraysize="*"
+			value="ivo://ivoa.org/dm/sample/Filter/1.9">
+			<VODML><ROLE>vodml-map:Model.identifier</ROLE><TYPE>ivoa:anyURI</TYPE></VODML>
+		</PARAM>
+		
+		<PARAM name="name" datatype="char" arraysize="*" value="filter">
+			<VODML><ROLE>vodml-map:Model.name</ROLE><TYPE>ivoa:string</TYPE></VODML>
+		</PARAM>
+	</GROUP>
+	
+	<GROUP>
+		<VODML><TYPE>vodml-map:Model</TYPE></VODML>
+		<PARAM name="url" datatype="char" arraysize="*"
+			value="http://volute.g-vo.org/svn/trunk/projects/dm/vo-dml/models/sample/sample/Sample.vo-dml.xml">
+			<VODML><ROLE>vodml-map:Model.url</ROLE><TYPE>ivoa:anyURI</TYPE></VODML>
+		</PARAM>
+		<PARAM name="name" datatype="char" arraysize="*" value="sample">
+			<VODML><ROLE>vodml-map:Model.name</ROLE><TYPE>ivoa:string</TYPE></VODML>
+		</PARAM>
+	</GROUP>
+
+  <RESOURCE ID="standalone_objects">
+
+<!-- Following GROUPs represent singleton instances of specific ObjectTypes -->
+    <GROUP ID="_icrs">
+    <!-- Only  VODML/TYPE is used, no VODML/ROLE (and no VODML-annotated parent group exists), hence this GROUP
+    represents a singleton objects of the identified type. 
+    See $7.2.1 
+    NB it were better if this particular object, representing "the" ICR coordinate frame, were formally defined
+    and stored in some standardized repository of reference data objects that provided it with a standard IVO-Id.
+    If that were the case, the references below pointing to this GROUP would instead use the RemoteReference pattern. 
+    See $7.5.4 
+    -->
+      <VODML><TYPE>sample:catalog.SkyCoordinateFrame</TYPE></VODML>
+      <PARAM name="name" datatype="char" value="ICRS">
+        <VODML><ROLE>sample:catalog.SkyCoordinateFrame.name</ROLE></VODML>
+      </PARAM>
+    </GROUP>
+    
+    
+    <!-- The following GROUPs represent direct instances of a PhotomoteryFilter object type. 
+    Should really have a fuller definition, possibly outside this VOTable.
+    E.g. we should be using the PhotDM model for that. The first three filters represent 2MASS bands.
+    The last 2 represent SDSS bands. Those have also an explicit ID defined for them.
+    This way they can be referenced from within a table, not just using a "GROUPref" 
+    See $7.2.1
+    Again, these should be defined once, and stored in a standardized repository that identifies them.
+    See discussion on this topic in above GROUP _icrs.
+    See $7.5.4
+    -->
+    <GROUP  ID="_2massJ">
+      <VODML><TYPE>filter:PhotometryFilter</TYPE></VODML>
+      <PARAM name="name" datatype="char" value="2mass:J">
+        <VODML><ROLE>filter:PhotometryFilter.name</ROLE></VODML>
+      </PARAM>
+    </GROUP>
+    <GROUP ID="_2massH">
+      <VODML><TYPE>filter:PhotometryFilter</TYPE></VODML>
+      <PARAM name="name" datatype="char" value="2mass:H">
+        <VODML><ROLE>filter:PhotometryFilter.name</ROLE></VODML>
+      </PARAM>
+    </GROUP>
+    <GROUP ID="_2massK">
+      <VODML><TYPE>filter:PhotometryFilter</TYPE></VODML>
+      <PARAM name="name" datatype="char" value="2mass:K">
+        <VODML><ROLE>filter:PhotometryFilter.name</ROLE></VODML>
+      </PARAM>
+    </GROUP>
+    
+  </RESOURCE>
+
+  <RESOURCE ID="table_objects">
+    <TABLE >
+    <!-- The following GROUP represents 0 or more  Sources indirectly.
+    For it has FIELDref-s, hence indicating the Source instances are stored in the TABLE rows.
+    Note that not all FIELDs are represented in the annotation, as there is no model covering all elements such as.
+     -->
+      <GROUP ID="_source">
+        <VODML><TYPE>sample:catalog.AbstractSource</TYPE></VODML>
+        <FIELDref ref="_designation">
+          <VODML><ROLE>vodml-map:ObjectTypeInstance.ID</ROLE></VODML>
+        </FIELDref>
+        <!-- It is possible to have multiple annotations for same FIELD, 
+             here vodml-map:ObjectTypeInstance.ID and sample:catalog.AbstractSource.name -->
+        <FIELDref ref="_designation">
+          <VODML><ROLE>sample:catalog.AbstractSource.name</ROLE></VODML>
+        </FIELDref>
+        <GROUP>
+          <VODML><ROLE>sample:catalog.AbstractSource.position</ROLE><TYPE>sample:catalog.SkyCoordinate</TYPE></VODML>
+          <FIELDref ref="_ra">
+            <VODML><ROLE>sample:catalog.SkyCoordinate.longitude</ROLE></VODML>
+          </FIELDref>  
+          <FIELDref ref="_dec">
+            <VODML><ROLE>sample:catalog.SkyCoordinate.latitude</ROLE></VODML>
+          </FIELDref>
+          <GROUP ref="_icrs">
+            <VODML><ROLE>sample:catalog.SkyCoordinate.frame</ROLE><TYPE>vodml-map:GROUPref</TYPE></VODML>
+          </GROUP>
+        </GROUP>
+        <GROUP >
+          <VODML><ROLE>sample:catalog.AbstractSource.luminosity</ROLE><TYPE>sample:catalog.LuminosityMeasurement</TYPE></VODML>
+          <FIELDref ref="_magJ">
+            <VODML><ROLE>sample:catalog.LuminosityMeasurement.value</ROLE></VODML>
+          </FIELDref>
+          <FIELDref ref="_errJ">
+            <VODML><ROLE>sample:catalog.LuminosityMeasurement.error</ROLE></VODML>
+          </FIELDref>
+          <!-- these luminosities represent magnitudes -->
+          <PARAM name="type" value="magnitude" datatype="char">
+            <VODML><ROLE>sample:catalog.LuminosityMeasurement.type</ROLE></VODML>
+          </PARAM>
+          <!-- these luminosities are all 2MASS-J -->
+          <GROUP ref="_2massJ">
+            <VODML><ROLE>sample:catalog.LuminosityMeasurement.filter</ROLE><TYPE>vodml-map:GROUPref</TYPE></VODML>
+          </GROUP>
+        </GROUP>
+        <GROUP >
+          <VODML><ROLE>sample:catalog.AbstractSource.luminosity</ROLE><TYPE>sample:catalog.LuminosityMeasurement</TYPE></VODML>
+          <FIELDref ref="_magK">
+            <VODML><ROLE>sample:catalog.LuminosityMeasurement.value</ROLE></VODML>
+          </FIELDref>
+          <FIELDref ref="_errK">
+            <VODML><ROLE>sample:catalog.LuminosityMeasurement.error</ROLE></VODML>
+          </FIELDref>
+          <!-- these luminosities represent magnitudes -->
+          <PARAM name="type" value="magnitude" datatype="char">
+            <VODML><ROLE>sample:catalog.LuminosityMeasurement.type</ROLE></VODML>
+          </PARAM>
+          <!-- these luminosities are all 2MASS-K -->
+          <GROUP ref="_2massK">
+            <VODML><ROLE>sample:catalog.LuminosityMeasurement.filter</ROLE><TYPE>vodml-map:GROUPref</TYPE></VODML>
+          </GROUP>
+        </GROUP>
+        <GROUP >
+          <VODML><ROLE>sample:catalog.AbstractSource.luminosity</ROLE><TYPE>sample:catalog.LuminosityMeasurement</TYPE></VODML>
+          <FIELDref ref="_magH">
+            <VODML><ROLE>sample:catalog.LuminosityMeasurement.value</ROLE></VODML>
+          </FIELDref>
+          <FIELDref ref="_errH">
+            <VODML><ROLE>sample:catalog.LuminosityMeasurement.error</ROLE></VODML>
+          </FIELDref>
+          <!-- these luminosities represent magnitudes -->
+          <PARAM name="type" value="magnitude" datatype="char">
+            <VODML><ROLE>sample:catalog.LuminosityMeasurement.type</ROLE></VODML>
+          </PARAM>
+          <!-- these luminosities are all 2MASS-H -->
+          <GROUP ref="_2massH">
+            <VODML><ROLE>sample:catalog.LuminosityMeasurement.filter</ROLE><TYPE>vodml-map:GROUPref</TYPE></VODML>
+          </GROUP>
+        </GROUP>
+        <!-- Next is example of a the possibility to refer to a (part of a) collection that is stored elsewhere, 
+        annotated by the GROUP identified by the @ref. The referenced GROUP MUST have a container pointer
+        indicating which row in the current table acts as container for which row in the collection.
+        See 7.6.2
+        NOT SUPPORTED IN V1.0 for being redundant with maping  form child to parent that MUST be given and is more exact.
+         -->
+         <!-- 
+          <GROUP ref="SDSS_mags">
+            <VODML><TYPE>vodml-map:CollectionReference</TYPE><ROLE>sample:catalog.AbstractSource.luminosity</ROLE></VODML>
+          </GROUP>
+           -->
+        </GROUP>
+      <FIELD name="designation" ID="_designation" utype="ivoa:string" datatype="char">
+        <DESCRIPTION>source designation formed from sexigesimal coordinates</DESCRIPTION>
+      </FIELD>
+      <FIELD name="ra" ID="_ra" unit="deg"  datatype="float">
+        <DESCRIPTION>right ascension (J2000 decimal deg)</DESCRIPTION>
+      </FIELD>
+      <FIELD name="dec" ID="_dec" unit="deg"  datatype="float">
+        <DESCRIPTION>declination (J2000 decimal deg)</DESCRIPTION>
+      </FIELD>
+      <FIELD name="clon"  datatype="char" arraysize="*">
+        <DESCRIPTION>Right ascention in Sexagesimal format.</DESCRIPTION>
+      </FIELD>
+      <FIELD name="clat" datatype="char" arraysize="*">
+        <DESCRIPTION>Declination in Sexagesimal format.</DESCRIPTION>
+      </FIELD>
+      <FIELD name="err_maj" unit="arcsec" datatype="float">
+        <DESCRIPTION>major axis of 1-sigma error ellipse</DESCRIPTION>
+      </FIELD>
+      <FIELD name="err_min" unit="arcsec" datatype="float">
+        <DESCRIPTION>minor axis of 1-sigma error ellipse</DESCRIPTION>
+      </FIELD>
+      <FIELD name="err_ang" unit="deg" datatype="float">
+        <DESCRIPTION>angle of error ellipse major axis unit="E of" N</DESCRIPTION>
+      </FIELD>
+      <FIELD name="j_m" unit="mag" ID="_magJ" datatype="float">
+        <DESCRIPTION>J band selected "default" magnitude</DESCRIPTION>
+      </FIELD>
+      <FIELD name="j_cmsig" unit="mag" ID="_errJ" datatype="float">
+        <DESCRIPTION>corrected J band photometric uncertainty</DESCRIPTION>
+      </FIELD>
+      <FIELD name="j_msigcom" unit="mag" datatype="float">
+        <DESCRIPTION>combined (total J band photometric uncertainty)</DESCRIPTION>
+      </FIELD>
+      <FIELD name="j_snr" datatype="float">
+        <DESCRIPTION>J band (scan) signal-to-noise ratio</DESCRIPTION>
+      </FIELD>
+      <FIELD name="h_m" unit="mag" ID="_magH" datatype="float">
+        <DESCRIPTION>H band selected 'default' magnitude</DESCRIPTION>
+      </FIELD>
+      <FIELD name="h_cmsig" unit="mag" ID="_errH" datatype="float">
+        <DESCRIPTION>corrected H band photometric uncertainty</DESCRIPTION>
+      </FIELD>
+      <FIELD name="h_msigcom" unit="mag" datatype="float">
+        <DESCRIPTION>combined (total) H band photometric uncertainty</DESCRIPTION>
+      </FIELD>
+      <FIELD name="h_snr" datatype="float">
+        <DESCRIPTION>H band "scan" signal-to-noise ratio</DESCRIPTION>
+      </FIELD>
+      <FIELD name="k_m" unit="mag" ID="_magK" datatype="float">
+        <DESCRIPTION>K band selected 'default' magnitude</DESCRIPTION>
+      </FIELD>
+      <FIELD name="k_cmsig" unit="mag" ID="_errK" datatype="float">
+        <DESCRIPTION>corrected K band photometric uncertainty</DESCRIPTION>
+      </FIELD>
+      <FIELD name="k_msigcom" unit="mag" datatype="float">
+        <DESCRIPTION>combined (total) K band photometric uncertainty</DESCRIPTION>
+      </FIELD>
+      <FIELD name="k_snr" datatype="float">
+        <DESCRIPTION>K band "scan" signal-to-noise ratio</DESCRIPTION>
+      </FIELD>
+      <FIELD name="rd_flg" datatype="char">
+        <DESCRIPTION>source of JHK 'default' mags (AKA 'read flag')</DESCRIPTION>
+      </FIELD>
+      <FIELD name="cc_flg" datatype="char" arraysize="*">
+        <DESCRIPTION>indicates JHK artifact contamination and/or confusion</DESCRIPTION>
+      </FIELD>
+      <FIELD name="ph_qual" datatype="char" arraysize="*">
+        <DESCRIPTION>flag indicating photometric quality of source</DESCRIPTION>
+      </FIELD>
+      <FIELD name="angle" unit="deg" datatype="float">
+        <DESCRIPTION>Position Angle in degree.</DESCRIPTION>
+      </FIELD>
+      <FIELD name="dist" unit="arcsec" datatype="float">
+        <DESCRIPTION>Distance between the target position and each source in arcsec.</DESCRIPTION>
+      </FIELD>
+      <FIELD name="j_h" unit="mag" datatype="float">
+        <DESCRIPTION>J-H color.</DESCRIPTION>
+      </FIELD>
+      <FIELD name="h_k" unit="mag" datatype="float">
+        <DESCRIPTION>H-K color.</DESCRIPTION>
+      </FIELD>
+      <FIELD name="j_k" unit="mag" datatype="float">
+        <DESCRIPTION>J-K color.</DESCRIPTION>
+      </FIELD>
+      <DATA>
+        <TABLEDATA>
+          <TR>
+            <TD>08120809-0206132</TD>
+            <TD>123.033734</TD>
+            <TD>-2.103671</TD>
+            <TD>08h12m08.10s</TD>
+            <TD>-02d06m13.22s</TD>
+            <TD>0.07</TD>
+            <TD>0.06</TD>
+            <TD>0</TD>
+            <TD>14.161</TD>
+            <TD>0.025</TD>
+            <TD>0.027</TD>
+            <TD>83.8</TD>
+            <TD>13.681</TD>
+            <TD>0.027</TD>
+            <TD>0.029</TD>
+            <TD>57.7</TD>
+            <TD>13.675</TD>
+            <TD>0.048</TD>
+            <TD>0.049</TD>
+            <TD>25.8</TD>
+            <TD>222</TD>
+            <TD>000</TD>
+            <TD>AAA</TD>
+            <TD>122.078134</TD>
+            <TD>96.215367</TD>
+            <TD>0.4800</TD>
+            <TD>0.0060</TD>
+            <TD>0.4860</TD>
+          </TR>
+          <TR>
+            <TD>08115683-0205428</TD>
+            <TD>122.986794</TD>
+            <TD>-2.095231</TD>
+            <TD>08h11m56.83s</TD>
+            <TD>-02d05m42.83s</TD>
+            <TD>0.08</TD>
+            <TD>0.07</TD>
+            <TD>0</TD>
+            <TD>15.860</TD>
+            <TD>0.060</TD>
+            <TD>0.061</TD>
+            <TD>17.5</TD>
+            <TD>15.103</TD>
+            <TD>0.077</TD>
+            <TD>0.077</TD>
+            <TD>15.6</TD>
+            <TD>14.847</TD>
+            <TD>0.127</TD>
+            <TD>0.128</TD>
+            <TD>8.8</TD>
+            <TD>222</TD>
+            <TD>000</TD>
+            <TD>AAB</TD>
+            <TD>50.516627</TD>
+            <TD>289.867885</TD>
+            <TD>0.7570</TD>
+            <TD>0.2560</TD>
+            <TD>1.0130</TD>
+          </TR>
+          <TR>
+            <TD>08115826-0205336</TD>
+            <TD>122.992773</TD>
+            <TD>-2.092676</TD>
+            <TD>08h11m58.27s</TD>
+            <TD>-02d05m33.63s</TD>
+            <TD>0.26</TD>
+            <TD>0.24</TD>
+            <TD>76</TD>
+            <TD>16.273</TD>
+            <TD>0.096</TD>
+            <TD>0.097</TD>
+            <TD>12.0</TD>
+            <TD>15.718</TD>
+            <TD>0.112</TD>
+            <TD>0.112</TD>
+            <TD>8.8</TD>
+            <TD>15.460</TD>
+            <TD>0.212</TD>
+            <TD>0.212</TD>
+            <TD>5.0</TD>
+            <TD>222</TD>
+            <TD>000</TD>
+            <TD>ABD</TD>
+            <TD>37.029393</TD>
+            <TD>315.400985</TD>
+            <TD>0.5550</TD>
+            <TD>0.2580</TD>
+            <TD>0.8130</TD>
+          </TR>
+          <TR>
+            <TD>08121086-0207102</TD>
+            <TD>123.045252</TD>
+            <TD>-2.119513</TD>
+            <TD>08h12m10.86s</TD>
+            <TD>-02d07m10.25s</TD>
+            <TD>0.07</TD>
+            <TD>0.06</TD>
+            <TD>0</TD>
+            <TD>13.512</TD>
+            <TD>0.021</TD>
+            <TD>0.024</TD>
+            <TD>152.3</TD>
+            <TD>13.058</TD>
+            <TD>0.024</TD>
+            <TD>0.026</TD>
+            <TD>102.5</TD>
+            <TD>12.956</TD>
+            <TD>0.029</TD>
+            <TD>0.030</TD>
+            <TD>50.0</TD>
+            <TD>222</TD>
+            <TD>000</TD>
+            <TD>AAA</TD>
+            <TD>177.305955</TD>
+            <TD>113.341027</TD>
+            <TD>0.4540</TD>
+            <TD>0.1020</TD>
+            <TD>0.5560</TD>
+          </TR>
+          <TR>
+            <TD>08120662-0205179</TD>
+            <TD>123.027609</TD>
+            <TD>-2.088332</TD>
+            <TD>08h12m06.63s</TD>
+            <TD>-02d05m18.00s</TD>
+            <TD>0.07</TD>
+            <TD>0.06</TD>
+            <TD>0</TD>
+            <TD>13.478</TD>
+            <TD>0.026</TD>
+            <TD>0.029</TD>
+            <TD>157.1</TD>
+            <TD>13.188</TD>
+            <TD>0.027</TD>
+            <TD>0.029</TD>
+            <TD>90.9</TD>
+            <TD>13.142</TD>
+            <TD>0.030</TD>
+            <TD>0.032</TD>
+            <TD>42.1</TD>
+            <TD>222</TD>
+            <TD>000</TD>
+            <TD>AAA</TD>
+            <TD>107.842761</TD>
+            <TD>67.077088</TD>
+            <TD>0.2900</TD>
+            <TD>0.0460</TD>
+            <TD>0.3360</TD>
+          </TR>
+        </TABLEDATA>
+      </DATA>
+    </TABLE>
+
+  </RESOURCE>
+</VOTABLE>


More information about the Volutecommits mailing list