README.md 2.29 KB
Newer Older
R.W.Majeed's avatar
R.W.Majeed committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
Common API for the AKTIN data warehouse
---------------------------------------

Generate XSD files:
```
"$JAVA_HOME"/bin/schemagen -d target -cp target/classes org.aktin.exchange.Query
```

Query exchange
--------------
```
<request>
	<id>unique request id</id>
	<date-reference>2016-04-11</date-reference>
	<published>
	<query>
		<id>unique query id</id>
		<description>
		
		</description>
		<principal>
			<name></name>
			<organisation></organisation>
			<location></location>
			<email></email>
			<phone></phone>
			<url></url>
		</principal>

		<schedule type="single|repeating|benchmark">
			<duration>-P1Y</duration>
			<interval>P1Y</interval>
		</schedule>

		<concepts>
			<concept id="CEDIS30:XXX" type="raw"/>
			<concept id="XXX1" type="aggregate">
				<count group-by="fact.value">
			</concept>
			<concept id="XXX1" type="aggregate">
				<!-- by arrival time -->
				<count group-by="substr(8,10,fact.start)">
				<max/>
				<min/>
			</concept>
		</concepts>
		<definition xsi:type="sql">
			
		</definition>
	</query>
	<signature from="broker" algorithm="SHA256withRSA">...</signature>
	<signature from="me" algorithm="SHA256withRSA">...</signature>
	<broker>
		<last-modified>max timestamp der nachfolgenden</last-modified>
		<!-- timestamp the query was published by the broker -->
		<published>2015-12-01T18:30:14</published>
		<!-- later, the query can be either canceled or closed -->
		<closed>2015-12-02T18:30:00</closed>
		<canceled>2015-12-02T18:30:14</canceled>
	</broker>
</query>

	<request-status ref="123">
		<last-modified>max timestampt der nachfolgenden</last-modified>
		<received>XXXtimestamp</received>
		<confirmation method="single|double|automatic">xxx</confirmation>
		<!-- confirmation or rejection -->
rwm's avatar
rwm committed
68 69 70 71
		<rejected></rejected><!-- manually rejected -->
		<!-- may also automatically reject requests:
		 reject all because of vacation,
		 reject specific recurring query -->
72
		<reject-reason>La la la</reject-reason>
R.W.Majeed's avatar
R.W.Majeed committed
73 74 75
		<comment></comment>
		<last-execution>
			<completed>XXXtimestamp</completed>
rwm's avatar
rwm committed
76
		<failed></failed><!-- may fail due to technical reasons -->
R.W.Majeed's avatar
R.W.Majeed committed
77 78 79 80 81 82 83 84 85
			
		</last-execution>
		<last-contact>
		<result-submitted>XXX timestamp</result-submitted>
	</request-status>


<query-result id-ref="">
</query-result>
rwm's avatar
rwm committed
86 87 88 89 90

<nodeStatus>
	<module artifact="dwh-api" version="0.1-SNAPSHOT"/>
	
</nodeStatus>
R.W.Majeed's avatar
R.W.Majeed committed
91
```