Class SectionIDMap
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap
-
- org.apache.poi.hpsf.wellknown.SectionIDMap
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.util.Map
public class SectionIDMap extends java.util.HashMapMaps section format IDs to
PropertyIDMaps. It is initialized with two well-known section format IDs: those of the \005SummaryInformation stream and the \005DocumentSummaryInformation stream.If you have a section format ID you can use it as a key to query this map. If you get a
PropertyIDMapreturned your section is well-known and you can query thePropertyIDMapfor PID strings. If you get backnullyou are on your own.This
Mapexpects the byte arrays of section format IDs as keys. A key maps to aPropertyIDMapdescribing the property IDs in sections with the specified section format ID.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Field Summary
Fields Modifier and Type Field and Description static byte[][]DOCUMENT_SUMMARY_INFORMATION_IDThe DocumentSummaryInformation's first and second sections' format ID.static byte[]SUMMARY_INFORMATION_IDThe SummaryInformation's section's format ID.static java.lang.StringUNDEFINEDA property without a known name is described by this string.
-
Constructor Summary
Constructors Constructor and Description SectionIDMap()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description PropertyIDMapget(byte[] sectionFormatID)Returns thePropertyIDMapfor a given section format ID.java.lang.Objectget(java.lang.Object sectionFormatID)Deprecated.Useget(byte[])instead!static SectionIDMapgetInstance()Returns the singleton instance of the defaultSectionIDMap.static java.lang.StringgetPIDString(byte[] sectionFormatID, long pid)Returns the property ID string that is associated with a given property ID in a section format ID's namespace.java.lang.Objectput(byte[] sectionFormatID, PropertyIDMap propertyIDMap)Associates a section format ID with aPropertyIDMap.java.lang.Objectput(java.lang.Object key, java.lang.Object value)Deprecated.Useput(byte[], PropertyIDMap)instead!
-
-
-
Field Detail
-
SUMMARY_INFORMATION_ID
public static final byte[] SUMMARY_INFORMATION_ID
The SummaryInformation's section's format ID.
-
DOCUMENT_SUMMARY_INFORMATION_ID
public static final byte[][] DOCUMENT_SUMMARY_INFORMATION_ID
The DocumentSummaryInformation's first and second sections' format ID.
-
UNDEFINED
public static final java.lang.String UNDEFINED
A property without a known name is described by this string.
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static SectionIDMap getInstance()
Returns the singleton instance of the default
SectionIDMap.- Returns:
- The instance value
-
getPIDString
public static java.lang.String getPIDString(byte[] sectionFormatID, long pid)Returns the property ID string that is associated with a given property ID in a section format ID's namespace.
- Parameters:
sectionFormatID- Each section format ID has its own name space of property ID strings and thus must be specified.pid- The property ID- Returns:
- The well-known property ID string associated with the property ID pid in the name space spanned by sectionFormatID . If the pid /sectionFormatID combination is not well-known, the string "[undefined]" is returned.
-
get
public PropertyIDMap get(byte[] sectionFormatID)
Returns the
PropertyIDMapfor a given section format ID.- Parameters:
sectionFormatID- the section format ID- Returns:
- the property ID map
-
get
public java.lang.Object get(java.lang.Object sectionFormatID)
Deprecated. Useget(byte[])instead!Returns the
PropertyIDMapfor a given section format ID.- Specified by:
getin interfacejava.util.Map- Overrides:
getin classjava.util.HashMap- Parameters:
sectionFormatID- A section format ID as a byte[] .- Returns:
- the property ID map
-
put
public java.lang.Object put(byte[] sectionFormatID, PropertyIDMap propertyIDMap)Associates a section format ID with a
PropertyIDMap.- Parameters:
sectionFormatID- the section format IDpropertyIDMap- the property ID map- Returns:
- as defined by
Map.put(K, V)
-
put
public java.lang.Object put(java.lang.Object key, java.lang.Object value)Deprecated. Useput(byte[], PropertyIDMap)instead!- Specified by:
putin interfacejava.util.Map- Overrides:
putin classjava.util.HashMap- Parameters:
key- This parameter remains undocumented since the method is deprecated.value- This parameter remains undocumented since the method is deprecated.- Returns:
- The return value remains undocumented since the method is deprecated.
- See Also:
put(byte[], PropertyIDMap)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG