r3 - 21 Oct 2004 - 13:10:54 - DuckySherwoodYou are here: OSAF >  Projects Web  >  DevelopmentHome > EngineeringIssues > ZeroPointFourItemCollectionSummary

0.4 Item Collection Summary

  • Item collections now belong to the content model.
  • StuartParmenter is responsible for the implementation for the .4 release (and possibly beyond, but this document only purports to be relevant for the .4 release).
  • Functional spec: ItemCollectionsProposal
  • Design team requirements: ItemCollectionDesign, MitchKapor20040427
  • Historical references can be found here: CollectionProject


An ItemCollection contains a rule, which specifies a set of items in the repository. An example might be "all the items that are of Note kind" (for more on rules, check out QuerySystemReference). An ItemCollection can also be viewed as an array of items, called the results, which is just the a recent result of the running the rule. From CPIA's point of view, a Table or List often displays the list of Items in the ItemCollection, so the array is the main interface to the ItemCollection. In addition to the rule, an ItemCollection also contains two other lists: Inclusions and Exclusions -- explicit lists of items to add or remove after the rule is run -- and a list of Kinds that filter the results after inclusions and exclusions have been added so the results contain only certain kinds of items.

Perhaps the most interesting feature of ItemCollections is that the repository can know when items are created, deleted or modified, and since it can know the rule, it can usually tell when the results change, making it possible to incrementally update the results and even notify the block that it needs to update the user interface when the results change.

ItemCollections have methods to subscribe and unsubscribe to notifications about changes, add or remove items from the inclusions and exclusions, add or remove the filter kind, get and set the rule, access the results by indexing, getting its length, etc. In the future we will be adding sorts to ItemCollections, taking advantage of the repository's recent ability to index ref collections. See parcels/osaf/contentmodel/ItemCollection.py and repository/query/Query.py for more details.

-- KatieCappsParlante - 07 Jul 2004

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r3 < r2 < r1 | More topic actions
Open Source Applications Foundation
Except where otherwise noted, this site and its content are licensed by OSAF under an Creative Commons License, Attribution Only 3.0.
See list of page contributors for attributions.