source: cats/ISOcat/trunk/mod-ISOcat-access-data/access/dc_touch.acc @ 3458

Last change on this file since 3458 was 3458, checked in by mwindhouwer, 11 years ago

M mod-ISOcat-access-data/dbx/DCIF.xml

  • caches DCIF per DC
  • removed inclusion of rank info, so search results can use cached DCIF

M mod-ISOcat-access-data/access/dc_touch.acc

  • remove the cache entry for a DC

M mod-ISOcat-access-data/access/dcs_to_dcif.acc

  • added postprocessing to add rank info if available and requested

M mod-ISOcat-access-data/access/dc_update.acc

  • reformatting
File size: 2.9 KB
Line 
1<accessor debug="true">
2        <name>ISOcat.access.data.dc.touch</name>
3        <descr>Touch a DC.</descr>
4        <param mandatory="true">
5                <name>dc</name>
6                <descr>the DC key</descr>
7                <type canonical="true">string</type>
8        </param>
9        <param>
10                <name>check</name>
11                <descr>check the DC</descr>
12                <type canonical="true">string</type>
13                <source>
14                        <param/>
15                        <default>
16                                <string>true</string>
17                        </default>
18                </source>
19        </param>
20        <param>
21                <name>dir</name>
22                <descr>direction of the DC check propagation</descr>
23                <type canonical="true">string</type>
24                <source>
25                        <param/>
26                        <default>
27                                <string>down</string>
28                        </default>
29                </source>
30        </param>
31        <idoc>
32                <seq>
33                        <!-- as the DB has been updated, cut the golden thread of this DC -->
34                        <instr>
35                                <type>sloot.xquery</type>
36                                <operator>
37                                        <string>goldenthread:/dc/{string($dc)}</string>
38                                </operator>
39                                <dc>var:dc</dc>
40                                <target>var:thread</target>
41                        </instr>
42                        <instr>
43                                <type>sloot.cutGoldenThread</type>
44                                <param>var:thread</param>
45                        </instr>
46                        <!-- delete a cache for the DC -->
47                        <instr>
48                                <type>sloot.xquery</type>
49                                <operator>
50                                        <string>/dc/{string($dc)}</string>
51                                </operator>
52                                <dc>var:dc</dc>
53                                <target>var:cache</target>
54                        </instr>
55                        <instr>
56                                <type>sloot.dbx-cache</type>
57                                <entry>var:cache</entry>
58                                <target>var:cache</target>
59                        </instr>
60                        <instr>
61                                <type>log</type>
62                                <operand>var:cache</operand>
63                        </instr>
64                        <!-- (re)check the DC -->
65                        <choose>
66                                <cond>
67                                        <instr>
68                                                <type>sloot.xpath2eval</type>
69                                                <operand>var:check</operand>
70                                                <operator>
71                                                        <xpath>.='true' or .='async'</xpath>
72                                                </operator>
73                                                <target>this:cond</target>
74                                        </instr>
75                                </cond>
76                                <then>
77                                        <instr>
78                                                <type>async</type>
79                                                <uri>active:ISOcat.access.data.dc.check.bg</uri>
80                                                <dc>var:dc</dc>
81                                                <target>var:void</target>
82                                        </instr>
83                                </then>
84                                <cond>
85                                        <instr>
86                                                <type>sloot.xpath2eval</type>
87                                                <operand>var:check</operand>
88                                                <operator>
89                                                        <xpath>.='sync'</xpath>
90                                                </operator>
91                                                <target>this:cond</target>
92                                        </instr>
93                                </cond>
94                                <then>
95                                        <instr>
96                                                <type>ISOcat.access.data.dc.check</type>
97                                                <dc>var:dc</dc>
98                                                <target>var:void</target>
99                                        </instr>
100                                </then>
101                        </choose>
102                        <!-- hug the context of this DC -->
103                        <instr>
104                                <type>async</type>
105                                <uri>active:ISOcat.access.data.dc.hug.bg</uri>
106                                <dc>var:dc</dc>
107                                <check>var:check</check>
108                                <target>var:void</target>
109                        </instr>
110                        <!--<instr>
111                                <type>ISOcat.access.data.dc.hug</type>
112                                <dc>var:dc</dc>
113                                <check>var:check</check>
114                                <dir>var:dir</dir>
115                                <target>var:void</target>
116                        </instr>-->
117                        <instr>
118                                <type>copy</type>
119                                <operand>
120                                        <null/>
121                                </operand>
122                                <target>this:response</target>
123                        </instr>
124                </seq>
125        </idoc>
126        <exception>
127                <debug/>
128                <trace>ffcpl:/trace/dc_touch.exception.xml</trace>
129        </exception>
130        <response>
131                <debug>ffcpl:/trace/dc_touch.response.xml</debug>
132                <mime>application/xml</mime>
133        </response>
134</accessor>
Note: See TracBrowser for help on using the repository browser.