Add missing reference files
[qtcontacts-tracker:hasselmms-qtcontacts-tracker.git] / tests / ut_qtcontacts_trackerplugin_querybuilder / data / 110-contact-phone-number.rq
1 SELECT DISTINCT
2
3      ?_contact ?_PhoneNumber_PhoneNumber
4
5      bound(?_PhoneNumber_SubTypes_BulletinBoardSystem) AS ?_PhoneNumber_SubTypes_BulletinBoardSystem_IsBound
6      bound(?_PhoneNumber_SubTypes_Car) AS ?_PhoneNumber_SubTypes_Car_IsBound
7      bound(?_PhoneNumber_SubTypes_Facsimile) AS ?_PhoneNumber_SubTypes_Facsimile_IsBound
8      bound(?_PhoneNumber_SubTypes_MessagingCapable) AS ?_PhoneNumber_SubTypes_MessagingCapable_IsBound
9      bound(?_PhoneNumber_SubTypes_Mobile) AS ?_PhoneNumber_SubTypes_Mobile_IsBound
10      bound(?_PhoneNumber_SubTypes_Modem) AS ?_PhoneNumber_SubTypes_Modem_IsBound
11      bound(?_PhoneNumber_SubTypes_Pager) AS ?_PhoneNumber_SubTypes_Pager_IsBound
12      bound(?_PhoneNumber_SubTypes_Video) AS ?_PhoneNumber_SubTypes_Video_IsBound
13      bound(?_PhoneNumber_SubTypes_Voice) AS ?_PhoneNumber_SubTypes_Voice_IsBound
14      bound(?_PhoneNumber_Context_Work) AS ?_PhoneNumber_Context_Work_IsBound
15
16 WHERE
17 {
18   {
19     ?_contact rdf:type nco:PersonContact .
20       {
21         ?_contact nco:hasPhoneNumber ?__1 .
22         ?__1 nco:phoneNumber ?_PhoneNumber_PhoneNumber .
23           OPTIONAL
24           {
25             ?_contact nco:hasPhoneNumber ?_PhoneNumber_SubTypes_BulletinBoardSystem .
26             ?_PhoneNumber_SubTypes_BulletinBoardSystem rdf:type nco:BbsNumber .
27           }
28           OPTIONAL
29           {
30             ?_contact nco:hasPhoneNumber ?_PhoneNumber_SubTypes_Car .
31             ?_PhoneNumber_SubTypes_Car rdf:type nco:CarPhoneNumber .
32           }
33           OPTIONAL
34           {
35             ?_contact nco:hasPhoneNumber ?_PhoneNumber_SubTypes_Facsimile .
36             ?_PhoneNumber_SubTypes_Facsimile rdf:type nco:FaxNumber .
37           }
38           OPTIONAL
39           {
40             ?_contact nco:hasPhoneNumber ?_PhoneNumber_SubTypes_MessagingCapable .
41             ?_PhoneNumber_SubTypes_MessagingCapable rdf:type nco:MessagingNumber .
42           }
43           OPTIONAL
44           {
45             ?_contact nco:hasPhoneNumber ?_PhoneNumber_SubTypes_Mobile .
46             ?_PhoneNumber_SubTypes_Mobile rdf:type nco:CellPhoneNumber .
47           }
48           OPTIONAL
49           {
50             ?_contact nco:hasPhoneNumber ?_PhoneNumber_SubTypes_Modem .
51             ?_PhoneNumber_SubTypes_Modem rdf:type nco:ModemNumber .
52           }
53           OPTIONAL
54           {
55             ?_contact nco:hasPhoneNumber ?_PhoneNumber_SubTypes_Pager .
56             ?_PhoneNumber_SubTypes_Pager rdf:type nco:PagerNumber .
57           }
58           OPTIONAL
59           {
60             ?_contact nco:hasPhoneNumber ?_PhoneNumber_SubTypes_Video .
61             ?_PhoneNumber_SubTypes_Video rdf:type nco:VideoTelephoneNumber .
62           }
63           OPTIONAL
64           {
65             ?_contact nco:hasPhoneNumber ?_PhoneNumber_SubTypes_Voice .
66             ?_PhoneNumber_SubTypes_Voice rdf:type nco:VoicePhoneNumber .
67           }
68       }
69       UNION
70       {
71         ?_contact nco:hasAffiliation ?_PhoneNumber_Context_Work .
72         ?_PhoneNumber_Context_Work nco:hasPhoneNumber ?__2 .
73         ?__2 nco:phoneNumber ?_PhoneNumber_PhoneNumber .
74           OPTIONAL
75           {
76             ?_PhoneNumber_Context_Work nco:hasPhoneNumber ?_PhoneNumber_SubTypes_BulletinBoardSystem .
77             ?_PhoneNumber_SubTypes_BulletinBoardSystem rdf:type nco:BbsNumber .
78           }
79           OPTIONAL
80           {
81             ?_PhoneNumber_Context_Work nco:hasPhoneNumber ?_PhoneNumber_SubTypes_Car .
82             ?_PhoneNumber_SubTypes_Car rdf:type nco:CarPhoneNumber .
83           }
84           OPTIONAL
85           {
86             ?_PhoneNumber_Context_Work nco:hasPhoneNumber ?_PhoneNumber_SubTypes_Facsimile .
87             ?_PhoneNumber_SubTypes_Facsimile rdf:type nco:FaxNumber .
88           }
89           OPTIONAL
90           {
91             ?_PhoneNumber_Context_Work nco:hasPhoneNumber ?_PhoneNumber_SubTypes_MessagingCapable .
92             ?_PhoneNumber_SubTypes_MessagingCapable rdf:type nco:MessagingNumber .
93           }
94           OPTIONAL
95           {
96             ?_PhoneNumber_Context_Work nco:hasPhoneNumber ?_PhoneNumber_SubTypes_Mobile .
97             ?_PhoneNumber_SubTypes_Mobile rdf:type nco:CellPhoneNumber .
98           }
99           OPTIONAL
100           {
101             ?_PhoneNumber_Context_Work nco:hasPhoneNumber ?_PhoneNumber_SubTypes_Modem .
102             ?_PhoneNumber_SubTypes_Modem rdf:type nco:ModemNumber .
103           }
104           OPTIONAL
105           {
106             ?_PhoneNumber_Context_Work nco:hasPhoneNumber ?_PhoneNumber_SubTypes_Pager .
107             ?_PhoneNumber_SubTypes_Pager rdf:type nco:PagerNumber .
108           }
109           OPTIONAL
110           {
111             ?_PhoneNumber_Context_Work nco:hasPhoneNumber ?_PhoneNumber_SubTypes_Video .
112             ?_PhoneNumber_SubTypes_Video rdf:type nco:VideoTelephoneNumber .
113           }
114           OPTIONAL
115           {
116             ?_PhoneNumber_Context_Work nco:hasPhoneNumber ?_PhoneNumber_SubTypes_Voice .
117             ?_PhoneNumber_SubTypes_Voice rdf:type nco:VoicePhoneNumber .
118           }
119       }
120   }
121 }
122
123 ORDER BY ?_contact