Loading src/main/java/org/aktin/exchange/QuerySchedule.java +2 −2 Original line number Diff line number Diff line Loading @@ -14,8 +14,8 @@ import javax.xml.bind.annotation.XmlSeeAlso; public abstract class QuerySchedule { /** * Duration for the query. The duration is relative * to a reference timestamp and might also be negative. * Duration for the queried data, relative to the request reference date * {@link QueryRequest#referenceDate}. Usually negative: e.g. -D1M for previous month. */ @XmlElement(required=true) public Period duration; Loading src/main/java/org/aktin/exchange/RepeatedExecution.java +1 −1 Original line number Diff line number Diff line Loading @@ -18,5 +18,5 @@ public class RepeatedExecution extends QuerySchedule{ * This property will not cause any execution on the data warehouse side. * It is solely for information purposes. */ public Duration repeats; public Duration interval; } src/test/java/org/aktin/exchange/TestUnmarshallDocuments.java +1 −1 Original line number Diff line number Diff line Loading @@ -72,7 +72,7 @@ public class TestUnmarshallDocuments { public void unmarshallQuery() throws IOException, SAXException{ Source xml = getResource("/query.xml"); Query query = JAXB.unmarshal(xml, Query.class); Assert.assertEquals(query.schedule.getClass(), SingleExecution.class); Assert.assertEquals(SingleExecution.class, query.schedule.getClass()); SingleExecution se = (SingleExecution)query.schedule; Assert.assertNotNull(se.duration); Assert.assertNotNull(se.reference); Loading src/test/resources/query-repeating.xml 0 → 100644 +27 −0 Original line number Diff line number Diff line <query xmlns="http://aktin.org/ns/exchange" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dwh="http://aktin.org/ns/dwh" xmlns:psm="http://www.i2b2.org/xsd/cell/crc/psm/1.1/"> <id>123</id> <description>Lala</description> <principal> <name>Prince Ipal</name> <organisation>AKTIN</organisation> <email>it-support@aktin.org</email> <phone>+49 (441) 798 - 2772</phone> </principal> <schedule xsi:type="repeatedExecution"> <duration>-1W</duration> <interval>P1D</interval> </schedule> <concepts> <concept id="birthdate" xsi:type="raw"/> </concepts> <!-- also possible: xsi:type="psm:query_definition" --> <!-- also possible: xsi:type="dwh:eclectic_query", see http://methods.schattauer.de/en/contents/archivestandard/issue/2168/manuscript/21349/show.html --> <dwh:sql xsi:type="dwh:sqlt"> SELECT a, b; </dwh:sql> </query> src/test/resources/query.xml +6 −1 Original line number Diff line number Diff line <query xmlns="http://aktin.org/ns/exchange" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dwh="http://aktin.org/ns/dwh"> xmlns:dwh="http://aktin.org/ns/dwh" xmlns:psm="http://www.i2b2.org/xsd/cell/crc/psm/1.1/"> <id>123</id> <description>Lala</description> <principal> Loading @@ -16,6 +17,10 @@ <concepts> <concept id="birthdate" xsi:type="raw"/> </concepts> <!-- also possible: xsi:type="psm:query_definition" --> <!-- also possible: xsi:type="dwh:eclectic_query", see http://methods.schattauer.de/en/contents/archivestandard/issue/2168/manuscript/21349/show.html --> <dwh:sql xsi:type="dwh:sqlt"> SELECT a, b; </dwh:sql> Loading Loading
src/main/java/org/aktin/exchange/QuerySchedule.java +2 −2 Original line number Diff line number Diff line Loading @@ -14,8 +14,8 @@ import javax.xml.bind.annotation.XmlSeeAlso; public abstract class QuerySchedule { /** * Duration for the query. The duration is relative * to a reference timestamp and might also be negative. * Duration for the queried data, relative to the request reference date * {@link QueryRequest#referenceDate}. Usually negative: e.g. -D1M for previous month. */ @XmlElement(required=true) public Period duration; Loading
src/main/java/org/aktin/exchange/RepeatedExecution.java +1 −1 Original line number Diff line number Diff line Loading @@ -18,5 +18,5 @@ public class RepeatedExecution extends QuerySchedule{ * This property will not cause any execution on the data warehouse side. * It is solely for information purposes. */ public Duration repeats; public Duration interval; }
src/test/java/org/aktin/exchange/TestUnmarshallDocuments.java +1 −1 Original line number Diff line number Diff line Loading @@ -72,7 +72,7 @@ public class TestUnmarshallDocuments { public void unmarshallQuery() throws IOException, SAXException{ Source xml = getResource("/query.xml"); Query query = JAXB.unmarshal(xml, Query.class); Assert.assertEquals(query.schedule.getClass(), SingleExecution.class); Assert.assertEquals(SingleExecution.class, query.schedule.getClass()); SingleExecution se = (SingleExecution)query.schedule; Assert.assertNotNull(se.duration); Assert.assertNotNull(se.reference); Loading
src/test/resources/query-repeating.xml 0 → 100644 +27 −0 Original line number Diff line number Diff line <query xmlns="http://aktin.org/ns/exchange" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dwh="http://aktin.org/ns/dwh" xmlns:psm="http://www.i2b2.org/xsd/cell/crc/psm/1.1/"> <id>123</id> <description>Lala</description> <principal> <name>Prince Ipal</name> <organisation>AKTIN</organisation> <email>it-support@aktin.org</email> <phone>+49 (441) 798 - 2772</phone> </principal> <schedule xsi:type="repeatedExecution"> <duration>-1W</duration> <interval>P1D</interval> </schedule> <concepts> <concept id="birthdate" xsi:type="raw"/> </concepts> <!-- also possible: xsi:type="psm:query_definition" --> <!-- also possible: xsi:type="dwh:eclectic_query", see http://methods.schattauer.de/en/contents/archivestandard/issue/2168/manuscript/21349/show.html --> <dwh:sql xsi:type="dwh:sqlt"> SELECT a, b; </dwh:sql> </query>
src/test/resources/query.xml +6 −1 Original line number Diff line number Diff line <query xmlns="http://aktin.org/ns/exchange" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dwh="http://aktin.org/ns/dwh"> xmlns:dwh="http://aktin.org/ns/dwh" xmlns:psm="http://www.i2b2.org/xsd/cell/crc/psm/1.1/"> <id>123</id> <description>Lala</description> <principal> Loading @@ -16,6 +17,10 @@ <concepts> <concept id="birthdate" xsi:type="raw"/> </concepts> <!-- also possible: xsi:type="psm:query_definition" --> <!-- also possible: xsi:type="dwh:eclectic_query", see http://methods.schattauer.de/en/contents/archivestandard/issue/2168/manuscript/21349/show.html --> <dwh:sql xsi:type="dwh:sqlt"> SELECT a, b; </dwh:sql> Loading