FileDocCategorySizeDatePackage
PropertyIDMap.javaAPI DocApache Poi 3.0.112783Mon Jan 01 12:39:34 GMT 2007org.apache.poi.hpsf.wellknown

PropertyIDMap

public class PropertyIDMap extends HashMap

This is a dictionary which maps property ID values to property ID strings.

The methods {@link #getSummaryInformationProperties} and {@link #getDocumentSummaryInformationProperties} return singleton {@link PropertyIDMap}s. An application that wants to extend these maps should treat them as unmodifiable, copy them and modifiy the copies.

author
Rainer Klute <klute@rainer-klute.de>
version
$Id: PropertyIDMap.java 489730 2006-12-22 19:18:16Z bayard $
since
2002-02-09

Fields Summary
public static final int
PID_TITLE

ID of the property that denotes the document's title

public static final int
PID_SUBJECT

ID of the property that denotes the document's subject

public static final int
PID_AUTHOR

ID of the property that denotes the document's author

public static final int
PID_KEYWORDS

ID of the property that denotes the document's keywords

public static final int
PID_COMMENTS

ID of the property that denotes the document's comments

public static final int
PID_TEMPLATE

ID of the property that denotes the document's template

public static final int
PID_LASTAUTHOR

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

public static final int
PID_REVNUMBER

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

public static final int
PID_EDITTIME

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

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_CREATE_DTM

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

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_PAGECOUNT

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

public static final int
PID_WORDCOUNT

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

public static final int
PID_CHARCOUNT

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

public static final int
PID_THUMBNAIL

ID of the property that denotes the document's thumbnail

public static final int
PID_APPNAME

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

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:

Value

Description

0

No restriction

2

Read-only recommended

4

Read-only enforced

public static final int
PID_DICTIONARY

The entry is a dictionary.

public static final int
PID_CODEPAGE

The entry denotes a code page.

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_PRESFORMAT

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

public static final int
PID_BYTECOUNT

Number of bytes.

public static final int
PID_LINECOUNT

Number of lines.

public static final int
PID_PARCOUNT

Number of paragraphs.

public static final int
PID_SLIDECOUNT

Number of slides in a power point presentation.

public static final int
PID_NOTECOUNT

Number of slides with notes.

public static final int
PID_HIDDENCOUNT

Number of hidden slides.

public static final int
PID_MMCLIPCOUNT

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

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.

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.

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_MANAGER

This entry contains the name of the project manager.

public static final int
PID_COMPANY

This entry contains the company name.

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_MAX

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

private static PropertyIDMap
summaryInformationProperties

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

private static PropertyIDMap
documentSummaryInformationProperties

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

Constructors Summary
public PropertyIDMap(int initialCapacity, float loadFactor)

Creates a {@link PropertyIDMap}.

param
initialCapacity The initial capacity as defined for {@link HashMap}
param
loadFactor The load factor as defined for {@link HashMap}




                                  
          
    
        super(initialCapacity, loadFactor);
    
public PropertyIDMap(Map map)

Creates a {@link PropertyIDMap} backed by another map.

param
map The instance to be created is backed by this map.

        super(map);
    
Methods Summary
public java.lang.Objectget(long id)

Gets the ID string for an ID from the {@link PropertyIDMap}.

param
id The ID.
return
The ID string associated with id.

        return get(new Long(id));
    
public static org.apache.poi.hpsf.wellknown.PropertyIDMapgetDocumentSummaryInformationProperties()

Returns the Document Summary Information properties singleton.

return
The Document Summary Information properties singleton.

        if (documentSummaryInformationProperties == null)
        {
            PropertyIDMap m = new PropertyIDMap(17, (float) 1.0);
            m.put(PID_DICTIONARY, "PID_DICTIONARY");
            m.put(PID_CODEPAGE, "PID_CODEPAGE");
            m.put(PID_CATEGORY, "PID_CATEGORY");
            m.put(PID_PRESFORMAT, "PID_PRESFORMAT");
            m.put(PID_BYTECOUNT, "PID_BYTECOUNT");
            m.put(PID_LINECOUNT, "PID_LINECOUNT");
            m.put(PID_PARCOUNT, "PID_PARCOUNT");
            m.put(PID_SLIDECOUNT, "PID_SLIDECOUNT");
            m.put(PID_NOTECOUNT, "PID_NOTECOUNT");
            m.put(PID_HIDDENCOUNT, "PID_HIDDENCOUNT");
            m.put(PID_MMCLIPCOUNT, "PID_MMCLIPCOUNT");
            m.put(PID_SCALE, "PID_SCALE");
            m.put(PID_HEADINGPAIR, "PID_HEADINGPAIR");
            m.put(PID_DOCPARTS, "PID_DOCPARTS");
            m.put(PID_MANAGER, "PID_MANAGER");
            m.put(PID_COMPANY, "PID_COMPANY");
            m.put(PID_LINKSDIRTY, "PID_LINKSDIRTY");
            documentSummaryInformationProperties =
                new PropertyIDMap(Collections.unmodifiableMap(m));
        }
        return documentSummaryInformationProperties;
    
public static org.apache.poi.hpsf.wellknown.PropertyIDMapgetSummaryInformationProperties()

return
the Summary Information properties singleton

        if (summaryInformationProperties == null)
        {
            PropertyIDMap m = new PropertyIDMap(18, (float) 1.0);
            m.put(PID_TITLE, "PID_TITLE");
            m.put(PID_SUBJECT, "PID_SUBJECT");
            m.put(PID_AUTHOR, "PID_AUTHOR");
            m.put(PID_KEYWORDS, "PID_KEYWORDS");
            m.put(PID_COMMENTS, "PID_COMMENTS");
            m.put(PID_TEMPLATE, "PID_TEMPLATE");
            m.put(PID_LASTAUTHOR, "PID_LASTAUTHOR");
            m.put(PID_REVNUMBER, "PID_REVNUMBER");
            m.put(PID_EDITTIME, "PID_EDITTIME");
            m.put(PID_LASTPRINTED, "PID_LASTPRINTED");
            m.put(PID_CREATE_DTM, "PID_CREATE_DTM");
            m.put(PID_LASTSAVE_DTM, "PID_LASTSAVE_DTM");
            m.put(PID_PAGECOUNT, "PID_PAGECOUNT");
            m.put(PID_WORDCOUNT, "PID_WORDCOUNT");
            m.put(PID_CHARCOUNT, "PID_CHARCOUNT");
            m.put(PID_THUMBNAIL, "PID_THUMBNAIL");
            m.put(PID_APPNAME, "PID_APPNAME");
            m.put(PID_SECURITY, "PID_SECURITY");
            summaryInformationProperties =
                new PropertyIDMap(Collections.unmodifiableMap(m));
        }
        return summaryInformationProperties;
    
public static voidmain(java.lang.String[] args)

For the most basic testing.

param
args The command-line arguments

        PropertyIDMap s1 = getSummaryInformationProperties();
        PropertyIDMap s2 = getDocumentSummaryInformationProperties();
        System.out.println("s1: " + s1);
        System.out.println("s2: " + s2);
    
public java.lang.Objectput(long id, java.lang.String idString)

Puts a ID string for an ID into the {@link PropertyIDMap}.

param
id The ID.
param
idString The ID string.
return
As specified by the {@link java.util.Map} interface, this method returns the previous value associated with the specified id, or null if there was no mapping for key.

        return put(new Long(id), idString);