1<?xml version="1.0" encoding="UTF-8"?>
2<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
3 <xs:import namespace="http://www.w3.org/2001/XMLSchema-instance" schemaLocation="xsi.xsd"/>
4 <xs:element name="activity">
5 <xs:complexType>
6 <xs:choice minOccurs="0" maxOccurs="unbounded">
7 <xs:element name="description" type="xs:string">
8 <xs:annotation>
9 <xs:documentation>Give about one sentance describing what this activity does.</xs:documentation>
10 </xs:annotation>
11 </xs:element>
12 <xs:element ref="url"/>
13 <xs:element ref="event"/>
14 <xs:element ref="class"/>
15 <xs:element ref="test"/>
16 <xs:element ref="executable"/>
17 <xs:element ref="template"/>
18 <xs:element name="weight" type="xs:float">
19 <xs:annotation>
20 <xs:documentation>Allow heavy-weight activities to be restricted to workers with more resources</xs:documentation>
21 </xs:annotation>
22 </xs:element>
23 <xs:element name="priority" type="xs:float">
24 <xs:annotation>
25 <xs:documentation>Allows workers to target some activities first</xs:documentation>
26 </xs:annotation>
27 </xs:element>
28 <xs:element ref="calling-convention"/>
29 <xs:element ref="trigger"/>
30 <xs:element ref="output-table"/>
31 <xs:element ref="group"/>
32 <xs:element ref="sid"/>
33 <xs:element ref="related"/>
34 <xs:element name="weight" type="xs:integer"/>
35 <xs:element name="priority" type="xs:integer"/>
36 <xs:element ref="configuration"/>
37 </xs:choice>
38 <xs:attribute ref="xsi:noNamespaceSchemaLocation" use="required"/>
39 </xs:complexType>
40 </xs:element>
41 <xs:element name="url" type="xs:string">
42 <xs:annotation>
43 <xs:documentation>Link to a web page giving more information.</xs:documentation>
44 </xs:annotation>
45 </xs:element>
46 <xs:element name="event" type="xs:string">
47 <xs:annotation>
48 <xs:documentation>List all events this activity can raise.</xs:documentation>
49 </xs:annotation>
50 </xs:element>
51 <xs:element name="class">
52 <xs:annotation>
53 <xs:documentation>General purpose processing algorithm or a report generator.</xs:documentation>
54 </xs:annotation>
55 <xs:simpleType>
56 <xs:restriction base="xs:token">
57 <xs:enumeration value="algorithm"/>
58 <xs:enumeration value="report"/>
59 </xs:restriction>
60 </xs:simpleType>
61 </xs:element>
62 <xs:element name="test" type="xs:string">
63 <xs:annotation>
64 <xs:documentation>Name of an executable to test this activity.</xs:documentation>
65 </xs:annotation>
66 </xs:element>
67 <xs:element name="executable" type="xs:string">
68 <xs:annotation>
69 <xs:documentation>For a processing algorithm name the executable file.</xs:documentation>
70 </xs:annotation>
71 </xs:element>
72 <xs:element name="template" type="xs:string">
73 <xs:annotation>
74 <xs:documentation>For a report activity name the report template XML file inside
75settings.REPORT_TEMPLATE_DIR.</xs:documentation>
76 </xs:annotation>
77 </xs:element>
78 <xs:element name="calling-convention">
79 <xs:annotation>
80 <xs:documentation>State which parameters the algorithm needs to be called with</xs:documentation>
81 </xs:annotation>
82 <xs:simpleType>
83 <xs:restriction base="xs:token">
84 <xs:enumeration value="none"/>
85 <xs:enumeration value="timerange"/>
86 <xs:enumeration value="sid+timerange"/>
87 <xs:enumeration value="filename"/>
88 <xs:enumeration value="sid+hourly"/>
89 <xs:enumeration value="sid+timerange+table"/>
90 </xs:restriction>
91 </xs:simpleType>
92 </xs:element>
93 <xs:element name="trigger">
94 <xs:annotation>
95 <xs:documentation>Tell the worker this activity should be called automatically after certain tables are written to</xs:documentation>
96 </xs:annotation>
97 <xs:complexType>
98 <xs:all>
99 <xs:element minOccurs="0" ref="with-stats"/>
100 <xs:element minOccurs="0" ref="type"/>
101 <xs:element minOccurs="0" ref="table"/>
102 <xs:element minOccurs="0" ref="latency"/>
103 </xs:all>
104 </xs:complexType>
105 </xs:element>
106 <xs:element name="with-stats" type="xs:boolean"/>
107 <xs:element name="type">
108 <xs:simpleType>
109 <xs:restriction base="xs:token">
110 <xs:enumeration value="orbital"/>
111 <xs:enumeration value="daily"/>
112 <xs:enumeration value="hourly"/>
113 <xs:enumeration value="threedaily"/>
114 <xs:enumeration value="20min"/>
115 </xs:restriction>
116 </xs:simpleType>
117 </xs:element>
118 <xs:element name="table" type="xs:string"/>
119 <xs:element name="latency" type="xs:duration"/>
120 <xs:element name="output-table" type="xs:string">
121 <xs:annotation>
122 <xs:documentation>Declare all output tables we can write to.</xs:documentation>
123 </xs:annotation>
124 </xs:element>
125 <xs:element name="group" type="xs:string">
126 <xs:annotation>
127 <xs:documentation>This is purely cosmetic. Tell the report viewer to group together all reports with the
128same <group> value.</xs:documentation>
129 </xs:annotation>
130 </xs:element>
131 <xs:element name="sid" type="xs:string">
132 <xs:annotation>
133 <xs:documentation>Enable only for SIDs</xs:documentation>
134 </xs:annotation>
135 </xs:element>
136 <xs:element name="related">
137 <xs:annotation>
138 <xs:documentation>When viewing a report in the report viewer the user can pull down a list of other
139reports to switch to. If the activity has <related> reports these are shown at the top.</xs:documentation>
140 </xs:annotation>
141 <xs:complexType>
142 <xs:sequence>
143 <xs:element minOccurs="0" maxOccurs="unbounded" ref="report"/>
144 </xs:sequence>
145 </xs:complexType>
146 </xs:element>
147 <xs:element name="report" type="xs:string"/>
148 <xs:element name="configuration">
149 <xs:complexType>
150 <xs:sequence>
151 <xs:element maxOccurs="unbounded" ref="parameter"/>
152 </xs:sequence>
153 </xs:complexType>
154 </xs:element>
155 <xs:element name="parameter">
156 <xs:complexType>
157 <xs:all>
158 <xs:element ref="name"/>
159 <xs:element name="description" type="xs:string"/>
160 <xs:element ref="datatype"/>
161 <xs:element ref="value"/>
162 </xs:all>
163 </xs:complexType>
164 </xs:element>
165 <xs:element name="name" type="xs:string"/>
166 <xs:element name="datatype">
167 <xs:simpleType>
168 <xs:restriction base="xs:token">
169 <xs:enumeration value="path"/>
170 </xs:restriction>
171 </xs:simpleType>
172 </xs:element>
173 <xs:element name="value" type="xs:string"/>
174</xs:schema>