qtmobility/tests/auto/ut_qtcontacts_trackerplugin/ut_qtcontacts_trackerplugin_data/insertTpContact.sparql
equal
deleted
inserted
replaced
1 #!/bin/bash |
|
2 |
|
3 if [ -z "$1" ]; then |
|
4 echo "usage: $0 <contact-uri> <contact-uid> <im-id> <accountPath> <imPresence> <statusMessage> <protocol> <nameGiven> <nameFamily>" |
|
5 exit 1 |
|
6 fi |
|
7 |
|
8 echo "create nco:IMAccount" |
|
9 tracker-sparql -u -q " |
|
10 INSERT |
|
11 { |
|
12 <telepathy:$4> |
|
13 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> |
|
14 <http://www.semanticdesktop.org/ontologies/2007/03/22/nco#IMAccount> |
|
15 } |
|
16 " |
|
17 |
|
18 tracker-sparql -u -q " |
|
19 INSERT |
|
20 { |
|
21 <telepathy:$4> |
|
22 nco:imDisplayName '$7' |
|
23 } |
|
24 " |
|
25 |
|
26 echo "create nco:IMContact" |
|
27 tracker-sparql -u -q " |
|
28 INSERT |
|
29 { |
|
30 <$1> |
|
31 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> |
|
32 <http://www.semanticdesktop.org/ontologies/2007/03/22/nco#IMContact> |
|
33 } |
|
34 " |
|
35 |
|
36 echo "create nco:IMContact" |
|
37 tracker-sparql --update --query " |
|
38 INSERT { |
|
39 <$1> a nco:IMContact; |
|
40 nco:contactUID '$2'; |
|
41 nco:imContactId '$3'; |
|
42 nco:imContactNickname '$8$9'; |
|
43 nco:imContactPresence $5; |
|
44 nco:imContactStatusMessage '$6'; |
|
45 nco:fromIMAccount <telepathy:$4>; |
|
46 nco:imContactCapability <bogus> |
|
47 } |
|
48 " |
|
49 |
|
50 echo "update nco:IMContact" |
|
51 tracker-sparql --update --query "INSERT { |
|
52 <$1> a nco:IMContact; |
|
53 nco:nameGiven '$8'; |
|
54 nco:nameFamily '$9' |
|
55 } |
|
56 " |
|