|
1 /* |
|
2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Holds the contact information in memory. It maintains a |
|
15 * master array of all contacts. It also has 10 pools corresponding |
|
16 * to each key id in the keyboard. Based on numeric key char of |
|
17 * first char of firstname/ lastname a contact is added to one of the |
|
18 * pools. Implements MDataStoreObserver interface functions to |
|
19 * add/ remove contacts. |
|
20 * |
|
21 */ |
|
22 |
|
23 // INCLUDE FILES |
|
24 #include <MVPbkContactLink.h> |
|
25 |
|
26 #include "FindUtilChineseECE.h" |
|
27 #include "CPsData.h" |
|
28 #include "CPcsCache.h" |
|
29 #include "CPcsDebug.h" |
|
30 #include "CWords.h" |
|
31 #include "CPcsAlgorithm2Utils.h" |
|
32 #include "CPcsAlgorithm2.h" |
|
33 |
|
34 // ============================== MEMBER FUNCTIONS ============================ |
|
35 |
|
36 // ---------------------------------------------------------------------------- |
|
37 // CPcsCache::NewL |
|
38 // Two Phase Construction |
|
39 // ---------------------------------------------------------------------------- |
|
40 CPcsCache* CPcsCache::NewL(CPcsAlgorithm2* aAlgorithm, TDesC& aURI, |
|
41 CPcsKeyMap& aKeyMap, TUint8 aUriId) |
|
42 { |
|
43 PRINT ( _L("Enter CPcsCache::NewL") ); |
|
44 |
|
45 CPcsCache* instance = new (ELeave) CPcsCache(); |
|
46 |
|
47 CleanupStack::PushL(instance); |
|
48 |
|
49 instance->ConstructL(aAlgorithm, aURI, aKeyMap, aUriId); |
|
50 |
|
51 CleanupStack::Pop(instance); |
|
52 |
|
53 PRINT ( _L("End CPcsCache::NewL") ); |
|
54 |
|
55 return instance; |
|
56 } |
|
57 |
|
58 // ---------------------------------------------------------------------------- |
|
59 // CPcsCache::CPcsCache |
|
60 // Constructor |
|
61 // ---------------------------------------------------------------------------- |
|
62 CPcsCache::CPcsCache() |
|
63 { |
|
64 PRINT ( _L("Enter CPcsCache::CPcsCache") ); |
|
65 PRINT ( _L("End CPcsCache::CPcsCache") ); |
|
66 } |
|
67 |
|
68 // ---------------------------------------------------------------------------- |
|
69 // CPcsCache::ConstructL |
|
70 // 2nd Phase Constructor |
|
71 // ---------------------------------------------------------------------------- |
|
72 void CPcsCache::ConstructL(CPcsAlgorithm2* aAlgorithm, TDesC& aURI, |
|
73 CPcsKeyMap& aKeyMap, TUint8 aUriId) |
|
74 { |
|
75 PRINT ( _L("Enter CPcsCache::ConstructL") ); |
|
76 iAlgorithm = aAlgorithm; |
|
77 |
|
78 iURI = aURI.AllocL(); |
|
79 iUriId = aUriId; |
|
80 //Update the caching status for this cache |
|
81 iCacheStatus = ECachingNotStarted; |
|
82 |
|
83 keyMap = &aKeyMap; |
|
84 |
|
85 // Populate keyArr |
|
86 for (TInt i = 0; i < aKeyMap.PoolCount(); i++) |
|
87 { |
|
88 RPointerArray<CPcsPoolElement> *keyMap = new (ELeave) RPointerArray<CPcsPoolElement> (1); |
|
89 keyArr.InsertL(keyMap, i); |
|
90 } |
|
91 |
|
92 PRINT ( _L("End CPcsCache::ConstructL") ); |
|
93 } |
|
94 |
|
95 // ---------------------------------------------------------------------------- |
|
96 // CPcsCache::~CPcsCache |
|
97 // Destructor |
|
98 // ---------------------------------------------------------------------------- |
|
99 CPcsCache::~CPcsCache() |
|
100 { |
|
101 PRINT ( _L("Enter CPcsCache::~CPcsCache") ); |
|
102 |
|
103 if (iURI) |
|
104 { |
|
105 delete iURI; |
|
106 } |
|
107 |
|
108 // Loop thru cache info and free and the data elements |
|
109 THashMapIter<TInt, TInt> iter(cacheInfo); |
|
110 |
|
111 do |
|
112 { |
|
113 TInt* id = const_cast<TInt*> (iter.NextKey()); |
|
114 |
|
115 if (id == NULL) |
|
116 break; |
|
117 |
|
118 TInt* poolMap = iter.CurrentValue(); |
|
119 |
|
120 if (poolMap == NULL) |
|
121 { |
|
122 continue; |
|
123 } |
|
124 |
|
125 CPsData *data = NULL; |
|
126 for (int keyIndex = 0; keyIndex <= keyArr.Count(); keyIndex++) |
|
127 { |
|
128 TBool present = GetPoolMap(*poolMap, keyIndex); |
|
129 |
|
130 if (!present) |
|
131 { |
|
132 continue; |
|
133 } |
|
134 |
|
135 RPointerArray<CPcsPoolElement> tmpKeyMap = *(keyArr[keyIndex]); |
|
136 for (int arrayIndex = 0; arrayIndex < tmpKeyMap.Count(); arrayIndex++) |
|
137 { |
|
138 CPcsPoolElement *element = tmpKeyMap[arrayIndex]; |
|
139 TInt localId = element->GetPsData()->Id(); |
|
140 if (*id == localId) |
|
141 { |
|
142 data = element->GetPsData(); |
|
143 delete element; |
|
144 keyArr[keyIndex]->Remove(arrayIndex); |
|
145 } |
|
146 } |
|
147 }; |
|
148 |
|
149 // Remove this element from master pool |
|
150 for (int arrayIndex = 0; arrayIndex < masterPool.Count(); arrayIndex++) |
|
151 { |
|
152 CPsData *dataElement = masterPool[arrayIndex]; |
|
153 TInt localId = dataElement->Id(); |
|
154 if (*id == localId) |
|
155 { |
|
156 masterPool.Remove(arrayIndex); |
|
157 } |
|
158 } |
|
159 |
|
160 if (data) |
|
161 { |
|
162 delete data; |
|
163 } |
|
164 |
|
165 } |
|
166 while (1); |
|
167 |
|
168 for (TInt i = 0; i < keyArr.Count(); i++) |
|
169 { |
|
170 keyArr[i]->ResetAndDestroy(); |
|
171 delete keyArr[i]; |
|
172 keyArr[i] = NULL; |
|
173 } |
|
174 |
|
175 masterPool.ResetAndDestroy(); |
|
176 |
|
177 cacheInfo.Close(); |
|
178 |
|
179 keyArr.Reset(); |
|
180 iDataFields.Reset(); |
|
181 iSortOrder.Reset(); |
|
182 iIndexOrder.Reset(); |
|
183 |
|
184 PRINT ( _L("End CPcsCache::~CPcsCache") ); |
|
185 } |
|
186 |
|
187 // ---------------------------------------------------------------------------- |
|
188 // CPcsCache::GetContactsForKeyL |
|
189 // Get list of pool elements specific to a pool |
|
190 // ---------------------------------------------------------------------------- |
|
191 void CPcsCache::GetContactsForKeyL(TInt aKeyId, RPointerArray<CPcsPoolElement>& aData) |
|
192 { |
|
193 PRINT ( _L("Enter CPcsCache::GetContactsForKeyL") ); |
|
194 |
|
195 RPointerArray<CPcsPoolElement> arr = *keyArr[aKeyId]; |
|
196 for (int i = 0; i < arr.Count(); i++) |
|
197 { |
|
198 CPcsPoolElement* value = arr[i]; |
|
199 aData.AppendL(value); |
|
200 } |
|
201 |
|
202 PRINT ( _L("End CPcsCache::GetContactsForKeyL") ); |
|
203 } |
|
204 |
|
205 // ---------------------------------------------------------------------------- |
|
206 // CPcsCache::GetAllContentsL |
|
207 // Get all data elements in this cache |
|
208 // ---------------------------------------------------------------------------- |
|
209 void CPcsCache::GetAllContentsL(RPointerArray<CPsData>& aData) |
|
210 { |
|
211 PRINT ( _L("Enter CPcsCache::GetAllContentsL") ); |
|
212 |
|
213 for (int i = 0; i < masterPool.Count(); i++) |
|
214 { |
|
215 CPsData* value = masterPool[i]; |
|
216 aData.AppendL(value); |
|
217 } |
|
218 |
|
219 PRINT ( _L("End CPcsCache::GetAllContentsL") ); |
|
220 } |
|
221 |
|
222 // ---------------------------------------------------------------------------- |
|
223 // CPcsCache::AddToPool |
|
224 // Adds a contact to cache |
|
225 // ---------------------------------------------------------------------------- |
|
226 void CPcsCache::AddToPoolL(TInt& aPoolMap, CPsData& aData) |
|
227 { |
|
228 // Temp hash to remember the location of pool elements |
|
229 // First TInt = Pool |
|
230 // Second TInt = Location in the pool |
|
231 // Required for memory optimization so that more than one pool |
|
232 // element doesn't get added for the same data |
|
233 RHashMap<TInt, TInt> elementHash; |
|
234 TLinearOrder<CPcsPoolElement> rule(CPcsPoolElement::CompareByData); |
|
235 |
|
236 // Parse thru each data element |
|
237 for (int dataIndex = 0; dataIndex < aData.DataElementCount(); dataIndex++) |
|
238 { |
|
239 // Stores first key for each word |
|
240 RArray<TChar> firstKey; |
|
241 |
|
242 // Recover the first character |
|
243 if (aData.Data(dataIndex) && aData.Data(dataIndex)->Length() != 0) |
|
244 { |
|
245 // Split the data into words |
|
246 CWords* words = CWords::NewLC(*aData.Data(dataIndex)); |
|
247 |
|
248 // Store the first numeric key for each word |
|
249 for (int i = 0; i < words->MdcaCount(); i++) |
|
250 { |
|
251 TChar firstChar; |
|
252 for (int j = 0; j < words->MdcaPoint(i).Length(); j++) |
|
253 { |
|
254 firstChar = (words->MdcaPoint(i))[j]; |
|
255 TBuf<20> word; |
|
256 word.Append(firstChar); |
|
257 if (iAlgorithm->FindUtilECE()->IsChineseWord(word)) |
|
258 { |
|
259 RPointerArray<HBufC> spellList; |
|
260 if (iAlgorithm->FindUtilECE()->T9ChineseTranslationL(firstChar, spellList)) |
|
261 { |
|
262 for (int j = 0; j < spellList.Count(); j++) |
|
263 { |
|
264 firstKey.Append(keyMap->KeyForCharacter(*(spellList[j]->Ptr()))); |
|
265 } |
|
266 } |
|
267 else |
|
268 { |
|
269 firstKey.Append( keyMap->KeyForCharacter(firstChar)); |
|
270 } |
|
271 spellList.ResetAndDestroy(); |
|
272 } |
|
273 else |
|
274 { |
|
275 firstKey.Append(keyMap->KeyForCharacter(firstChar)); |
|
276 } |
|
277 } |
|
278 } |
|
279 |
|
280 CleanupStack::PopAndDestroy(words); |
|
281 } |
|
282 |
|
283 for (TInt wordIndex = 0; wordIndex < firstKey.Count(); wordIndex++) |
|
284 { |
|
285 TInt arrayIndex = keyMap->PoolIdForCharacter(firstKey[wordIndex]); |
|
286 |
|
287 CPcsPoolElement* element = NULL; |
|
288 |
|
289 // Check if an element already exists in the pool for this data |
|
290 TInt* loc = NULL; |
|
291 loc = elementHash.Find(arrayIndex); |
|
292 if (loc != NULL) |
|
293 { |
|
294 // Exists. Then recover ... |
|
295 RPointerArray<CPcsPoolElement> tmpKeyMap = *(keyArr[arrayIndex]); |
|
296 element = tmpKeyMap[*loc]; |
|
297 } |
|
298 |
|
299 if (element == NULL) // Pool element doesn't exist. Create new ... |
|
300 { |
|
301 element = CPcsPoolElement::NewL(aData); |
|
302 element->ClearDataMatchAttribute(); |
|
303 element->SetDataMatch(dataIndex); |
|
304 |
|
305 // Insert to pool |
|
306 keyArr[arrayIndex]->InsertInOrderAllowRepeatsL(element, rule); |
|
307 TInt index = keyArr[arrayIndex]->FindInOrderL(element, rule); |
|
308 |
|
309 // Set the bit for this pool |
|
310 SetPoolMap(aPoolMap, arrayIndex); |
|
311 |
|
312 // Store the array index in the temp hash |
|
313 elementHash.InsertL(arrayIndex, index); |
|
314 } |
|
315 else // Pool element exists. Just alter the data match attribute |
|
316 { |
|
317 element->SetDataMatch(dataIndex); |
|
318 |
|
319 // Set the bit for this pool |
|
320 SetPoolMap(aPoolMap, arrayIndex); |
|
321 } |
|
322 |
|
323 } // for 2 loop |
|
324 |
|
325 firstKey.Reset(); |
|
326 |
|
327 } // for 1 loop |
|
328 |
|
329 elementHash.Close(); |
|
330 } |
|
331 |
|
332 // --------------------------------------------------------------------- |
|
333 // CPcsCache::AddToCacheL |
|
334 // |
|
335 // --------------------------------------------------------------------- |
|
336 void CPcsCache::AddToCacheL(CPsData& aData) |
|
337 { |
|
338 // Protect against duplicate items getting added |
|
339 if (cacheInfo.Find(aData.Id()) != NULL) |
|
340 { |
|
341 return; |
|
342 } |
|
343 |
|
344 // Include this element in the pool |
|
345 TInt poolMap = 0; |
|
346 AddToPoolL(poolMap, aData); |
|
347 cacheInfo.InsertL(aData.Id(), poolMap); |
|
348 |
|
349 // Include this element in master pool |
|
350 TLinearOrder<CPsData> rule(CPcsAlgorithm2Utils::CompareDataBySortOrder); |
|
351 masterPool.InsertInOrderAllowRepeatsL(&aData, rule); |
|
352 } |
|
353 |
|
354 // --------------------------------------------------------------------- |
|
355 // CPcsCache::RemoveContactL |
|
356 // |
|
357 // --------------------------------------------------------------------- |
|
358 void CPcsCache::RemoveFromCacheL(TInt aItemId) |
|
359 { |
|
360 CPsData *data = NULL; |
|
361 |
|
362 TInt* poolMap = cacheInfo.Find(aItemId); |
|
363 |
|
364 if (poolMap == NULL) |
|
365 { |
|
366 return; |
|
367 } |
|
368 |
|
369 // Remove this element from pools |
|
370 for (int keyIndex = 0; keyIndex <= keyArr.Count(); keyIndex++) |
|
371 { |
|
372 TBool present = GetPoolMap(*poolMap, keyIndex); |
|
373 |
|
374 if (!present) |
|
375 { |
|
376 continue; |
|
377 } |
|
378 |
|
379 RPointerArray<CPcsPoolElement> tmpKeyMap = *(keyArr[keyIndex]); |
|
380 for (int arrayIndex = 0; arrayIndex < tmpKeyMap.Count(); arrayIndex++) |
|
381 { |
|
382 CPcsPoolElement *element = tmpKeyMap[arrayIndex]; |
|
383 TInt id = element->GetPsData()->Id(); |
|
384 if (id == aItemId) |
|
385 { |
|
386 data = element->GetPsData(); |
|
387 delete element; |
|
388 keyArr[keyIndex]->Remove(arrayIndex); |
|
389 } |
|
390 } |
|
391 } |
|
392 |
|
393 // Remove this element from master pool |
|
394 for (int arrayIndex = 0; arrayIndex < masterPool.Count(); arrayIndex++) |
|
395 { |
|
396 CPsData *dataElement = masterPool[arrayIndex]; |
|
397 TInt id = dataElement->Id(); |
|
398 if (id == aItemId) |
|
399 { |
|
400 masterPool.Remove(arrayIndex); |
|
401 } |
|
402 } |
|
403 |
|
404 // Delete data |
|
405 if (data) |
|
406 { |
|
407 delete data; |
|
408 data = NULL; |
|
409 } |
|
410 |
|
411 // Clear up cache information |
|
412 cacheInfo.Remove(aItemId); |
|
413 } |
|
414 |
|
415 // --------------------------------------------------------------------- |
|
416 // CPcsCache::RemoveAllFromCacheL |
|
417 // |
|
418 // --------------------------------------------------------------------- |
|
419 void CPcsCache::RemoveAllFromCacheL() |
|
420 { |
|
421 PRINT ( _L("Enter CPcsCache::RemoveAllFromCacheL") ); |
|
422 |
|
423 for (TInt i = 0; i < keyArr.Count(); i++) |
|
424 { |
|
425 keyArr[i]->ResetAndDestroy(); |
|
426 |
|
427 } |
|
428 |
|
429 masterPool.ResetAndDestroy(); |
|
430 cacheInfo.Close(); |
|
431 |
|
432 PRINT ( _L("End CPcsCache::RemoveAllFromCacheL") ); |
|
433 } |
|
434 |
|
435 // --------------------------------------------------------------------- |
|
436 // CPcsCache::SetPoolMap |
|
437 // |
|
438 // --------------------------------------------------------------------- |
|
439 void CPcsCache::SetPoolMap(TInt& aPoolMap, TInt arrayIndex) |
|
440 { |
|
441 TReal val; |
|
442 Math::Pow(val, 2, arrayIndex); |
|
443 |
|
444 aPoolMap |= (TInt) val; |
|
445 } |
|
446 |
|
447 // --------------------------------------------------------------------- |
|
448 // CPcsCache::GetPoolMap |
|
449 // |
|
450 // --------------------------------------------------------------------- |
|
451 TBool CPcsCache::GetPoolMap(TInt& aPoolMap, TInt arrayIndex) |
|
452 { |
|
453 TReal val; |
|
454 Math::Pow(val, 2, arrayIndex); |
|
455 |
|
456 return (aPoolMap & (TInt) val); |
|
457 } |
|
458 |
|
459 // --------------------------------------------------------------------- |
|
460 // CPcsCache::GetURI |
|
461 // |
|
462 // --------------------------------------------------------------------- |
|
463 TDesC& CPcsCache::GetURI() |
|
464 { |
|
465 return (*iURI); |
|
466 } |
|
467 |
|
468 // --------------------------------------------------------------------- |
|
469 // CPcsCache::SetDataFields |
|
470 // |
|
471 // --------------------------------------------------------------------- |
|
472 void CPcsCache::SetDataFields(RArray<TInt>& aDataFields) |
|
473 { |
|
474 for (TInt i(0); i < aDataFields.Count(); i++) |
|
475 { |
|
476 iDataFields.Append(aDataFields[i]); |
|
477 } |
|
478 } |
|
479 |
|
480 // --------------------------------------------------------------------- |
|
481 // CPcsCache::GetDataFields |
|
482 // |
|
483 // --------------------------------------------------------------------- |
|
484 void CPcsCache::GetDataFields(RArray<TInt>& aDataFields) |
|
485 { |
|
486 for (TInt i(0); i < iDataFields.Count(); i++) |
|
487 { |
|
488 aDataFields.Append(iDataFields[i]); |
|
489 } |
|
490 } |
|
491 |
|
492 // --------------------------------------------------------------------- |
|
493 // CPcsCache::UpdateCacheStatus |
|
494 // |
|
495 // --------------------------------------------------------------------- |
|
496 void CPcsCache::UpdateCacheStatus(TInt aStatus) |
|
497 { |
|
498 iCacheStatus = aStatus; |
|
499 } |
|
500 |
|
501 // --------------------------------------------------------------------- |
|
502 // CPcsCache::GetCacheStatus |
|
503 // |
|
504 // --------------------------------------------------------------------- |
|
505 TInt CPcsCache::GetCacheStatus() |
|
506 { |
|
507 return iCacheStatus; |
|
508 } |
|
509 |
|
510 // --------------------------------------------------------------------- |
|
511 // CPcsCache::GetUriId |
|
512 // |
|
513 // --------------------------------------------------------------------- |
|
514 TUint8 CPcsCache::GetUriId() |
|
515 { |
|
516 return iUriId; |
|
517 } |
|
518 |
|
519 // --------------------------------------------------------------------- |
|
520 // CPcsCache::GetUri |
|
521 // |
|
522 // --------------------------------------------------------------------- |
|
523 HBufC* CPcsCache::GetUri() |
|
524 { |
|
525 return iURI; |
|
526 } |
|
527 |
|
528 // --------------------------------------------------------------------- |
|
529 // CPcsCache::SetSortOrder |
|
530 // |
|
531 // --------------------------------------------------------------------- |
|
532 void CPcsCache::SetSortOrder(RArray<TInt>& aSortOrder) |
|
533 { |
|
534 PRINT ( _L("Enter CPcsCache::SetSortOrder") ); |
|
535 |
|
536 iSortOrder.Reset(); |
|
537 |
|
538 for (TInt i(0); i < aSortOrder.Count(); i++) |
|
539 { |
|
540 iSortOrder.Append(aSortOrder[i]); |
|
541 } |
|
542 |
|
543 ComputeIndexOrder(); |
|
544 |
|
545 PRINT ( _L("End CPcsCache::SetSortOrder") ); |
|
546 } |
|
547 |
|
548 // --------------------------------------------------------------------- |
|
549 // CPcsCache::GetSortOrder |
|
550 // |
|
551 // --------------------------------------------------------------------- |
|
552 void CPcsCache::GetSortOrder(RArray<TInt>& aSortOrder) |
|
553 { |
|
554 aSortOrder.Reset(); |
|
555 |
|
556 for (TInt i(0); i < iSortOrder.Count(); i++) |
|
557 { |
|
558 aSortOrder.Append(iSortOrder[i]); |
|
559 } |
|
560 } |
|
561 |
|
562 // --------------------------------------------------------------------- |
|
563 // CPcsCache::GetIndexOrder |
|
564 // |
|
565 // --------------------------------------------------------------------- |
|
566 void CPcsCache::GetIndexOrder(RArray<TInt>& aIndexOrder) |
|
567 { |
|
568 aIndexOrder.Reset(); |
|
569 |
|
570 for (TInt i(0); i < iIndexOrder.Count(); i++) |
|
571 { |
|
572 aIndexOrder.Append(iIndexOrder[i]); |
|
573 } |
|
574 } |
|
575 |
|
576 // --------------------------------------------------------------------- |
|
577 // CPcsCache::ComputeIndexOrder |
|
578 // |
|
579 // --------------------------------------------------------------------- |
|
580 void CPcsCache::ComputeIndexOrder() |
|
581 { |
|
582 iIndexOrder.Reset(); |
|
583 |
|
584 for (int i = 0; i < iSortOrder.Count(); i++) |
|
585 { |
|
586 for (int j = 0; j < iDataFields.Count(); j++) |
|
587 { |
|
588 if (iSortOrder[i] == iDataFields[j]) |
|
589 { |
|
590 iIndexOrder.Append(j); |
|
591 break; |
|
592 } |
|
593 } |
|
594 } |
|
595 } |
|
596 |
|
597 // --------------------------------------------------------------------- |
|
598 // CPcsCache::ResortdataInPools |
|
599 // |
|
600 // --------------------------------------------------------------------- |
|
601 void CPcsCache::ResortdataInPoolsL() |
|
602 { |
|
603 // copy masterPool data into masterPoolBackup |
|
604 for (TInt i = 0; i < masterPool.Count(); i++ ) |
|
605 { |
|
606 masterPoolBackup.Append( masterPool[i] ); |
|
607 } |
|
608 //Now reset the key array |
|
609 for (TInt i = 0; i < keyArr.Count(); i++ ) |
|
610 { |
|
611 keyArr[i]->ResetAndDestroy(); |
|
612 } |
|
613 masterPool.Reset(); |
|
614 cacheInfo.Close(); |
|
615 //now add data again from the masterPoolBackup |
|
616 for (TInt i = 0; i < masterPoolBackup.Count(); i++ ) |
|
617 { |
|
618 CPsData* temp = static_cast<CPsData*>(masterPoolBackup[i]); |
|
619 AddToCacheL( *temp ); |
|
620 } |
|
621 masterPoolBackup.Reset(); |
|
622 } |
|
623 // End of file |