diff --git a/models/sample/test/like_coords.vo-dml.xml b/models/sample/test/like_coords.vo-dml.xml
index 001f70f..3e0d7eb 100644
--- a/models/sample/test/like_coords.vo-dml.xml
+++ b/models/sample/test/like_coords.vo-dml.xml
@@ -10,7 +10,7 @@
Arnold Rots, Mark Cresitello-Dittmar, Omar Laurino
1.0
- 2024-11-28T11:52:20Z
+ 2024-11-29T09:02:40Z
ivoa
1.0
@@ -1051,5 +1051,17 @@
1
+
+ AnObject.sys
+ sys
+ the system
+
+ coords:GenericSys
+
+
+ 1
+ 1
+
+
diff --git a/models/sample/test/like_coords.vodsl b/models/sample/test/like_coords.vodsl
index 4a9dac2..89ed408 100644
--- a/models/sample/test/like_coords.vodsl
+++ b/models/sample/test/like_coords.vodsl
@@ -262,4 +262,5 @@ otype CartesianCoordSpace -> PhysicalCoordSpace "Spatial domain, three-dimensio
otype AnObject "example content" {
position:LonLatPoint "the position";
time:MJD "The time";
+ sys: GenericSys as composition "the system";
}
\ No newline at end of file
diff --git a/tools/gradletooling/sample/src/test/java/org/ivoa/dm/notstccoords/CoordsModelDbTest.java b/tools/gradletooling/sample/src/test/java/org/ivoa/dm/notstccoords/CoordsModelDbTest.java
index 8fc52ba..abfdc60 100644
--- a/tools/gradletooling/sample/src/test/java/org/ivoa/dm/notstccoords/CoordsModelDbTest.java
+++ b/tools/gradletooling/sample/src/test/java/org/ivoa/dm/notstccoords/CoordsModelDbTest.java
@@ -28,6 +28,7 @@ class CoordsModelDbTest extends AutoDBRoundTripTest {
/** logger for this class */
private static final org.slf4j.Logger logger =
org.slf4j.LoggerFactory.getLogger(CoordsModelDbTest.class);
+
private AnObject a;
@Override
@@ -35,6 +36,7 @@ public CoordsModel createModel() {
// see
// https://github.com/mcdittmar/ivoa-dm-examples/blob/master/assets/examples/coords/current/instances/astrocoordsys.jovial for jovial version of this test.
Unit deg = new Unit("deg");
+ Unit kms = new Unit("kms");
SpaceSys ICRS_SYS =
new SpaceSys()
.withFrame(
@@ -62,7 +64,10 @@ public CoordsModel createModel() {
p.lat = new RealQuantity(-16.716116, deg);
p.dist = new RealQuantity(8.6, new Unit("ly"));
p.coordSys = ICRS_SYS;
- }));
+ }))
+ .withVelocity(new CartesianPoint(new RealQuantity(5.0,kms),
+ new RealQuantity(5.0,kms), new RealQuantity(5.0,kms), ICRS_SYS));//IMPL cartesianpoint for a velocity!
+
}));
GenericSys SPECSYS =
new GenericSys()
@@ -73,17 +78,14 @@ public CoordsModel createModel() {
f.planetaryEphem = "DE432";
}));
-
+ SpaceSys GENSYS = null;
// note that this cannot be added directly as it is a dtype...
LonLatPoint llp = new LonLatPoint(new RealQuantity(45.0, deg), new RealQuantity(15.0, deg), new RealQuantity(1.5, new Unit("Mpc")), ICRS_SYS);
MJD mjd = new MJD(60310.0, TIMESYS_TT);
- a = new AnObject(llp,mjd);
+ a = new AnObject(llp,mjd, SPECSYS);
CoordsModel modelInstance = new CoordsModel();
- modelInstance.addReference(TIMESYS_TT);
- modelInstance.addReference(SPECSYS);
- modelInstance.addReference(ICRS_SYS);
modelInstance.addContent(a);
@@ -107,9 +109,24 @@ public void testModel(CoordsModel coordsModel) {
List ts = coordsModel.getContent(AnObject.class);
assertNotNull(ts);
assertEquals(1, ts.size());
- AnObject ts1 = ts.get(0);
- SpaceSys ss = ts1.getPosition().getCoordSys();
+ AnObject ano = ts.get(0);
+ SpaceSys ss = ano.getPosition().getCoordSys();
assertNotNull(ss);
+ MJD mjd = ano.getTime();
+ assertNotNull(mjd);
+ TimeSys tcsys = mjd.getCoordSys();
+ assertNotNull(tcsys);
+ TimeFrame tframe = tcsys.getFrame();
+ CustomRefLocation rd = (CustomRefLocation)tframe.getRefDirection();
+ LonLatPoint pos = (LonLatPoint)rd.getPosition();
+ assertEquals(-16.716116, pos.getLat().getValue());
+ GenericSys sys = ano.getSys();
+ GenericFrame gframe = sys.getFrame();
+ StdRefLocation gref = (StdRefLocation) gframe.getRefPosition();
+ assertEquals("TOPOCENTER",gref.getPosition());
+
+
+
}
diff --git a/tools/gradletooling/sample/src/test/java/org/ivoa/dm/notstccoords/CoordsModelTest.java b/tools/gradletooling/sample/src/test/java/org/ivoa/dm/notstccoords/CoordsModelTest.java
index f533720..22b111b 100644
--- a/tools/gradletooling/sample/src/test/java/org/ivoa/dm/notstccoords/CoordsModelTest.java
+++ b/tools/gradletooling/sample/src/test/java/org/ivoa/dm/notstccoords/CoordsModelTest.java
@@ -77,12 +77,9 @@ public CoordsModel createModel() {
// note that this cannot be added directly as it is a dtype...
LonLatPoint llp = new LonLatPoint(new RealQuantity(45.0, deg), new RealQuantity(15.0, deg), new RealQuantity(1.5, new Unit("Mpc")), ICRS_SYS);
MJD mjd = new MJD(60000.0, TIMESYS_TT);
- AnObject a = new AnObject(llp, mjd);
+ AnObject a = new AnObject(llp, mjd, SPECSYS);
CoordsModel modelInstance = new CoordsModel();
- modelInstance.addReference(TIMESYS_TT);
- modelInstance.addReference(SPECSYS);
- modelInstance.addReference(ICRS_SYS);
modelInstance.addContent(a);
diff --git a/tools/xslt/jpa.xsl b/tools/xslt/jpa.xsl
index b39eb8f..1fd7f1b 100644
--- a/tools/xslt/jpa.xsl
+++ b/tools/xslt/jpa.xsl
@@ -239,7 +239,8 @@
@jakarta.persistence.Embedded
-
+