Top Description Fields Constructors Methods
org.apache.poi.hpsf.wellknown

public Class PropertyIDMap

extends Object
implements Map<Long, String>
Class Inheritance
All Implemented Interfaces
java.util.Map
Imports
java.util.Collection, .Collections, .HashMap, .Map, .Set, org.apache.poi.hpsf.DocumentSummaryInformation, .SummaryInformation

This is a dictionary which maps property ID values to property ID strings. The methods getSummaryInformationProperties and getDocumentSummaryInformationProperties return singleton PropertyIDMaps. An application that wants to extend these maps should treat them as unmodifiable, copy them and modify the copies. Trying to modify the map directly will cause exceptions UnsupportedOperationException to be thrown.

Field Summary

Modifier and TypeField and Description
private static final Object[][]
private static PropertyIDMap
documentSummaryInformationProperties

Contains the summary information property ID values and associated strings.

private static final Object[][]
private static PropertyIDMap
fallbackProperties

Contains the fallback property ID values and associated strings.

private final Map<Long, String>
public static final int
PID_APPNAME

ID of the property that denotes the application that created the document

public static final int
PID_AUTHOR

ID of the property that denotes the document's author

public static final int
PID_BEHAVIOUR

The Behavior property, if present, MUST have the property identifier 0x80000003, MUST NOT have a property name, and MUST have type VT_UI4 (0x0013).

public static final int
PID_BYTECOUNT

Number of bytes.

public static final int
PID_CATEGORY

The entry is a string denoting the category the file belongs to, e.g. review, memo, etc. This is useful to find documents of same type.

public static final int
PID_CCHWITHSPACES

The entry specifies an estimate of the number of characters in the document, including whitespace, as an integer

public static final int
PID_CHARCOUNT

ID of the property that denotes the number of characters in the document

public static final int
PID_CODEPAGE

The entry denotes a code page.

public static final int
PID_COMMENTS

ID of the property that denotes the document's comments

public static final int
PID_COMPANY

This entry contains the company name.

public static final int
PID_CONTENTSTATUS

This entry contains a string of the document status.

public static final int
PID_CONTENTTYPE

This entry contains a string of the content type of the file.

public static final int
PID_CREATE_DTM

ID of the property that denotes the date and time the document was created.

public static final int
PID_DICTIONARY

The entry is a dictionary.

public static final int
PID_DIGSIG

This entry contains the VBA digital signature for the VBA project embedded in the document.

public static final int
PID_DOCPARTS

This entry contains the names of document parts (word: names of the documents in the master document, excel: sheet names, power point: slide titles, binder: document names).

public static final int
PID_DOCVERSION

This entry contains a string of the document version, but normally should be empty

public static final int
PID_EDITTIME

ID of the property that denotes the document's edit time

public static final int
PID_HEADINGPAIR

This entry denotes an internally used property.

public static final int
PID_HIDDENCOUNT

Number of hidden slides.

public static final int
PID_HYPERLINKSCHANGED

This entry contains a boolean which marks if the User Defined Property Set has been updated outside of the Application, if so the hyperlinks should be updated on document load.

public static final int
PID_KEYWORDS

ID of the property that denotes the document's keywords

public static final int
PID_LANGUAGE

This entry contains a string of the document language, but normally should be empty.

public static final int
PID_LASTAUTHOR

ID of the property that denotes the document's last author

public static final int
PID_LASTPRINTED

ID of the property that denotes the date and time the document was last printed

public static final int
PID_LASTSAVE_DTM

ID of the property that denotes the date and time the document was saved

public static final int
PID_LINECOUNT

Number of lines.

public static final int
PID_LINKSDIRTY

If this entry is -1 the links are dirty and should be re-evaluated.

public static final int
PID_LOCALE

The Locale property, if present, MUST have the property identifier 0x80000000, MUST NOT have a property name, and MUST have type VT_UI4 (0x0013).

public static final int
PID_MANAGER

This entry contains the name of the project manager.

public static final int
PID_MAX

The highest well-known property ID. Applications are free to use higher values for custom purposes.

public static final int
PID_MMCLIPCOUNT

Number of multimedia clips, e.g. sound or video.

public static final int
PID_NOTECOUNT

Number of slides with notes.

public static final int
PID_PAGECOUNT

ID of the property that denotes the number of pages in the document

public static final int
PID_PARCOUNT

Number of paragraphs.

public static final int
PID_PRESFORMAT

Target format for power point presentation, e.g. 35mm, printer, video etc.

public static final int
PID_REVNUMBER

ID of the property that denotes the document's revision number

public static final int
PID_SCALE

This entry is set to -1 when scaling of the thumbnail is desired.

public static final int
PID_SECURITY

ID of the property that denotes whether read/write access to the document is allowed or whether is should be opened as read-only.

public static final int
PID_SLIDECOUNT

Number of slides in a power point presentation.

public static final int
PID_SUBJECT

ID of the property that denotes the document's subject

public static final int
PID_TEMPLATE

ID of the property that denotes the document's template

public static final int
PID_THUMBNAIL

ID of the property that denotes the document's thumbnail

public static final int
PID_TITLE

ID of the property that denotes the document's title

public static final int
PID_VERSION

This entry contains the version of the Application which wrote the Property set, stored with the two high order bytes having the major version number, and the two low order bytes the minor version number.

public static final int
PID_WORDCOUNT

ID of the property that denotes the number of words in the document

private static final Object[][]
private static PropertyIDMap
summaryInformationProperties

Contains the summary information property ID values and associated strings.

public static final String
UNDEFINED

A property without a known name is described by this string.

Constructor Summary

AccessConstructor and Description
private
PropertyIDMap(Object[][]
an array of key/value pairs via nested Object[2] arrays
idValues
)

Creates a PropertyIDMap backed by another map.

Method Summary

Modifier and TypeMethod and Description
public void
clear()

Implements java.util.Map.clear.

Removes all of the mappings from this map (optional operation).

public boolean
containsKey(Object
key whose presence in this map is to be tested
key
)

Implements java.util.Map.containsKey.

Returns true if this map contains a mapping for the specified key.

public boolean
containsValue(Object
value whose presence in this map is to be tested
value
)

Implements java.util.Map.containsValue.

Returns true if this map maps one or more keys to the specified value.

public Set<Map.Entry<Long, String>>
entrySet()

Implements java.util.Map.entrySet.

Returns a Set view of the mappings contained in this map.

public String
get(Object
the key whose associated value is to be returned
key
)

Implements java.util.Map.get.

Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.

public static synchronized PropertyIDMap

Returns:

The Document Summary Information properties singleton.
getDocumentSummaryInformationProperties
()

public static synchronized PropertyIDMap

Returns:

the resulting property map
getFallbackProperties
()

Returns a property map, which is only used as a fallback, i.e. if available, the correct map for DocumentSummaryInformation or SummaryInformation should be used.

public static synchronized PropertyIDMap

Returns:

the Summary Information properties singleton
getSummaryInformationProperties
()

public boolean
isEmpty()

Implements java.util.Map.isEmpty.

Returns true if this map contains no key-value mappings.

public Set<Long>
keySet()

Implements java.util.Map.keySet.

Returns a Set view of the keys contained in this map.

public static void
main(final String[]
The command-line arguments
args
)

For the most basic testing.

public String
put(Long
key with which the specified value is to be associated
key
,
String
value to be associated with the specified key
value
)

Implements java.util.Map.put.

Associates the specified value with the specified key in this map (optional operation).

public void
putAll(Map<? extends Long, ? extends String>
mappings to be stored in this map
m
)

Implements java.util.Map.putAll.

Copies all of the mappings from the specified map to this map (optional operation).

public String
remove(Object
key whose mapping is to be removed from the map
key
)

Implements java.util.Map.remove.

Removes the mapping for a key from this map if it is present (optional operation).

public int
size()

Implements java.util.Map.size.

Returns the number of key-value mappings in this map.

public Collection<String>
values()

Implements java.util.Map.values.

Returns a Collection view of the values contained in this map.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

documentSummaryInformationIdValuesback to summary
private static final Object[][] documentSummaryInformationIdValues
documentSummaryInformationPropertiesback to summary
private static PropertyIDMap documentSummaryInformationProperties

Contains the summary information property ID values and associated strings. See the overall HPSF documentation for details!

fallbackIdValuesback to summary
private static final Object[][] fallbackIdValues
fallbackPropertiesback to summary
private static PropertyIDMap fallbackProperties

Contains the fallback property ID values and associated strings. This is only used for lookups and not for initializing a property set

idMapback to summary
private final Map<Long, String> idMap
PID_APPNAMEback to summary
public static final int PID_APPNAME

ID of the property that denotes the application that created the document

PID_AUTHORback to summary
public static final int PID_AUTHOR

ID of the property that denotes the document's author

PID_BEHAVIOURback to summary
public static final int PID_BEHAVIOUR

The Behavior property, if present, MUST have the property identifier 0x80000003, MUST NOT have a property name, and MUST have type VT_UI4 (0x0013). A version 0 property set, indicated by the value 0x0000 for the Version field of the PropertySetStream packet, MUST NOT have a Behavior property. If the Behavior property is present, it MUST have one of the following values.

  • 0x00000000 = Property names are case-insensitive (default)
  • 0x00000001 = Property names are case-sensitive.
PID_BYTECOUNTback to summary
public static final int PID_BYTECOUNT

Number of bytes.

PID_CATEGORYback to summary
public static final int PID_CATEGORY

The entry is a string denoting the category the file belongs to, e.g. review, memo, etc. This is useful to find documents of same type.

PID_CCHWITHSPACESback to summary
public static final int PID_CCHWITHSPACES

The entry specifies an estimate of the number of characters in the document, including whitespace, as an integer

PID_CHARCOUNTback to summary
public static final int PID_CHARCOUNT

ID of the property that denotes the number of characters in the document

PID_CODEPAGEback to summary
public static final int PID_CODEPAGE

The entry denotes a code page.

PID_COMMENTSback to summary
public static final int PID_COMMENTS

ID of the property that denotes the document's comments

PID_COMPANYback to summary
public static final int PID_COMPANY

This entry contains the company name.

PID_CONTENTSTATUSback to summary
public static final int PID_CONTENTSTATUS

This entry contains a string of the document status.

PID_CONTENTTYPEback to summary
public static final int PID_CONTENTTYPE

This entry contains a string of the content type of the file.

PID_CREATE_DTMback to summary
public static final int PID_CREATE_DTM

ID of the property that denotes the date and time the document was created.

PID_DICTIONARYback to summary
public static final int PID_DICTIONARY

The entry is a dictionary.

PID_DIGSIGback to summary
public static final int PID_DIGSIG

This entry contains the VBA digital signature for the VBA project embedded in the document.

PID_DOCPARTSback to summary
public static final int PID_DOCPARTS

This entry contains the names of document parts (word: names of the documents in the master document, excel: sheet names, power point: slide titles, binder: document names).

PID_DOCVERSIONback to summary
public static final int PID_DOCVERSION

This entry contains a string of the document version, but normally should be empty

PID_EDITTIMEback to summary
public static final int PID_EDITTIME

ID of the property that denotes the document's edit time

PID_HEADINGPAIRback to summary
public static final int PID_HEADINGPAIR

This entry denotes an internally used property. It is a vector of variants consisting of pairs of a string (VT_LPSTR) and a number (VT_I4). The string is a heading name, and the number tells how many document parts are under that heading.

PID_HIDDENCOUNTback to summary
public static final int PID_HIDDENCOUNT

Number of hidden slides.

PID_HYPERLINKSCHANGEDback to summary
public static final int PID_HYPERLINKSCHANGED

This entry contains a boolean which marks if the User Defined Property Set has been updated outside of the Application, if so the hyperlinks should be updated on document load.

PID_KEYWORDSback to summary
public static final int PID_KEYWORDS

ID of the property that denotes the document's keywords

PID_LANGUAGEback to summary
public static final int PID_LANGUAGE

This entry contains a string of the document language, but normally should be empty.

PID_LASTAUTHORback to summary
public static final int PID_LASTAUTHOR

ID of the property that denotes the document's last author

PID_LASTPRINTEDback to summary
public static final int PID_LASTPRINTED

ID of the property that denotes the date and time the document was last printed

PID_LASTSAVE_DTMback to summary
public static final int PID_LASTSAVE_DTM

ID of the property that denotes the date and time the document was saved

PID_LINECOUNTback to summary
public static final int PID_LINECOUNT

Number of lines.

PID_LINKSDIRTYback to summary
public static final int PID_LINKSDIRTY

If this entry is -1 the links are dirty and should be re-evaluated.

PID_LOCALEback to summary
public static final int PID_LOCALE

The Locale property, if present, MUST have the property identifier 0x80000000, MUST NOT have a property name, and MUST have type VT_UI4 (0x0013). If present, its value MUST be a valid language code identifier as specified in [MS-LCID]. Its value is selected in an implementation-specific manner.

PID_MANAGERback to summary
public static final int PID_MANAGER

This entry contains the name of the project manager.

PID_MAXback to summary
public static final int PID_MAX

The highest well-known property ID. Applications are free to use higher values for custom purposes. (This value is based on Office 12, earlier versions of Office had lower values)

PID_MMCLIPCOUNTback to summary
public static final int PID_MMCLIPCOUNT

Number of multimedia clips, e.g. sound or video.

PID_NOTECOUNTback to summary
public static final int PID_NOTECOUNT

Number of slides with notes.

PID_PAGECOUNTback to summary
public static final int PID_PAGECOUNT

ID of the property that denotes the number of pages in the document

PID_PARCOUNTback to summary
public static final int PID_PARCOUNT

Number of paragraphs.

PID_PRESFORMATback to summary
public static final int PID_PRESFORMAT

Target format for power point presentation, e.g. 35mm, printer, video etc.

PID_REVNUMBERback to summary
public static final int PID_REVNUMBER

ID of the property that denotes the document's revision number

PID_SCALEback to summary
public static final int PID_SCALE

This entry is set to -1 when scaling of the thumbnail is desired. Otherwise the thumbnail should be cropped.

PID_SECURITYback to summary
public static final int PID_SECURITY

ID of the property that denotes whether read/write access to the document is allowed or whether is should be opened as read-only. It can have the following values:

ID-property mapping
Value Description
0 No restriction
2 Read-only recommended
4 Read-only enforced
PID_SLIDECOUNTback to summary
public static final int PID_SLIDECOUNT

Number of slides in a power point presentation.

PID_SUBJECTback to summary
public static final int PID_SUBJECT

ID of the property that denotes the document's subject

PID_TEMPLATEback to summary
public static final int PID_TEMPLATE

ID of the property that denotes the document's template

PID_THUMBNAILback to summary
public static final int PID_THUMBNAIL

ID of the property that denotes the document's thumbnail

PID_TITLEback to summary
public static final int PID_TITLE

ID of the property that denotes the document's title

PID_VERSIONback to summary
public static final int PID_VERSION

This entry contains the version of the Application which wrote the Property set, stored with the two high order bytes having the major version number, and the two low order bytes the minor version number.

PID_WORDCOUNTback to summary
public static final int PID_WORDCOUNT

ID of the property that denotes the number of words in the document

summaryInformationIdValuesback to summary
private static final Object[][] summaryInformationIdValues
summaryInformationPropertiesback to summary
private static PropertyIDMap summaryInformationProperties

Contains the summary information property ID values and associated strings. See the overall HPSF documentation for details!

UNDEFINEDback to summary
public static final String UNDEFINED

A property without a known name is described by this string.

Constructor Detail

PropertyIDMapback to summary
private PropertyIDMap(Object[][] idValues)

Creates a PropertyIDMap backed by another map.

Parameters
idValues:Object[][]

an array of key/value pairs via nested Object[2] arrays

Method Detail

clearback to summary
public void clear()

Implements java.util.Map.clear.

Doc from java.util.Map.clear.

Removes all of the mappings from this map (optional operation). The map will be empty after this call returns.

Annotations
@Override
containsKeyback to summary
public boolean containsKey(Object key)

Implements java.util.Map.containsKey.

Doc from java.util.Map.containsKey.

Returns true if this map contains a mapping for the specified key. More formally, returns true if and only if this map contains a mapping for a key k such that Objects.equals(key, k). (There can be at most one such mapping.)

Parameters
key:Object

key whose presence in this map is to be tested

Returns:boolean

true if this map contains a mapping for the specified key

Annotations
@Override
containsValueback to summary
public boolean containsValue(Object value)

Implements java.util.Map.containsValue.

Doc from java.util.Map.containsValue.

Returns true if this map maps one or more keys to the specified value. More formally, returns true if and only if this map contains at least one mapping to a value v such that Objects.equals(value, v). This operation will probably require time linear in the map size for most implementations of the Map interface.

Parameters
value:Object

value whose presence in this map is to be tested

Returns:boolean

true if this map maps one or more keys to the specified value

Annotations
@Override
entrySetback to summary
public Set<Map.Entry<Long, String>> entrySet()

Implements java.util.Map.entrySet.

Doc from java.util.Map.entrySet.

Returns a Set view of the mappings contained in this map. The set is backed by the map, so changes to the map are reflected in the set, and vice-versa. If the map is modified while an iteration over the set is in progress (except through the iterator's own remove operation, or through the setValue operation on a map entry returned by the iterator) the results of the iteration are undefined. The set supports element removal, which removes the corresponding mapping from the map, via the Iterator.remove, Set.remove, removeAll, retainAll and clear operations. It does not support the add or addAll operations.

Returns:Set<Map.Entry<Long, String>>

a set view of the mappings contained in this map

Annotations
@Override
getback to summary
public String get(Object key)

Implements java.util.Map.get.

Doc from java.util.Map.get.

Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.

More formally, if this map contains a mapping from a key k to a value v such that Objects.equals(key, k), then this method returns v; otherwise it returns null. (There can be at most one such mapping.)

If this map permits null values, then a return value of null does not necessarily indicate that the map contains no mapping for the key; it's also possible that the map explicitly maps the key to null. The containsKey operation may be used to distinguish these two cases.

Parameters
key:Object

the key whose associated value is to be returned

Returns:String

the value to which the specified key is mapped, or null if this map contains no mapping for the key

Annotations
@Override
getDocumentSummaryInformationPropertiesback to summary
public static synchronized PropertyIDMap getDocumentSummaryInformationProperties()
Returns:PropertyIDMap

The Document Summary Information properties singleton.

getFallbackPropertiesback to summary
public static synchronized PropertyIDMap getFallbackProperties()

Returns a property map, which is only used as a fallback, i.e. if available, the correct map for DocumentSummaryInformation or SummaryInformation should be used.

Returns:PropertyIDMap

the resulting property map

getSummaryInformationPropertiesback to summary
public static synchronized PropertyIDMap getSummaryInformationProperties()
Returns:PropertyIDMap

the Summary Information properties singleton

isEmptyback to summary
public boolean isEmpty()

Implements java.util.Map.isEmpty.

Doc from java.util.Map.isEmpty.

Returns true if this map contains no key-value mappings.

Returns:boolean

true if this map contains no key-value mappings

Annotations
@Override
keySetback to summary
public Set<Long> keySet()

Implements java.util.Map.keySet.

Doc from java.util.Map.keySet.

Returns a Set view of the keys contained in this map. The set is backed by the map, so changes to the map are reflected in the set, and vice-versa. If the map is modified while an iteration over the set is in progress (except through the iterator's own remove operation), the results of the iteration are undefined. The set supports element removal, which removes the corresponding mapping from the map, via the Iterator.remove, Set.remove, removeAll, retainAll, and clear operations. It does not support the add or addAll operations.

Returns:Set<Long>

a set view of the keys contained in this map

Annotations
@Override
mainback to summary
public static void main(final String[] args)

For the most basic testing.

Parameters
args:String[]

The command-line arguments

putback to summary
public String put(Long key, String value)

Implements java.util.Map.put.

Doc from java.util.Map.put.

Associates the specified value with the specified key in this map (optional operation). If the map previously contained a mapping for the key, the old value is replaced by the specified value. (A map m is said to contain a mapping for a key k if and only if m.containsKey(k) would return true.)

Parameters
key:Long

key with which the specified value is to be associated

value:String

value to be associated with the specified key

Returns:String

the previous value associated with key, or null if there was no mapping for key. (A null return can also indicate that the map previously associated null with key, if the implementation supports null values.)

Annotations
@Override
putAllback to summary
public void putAll(Map<? extends Long, ? extends String> m)

Implements java.util.Map.putAll.

Doc from java.util.Map.putAll.

Copies all of the mappings from the specified map to this map (optional operation). The effect of this call is equivalent to that of calling put(k, v) on this map once for each mapping from key k to value v in the specified map. The behavior of this operation is undefined if the specified map is modified while the operation is in progress. If the specified map has a defined encounter order, processing of its mappings generally occurs in that order.

Parameters
m:Map<? extends Long, ? extends String>

mappings to be stored in this map

Annotations
@Override
removeback to summary
public String remove(Object key)

Implements java.util.Map.remove.

Doc from java.util.Map.remove.

Removes the mapping for a key from this map if it is present (optional operation). More formally, if this map contains a mapping from key k to value v such that Objects.equals(key, k), that mapping is removed. (The map can contain at most one such mapping.)

Returns the value to which this map previously associated the key, or null if the map contained no mapping for the key.

If this map permits null values, then a return value of null does not necessarily indicate that the map contained no mapping for the key; it's also possible that the map explicitly mapped the key to null.

The map will not contain a mapping for the specified key once the call returns.

Parameters
key:Object

key whose mapping is to be removed from the map

Returns:String

the previous value associated with key, or null if there was no mapping for key.

Annotations
@Override
sizeback to summary
public int size()

Implements java.util.Map.size.

Doc from java.util.Map.size.

Returns the number of key-value mappings in this map. If the map contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Returns:int

the number of key-value mappings in this map

Annotations
@Override
valuesback to summary
public Collection<String> values()

Implements java.util.Map.values.

Doc from java.util.Map.values.

Returns a Collection view of the values contained in this map. The collection is backed by the map, so changes to the map are reflected in the collection, and vice-versa. If the map is modified while an iteration over the collection is in progress (except through the iterator's own remove operation), the results of the iteration are undefined. The collection supports element removal, which removes the corresponding mapping from the map, via the Iterator.remove, Collection.remove, removeAll, retainAll and clear operations. It does not support the add or addAll operations.

Returns:Collection<String>

a collection view of the values contained in this map

Annotations
@Override