source: ISOcat/trunk/mod-ISOcat-access-data/access/user_shared.acc @ 2029

Last change on this file since 2029 was 2029, checked in by mwindhouwer, 12 years ago

Initial import of all the *cats, i.e., ISOcat, RELcat and SCHEMAcat.

File size: 2.0 KB
Line 
1<accessor debug="false">
2        <name>ISOcat.access.data.shared</name>
3        <descr>Get the list of DCs a specific user shares with others, but (s)he isn't the owner.</descr>
4        <param mandatory="true">
5                <name>user</name>
6                <descr>the user</descr>
7                <type canonical="true">string</type>
8        </param>
9        <param>
10                <name>tree</name>
11                <descr>show hierarchical DC relations (false, simple, complex, true)</descr>
12                <type canonical="true">string</type>
13                <source>
14                        <param/>
15                        <nvp/>
16                        <default>
17                                <string>false</string>
18                        </default>
19                </source>
20        </param>
21        <idoc>
22                <instr>
23                        <type>ISOcat.access.data.user.id</type>
24                        <user>var:user</user>
25                        <target>var:uid</target>
26                </instr>
27                <instr>
28                        <type>ISOcat.access.data.user.all</type>
29                        <user>var:user</user>
30                        <target>var:all</target>
31                </instr>
32                <instr>
33                        <type>sloot.xquery</type>
34                        <operator>
35                                <xquery>
36                                        declare variable $dcs as node() external;
37                                        declare variable $user as node() external;
38                                        declare variable $uid as node() external;
39
40                                        &lt;dcs type="shared" key="{string($user)}">{
41                                                $dcs//dc[@scope='shared']
42                                        }&lt;/dcs>
43                                </xquery>
44                        </operator>
45                        <dcs>var:all</dcs>
46                        <user>var:user</user>
47                        <uid>var:uid</uid>
48                        <target>var:shared</target>
49                </instr>
50                <instr>
51                        <type>ISOcat.access.data.selection</type>
52                        <dcs>var:shared</dcs>
53                        <tree>var:tree</tree>
54                        <target>this:response</target>
55                </instr>
56                <!-- attach the golden thread of this (implicit) DCS -->
57                <instr>
58                        <type>sloot.xquery</type>
59                        <operator>
60                                <string>goldenthread:/user/{string($user)}/shared</string>
61                        </operator>
62                        <user>var:uid</user>
63                        <target>var:thread</target>
64                </instr>
65                <instr>
66                        <type>sloot.attachGoldenThread</type>
67                        <operand>this:response</operand>
68                        <param>var:thread</param>
69                        <target>this:response</target>
70                </instr>
71        </idoc>
72        <exception>
73                <debug/>
74                <trace>ffcpl:/trace/user_shared.exception.xml</trace>
75                <throw/>
76        </exception>
77        <response>
78                <debug>ffcpl:/trace/user_shared.response.xml</debug>
79                <mime>application/xml</mime>
80        </response>
81</accessor>
82
Note: See TracBrowser for help on using the repository browser.