IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 22 years ago

Closed 21 years ago

Last modified 21 years ago

#248 closed defect (fixed)

psMetadataSetIterator/psMetadataGet{Next,Previous} doesn't match psListIterator API

Reported by: robert.desonia@… Owned by: eugene
Priority: high Milestone:
Component: PSLib SDRS Version: unspecified
Severity: normal Keywords:
Cc: Eric.VanAlst@…

Description

The psList iterator API has been refactored, and the psMetadata iterator API no
longer matches it (as they are just wrappers to the psList iterator).

One option is to just remove these functions altogether and just use the psList
within the psMetadata if one needs to iterate over all the members, otherwise
there should be one-to-one wrappers to the psList iterator API in the psMetadata
API.

-rdd

Change History (4)

comment:1 by Paul Price, 22 years ago

Owner: changed from Paul Price to eugene

comment:2 by eugene, 22 years ago

Resolution: fixed
Status: newclosed

The only concern I have with that solution is that it loses the feature
specified for the psMetadata iterators of being able to restrict the results on
the basis of a key (I assume this part of the iterators was not implemented
yet). On the other hand, it is not clear that this particular API is so useful
to the end user. I can imagine wanting to extract all of a subset of metadata
entries on the basis of the key (say, get all BIAS.* values), but I doubt I
would want to iterate over them like this. rather, I would probably want a list
of the possible keys, or perhaps a metadata subset or something.

So, in conclusion, let's go with your suggestion of dropping the psMetadata
iterator entries. In the SDRS, I'll keep the paragraph that discusses them with
a note identifying them as ides for a future feature, the details of which will
be deferred until we gain experience using the psMetadata structures.

comment:3 by eugene, 21 years ago

Resolution: fixed
Status: closedreopened

We have decided to re-add the metadata iterators. We've decided we need the
feature of searching based on a matched string. I am specifying it as a regex,
and we can supply some regex code examples if you need. I have cleaned the SDRS
text to be more consistent with the psList method of creating and using iterators:

psListIterator *psMetadataIteratorAlloc(psMetadata *md, int location, bool mutable);
bool psMetadataIteratorSet(psListIterator *iterator, int location);
psMetadataItem *psMetadataGetAndIncrement(psListIterator *iterator, const char
*regex);
psMetadataItem *psMetadataGetAndDecrement(psListIterator *iterator, const char
*regex);

comment:4 by eugene, 21 years ago

Cc: Eric.VanAlst@… added
Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.