Skip to content

Commit

Permalink
deal with reference processing better
Browse files Browse the repository at this point in the history
* tightened up what are true uncontained references.
* persisting the references should only be done at the model level
* content is also tightened so that only the true base containers can be added.
  • Loading branch information
pahjbo committed Oct 29, 2024
1 parent 967999d commit 1e24908
Show file tree
Hide file tree
Showing 49 changed files with 10,374 additions and 28 deletions.
40 changes: 40 additions & 0 deletions Filter.vo-dml.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema elementFormDefault="unqualified" version="1.0" targetNamespace="http://ivoa.net/dm/sample/filter/v1" xmlns:filt="http://ivoa.net/dm/sample/filter/v1" xmlns:tns="http://ivoa.net/dm/sample/filter/v1" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://ivoa.net/vodml/ivoa">

<xs:import namespace="http://ivoa.net/vodml/ivoa" schemaLocation="IVOA-v1.0.vo-dml.xsd"/>

<xs:element name="filterModel" type="tns:filterModel"/>

<xs:complexType name="PhotometryFilter">
<xs:sequence>
<xs:element name="fpsIdentifier" type="xs:string" minOccurs="0"/>
<xs:element name="name" type="xs:string"/>
<xs:element name="description" type="xs:string"/>
<xs:element name="bandName" type="xs:string"/>
<xs:element name="dataValidityFrom" type="xs:dateTime"/>
<xs:element name="dataValidityTo" type="xs:dateTime"/>
<xs:element name="spectralLocation" type="ns1:RealQuantity"/>
</xs:sequence>
<xs:attribute name="_id" type="xs:ID"/>
</xs:complexType>

<xs:complexType name="PhotometricSystem">
<xs:sequence>
<xs:element name="description" type="xs:string" minOccurs="0"/>
<xs:element name="detectorType" type="xs:int"/>
<xs:element name="photometryFilter" type="tns:PhotometryFilter" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="filterModel">
<xs:sequence>
<xs:element name="refs" type="tns:references" minOccurs="0"/>
<xs:element name="photometricSystem" type="tns:PhotometricSystem" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="references">
<xs:sequence/>
</xs:complexType>
</xs:schema>

47 changes: 47 additions & 0 deletions IVOA-v1.0.vo-dml.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema elementFormDefault="unqualified" version="1.0" targetNamespace="http://ivoa.net/vodml/ivoa" xmlns:tns="http://ivoa.net/vodml/ivoa" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ivoa="http://ivoa.net/vodml/ivoa">

<xs:element name="ivoaModel" type="tns:ivoaModel"/>

<xs:complexType name="RealQuantity">
<xs:complexContent>
<xs:extension base="tns:Quantity">
<xs:sequence>
<xs:element name="value" type="xs:double"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>

<xs:complexType name="Quantity" abstract="true">
<xs:sequence>
<xs:element name="unit" type="tns:Unit" minOccurs="0"/>
</xs:sequence>
</xs:complexType>

<xs:simpleType name="Unit">
<xs:restriction base="xs:string"/>
</xs:simpleType>

<xs:complexType name="IntegerQuantity">
<xs:complexContent>
<xs:extension base="tns:Quantity">
<xs:sequence>
<xs:element name="value" type="xs:int"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>

<xs:complexType name="ivoaModel">
<xs:sequence>
<xs:element name="refs" type="tns:references" minOccurs="0"/>
<xs:choice maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="references">
<xs:sequence/>
</xs:complexType>
</xs:schema>

179 changes: 179 additions & 0 deletions Sample.vo-dml.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema elementFormDefault="unqualified" version="1.0" targetNamespace="http://ivoa.net/dm/sample/sample/v1" xmlns:tns="http://ivoa.net/dm/sample/sample/v1" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://ivoa.net/dm/sample/filter/v1" xmlns:simp="http://ivoa.net/dm/sample/sample/v1" xmlns:ns1="http://ivoa.net/vodml/ivoa">

<xs:import namespace="http://ivoa.net/vodml/ivoa" schemaLocation="IVOA-v1.0.vo-dml.xsd"/>

<xs:import namespace="http://ivoa.net/dm/sample/filter/v1" schemaLocation="Filter.vo-dml.xsd"/>

<xs:element name="sampleModel" type="tns:sampleModel"/>

<xs:complexType name="sampleModel">
<xs:sequence>
<xs:element name="refs" type="tns:references" minOccurs="0"/>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="catalog.LuminosityMeasurement" type="tns:catalog.LuminosityMeasurement"/>
<xs:element name="catalog.SDSSSource" type="tns:catalog.SDSSSource"/>
<xs:element name="catalog.Source" type="tns:catalog.Source"/>
<xs:element name="catalog.TwoMassSource" type="tns:catalog.TwoMassSource"/>
<xs:element name="catalog.inner.Testing" type="tns:catalog.inner.Testing"/>
<xs:element name="catalog.inner.SourceCatalogue" type="tns:catalog.inner.SourceCatalogue"/>
<xs:element name="photometricSystem" type="ns2:PhotometricSystem"/>
</xs:choice>
</xs:sequence>
</xs:complexType>

<xs:complexType name="references">
<xs:sequence>
<xs:element name="catalog.SkyCoordinateFrame" type="tns:catalog.SkyCoordinateFrame" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="catalog.SkyCoordinateFrame">
<xs:sequence>
<xs:element name="documentURI" type="xs:string"/>
<xs:element name="equinox" type="xs:string" minOccurs="0"/>
<xs:element name="system" type="xs:string" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="name" type="xs:ID" use="required"/>
</xs:complexType>

<xs:complexType name="catalog.LuminosityMeasurement">
<xs:sequence>
<xs:element name="value" type="ns1:RealQuantity"/>
<xs:element name="error" type="ns1:RealQuantity" minOccurs="0"/>
<xs:element name="description" type="xs:string" minOccurs="0"/>
<xs:element name="type" type="tns:luminosityType"/>
<xs:element name="filter" type="xs:IDREF" minOccurs="0"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="catalog.SDSSSource">
<xs:complexContent>
<xs:extension base="tns:catalog.AbstractSource">
<xs:sequence>
<xs:element name="positionError" type="tns:catalog.SkyError" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>

<xs:complexType name="catalog.AbstractSource" abstract="true">
<xs:complexContent>
<xs:extension base="tns:catalog.AstroObject">
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="description" type="xs:string" minOccurs="0"/>
<xs:element name="position" type="tns:catalog.SkyCoordinate"/>
<xs:element name="classification" type="tns:sourceClassification"/>
<xs:element name="luminosity" type="tns:catalog.LuminosityMeasurement" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>

<xs:complexType name="catalog.AstroObject" abstract="true">
<xs:sequence>
<xs:element name="label" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="catalog.SkyError" abstract="true">
<xs:sequence/>
</xs:complexType>

<xs:complexType name="catalog.AlignedEllipse">
<xs:complexContent>
<xs:extension base="tns:catalog.SkyError">
<xs:sequence>
<xs:element name="longError" type="xs:double"/>
<xs:element name="latError" type="xs:double"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>

<xs:complexType name="catalog.CircleError">
<xs:complexContent>
<xs:extension base="tns:catalog.SkyError">
<xs:sequence>
<xs:element name="radius" type="xs:double"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>

<xs:complexType name="catalog.GenericEllipse">
<xs:complexContent>
<xs:extension base="tns:catalog.SkyError">
<xs:sequence>
<xs:element name="major" type="xs:double"/>
<xs:element name="minor" type="xs:double"/>
<xs:element name="pa" type="xs:double"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>

<xs:complexType name="catalog.SkyCoordinate">
<xs:sequence>
<xs:element name="longitude" type="ns1:RealQuantity"/>
<xs:element name="latitude" type="ns1:RealQuantity"/>
<xs:element name="frame" type="xs:IDREF" minOccurs="0"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="catalog.Source">
<xs:complexContent>
<xs:extension base="tns:catalog.AbstractSource">
<xs:sequence>
<xs:element name="positionError" type="tns:catalog.SkyError" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>

<xs:complexType name="catalog.TwoMassSource">
<xs:complexContent>
<xs:extension base="tns:catalog.AbstractSource">
<xs:sequence>
<xs:element name="positionError" type="tns:catalog.SkyError" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>

<xs:complexType name="catalog.inner.Testing">
<xs:sequence>
<xs:element name="plain" type="xs:string"/>
<xs:element name="arrayIsh" type="xs:string" maxOccurs="unbounded"/>
<xs:element name="unbounded" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="catalog.inner.SourceCatalogue">
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="entry" type="tns:catalog.AbstractSource" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="aTest" type="tns:catalog.inner.Testing" minOccurs="0"/>
<xs:element name="aTestMore" type="tns:catalog.inner.Testing" minOccurs="0"/>
</xs:sequence>
</xs:complexType>

<xs:simpleType name="luminosityType">
<xs:restriction base="xs:string">
<xs:enumeration value="magnitude"/>
<xs:enumeration value="flux"/>
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="sourceClassification">
<xs:restriction base="xs:string">
<xs:enumeration value="star"/>
<xs:enumeration value="galaxy"/>
<xs:enumeration value="AGN"/>
<xs:enumeration value="planet"/>
<xs:enumeration value="unknown"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>

Loading

0 comments on commit 1e24908

Please sign in to comment.