initial "report class" xml and schema generator script
[Evergreen.git] / Open-ILS / src / reporter / report_base.example.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <reporter xmlns:xi="http://www.w3.org/2001/XInclude">
3         <classes>
4                 <class
5                   name="silly-base"
6                   fact-table="silly.fact">
7                         <description>Silly Report base</description>
8                         <dims>
9                                 <dim include="silly_word_dim"/>
10                                 <dim include="silly_sayer_dim"/>
11                         </dims>
12                 </class>
13         </classes>
14
15         <tables>
16
17                 <table id="silly.fact" partition="true">
18                         <tablename>stats.silly_fact</tablename>
19
20                         <partition>
21                                 <field>said_when</field>
22                                 <!-- Valid options:  month, year, woy (week of year), doy (day of year) -->
23                                 <chunk>month</chunk>
24                                 <start>2005-09-01</start>
25                                 <end>2005-12-31</end>
26                         </partition>
27
28                         <fields>
29                                 <field
30                                   name="silly_word_dim"
31                                   datatype="int"
32                                   indexed="true">
33                                         <label>Silly word dim</label>
34                                         <description>Silly word entry dimension link</description>
35                                 </field>
36                                 <field
37                                   name="silly_sayer_dim"
38                                   datatype="int"
39                                   indexed="true">
40                                         <label>Silly sayer dim</label>
41                                         <description>Silly sayer entry dimension link</description>
42                                 </field>
43                                 <field
44                                   name="said_when"
45                                   datatype="timestamptz"
46                                   core="true"
47                                   indexed="true"
48                                   default="now()">
49                                         <label>Silly word timestamp</label>
50                                         <description>Silly word entry timestamp</description>
51                                 </field>
52                         </fields>
53                         <links>
54                                 <link
55                                   field="silly_word_dim"
56                                   table="silly.word_dim"
57                                   type="has_a"/>
58                                 <link
59                                   field="silly_sayer_dim"
60                                   table="silly.sayer_dim"
61                                   type="has_a"/>
62                         </links>
63                 </table>
64
65                 <table id="silly.word_dim">
66                         <tablename>stats.words</tablename>
67                         <fields>
68                                 <field
69                                   name="id"
70                                   primary="1"
71                                   create-type="serial"
72                                   datatype="int"/>
73                                 <field
74                                   name="word"
75                                   datatype="text"
76                                   indexed="true"
77                                   index-type="BTREE"/>
78                         </fields>
79                 </table>
80
81                 <table id="silly.sayer_dim">
82                         <tablename>stats.silly_sayers</tablename>
83                         <fields>
84                                 <field
85                                   name="id"
86                                   primary="1"
87                                   create-type="serial"
88                                   datatype="int"/>
89                                 <field
90                                   name="sayer"
91                                   datatype="text"
92                                   indexed="true"
93                                   index-type="BTREE"/>
94                         </fields>
95                 </table>
96
97         </tables>
98 </reporter>