Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dwh-api
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AKTIN
dwh-api
Commits
84d9a866
Commit
84d9a866
authored
Jun 28, 2016
by
R.W.Majeed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
example for repeated execution added
parent
8978fa3e
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
5 deletions
+37
-5
src/main/java/org/aktin/exchange/QuerySchedule.java
src/main/java/org/aktin/exchange/QuerySchedule.java
+2
-2
src/main/java/org/aktin/exchange/RepeatedExecution.java
src/main/java/org/aktin/exchange/RepeatedExecution.java
+1
-1
src/test/java/org/aktin/exchange/TestUnmarshallDocuments.java
...test/java/org/aktin/exchange/TestUnmarshallDocuments.java
+1
-1
src/test/resources/query-repeating.xml
src/test/resources/query-repeating.xml
+27
-0
src/test/resources/query.xml
src/test/resources/query.xml
+6
-1
No files found.
src/main/java/org/aktin/exchange/QuerySchedule.java
View file @
84d9a866
...
...
@@ -14,8 +14,8 @@ import javax.xml.bind.annotation.XmlSeeAlso;
public
abstract
class
QuerySchedule
{
/**
* Duration for the quer
y. The duration is relativ
e
*
to a reference timestamp and might also be negative
.
* Duration for the quer
ied data, relative to the request reference dat
e
*
{@link QueryRequest#referenceDate}. Usually negative: e.g. -D1M for previous month
.
*/
@XmlElement
(
required
=
true
)
public
Period
duration
;
...
...
src/main/java/org/aktin/exchange/RepeatedExecution.java
View file @
84d9a866
...
...
@@ -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
View file @
84d9a866
...
...
@@ -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
);
...
...
src/test/resources/query-repeating.xml
0 → 100644
View file @
84d9a866
<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
View file @
84d9a866
<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>
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment