IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ticket #364: psMD.txt

File psMD.txt, 1.4 KB (added by eugene, 21 years ago)

notes on metadata modifications

Line 
1
2- psMetadataItemAllocV:
3
4 - re-wrote 'comment' portion to use psStringCopy
5 - re-wrote 'name' portion to use vnsprintf to predict formatted string length
6 - added psListAlloc to META_MULTI creation
7 - value passed to META_MULTI must be NULL (type info is not available)
8
9- psMetadataAddItem:
10
11 the logic was wrong for MULTI and REPLACE, or perhaps the SDRS was unclear:
12
13 - if there is no existing entry, the entry is added simply
14
15 - if the existing entry is MULTI, the new entry is added as a node of MULTI
16 - it does not make sense for both the new and old entries to be of type MULTI
17 - allow replacement of the existing multi with new multi (not implemented)
18 - if both are MULTI && !REPLACE: error
19
20 - if new entry is MULTI, existing entry becomes node of the new multi. schematically:
21
22 hash --> existing <-- list
23
24 becomes
25
26 hash --> new -> list -> existing <- list
27
28 - if REPLACE is set, drop the old one first?
29 - behavior same if DUPLICATE is set or not
30
31 - if DUPLICATE is set, create a new multi, make both existing and
32 new entries nodes of that new multi:
33
34 hash --> existing <-- list
35
36 becomes
37
38 hash --> multi -> list -> existing <- list
39 list -> new <- list
40
41 - if REPLACE is set, remove the old entry, add new value
42
43 - note: this adjusts the order. we might need to be more careful.
44