poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 23903] New: - Add this method to DocumentSummaryInformation which will get the custom properties
Date Sat, 18 Oct 2003 04:41:44 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23903>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23903

Add this method to DocumentSummaryInformation which will get the custom properties

           Summary: Add this method to DocumentSummaryInformation which will
                    get the custom properties
           Product: POI
           Version: 2.0-pre3
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: HPFS
        AssignedTo: poi-dev@jakarta.apache.org
        ReportedBy: Robert_Flaherty@Hyperion.com


/**
	 * 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;
	}

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-dev-help@jakarta.apache.org


Mime
View raw message