/** * Gets the custom properties as a hash map from the property name to value. * Note that the result is created on each invocation to avoid duplicate * storage in the base class. * * @return The custom properties if any exist, <code>null</code> otherwise. */ public HashMap getCustomProperties() { HashMap rPropertyNameToValueHashMap = null; if (sectionCount == 2) { HashMap rPropertyIdToNameHashMap; Iterator rPropertyIdToNameIterator; Map.Entry rPropertyIdToNameMapEntry; Section rSection; rSection = (Section)sections.get(1); if ((rPropertyIdToNameHashMap = (HashMap) rSection.getProperty(PropertyIDMap.PID_DICTIONARY)) != null) { rPropertyNameToValueHashMap = new HashMap (rPropertyIdToNameHashMap.size()); rPropertyIdToNameIterator = rPropertyIdToNameHashMap.entrySet().iterator(); while (rPropertyIdToNameIterator.hasNext()) { rPropertyIdToNameMapEntry = (Map.Entry) rPropertyIdToNameIterator.next(); rPropertyNameToValueHashMap.put (rPropertyIdToNameMapEntry.getValue(), rSection.getProperty(((Number) rPropertyIdToNameMapEntry.getKey()).intValue())); } } } return rPropertyNameToValueHashMap; }
One change that needs to be made to that method I posted with the current implementation of SpecialPropertySet is that 'sectionCount' needs to be changed to getSectionCount() and 'sections' to getSections() b/c only the methods delegate to the wrapped PropertySet, but the fields are unset. I'm going to ask that they be set to accomodate any derived classes in another bug.
I refactored your contribution and added it to DocumentSummaryInformation. I will appear in the HEAD branch soon.
Any idea when this addition will make it into a release?
It's there for nearly 10 months. That's why this issue is closed. :-)
As of build 2.5.1, the built version of DocumentSummaryInformation is 1.9.4.1. Looks like it was merged into the trunk after 1.12 where the fix was. Version 1.14 is the tip. So for some reason the REL_2_BRANCH and REL_2_5_1 tags haven't been moved up. Many of the other files I looked at are the same (Section, SpecialPropertySet); tip is not used. Not sure if some are intentional or not.
Sorry, I misunderstood you. Since more than a year or so HPSF changes are in the CVS HEAD only, not in the REL_2 branches. That's something we'll address soon by merging the REL_2_5_1 branch into the trunk. Until then you have to checkout the HEAD.