]> source.dussan.org Git - poi.git/commitdiff
reindent code - prepare for cleanups
authorAndreas Beeker <kiwiwings@apache.org>
Sat, 10 Dec 2016 23:35:12 +0000 (23:35 +0000)
committerAndreas Beeker <kiwiwings@apache.org>
Sat, 10 Dec 2016 23:35:12 +0000 (23:35 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1773544 13f79535-47bb-0310-9956-ffa450edef68

18 files changed:
src/scratchpad/src/org/apache/poi/hsmf/datatypes/AttachmentChunks.java
src/scratchpad/src/org/apache/poi/hsmf/datatypes/ByteChunk.java
src/scratchpad/src/org/apache/poi/hsmf/datatypes/Chunk.java
src/scratchpad/src/org/apache/poi/hsmf/datatypes/ChunkBasedPropertyValue.java
src/scratchpad/src/org/apache/poi/hsmf/datatypes/ChunkGroup.java
src/scratchpad/src/org/apache/poi/hsmf/datatypes/ChunkGroupWithProperties.java
src/scratchpad/src/org/apache/poi/hsmf/datatypes/Chunks.java
src/scratchpad/src/org/apache/poi/hsmf/datatypes/DirectoryChunk.java
src/scratchpad/src/org/apache/poi/hsmf/datatypes/MAPIProperty.java
src/scratchpad/src/org/apache/poi/hsmf/datatypes/MessagePropertiesChunk.java
src/scratchpad/src/org/apache/poi/hsmf/datatypes/MessageSubmissionChunk.java
src/scratchpad/src/org/apache/poi/hsmf/datatypes/NameIdChunks.java
src/scratchpad/src/org/apache/poi/hsmf/datatypes/PropertiesChunk.java
src/scratchpad/src/org/apache/poi/hsmf/datatypes/PropertyValue.java
src/scratchpad/src/org/apache/poi/hsmf/datatypes/RecipientChunks.java
src/scratchpad/src/org/apache/poi/hsmf/datatypes/StoragePropertiesChunk.java
src/scratchpad/src/org/apache/poi/hsmf/datatypes/StringChunk.java
src/scratchpad/src/org/apache/poi/hsmf/datatypes/Types.java

index 51adf8f747a41a54efe59f62bf59154530158546..dc6ea58b8e5455d98881eb53c4b90815a238eb80 100644 (file)
@@ -34,134 +34,132 @@ import org.apache.poi.util.POILogFactory;
 import org.apache.poi.util.POILogger;
 
 /**
- * Collection of convenience chunks for standard parts of the MSG file attachment.
+ * Collection of convenience chunks for standard parts of the MSG file
+ * attachment.
  */
 public class AttachmentChunks implements ChunkGroup {
-   private static POILogger logger = POILogFactory.getLogger(AttachmentChunks.class);
-   public static final String PREFIX = "__attach_version1.0_#";
-   
-   public ByteChunk attachData;
-   public StringChunk attachExtension;
-   public StringChunk attachFileName;
-   public StringChunk attachLongFileName;
-   public StringChunk attachMimeTag;
-   public DirectoryChunk attachmentDirectory;
-   
-   /** 
-    * This is in WMF Format. You'll probably want to pass it
-    *  to Apache Batik to turn it into a SVG that you can
-    *  then display. 
-    */
-   public ByteChunk attachRenderingWMF;
-   
-   /**
-    * What the POIFS name of this attachment is.
-    */
-   private String poifsName;
-
-   /** Holds all the chunks that were found. */
-   private List<Chunk> allChunks = new ArrayList<Chunk>();
-
-   
-   public AttachmentChunks(String poifsName) {
-      this.poifsName = poifsName;
-   }
-   
-   
-   /**
-    * Is this Attachment an embedded MAPI message?
-    */
-   public boolean isEmbeddedMessage() {
-      return (attachmentDirectory != null);
-   }
-   /**
-    * Returns the embedded MAPI message, if the attachment
-    *  is an embedded message, or null otherwise
-    */
-   public MAPIMessage getEmbeddedMessage() throws IOException {
-      if (attachmentDirectory != null) {
-         return attachmentDirectory.getAsEmbededMessage();
-      }
-      return null;
-   }
-   
-   /**
-    * Returns the embedded object, if the attachment is an
-    *  object based embedding (image, document etc), or null
-    *  if it's an embedded message
-    */
-   public byte[] getEmbeddedAttachmentObject() {
-      if (attachData != null) {
-         return attachData.getValue();
-      }
-      return null;
-   }
-   
-   public Chunk[] getAll() {
-      return allChunks.toArray(new Chunk[allChunks.size()]);
-   }
-   public Chunk[] getChunks() {
-      return getAll();
-   }
-   
-   public String getPOIFSName() {
-      return poifsName;
-   }
-   
-   /**
-    * Called by the parser whenever a chunk is found.
-    */
-   public void record(Chunk chunk) {
-      // TODO: add further members for other properties like:
-      // - ATTACH_ADDITIONAL_INFO
-      // - ATTACH_CONTENT_BASE
-      // - ATTACH_CONTENT_LOCATION
-      // - ATTACH_DISPOSITION
-      // - ATTACH_ENCODING
-      // - ATTACH_FLAGS
-      // - ATTACH_LONG_PATHNAME
-      // - ATTACH_SIZE
-      final int chunkId = chunk.getChunkId();
-      if (chunkId == ATTACH_DATA.id) {
-         if(chunk instanceof ByteChunk) {
-             attachData = (ByteChunk)chunk;
-         } else if(chunk instanceof DirectoryChunk) {
-             attachmentDirectory = (DirectoryChunk)chunk;
-         } else {
-                logger.log(POILogger.ERROR, "Unexpected data chunk of type " + chunk);
-         }
-      } else if(chunkId == ATTACH_EXTENSION.id) {
-         attachExtension = (StringChunk)chunk;
-      } else if(chunkId == ATTACH_FILENAME.id) {
-         attachFileName = (StringChunk)chunk;
-      } else if(chunkId == ATTACH_LONG_FILENAME.id) {
-         attachLongFileName = (StringChunk)chunk;
-      } else if(chunkId == ATTACH_MIME_TAG.id) {
-         attachMimeTag = (StringChunk)chunk;
-      } else if(chunkId == ATTACH_RENDERING.id) {
-         attachRenderingWMF = (ByteChunk)chunk;
-      }
-
-      // And add to the main list
-      allChunks.add(chunk);
-   }
-
-   /**
-    * Used to flag that all the chunks of the attachment
-    *  have now been located.
-    */
-   public void chunksComplete() {
-      // Currently, we don't need to do anything special once
-      //  all the chunks have been located
-   }
-
-
-   /**
-    * Orders by the attachment number.
-    */
-   public static class AttachmentChunksSorter implements Comparator<AttachmentChunks>, Serializable {
-      public int compare(AttachmentChunks a, AttachmentChunks b) {
-         return a.poifsName.compareTo(b.poifsName);
-      }
-   }
+    private static POILogger logger = POILogFactory.getLogger(AttachmentChunks.class);
+    public static final String PREFIX = "__attach_version1.0_#";
+
+    public ByteChunk attachData;
+    public StringChunk attachExtension;
+    public StringChunk attachFileName;
+    public StringChunk attachLongFileName;
+    public StringChunk attachMimeTag;
+    public DirectoryChunk attachmentDirectory;
+
+    /**
+     * This is in WMF Format. You'll probably want to pass it to Apache Batik to
+     * turn it into a SVG that you can then display.
+     */
+    public ByteChunk attachRenderingWMF;
+
+    /**
+     * What the POIFS name of this attachment is.
+     */
+    private String poifsName;
+
+    /** Holds all the chunks that were found. */
+    private List<Chunk> allChunks = new ArrayList<Chunk>();
+
+    public AttachmentChunks(String poifsName) {
+        this.poifsName = poifsName;
+    }
+
+    /**
+     * Is this Attachment an embedded MAPI message?
+     */
+    public boolean isEmbeddedMessage() {
+        return (attachmentDirectory != null);
+    }
+
+    /**
+     * Returns the embedded MAPI message, if the attachment is an embedded
+     * message, or null otherwise
+     */
+    public MAPIMessage getEmbeddedMessage() throws IOException {
+        if (attachmentDirectory != null) {
+            return attachmentDirectory.getAsEmbededMessage();
+        }
+        return null;
+    }
+
+    /**
+     * Returns the embedded object, if the attachment is an object based
+     * embedding (image, document etc), or null if it's an embedded message
+     */
+    public byte[] getEmbeddedAttachmentObject() {
+        if (attachData != null) {
+            return attachData.getValue();
+        }
+        return null;
+    }
+
+    public Chunk[] getAll() {
+        return allChunks.toArray(new Chunk[allChunks.size()]);
+    }
+
+    public Chunk[] getChunks() {
+        return getAll();
+    }
+
+    public String getPOIFSName() {
+        return poifsName;
+    }
+
+    /**
+     * Called by the parser whenever a chunk is found.
+     */
+    public void record(Chunk chunk) {
+        // TODO: add further members for other properties like:
+        // - ATTACH_ADDITIONAL_INFO
+        // - ATTACH_CONTENT_BASE
+        // - ATTACH_CONTENT_LOCATION
+        // - ATTACH_DISPOSITION
+        // - ATTACH_ENCODING
+        // - ATTACH_FLAGS
+        // - ATTACH_LONG_PATHNAME
+        // - ATTACH_SIZE
+        final int chunkId = chunk.getChunkId();
+        if (chunkId == ATTACH_DATA.id) {
+            if (chunk instanceof ByteChunk) {
+                attachData = (ByteChunk) chunk;
+            } else if (chunk instanceof DirectoryChunk) {
+                attachmentDirectory = (DirectoryChunk) chunk;
+            } else {
+                logger.log(POILogger.ERROR, "Unexpected data chunk of type " + chunk);
+            }
+        } else if (chunkId == ATTACH_EXTENSION.id) {
+            attachExtension = (StringChunk) chunk;
+        } else if (chunkId == ATTACH_FILENAME.id) {
+            attachFileName = (StringChunk) chunk;
+        } else if (chunkId == ATTACH_LONG_FILENAME.id) {
+            attachLongFileName = (StringChunk) chunk;
+        } else if (chunkId == ATTACH_MIME_TAG.id) {
+            attachMimeTag = (StringChunk) chunk;
+        } else if (chunkId == ATTACH_RENDERING.id) {
+            attachRenderingWMF = (ByteChunk) chunk;
+        }
+
+        // And add to the main list
+        allChunks.add(chunk);
+    }
+
+    /**
+     * Used to flag that all the chunks of the attachment have now been located.
+     */
+    public void chunksComplete() {
+        // Currently, we don't need to do anything special once
+        // all the chunks have been located
+    }
+
+    /**
+     * Orders by the attachment number.
+     */
+    public static class AttachmentChunksSorter
+            implements Comparator<AttachmentChunks>, Serializable {
+        public int compare(AttachmentChunks a, AttachmentChunks b) {
+            return a.poifsName.compareTo(b.poifsName);
+        }
+    }
 }
index 25a525ab60b868fb3fe93739451eb5fa07f09d2f..ef0bdaf9a2dce44bd8be0f9f0dd2082ca97d9839 100644 (file)
@@ -24,89 +24,87 @@ import org.apache.poi.hsmf.datatypes.Types.MAPIType;
 import org.apache.poi.util.IOUtils;
 
 /**
- * A Chunk that holds binary data, normally unparsed.
- * Generally as we know how to make sense of the
- *  contents, we create a new Chunk class and add
- *  a special case in the parser for them.
+ * A Chunk that holds binary data, normally unparsed. Generally as we know how
+ * to make sense of the contents, we create a new Chunk class and add a special
+ * case in the parser for them.
  */
 
 public class ByteChunk extends Chunk {
-   private byte[] value;
-
-   /**
-    * Creates a Byte Chunk.
-    */
-   public ByteChunk(String namePrefix, int chunkId, MAPIType type) {
-      super(namePrefix, chunkId, type);
-   }
-   /**
-    * Create a Byte Chunk, with the specified
-    *  type.
-    */
-   public ByteChunk(int chunkId, MAPIType type) {
-      super(chunkId, type);
-   }
-
-   public void readValue(InputStream value) throws IOException {
-      this.value = IOUtils.toByteArray(value);
-   }
-
-   public void writeValue(OutputStream out) throws IOException {
-      out.write(value);
-   }
-
-   public byte[] getValue() {
-      return value;
-   }
-   public void setValue(byte[] value) {
-      this.value = value;
-   }
-   
-   /**
-    * Returns the data in a debug-friendly string format
-    */
-   public String toString() {
-       return toDebugFriendlyString(value);
-   }
-   
-   /**
-    * Formats the byte array in a debug-friendly way,
-    *  showing all of a short array, and the start of a 
-    *  longer one.
-    */
-   protected static String toDebugFriendlyString(byte[] value) {
-      if (value == null)
-         return "(Null Byte Array)";
-          
-      StringBuffer text = new StringBuffer();
-      text.append("Bytes len=").append(value.length);
-      text.append(" [");
-      
-      int limit = Math.min(value.length, 16);
-      if (value.length > 16) {
-          limit = 12;
-      }
-      for (int i=0; i<limit; i++) {
-          if (i > 0)
-              text.append(',');
-          text.append(value[i]);
-      }
-      if (value.length > 16) {
-          text.append(",....");
-      }
-      text.append("]");
-      return text.toString();
-   }
-   
-   /**
-    * Returns the data, formatted as a string assuming it
-    *  was a non-unicode string.
-    * If your data isn't in fact stored as basically
-    *  ASCII, don't expect this to return much of any
-    *  sense.... 
-    * @return  the data formatted as a string
-    */
-   public String getAs7bitString() {
-      return StringChunk.parseAs7BitData(value);
-   }
+    private byte[] value;
+
+    /**
+     * Creates a Byte Chunk.
+     */
+    public ByteChunk(String namePrefix, int chunkId, MAPIType type) {
+        super(namePrefix, chunkId, type);
+    }
+
+    /**
+     * Create a Byte Chunk, with the specified type.
+     */
+    public ByteChunk(int chunkId, MAPIType type) {
+        super(chunkId, type);
+    }
+
+    public void readValue(InputStream value) throws IOException {
+        this.value = IOUtils.toByteArray(value);
+    }
+
+    public void writeValue(OutputStream out) throws IOException {
+        out.write(value);
+    }
+
+    public byte[] getValue() {
+        return value;
+    }
+
+    public void setValue(byte[] value) {
+        this.value = value;
+    }
+
+    /**
+     * Returns the data in a debug-friendly string format
+     */
+    public String toString() {
+        return toDebugFriendlyString(value);
+    }
+
+    /**
+     * Formats the byte array in a debug-friendly way, showing all of a short
+     * array, and the start of a longer one.
+     */
+    protected static String toDebugFriendlyString(byte[] value) {
+        if (value == null)
+            return "(Null Byte Array)";
+
+        StringBuffer text = new StringBuffer();
+        text.append("Bytes len=").append(value.length);
+        text.append(" [");
+
+        int limit = Math.min(value.length, 16);
+        if (value.length > 16) {
+            limit = 12;
+        }
+        for (int i = 0; i < limit; i++) {
+            if (i > 0)
+                text.append(',');
+            text.append(value[i]);
+        }
+        if (value.length > 16) {
+            text.append(",....");
+        }
+        text.append("]");
+        return text.toString();
+    }
+
+    /**
+     * Returns the data, formatted as a string assuming it was a non-unicode
+     * string. If your data isn't in fact stored as basically ASCII, don't
+     * expect this to return much of any sense....
+     * 
+     * @return the data formatted as a string
+     */
+    public String getAs7bitString() {
+        return StringChunk.parseAs7BitData(value);
+    }
 }
index b6ef90d5a812d0e1cffc24010e4af4175385f21f..1be119b6abf07c3fe7613f9feff0bb63d33a41e9 100644 (file)
@@ -25,55 +25,59 @@ import java.util.Locale;
 import org.apache.poi.hsmf.datatypes.Types.MAPIType;
 
 public abstract class Chunk {
-   public static final String DEFAULT_NAME_PREFIX = "__substg1.0_";
-   
-   protected int chunkId;
-   protected MAPIType type;
-   protected String namePrefix;
-       
-   protected Chunk(String namePrefix, int chunkId, MAPIType type) {
-      this.namePrefix = namePrefix;
-      this.chunkId = chunkId;
-      this.type = type;
-   }
-   protected Chunk(int chunkId, MAPIType type) {
-       this(DEFAULT_NAME_PREFIX, chunkId, type);
-   }
-
-   /**
-    * Gets the id of this chunk
-    */
-   public int getChunkId() {
-       return this.chunkId;
-   }
-
-   /**
-    * Gets the numeric type of this chunk.
-    */
-   public MAPIType getType() {
-       return this.type;
-   }
-
-   /**
-    * Creates a string to use to identify this chunk in the POI file system object.
-    */
-   public String getEntryName() {
-       String type = this.type.asFileEnding();
-
-       String chunkId = Integer.toHexString(this.chunkId);
-       while(chunkId.length() < 4) chunkId = "0" + chunkId;
-
-       return this.namePrefix + chunkId.toUpperCase(Locale.ROOT)
-              + type.toUpperCase(Locale.ROOT);
-   }
-
-   /**
-    * Writes the value of this chunk back out again.
-    */
-   public abstract void writeValue(OutputStream out) throws IOException;
-
-   /**
-    * Reads the value of this chunk using an InputStream
-    */
-   public abstract void readValue(InputStream value) throws IOException;
+    public static final String DEFAULT_NAME_PREFIX = "__substg1.0_";
+
+    protected int chunkId;
+    protected MAPIType type;
+    protected String namePrefix;
+
+    protected Chunk(String namePrefix, int chunkId, MAPIType type) {
+        this.namePrefix = namePrefix;
+        this.chunkId = chunkId;
+        this.type = type;
+    }
+
+    protected Chunk(int chunkId, MAPIType type) {
+        this(DEFAULT_NAME_PREFIX, chunkId, type);
+    }
+
+    /**
+     * Gets the id of this chunk
+     */
+    public int getChunkId() {
+        return this.chunkId;
+    }
+
+    /**
+     * Gets the numeric type of this chunk.
+     */
+    public MAPIType getType() {
+        return this.type;
+    }
+
+    /**
+     * Creates a string to use to identify this chunk in the POI file system
+     * object.
+     */
+    public String getEntryName() {
+        String type = this.type.asFileEnding();
+
+        String chunkId = Integer.toHexString(this.chunkId);
+        while (chunkId.length() < 4)
+            chunkId = "0" + chunkId;
+
+        return this.namePrefix
+            + chunkId.toUpperCase(Locale.ROOT)
+            + type.toUpperCase(Locale.ROOT);
+    }
+
+    /**
+     * Writes the value of this chunk back out again.
+     */
+    public abstract void writeValue(OutputStream out) throws IOException;
+
+    /**
+     * Reads the value of this chunk using an InputStream
+     */
+    public abstract void readValue(InputStream value) throws IOException;
 }
index 36c723bdf79c3b5380c518515f2834827c1a4f4d..323065592f66ab4d9d8da3072a851ba8cdb51f6f 100644 (file)
 
 package org.apache.poi.hsmf.datatypes;
 
-
 /**
- * A variable length {@link PropertyValue} that is
- *  backed by a {@link Chunk}
+ * A variable length {@link PropertyValue} that is backed by a {@link Chunk}
  * TODO Provide a way to link these up with the chunks
  */
 public class ChunkBasedPropertyValue extends PropertyValue {
-   public ChunkBasedPropertyValue(MAPIProperty property, long flags, byte[] offsetData) {
-      super(property, flags, offsetData);
-   }
+    public ChunkBasedPropertyValue(MAPIProperty property, long flags, byte[] offsetData) {
+        super(property, flags, offsetData);
+    }
+
+    @Override
+    public Chunk getValue() {
+        // TODO Decode the value into an offset
+        // TODO Look up the chunk based on that
+        return null;
+    }
 
-   @Override
-   public Chunk getValue() {
-      // TODO Decode the value into an offset
-      // TODO Look up the chunk based on that
-      return null;
-   }
-   
-   /**
-    * Stores the offset of the chunk as the property value
-    */
-   public void setValue(Chunk chunk) {
-      // TODO
-   }
+    /**
+     * Stores the offset of the chunk as the property value
+     */
+    public void setValue(Chunk chunk) {
+        // TODO
+    }
 }
index 0bd7dc0af18281f4ba1f067c6368594cc43d9a5e..273950b28cc4a4c009bfcb2591baef60e9b08e70 100644 (file)
 package org.apache.poi.hsmf.datatypes;
 
 /**
- * A group of chunks, that are at the same point in the
- *  file structure.
+ * A group of chunks, that are at the same point in the file structure.
  */
 public interface ChunkGroup {
-   /**
-    * Returns the chunks that make up the group.
-    * Should certainly contain all the interesting Chunks,
-    *  but needn't always contain all of the Chunks.
-    */
+    /**
+     * Returns the chunks that make up the group. Should certainly contain all
+     * the interesting Chunks, but needn't always contain all of the Chunks.
+     */
     public Chunk[] getChunks();
 
     /**
index 3d99ea345397997317ea292a4aebdf136f1f48bb..e29d01b804d3747e3205e61216cbce67f177bc00 100644 (file)
@@ -21,18 +21,15 @@ import java.util.List;
 import java.util.Map;
 
 /**
- * A group of chunks which is indexable by {@link MAPIProperty}
- *  entries.
+ * A group of chunks which is indexable by {@link MAPIProperty} entries.
  */
 public interface ChunkGroupWithProperties extends ChunkGroup {
-   /**
-    * Returns all the Properties contained in the Chunk, along
-    *  with their Values.
-    * Normally, each property will have one value, sometimes
-    *  none, and rarely multiple (normally for Unknown etc).
-    * For fixed sized properties, the value can be fetched 
-    *  straight from the {@link PropertyValue}. For variable
-    *  sized properties, you'll need to go via the chunk.
-    */
-   public Map<MAPIProperty,List<PropertyValue>> getProperties();
+    /**
+     * Returns all the Properties contained in the Chunk, along with their
+     * Values. Normally, each property will have one value, sometimes none, and
+     * rarely multiple (normally for Unknown etc). For fixed sized properties,
+     * the value can be fetched straight from the {@link PropertyValue}. For
+     * variable sized properties, you'll need to go via the chunk.
+     */
+    public Map<MAPIProperty, List<PropertyValue>> getProperties();
 }
index 19165a013d533df34bd79446e2f9e8f0b35de048..fa40797acbcc4321bd140ef5b1bcd48f1218df1c 100644 (file)
@@ -26,169 +26,158 @@ import java.util.Map;
 import org.apache.poi.util.POILogFactory;
 import org.apache.poi.util.POILogger;
 
-
 /**
  * Collection of convenience chunks for standard parts of the MSG file.
  * 
  * Not all of these will be present in any given file.
  * 
  * A partial list is available at:
- *  http://msdn.microsoft.com/en-us/library/ms526356%28v=exchg.10%29.aspx
- *  
+ * http://msdn.microsoft.com/en-us/library/ms526356%28v=exchg.10%29.aspx
+ * 
  * TODO Deprecate the public Chunks in favour of Property Lookups
  */
 public final class Chunks implements ChunkGroupWithProperties {
-   private static POILogger logger = POILogFactory.getLogger(Chunks.class);
-
-   /** 
-    * Holds all the chunks that were found, indexed by their MAPIProperty.
-    * Normally a property will have zero chunks (fixed sized) or one chunk 
-    *  (variable size), but in some cases (eg Unknown) you may get more.
-    */
-   private Map<MAPIProperty,List<Chunk>> allChunks = new HashMap<MAPIProperty,List<Chunk>>();
-   
-   /** Type of message that the MSG represents (ie. IPM.Note) */
-   public StringChunk messageClass;
-   /** BODY Chunk, for plain/text messages */
-   public StringChunk textBodyChunk;
-   /** BODY Html Chunk, for html messages */
-   public StringChunk htmlBodyChunkString;
-   public ByteChunk htmlBodyChunkBinary;
-   /** BODY Rtf Chunk, for Rtf (Rich) messages */
-   public ByteChunk rtfBodyChunk;
-   /** Subject link chunk, in plain/text */
-   public StringChunk subjectChunk;
-   /** 
-    * Value that is in the TO field (not actually the addresses as they are 
-    * stored in recip directory nodes 
-    */
-   public StringChunk displayToChunk;
-   /** Value that is in the FROM field */
-   public StringChunk displayFromChunk;
-   /** value that shows in the CC field */
-   public StringChunk displayCCChunk;
-   /** Value that shows in the BCC field */
-   public StringChunk displayBCCChunk;
-   /** Sort of like the subject line, but without the RE: and FWD: parts. */
-   public StringChunk conversationTopic;
-   /** Type of server that the message originated from (SMTP, etc). */
-   public StringChunk sentByServerType;
-   /** The email headers */
-   public StringChunk messageHeaders;
-   /** TODO */
-   public MessageSubmissionChunk submissionChunk; 
-   /** TODO */
-   public StringChunk emailFromChunk; 
-   /** The message ID */
-   public StringChunk messageId;
-   /** The message properties */
-   private MessagePropertiesChunk messageProperties;
-
-   public Map<MAPIProperty,List<PropertyValue>> getProperties() {
-      if (messageProperties != null) {
-         return messageProperties.getProperties();
-      }
-      else return Collections.emptyMap();
-   }
-   public Map<MAPIProperty, PropertyValue> getRawProperties() {
-      if (messageProperties != null) {
-         return messageProperties.getRawProperties();
-      }
-      else return Collections.emptyMap();
-   }
-   
-   public Map<MAPIProperty,List<Chunk>> getAll() {
-      return allChunks;
-   }
-   public Chunk[] getChunks() {
-      ArrayList<Chunk> chunks = new ArrayList<Chunk>(allChunks.size());
-      for (List<Chunk> c : allChunks.values()) {
-         chunks.addAll(c);
-      }
-      return chunks.toArray(new Chunk[chunks.size()]);
-   }
-       
-   /**
-    * Called by the parser whenever a chunk is found.
-    */
-   public void record(Chunk chunk) {
-      // Work out what MAPIProperty this corresponds to
-      MAPIProperty prop = MAPIProperty.get(chunk.getChunkId());
-      
-      // Assign it for easy lookup, as best we can
-      if(prop == MAPIProperty.MESSAGE_CLASS) {
-         messageClass = (StringChunk)chunk;
-      }
-      else if(prop == MAPIProperty.INTERNET_MESSAGE_ID) {
-         messageId = (StringChunk)chunk;
-      }
-      else if(prop == MAPIProperty.MESSAGE_SUBMISSION_ID) {
-         // TODO - parse
-         submissionChunk = (MessageSubmissionChunk)chunk;
-      }
-      else if(prop == MAPIProperty.RECEIVED_BY_ADDRTYPE) {
-         sentByServerType = (StringChunk)chunk;
-      }
-      else if(prop == MAPIProperty.TRANSPORT_MESSAGE_HEADERS) {
-         messageHeaders = (StringChunk)chunk;
-      }
-      
-      else if(prop == MAPIProperty.CONVERSATION_TOPIC) {
-         conversationTopic = (StringChunk)chunk;
-      }
-      else if(prop == MAPIProperty.SUBJECT) {
-         subjectChunk = (StringChunk)chunk;
-      }
-      else if(prop == MAPIProperty.ORIGINAL_SUBJECT) {
-         // TODO
-      }
-      
-      else if(prop == MAPIProperty.DISPLAY_TO) {
-         displayToChunk = (StringChunk)chunk;
-      }
-      else if(prop == MAPIProperty.DISPLAY_CC) {
-         displayCCChunk = (StringChunk)chunk;
-      }
-      else if(prop == MAPIProperty.DISPLAY_BCC) {
-         displayBCCChunk = (StringChunk)chunk;
-      }
-      
-      else if(prop == MAPIProperty.SENDER_EMAIL_ADDRESS) {
-         emailFromChunk = (StringChunk)chunk;
-      }
-      else if(prop == MAPIProperty.SENDER_NAME) {
-         displayFromChunk = (StringChunk)chunk;
-      }
-      else if(prop == MAPIProperty.BODY) {
-         textBodyChunk = (StringChunk)chunk;
-      }
-      else if(prop == MAPIProperty.BODY_HTML) {
-         if(chunk instanceof StringChunk) {
-            htmlBodyChunkString = (StringChunk)chunk;
-         }
-         if(chunk instanceof ByteChunk) {
-            htmlBodyChunkBinary = (ByteChunk)chunk;
-         }
-      }
-      else if(prop == MAPIProperty.RTF_COMPRESSED) {
-         rtfBodyChunk = (ByteChunk)chunk;
-      }
-      else if(chunk instanceof MessagePropertiesChunk) {
-         messageProperties = (MessagePropertiesChunk) chunk;
-      }
-      
-      // And add to the main list
-      if (allChunks.get(prop) == null) {
-         allChunks.put(prop, new ArrayList<Chunk>());
-      }
-      allChunks.get(prop).add(chunk);
-   }
-   
-   public void chunksComplete() {
-      if (messageProperties != null) {
-         messageProperties.matchVariableSizedPropertiesToChunks();
-      } else {
-         logger.log(POILogger.WARN, "Message didn't contain a root list of properties!");
-      }
-   }
+    private static POILogger logger = POILogFactory.getLogger(Chunks.class);
+
+    /**
+     * Holds all the chunks that were found, indexed by their MAPIProperty.
+     * Normally a property will have zero chunks (fixed sized) or one chunk
+     * (variable size), but in some cases (eg Unknown) you may get more.
+     */
+    private Map<MAPIProperty, List<Chunk>> allChunks = new HashMap<MAPIProperty, List<Chunk>>();
+
+    /** Type of message that the MSG represents (ie. IPM.Note) */
+    public StringChunk messageClass;
+    /** BODY Chunk, for plain/text messages */
+    public StringChunk textBodyChunk;
+    /** BODY Html Chunk, for html messages */
+    public StringChunk htmlBodyChunkString;
+    public ByteChunk htmlBodyChunkBinary;
+    /** BODY Rtf Chunk, for Rtf (Rich) messages */
+    public ByteChunk rtfBodyChunk;
+    /** Subject link chunk, in plain/text */
+    public StringChunk subjectChunk;
+    /**
+     * Value that is in the TO field (not actually the addresses as they are
+     * stored in recip directory nodes
+     */
+    public StringChunk displayToChunk;
+    /** Value that is in the FROM field */
+    public StringChunk displayFromChunk;
+    /** value that shows in the CC field */
+    public StringChunk displayCCChunk;
+    /** Value that shows in the BCC field */
+    public StringChunk displayBCCChunk;
+    /** Sort of like the subject line, but without the RE: and FWD: parts. */
+    public StringChunk conversationTopic;
+    /** Type of server that the message originated from (SMTP, etc). */
+    public StringChunk sentByServerType;
+    /** The email headers */
+    public StringChunk messageHeaders;
+    /** TODO */
+    public MessageSubmissionChunk submissionChunk;
+    /** TODO */
+    public StringChunk emailFromChunk;
+    /** The message ID */
+    public StringChunk messageId;
+    /** The message properties */
+    private MessagePropertiesChunk messageProperties;
+
+    public Map<MAPIProperty, List<PropertyValue>> getProperties() {
+        if (messageProperties != null) {
+            return messageProperties.getProperties();
+        } else
+            return Collections.emptyMap();
+    }
+
+    public Map<MAPIProperty, PropertyValue> getRawProperties() {
+        if (messageProperties != null) {
+            return messageProperties.getRawProperties();
+        } else
+            return Collections.emptyMap();
+    }
+
+    public Map<MAPIProperty, List<Chunk>> getAll() {
+        return allChunks;
+    }
+
+    public Chunk[] getChunks() {
+        ArrayList<Chunk> chunks = new ArrayList<Chunk>(allChunks.size());
+        for (List<Chunk> c : allChunks.values()) {
+            chunks.addAll(c);
+        }
+        return chunks.toArray(new Chunk[chunks.size()]);
+    }
+
+    /**
+     * Called by the parser whenever a chunk is found.
+     */
+    public void record(Chunk chunk) {
+        // Work out what MAPIProperty this corresponds to
+        MAPIProperty prop = MAPIProperty.get(chunk.getChunkId());
+
+        // Assign it for easy lookup, as best we can
+        if (prop == MAPIProperty.MESSAGE_CLASS) {
+            messageClass = (StringChunk) chunk;
+        } else if (prop == MAPIProperty.INTERNET_MESSAGE_ID) {
+            messageId = (StringChunk) chunk;
+        } else if (prop == MAPIProperty.MESSAGE_SUBMISSION_ID) {
+            // TODO - parse
+            submissionChunk = (MessageSubmissionChunk) chunk;
+        } else if (prop == MAPIProperty.RECEIVED_BY_ADDRTYPE) {
+            sentByServerType = (StringChunk) chunk;
+        } else if (prop == MAPIProperty.TRANSPORT_MESSAGE_HEADERS) {
+            messageHeaders = (StringChunk) chunk;
+        }
+
+        else if (prop == MAPIProperty.CONVERSATION_TOPIC) {
+            conversationTopic = (StringChunk) chunk;
+        } else if (prop == MAPIProperty.SUBJECT) {
+            subjectChunk = (StringChunk) chunk;
+        } else if (prop == MAPIProperty.ORIGINAL_SUBJECT) {
+            // TODO
+        }
+
+        else if (prop == MAPIProperty.DISPLAY_TO) {
+            displayToChunk = (StringChunk) chunk;
+        } else if (prop == MAPIProperty.DISPLAY_CC) {
+            displayCCChunk = (StringChunk) chunk;
+        } else if (prop == MAPIProperty.DISPLAY_BCC) {
+            displayBCCChunk = (StringChunk) chunk;
+        }
+
+        else if (prop == MAPIProperty.SENDER_EMAIL_ADDRESS) {
+            emailFromChunk = (StringChunk) chunk;
+        } else if (prop == MAPIProperty.SENDER_NAME) {
+            displayFromChunk = (StringChunk) chunk;
+        } else if (prop == MAPIProperty.BODY) {
+            textBodyChunk = (StringChunk) chunk;
+        } else if (prop == MAPIProperty.BODY_HTML) {
+            if (chunk instanceof StringChunk) {
+                htmlBodyChunkString = (StringChunk) chunk;
+            }
+            if (chunk instanceof ByteChunk) {
+                htmlBodyChunkBinary = (ByteChunk) chunk;
+            }
+        } else if (prop == MAPIProperty.RTF_COMPRESSED) {
+            rtfBodyChunk = (ByteChunk) chunk;
+        } else if (chunk instanceof MessagePropertiesChunk) {
+            messageProperties = (MessagePropertiesChunk) chunk;
+        }
+
+        // And add to the main list
+        if (allChunks.get(prop) == null) {
+            allChunks.put(prop, new ArrayList<Chunk>());
+        }
+        allChunks.get(prop).add(chunk);
+    }
+
+    public void chunksComplete() {
+        if (messageProperties != null) {
+            messageProperties.matchVariableSizedPropertiesToChunks();
+        } else {
+            logger.log(POILogger.WARN,
+                    "Message didn't contain a root list of properties!");
+        }
+    }
 }
\ No newline at end of file
index 5365a632592477c48051ef638bd2656bc01b2f3c..2be65a93d56fffa91028c72a0c226741e589ba12 100644 (file)
@@ -25,33 +25,28 @@ import org.apache.poi.hsmf.datatypes.Types.MAPIType;
 import org.apache.poi.poifs.filesystem.DirectoryNode;
 
 /**
- * A Chunk that is just a placeholder in the
- *  MAPIMessage directory structure, which
- *  contains children.
- * This is most commonly used with nested
- *  MAPIMessages
+ * A Chunk that is just a placeholder in the MAPIMessage directory structure,
+ * which contains children. This is most commonly used with nested MAPIMessages
  */
 public class DirectoryChunk extends Chunk {
     private DirectoryNode dir;
-    
+
     public DirectoryChunk(DirectoryNode dir, String namePrefix, int chunkId, MAPIType type) {
         super(namePrefix, chunkId, type);
         this.dir = dir;
     }
-    
+
     /**
-     * Returns the directory entry for this chunk.
-     * You can then use standard POIFS methods to
-     *  enumerate the entries in it.
+     * Returns the directory entry for this chunk. You can then use standard
+     * POIFS methods to enumerate the entries in it.
      */
     public DirectoryNode getDirectory() {
         return dir;
     }
-    
+
     /**
-     * Treats the directory as an embeded MAPIMessage
-     *  (it normally is one), and returns a MAPIMessage
-     *  object to process it with.
+     * Treats the directory as an embeded MAPIMessage (it normally is one), and
+     * returns a MAPIMessage object to process it with.
      */
     public MAPIMessage getAsEmbededMessage() throws IOException {
         return new MAPIMessage(dir);
index ae473983f0da23a44d6878d1778829b66d1b5562..d29e60b65620953037d0664889eb74d4dbf7d7f6 100644 (file)
@@ -36,1071 +36,1075 @@ import java.util.Map;
 import org.apache.poi.hsmf.datatypes.Types.MAPIType;
 
 /**
- * Holds the list of MAPI Attributes, and allows lookup
- *  by friendly name, ID and MAPI Property Name.
- * 
+ * Holds the list of MAPI Attributes, and allows lookup by friendly name, ID and
+ * MAPI Property Name.
+ *
  * These are taken from the following MSDN resources:
- *  https://msdn.microsoft.com/en-us/library/microsoft.exchange.data.contenttypes.tnef.tnefpropertyid(v=exchg.150).aspx
- *  http://msdn.microsoft.com/en-us/library/ms526356%28v=exchg.10%29.aspx
+ * https://msdn.microsoft.com/en-us/library/microsoft.exchange.data.contenttypes.tnef.tnefpropertyid(v=exchg.150).aspx
+ * http://msdn.microsoft.com/en-us/library/ms526356%28v=exchg.10%29.aspx
  */
 public class MAPIProperty {
-   private static Map<Integer, MAPIProperty> attributes = new HashMap<Integer, MAPIProperty>();
-   
-   public static final MAPIProperty AB_DEFAULT_DIR =
-      new MAPIProperty(0x3d06, BINARY, "AbDefaultDir", "PR_AB_DEFAULT_DIR");
-   public static final MAPIProperty AB_DEFAULT_PAB =
-      new MAPIProperty(0x3d07, BINARY, "AbDefaultPab", "PR_AB_DEFAULT_PAB");
-   public static final MAPIProperty AB_PROVIDER_ID =
-      new MAPIProperty(0x3615, BINARY, "AbProviderId", "PR_AB_PROVIDER_ID");
-   public static final MAPIProperty AB_PROVIDERS =
-      new MAPIProperty(0x3d01, BINARY, "AbProviders", "PR_AB_PROVIDERS");
-   public static final MAPIProperty AB_SEARCH_PATH =
-      new MAPIProperty(0x3d05, Types.createCustom(4354), "AbSearchPath", "PR_AB_SEARCH_PATH");
-   public static final MAPIProperty AB_SEARCH_PATH_UPDATE =
-      new MAPIProperty(0x3d11, BINARY, "AbSearchPathUpdate", "PR_AB_SEARCH_PATH_UPDATE");
-   public static final MAPIProperty ACCESS =
-      new MAPIProperty(0xff4, LONG, "Access", "PR_ACCESS");
-   public static final MAPIProperty ACCESS_LEVEL =
-      new MAPIProperty(0xff7, LONG, "AccessLevel", "PR_ACCESS_LEVEL");
-   public static final MAPIProperty ACCOUNT =
-      new MAPIProperty(0x3a00, ASCII_STRING, "Account", "PR_ACCOUNT");
-   public static final MAPIProperty ADDRTYPE =
-      new MAPIProperty(0x3002, ASCII_STRING, "Addrtype", "PR_ADDRTYPE");
-   public static final MAPIProperty ALTERNATE_RECIPIENT =
-      new MAPIProperty(0x3a01, BINARY, "AlternateRecipient", "PR_ALTERNATE_RECIPIENT");
-   public static final MAPIProperty ALTERNATE_RECIPIENT_ALLOWED =
-      new MAPIProperty(2, BOOLEAN, "AlternateRecipientAllowed", "PR_ALTERNATE_RECIPIENT_ALLOWED");
-   public static final MAPIProperty ANR =
-      new MAPIProperty(0x360c, ASCII_STRING, "Anr", "PR_ANR");
-   public static final MAPIProperty ASSISTANT =
-      new MAPIProperty(0x3a30, ASCII_STRING, "Assistant", "PR_ASSISTANT");
-   public static final MAPIProperty ASSISTANT_TELEPHONE_NUMBER =
-      new MAPIProperty(0x3a2e, ASCII_STRING, "AssistantTelephoneNumber", "PR_ASSISTANT_TELEPHONE_NUMBER");
-   public static final MAPIProperty ASSOC_CONTENT_COUNT =
-      new MAPIProperty(0x3617, LONG, "AssocContentCount", "PR_ASSOC_CONTENT_COUNT");
-   public static final MAPIProperty ATTACH_ADDITIONAL_INFO =
-      new MAPIProperty(0x370f, BINARY, "AttachAdditionalInfo", "PR_ATTACH_ADDITIONAL_INFO");
-   public static final MAPIProperty ATTACH_CONTENT_BASE =
-      new MAPIProperty(0x3711, Types.UNKNOWN,  "AttachContentBase", "PR_ATTACH_CONTENT_BASE");
-   public static final MAPIProperty ATTACH_CONTENT_ID =
-      new MAPIProperty(0x3712, Types.UNKNOWN,  "AttachContentId", "PR_ATTACH_CONTENT_ID");
-   public static final MAPIProperty ATTACH_CONTENT_LOCATION =
-      new MAPIProperty(0x3713, Types.UNKNOWN,  "AttachContentLocation", "PR_ATTACH_CONTENT_LOCATION");
-   public static final MAPIProperty ATTACH_DATA =
-      new MAPIProperty(0x3701, BINARY, "AttachData", "PR_ATTACH_DATA_OBJ");
-   public static final MAPIProperty ATTACH_DISPOSITION =
-      new MAPIProperty(0x3716, Types.UNKNOWN,  "AttachDisposition", "PR_ATTACH_DISPOSITION");
-   public static final MAPIProperty ATTACH_ENCODING =
-      new MAPIProperty(0x3702, BINARY, "AttachEncoding", "PR_ATTACH_ENCODING");
-   public static final MAPIProperty ATTACH_EXTENSION =
-      new MAPIProperty(0x3703, ASCII_STRING, "AttachExtension", "PR_ATTACH_EXTENSION");
-   public static final MAPIProperty ATTACH_FILENAME =
-      new MAPIProperty(0x3704, ASCII_STRING, "AttachFilename", "PR_ATTACH_FILENAME");
-   public static final MAPIProperty ATTACH_FLAGS =
-      new MAPIProperty(0x3714, Types.UNKNOWN,  "AttachFlags", "PR_ATTACH_FLAGS");
-   public static final MAPIProperty ATTACH_LONG_FILENAME =
-      new MAPIProperty(0x3707, ASCII_STRING, "AttachLongFilename", "PR_ATTACH_LONG_FILENAME");
-   public static final MAPIProperty ATTACH_LONG_PATHNAME =
-      new MAPIProperty(0x370d, ASCII_STRING, "AttachLongPathname", "PR_ATTACH_LONG_PATHNAME");
-   public static final MAPIProperty ATTACH_METHOD =
-      new MAPIProperty(0x3705, LONG, "AttachMethod", "PR_ATTACH_METHOD");
-   public static final MAPIProperty ATTACH_MIME_SEQUENCE =
-      new MAPIProperty(0x3710, Types.UNKNOWN,  "AttachMimeSequence", "PR_ATTACH_MIME_SEQUENCE");
-   public static final MAPIProperty ATTACH_MIME_TAG =
-      new MAPIProperty(0x370e, ASCII_STRING, "AttachMimeTag", "PR_ATTACH_MIME_TAG");
-   public static final MAPIProperty ATTACH_NETSCAPE_MAC_INFO =
-      new MAPIProperty(0x3715, Types.UNKNOWN,  "AttachNetscapeMacInfo", "PR_ATTACH_NETSCAPE_MAC_INFO");
-   public static final MAPIProperty ATTACH_NUM =
-      new MAPIProperty(0xe21, LONG, "AttachNum", "PR_ATTACH_NUM");
-   public static final MAPIProperty ATTACH_PATHNAME =
-      new MAPIProperty(0x3708, ASCII_STRING, "AttachPathname", "PR_ATTACH_PATHNAME");
-   public static final MAPIProperty ATTACH_RENDERING =
-      new MAPIProperty(0x3709, BINARY, "AttachRendering", "PR_ATTACH_RENDERING");
-   public static final MAPIProperty ATTACH_SIZE =
-      new MAPIProperty(0xe20, LONG, "AttachSize", "PR_ATTACH_SIZE");
-   public static final MAPIProperty ATTACH_TAG =
-      new MAPIProperty(0x370a, BINARY, "AttachTag", "PR_ATTACH_TAG");
-   public static final MAPIProperty ATTACH_TRANSPORT_NAME =
-      new MAPIProperty(0x370c, ASCII_STRING, "AttachTransportName", "PR_ATTACH_TRANSPORT_NAME");
-   public static final MAPIProperty ATTACHMENT_X400_PARAMETERS =
-      new MAPIProperty(0x3700, BINARY, "AttachmentX400Parameters", "PR_ATTACHMENT_X400_PARAMETERS");
-   public static final MAPIProperty AUTHORIZING_USERS =
-      new MAPIProperty(3, BINARY, "AuthorizingUsers", "PR_AUTHORIZING_USERS");
-   public static final MAPIProperty AUTO_FORWARD_COMMENT =
-      new MAPIProperty(4, ASCII_STRING, "AutoForwardComment", "PR_AUTO_FORWARD_COMMENT");
-   public static final MAPIProperty AUTO_FORWARDED =
-      new MAPIProperty(5, BOOLEAN, "AutoForwarded", "PR_AUTO_FORWARDED");
-   public static final MAPIProperty AUTO_RESPONSE_SUPPRESS =
-      new MAPIProperty(0x3fdf, Types.UNKNOWN,  "AutoResponseSuppress", "PR_AUTO_RESPONSE_SUPPRESS");
-   public static final MAPIProperty BIRTHDAY =
-      new MAPIProperty(0x3a42, TIME, "Birthday", "PR_BIRTHDAY");
-   public static final MAPIProperty BODY =
-      new MAPIProperty(0x1000, ASCII_STRING, "Body", "PR_BODY");
-   public static final MAPIProperty BODY_CONTENT_ID =
-      new MAPIProperty(0x1015, Types.UNKNOWN,  "BodyContentId", "PR_BODY_CONTENT_ID");
-   public static final MAPIProperty BODY_CONTENT_LOCATION =
-      new MAPIProperty(0x1014, Types.UNKNOWN,  "BodyContentLocation", "PR_BODY_CONTENT_LOCATION");
-   public static final MAPIProperty BODY_CRC =
-      new MAPIProperty(0xe1c, LONG, "BodyCrc", "PR_BODY_CRC");
-   public static final MAPIProperty BODY_HTML =
-      new MAPIProperty(0x1013, Types.UNKNOWN,  "BodyHtml", "data");
-   public static final MAPIProperty BUSINESS_FAX_NUMBER =
-      new MAPIProperty(0x3a24, ASCII_STRING, "BusinessFaxNumber", "PR_BUSINESS_FAX_NUMBER");
-   public static final MAPIProperty BUSINESS_HOME_PAGE =
-      new MAPIProperty(0x3a51, ASCII_STRING, "BusinessHomePage", "PR_BUSINESS_HOME_PAGE");
-   public static final MAPIProperty CALLBACK_TELEPHONE_NUMBER =
-      new MAPIProperty(0x3a02, ASCII_STRING, "CallbackTelephoneNumber", "PR_CALLBACK_TELEPHONE_NUMBER");
-   public static final MAPIProperty CAR_TELEPHONE_NUMBER =
-      new MAPIProperty(0x3a1e, ASCII_STRING, "CarTelephoneNumber", "PR_CAR_TELEPHONE_NUMBER");
-   public static final MAPIProperty CHILDRENS_NAMES =
-      new MAPIProperty(0x3a58, Types.createCustom(4126), "ChildrensNames", "PR_CHILDRENS_NAMES");
-   public static final MAPIProperty CLIENT_SUBMIT_TIME =
-      new MAPIProperty(0x39, TIME, "ClientSubmitTime", "PR_CLIENT_SUBMIT_TIME");
-   public static final MAPIProperty COMMENT =
-      new MAPIProperty(0x3004, ASCII_STRING, "Comment", "PR_COMMENT");
-   public static final MAPIProperty COMMON_VIEWS_ENTRY_ID =
-      new MAPIProperty(0x35e6, BINARY, "CommonViewsEntryId", "PR_COMMON_VIEWS_ENTRYID");
-   public static final MAPIProperty COMPANY_MAIN_PHONE_NUMBER =
-      new MAPIProperty(0x3a57, ASCII_STRING, "CompanyMainPhoneNumber", "PR_COMPANY_MAIN_PHONE_NUMBER");
-   public static final MAPIProperty COMPANY_NAME =
-      new MAPIProperty(0x3a16, ASCII_STRING, "CompanyName", "PR_COMPANY_NAME");
-   public static final MAPIProperty COMPUTER_NETWORK_NAME =
-      new MAPIProperty(0x3a49, ASCII_STRING, "ComputerNetworkName", "PR_COMPUTER_NETWORK_NAME");
-   public static final MAPIProperty CONTACT_ADDRTYPES =
-      new MAPIProperty(0x3a54, Types.createCustom(4126), "ContactAddrtypes", "PR_CONTACT_ADDRTYPES");
-   public static final MAPIProperty CONTACT_DEFAULT_ADDRESS_INDEX =
-      new MAPIProperty(0x3a55, LONG, "ContactDefaultAddressIndex", "PR_CONTACT_DEFAULT_ADDRESS_INDEX");
-   public static final MAPIProperty CONTACT_EMAIL_ADDRESSES =
-      new MAPIProperty(0x3a56, Types.createCustom(4126), "ContactEmailAddresses", "PR_CONTACT_EMAIL_ADDRESSES");
-   public static final MAPIProperty CONTACT_ENTRY_IDS =
-      new MAPIProperty(0x3a53, Types.createCustom(4354), "ContactEntryIds", "PR_CONTACT_ENTRYIDS");
-   public static final MAPIProperty CONTACT_VERSION =
-      new MAPIProperty(0x3a52, CLS_ID, "ContactVersion", "PR_CONTACT_VERSION");
-   public static final MAPIProperty CONTAINER_CLASS =
-      new MAPIProperty(0x3613, ASCII_STRING, "ContainerClass", "PR_CONTAINER_CLASS");
-   public static final MAPIProperty CONTAINER_CONTENTS =
-      new MAPIProperty(0x360f, DIRECTORY, "ContainerContents", "PR_CONTAINER_CONTENTS");
-   public static final MAPIProperty CONTAINER_FLAGS =
-      new MAPIProperty(0x3600, LONG, "ContainerFlags", "PR_CONTAINER_FLAGS");
-   public static final MAPIProperty CONTAINER_HIERARCHY =
-      new MAPIProperty(0x360e, DIRECTORY, "ContainerHierarchy", "PR_CONTAINER_HIERARCHY");
-   public static final MAPIProperty CONTAINER_MODIFY_VERSION =
-      new MAPIProperty(0x3614, LONG_LONG, "ContainerModifyVersion", "PR_CONTAINER_MODIFY_VERSION");
-   public static final MAPIProperty CONTENT_CONFIDENTIALITY_ALGORITHM_ID =
-      new MAPIProperty(6, BINARY, "ContentConfidentialityAlgorithmId", "PR_CONTENT_CONFIDENTIALITY_ALGORITHM_ID");
-   public static final MAPIProperty CONTENT_CORRELATOR =
-      new MAPIProperty(7, BINARY, "ContentCorrelator", "PR_CONTENT_CORRELATOR");
-   public static final MAPIProperty CONTENT_COUNT =
-      new MAPIProperty(0x3602, LONG, "ContentCount", "PR_CONTENT_COUNT");
-   public static final MAPIProperty CONTENT_IDENTIFIER =
-      new MAPIProperty(8, ASCII_STRING, "ContentIdentifier", "PR_CONTENT_IDENTIFIER");
-   public static final MAPIProperty CONTENT_INTEGRITY_CHECK =
-      new MAPIProperty(0xc00, BINARY, "ContentIntegrityCheck", "PR_CONTENT_INTEGRITY_CHECK");
-   public static final MAPIProperty CONTENT_LENGTH =
-      new MAPIProperty(9, LONG, "ContentLength", "PR_CONTENT_LENGTH");
-   public static final MAPIProperty CONTENT_RETURN_REQUESTED =
-      new MAPIProperty(10, BOOLEAN, "ContentReturnRequested", "PR_CONTENT_RETURN_REQUESTED");
-   public static final MAPIProperty CONTENT_UNREAD =
-      new MAPIProperty(0x3603, LONG, "ContentUnread", "PR_CONTENT_UNREAD");
-   public static final MAPIProperty CONTENTS_SORT_ORDER =
-      new MAPIProperty(0x360d, Types.createCustom(4099), "ContentsSortOrder", "PR_CONTENTS_SORT_ORDER");
-   public static final MAPIProperty CONTROL_FLAGS =
-      new MAPIProperty(0x3f00, LONG, "ControlFlags", "PR_CONTROL_FLAGS");
-   public static final MAPIProperty CONTROL_ID =
-      new MAPIProperty(0x3f07, BINARY, "ControlId", "PR_CONTROL_ID");
-   public static final MAPIProperty CONTROL_STRUCTURE =
-      new MAPIProperty(0x3f01, BINARY, "ControlStructure", "PR_CONTROL_STRUCTURE");
-   public static final MAPIProperty CONTROL_TYPE =
-      new MAPIProperty(0x3f02, LONG, "ControlType", "PR_CONTROL_TYPE");
-   public static final MAPIProperty CONVERSATION_INDEX =
-      new MAPIProperty(0x71, BINARY, "ConversationIndex", "PR_CONVERSATION_INDEX");
-   public static final MAPIProperty CONVERSATION_KEY =
-      new MAPIProperty(11, BINARY, "ConversationKey", "PR_CONVERSATION_KEY");
-   public static final MAPIProperty CONVERSATION_TOPIC =
-      new MAPIProperty(0x70, ASCII_STRING, "ConversationTopic", "PR_CONVERSATION_TOPIC");
-   public static final MAPIProperty CONVERSION_EITS =
-      new MAPIProperty(12, BINARY, "ConversionEits", "PR_CONVERSION_EITS");
-   public static final MAPIProperty CONVERSION_PROHIBITED =
-      new MAPIProperty(0x3a03, BOOLEAN, "ConversionProhibited", "PR_CONVERSION_PROHIBITED");
-   public static final MAPIProperty CONVERSION_WITH_LOSS_PROHIBITED =
-      new MAPIProperty(13, BOOLEAN, "ConversionWithLossProhibited", "PR_CONVERSION_WITH_LOSS_PROHIBITED");
-   public static final MAPIProperty CONVERTED_EITS =
-      new MAPIProperty(14, BINARY, "ConvertedEits", "PR_CONVERTED_EITS");
-   public static final MAPIProperty CORRELATE =
-      new MAPIProperty(0xe0c, BOOLEAN, "Correlate", "PR_CORRELATE");
-   public static final MAPIProperty CORRELATE_MTSID =
-      new MAPIProperty(0xe0d, BINARY, "CorrelateMtsid", "PR_CORRELATE_MTSID");
-   public static final MAPIProperty COUNTRY =
-      new MAPIProperty(0x3a26, ASCII_STRING, "Country", "PR_COUNTRY");
-   public static final MAPIProperty CREATE_TEMPLATES =
-      new MAPIProperty(0x3604, DIRECTORY, "CreateTemplates", "PR_CREATE_TEMPLATES");
-   public static final MAPIProperty CREATION_TIME =
-      new MAPIProperty(0x3007, TIME, "CreationTime", "PR_CREATION_TIME");
-   public static final MAPIProperty CREATION_VERSION =
-      new MAPIProperty(0xe19, LONG_LONG, "CreationVersion", "PR_CREATION_VERSION");
-   public static final MAPIProperty CURRENT_VERSION =
-      new MAPIProperty(0xe00, LONG_LONG, "CurrentVersion", "PR_CURRENT_VERSION");
-   public static final MAPIProperty CUSTOMER_ID =
-      new MAPIProperty(0x3a4a, ASCII_STRING, "CustomerId", "PR_CUSTOMER_ID");
-   public static final MAPIProperty DEF_CREATE_DL =
-      new MAPIProperty(0x3611, BINARY, "DefCreateDl", "PR_DEF_CREATE_DL");
-   public static final MAPIProperty DEF_CREATE_MAILUSER =
-      new MAPIProperty(0x3612, BINARY, "DefCreateMailuser", "PR_DEF_CREATE_MAILUSER");
-   public static final MAPIProperty DEFAULT_PROFILE =
-      new MAPIProperty(0x3d04, BOOLEAN, "DefaultProfile", "PR_DEFAULT_PROFILE");
-   public static final MAPIProperty DEFAULT_STORE =
-      new MAPIProperty(0x3400, BOOLEAN, "DefaultStore", "PR_DEFAULT_STORE");
-   public static final MAPIProperty DEFAULT_VIEW_ENTRY_ID =
-      new MAPIProperty(0x3616, BINARY, "DefaultViewEntryId", "PR_DEFAULT_VIEW_ENTRYID");
-   public static final MAPIProperty DEFERRED_DELIVERY_TIME =
-      new MAPIProperty(15, TIME, "DeferredDeliveryTime", "PR_DEFERRED_DELIVERY_TIME");
-   public static final MAPIProperty DELEGATION =
-      new MAPIProperty(0x7e, BINARY, "Delegation", "PR_DELEGATION");
-   public static final MAPIProperty DELETE_AFTER_SUBMIT =
-      new MAPIProperty(0xe01, BOOLEAN, "DeleteAfterSubmit", "PR_DELETE_AFTER_SUBMIT");
-   public static final MAPIProperty DELIVER_TIME =
-      new MAPIProperty(0x10, TIME, "DeliverTime", "PR_DELIVER_TIME");
-   public static final MAPIProperty DELIVERY_POINT =
-      new MAPIProperty(0xc07, LONG, "DeliveryPoint", "PR_DELIVERY_POINT");
-   public static final MAPIProperty DELTAX =
-      new MAPIProperty(0x3f03, LONG, "Deltax", "PR_DELTAX");
-   public static final MAPIProperty DELTAY =
-      new MAPIProperty(0x3f04, LONG, "Deltay", "PR_DELTAY");
-   public static final MAPIProperty DEPARTMENT_NAME =
-      new MAPIProperty(0x3a18, ASCII_STRING, "DepartmentName", "PR_DEPARTMENT_NAME");
-   public static final MAPIProperty DEPTH =
-      new MAPIProperty(0x3005, LONG, "Depth", "PR_DEPTH");
-   public static final MAPIProperty DETAILS_TABLE =
-      new MAPIProperty(0x3605, DIRECTORY, "DetailsTable", "PR_DETAILS_TABLE");
-   public static final MAPIProperty DISC_VAL =
-      new MAPIProperty(0x4a, BOOLEAN, "DiscVal", "PR_DISC_VAL");
-   public static final MAPIProperty DISCARD_REASON =
-      new MAPIProperty(0x11, LONG, "DiscardReason", "PR_DISCARD_REASON");
-   public static final MAPIProperty DISCLOSE_RECIPIENTS =
-      new MAPIProperty(0x3a04, BOOLEAN, "DiscloseRecipients", "PR_DISCLOSE_RECIPIENTS");
-   public static final MAPIProperty DISCLOSURE_OF_RECIPIENTS =
-      new MAPIProperty(0x12, BOOLEAN, "DisclosureOfRecipients", "PR_DISCLOSURE_OF_RECIPIENTS");
-   public static final MAPIProperty DISCRETE_VALUES =
-      new MAPIProperty(0xe0e, BOOLEAN, "DiscreteValues", "PR_DISCRETE_VALUES");
-   public static final MAPIProperty DISPLAY_BCC =
-      new MAPIProperty(0xe02, ASCII_STRING, "DisplayBcc", "PR_DISPLAY_BCC");
-   public static final MAPIProperty DISPLAY_CC =
-      new MAPIProperty(0xe03, ASCII_STRING, "DisplayCc", "PR_DISPLAY_CC");
-   public static final MAPIProperty DISPLAY_NAME =
-      new MAPIProperty(0x3001, ASCII_STRING, "DisplayName", "PR_DISPLAY_NAME");
-   public static final MAPIProperty DISPLAY_NAME_PREFIX =
-      new MAPIProperty(0x3a45, ASCII_STRING, "DisplayNamePrefix", "PR_DISPLAY_NAME_PREFIX");
-   public static final MAPIProperty DISPLAY_TO =
-      new MAPIProperty(0xe04, ASCII_STRING, "DisplayTo", "PR_DISPLAY_TO");
-   public static final MAPIProperty DISPLAY_TYPE =
-      new MAPIProperty(0x3900, LONG, "DisplayType", "PR_DISPLAY_TYPE");
-   public static final MAPIProperty DL_EXPANSION_HISTORY =
-      new MAPIProperty(0x13, BINARY, "DlExpansionHistory", "PR_DL_EXPANSION_HISTORY");
-   public static final MAPIProperty DL_EXPANSION_PROHIBITED =
-      new MAPIProperty(20, BOOLEAN, "DlExpansionProhibited", "PR_DL_EXPANSION_PROHIBITED");
-   public static final MAPIProperty EMAIL_ADDRESS =
-      new MAPIProperty(0x3003, ASCII_STRING, "EmailAddress", "PR_EMAIL_ADDRESS");
-   public static final MAPIProperty END_DATE =
-      new MAPIProperty(0x61, TIME, "EndDate", "PR_END_DATE");
-   public static final MAPIProperty ENTRY_ID =
-      new MAPIProperty(0xfff, BINARY, "EntryId", "PR_ENTRYID");
-   public static final MAPIProperty EXPAND_BEGIN_TIME =
-      new MAPIProperty(0x3618, Types.UNKNOWN,  "ExpandBeginTime", "PR_EXPAND_BEGIN_TIME");
-   public static final MAPIProperty EXPAND_END_TIME =
-      new MAPIProperty(0x3619, Types.UNKNOWN,  "ExpandEndTime", "PR_EXPAND_END_TIME");
-   public static final MAPIProperty EXPANDED_BEGIN_TIME =
-      new MAPIProperty(0x361a, Types.UNKNOWN,  "ExpandedBeginTime", "PR_EXPANDED_BEGIN_TIME");
-   public static final MAPIProperty EXPANDED_END_TIME =
-      new MAPIProperty(0x361b, Types.UNKNOWN,  "ExpandedEndTime", "PR_EXPANDED_END_TIME");
-   public static final MAPIProperty EXPIRY_TIME =
-      new MAPIProperty(0x15, TIME, "ExpiryTime", "PR_EXPIRY_TIME");
-   public static final MAPIProperty EXPLICIT_CONVERSION =
-      new MAPIProperty(0xc01, LONG, "ExplicitConversion", "PR_EXPLICIT_CONVERSION");
-   public static final MAPIProperty FILTERING_HOOKS =
-      new MAPIProperty(0x3d08, BINARY, "FilteringHooks", "PR_FILTERING_HOOKS");
-   public static final MAPIProperty FINDER_ENTRY_ID =
-      new MAPIProperty(0x35e7, BINARY, "FinderEntryId", "PR_FINDER_ENTRYID");
-   public static final MAPIProperty FOLDER_ASSOCIATED_CONTENTS =
-      new MAPIProperty(0x3610, DIRECTORY, "FolderAssociatedContents", "PR_FOLDER_ASSOCIATED_CONTENTS");
-   public static final MAPIProperty FOLDER_TYPE =
-      new MAPIProperty(0x3601, LONG, "FolderType", "PR_FOLDER_TYPE");
-   public static final MAPIProperty FORM_CATEGORY =
-      new MAPIProperty(0x3304, ASCII_STRING, "FormCategory", "PR_FORM_CATEGORY");
-   public static final MAPIProperty FORM_CATEGORY_SUB =
-      new MAPIProperty(0x3305, ASCII_STRING, "FormCategorySub", "PR_FORM_CATEGORY_SUB");
-   public static final MAPIProperty FORM_CLSID =
-      new MAPIProperty(0x3302, CLS_ID, "FormClsid", "PR_FORM_ClsID");
-   public static final MAPIProperty FORM_CONTACT_NAME =
-      new MAPIProperty(0x3303, ASCII_STRING, "FormContactName", "PR_FORM_CONTACT_NAME");
-   public static final MAPIProperty FORM_DESIGNER_GUID =
-      new MAPIProperty(0x3309, CLS_ID, "FormDesignerGuid", "PR_FORM_DESIGNER_GUID");
-   public static final MAPIProperty FORM_DESIGNER_NAME =
-      new MAPIProperty(0x3308, ASCII_STRING, "FormDesignerName", "PR_FORM_DESIGNER_NAME");
-   public static final MAPIProperty FORM_HIDDEN =
-      new MAPIProperty(0x3307, BOOLEAN, "FormHidden", "PR_FORM_HIDDEN");
-   public static final MAPIProperty FORM_HOST_MAP =
-      new MAPIProperty(0x3306, Types.createCustom(4099), "FormHostMap", "PR_FORM_HOST_MAP");
-   public static final MAPIProperty FORM_MESSAGE_BEHAVIOR =
-      new MAPIProperty(0x330a, LONG, "FormMessageBehavior", "PR_FORM_MESSAGE_BEHAVIOR");
-   public static final MAPIProperty FORM_VERSION =
-      new MAPIProperty(0x3301, ASCII_STRING, "FormVersion", "PR_FORM_VERSION");
-   public static final MAPIProperty FTP_SITE =
-      new MAPIProperty(0x3a4c, ASCII_STRING, "FtpSite", "PR_FTP_SITE");
-   public static final MAPIProperty GENDER =
-      new MAPIProperty(0x3a4d, SHORT, "Gender", "PR_GENDER");
-   public static final MAPIProperty GENERATION =
-      new MAPIProperty(0x3a05, ASCII_STRING, "Generation", "PR_GENERATION");
-   public static final MAPIProperty GIVEN_NAME =
-      new MAPIProperty(0x3a06, ASCII_STRING, "GivenName", "PR_GIVEN_NAME");
-   public static final MAPIProperty GOVERNMENT_ID_NUMBER =
-      new MAPIProperty(0x3a07, ASCII_STRING, "GovernmentIdNumber", "PR_GOVERNMENT_ID_NUMBER");
-   public static final MAPIProperty HASATTACH =
-      new MAPIProperty(0xe1b, BOOLEAN, "Hasattach", "PR_HASATTACH");
-   public static final MAPIProperty HEADER_FOLDER_ENTRY_ID =
-      new MAPIProperty(0x3e0a, BINARY, "HeaderFolderEntryId", "PR_HEADER_FOLDER_ENTRYID");
-   public static final MAPIProperty HOBBIES =
-      new MAPIProperty(0x3a43, ASCII_STRING, "Hobbies", "PR_HOBBIES");
-   public static final MAPIProperty HOME2_TELEPHONE_NUMBER =
-      new MAPIProperty(0x3a2f, ASCII_STRING, "Home2TelephoneNumber", "PR_HOME2_TELEPHONE_NUMBER");
-   public static final MAPIProperty HOME_ADDRESS_CITY =
-      new MAPIProperty(0x3a59, ASCII_STRING, "HomeAddressCity", "PR_HOME_ADDRESS_CITY");
-   public static final MAPIProperty HOME_ADDRESS_COUNTRY =
-      new MAPIProperty(0x3a5a, ASCII_STRING, "HomeAddressCountry", "PR_HOME_ADDRESS_COUNTRY");
-   public static final MAPIProperty HOME_ADDRESS_POST_OFFICE_BOX =
-      new MAPIProperty(0x3a5e, ASCII_STRING, "HomeAddressPostOfficeBox", "PR_HOME_ADDRESS_POST_OFFICE_BOX");
-   public static final MAPIProperty HOME_ADDRESS_POSTAL_CODE =
-      new MAPIProperty(0x3a5b, ASCII_STRING, "HomeAddressPostalCode", "PR_HOME_ADDRESS_POSTAL_CODE");
-   public static final MAPIProperty HOME_ADDRESS_STATE_OR_PROVINCE =
-      new MAPIProperty(0x3a5c, ASCII_STRING, "HomeAddressStateOrProvince", "PR_HOME_ADDRESS_STATE_OR_PROVINCE");
-   public static final MAPIProperty HOME_ADDRESS_STREET =
-      new MAPIProperty(0x3a5d, ASCII_STRING, "HomeAddressStreet", "PR_HOME_ADDRESS_STREET");
-   public static final MAPIProperty HOME_FAX_NUMBER =
-      new MAPIProperty(0x3a25, ASCII_STRING, "HomeFaxNumber", "PR_HOME_FAX_NUMBER");
-   public static final MAPIProperty HOME_TELEPHONE_NUMBER =
-      new MAPIProperty(0x3a09, ASCII_STRING, "HomeTelephoneNumber", "PR_HOME_TELEPHONE_NUMBER");
-   public static final MAPIProperty INET_MAIL_OVERRIDE_CHARSET =
-      new MAPIProperty(0x5903, Types.UNKNOWN,  "INetMailOverrideCharset", "Charset");
-   public static final MAPIProperty INET_MAIL_OVERRIDE_FORMAT =
-      new MAPIProperty(0x5902, Types.UNKNOWN,  "INetMailOverrideFormat", "Format");
-   public static final MAPIProperty ICON =
-      new MAPIProperty(0xffd, BINARY, "Icon", "PR_ICON");
-   public static final MAPIProperty IDENTITY_DISPLAY =
-      new MAPIProperty(0x3e00, ASCII_STRING, "IdentityDisplay", "PR_IDENTITY_DISPLAY");
-   public static final MAPIProperty IDENTITY_ENTRY_ID =
-      new MAPIProperty(0x3e01, BINARY, "IdentityEntryId", "PR_IDENTITY_ENTRYID");
-   public static final MAPIProperty IDENTITY_SEARCH_KEY =
-      new MAPIProperty(0x3e05, BINARY, "IdentitySearchKey", "PR_IDENTITY_SEARCH_KEY");
-   public static final MAPIProperty IMPLICIT_CONVERSION_PROHIBITED =
-      new MAPIProperty(0x16, BOOLEAN, "ImplicitConversionProhibited", "PR_IMPLICIT_CONVERSION_PROHIBITED");
-   public static final MAPIProperty IMPORTANCE =
-      new MAPIProperty(0x17, LONG, "Importance", "PR_IMPORTANCE");
-   public static final MAPIProperty IN_REPLY_TO_ID =
-      new MAPIProperty(0x1042, Types.UNKNOWN,  "InReplyToId", "PR_IN_REPLY_TO_ID");
-   public static final MAPIProperty INCOMPLETE_COPY =
-      new MAPIProperty(0x35, BOOLEAN, "IncompleteCopy", "PR_INCOMPLETE_COPY");
-   public static final MAPIProperty INITIAL_DETAILS_PANE =
-      new MAPIProperty(0x3f08, LONG, "InitialDetailsPane", "PR_INITIAL_DETAILS_PANE");
-   public static final MAPIProperty INITIALS =
-      new MAPIProperty(0x3a0a, ASCII_STRING, "Initials", "PR_INITIALS");
-   public static final MAPIProperty INSTANCE_KEY =
-      new MAPIProperty(0xff6, BINARY, "InstanceKey", "PR_INSTANCE_KEY");
-   public static final MAPIProperty INTERNET_APPROVED =
-      new MAPIProperty(0x1030, ASCII_STRING, "InternetApproved", "PR_INTERNET_APPROVED");
-   public static final MAPIProperty INTERNET_ARTICLE_NUMBER =
-      new MAPIProperty(0xe23, LONG, "InternetArticleNumber", "PR_INTERNET_ARTICLE_NUMBER");
-   public static final MAPIProperty INTERNET_CPID =
-      new MAPIProperty(0x3fde, Types.LONG,  "InternetCPID", "PR_INTERNET_CPID");
-   public static final MAPIProperty INTERNET_CONTROL =
-      new MAPIProperty(0x1031, ASCII_STRING, "InternetControl", "PR_INTERNET_CONTROL");
-   public static final MAPIProperty INTERNET_DISTRIBUTION =
-      new MAPIProperty(0x1032, ASCII_STRING, "InternetDistribution", "PR_INTERNET_DISTRIBUTION");
-   public static final MAPIProperty INTERNET_FOLLOWUP_TO =
-      new MAPIProperty(0x1033, ASCII_STRING, "InternetFollowupTo", "PR_INTERNET_FOLLOWUP_TO");
-   public static final MAPIProperty INTERNET_LINES =
-      new MAPIProperty(0x1034, LONG, "InternetLines", "PR_INTERNET_LINES");
-   public static final MAPIProperty INTERNET_MESSAGE_ID =
-      new MAPIProperty(0x1035, ASCII_STRING, "InternetMessageId", "PR_INTERNET_MESSAGE_ID");
-   public static final MAPIProperty INTERNET_NEWSGROUPS =
-      new MAPIProperty(0x1036, ASCII_STRING, "InternetNewsgroups", "PR_INTERNET_NEWSGROUPS");
-   public static final MAPIProperty INTERNET_NNTP_PATH =
-      new MAPIProperty(0x1038, ASCII_STRING, "InternetNntpPath", "PR_INTERNET_NNTP_PATH");
-   public static final MAPIProperty INTERNET_ORGANIZATION =
-      new MAPIProperty(0x1037, ASCII_STRING, "InternetOrganization", "PR_INTERNET_ORGANIZATION");
-   public static final MAPIProperty INTERNET_PRECEDENCE =
-      new MAPIProperty(0x1041, ASCII_STRING, "InternetPrecedence", "PR_INTERNET_PRECEDENCE");
-   public static final MAPIProperty INTERNET_REFERENCES =
-      new MAPIProperty(0x1039, ASCII_STRING, "InternetReferences", "PR_INTERNET_REFERENCES");
-   public static final MAPIProperty IPM_ID =
-      new MAPIProperty(0x18, BINARY, "IpmId", "PR_IPM_ID");
-   public static final MAPIProperty IPM_OUTBOX_ENTRY_ID =
-      new MAPIProperty(0x35e2, BINARY, "IpmOutboxEntryId", "PR_IPM_OUTBOX_ENTRYID");
-   public static final MAPIProperty IPM_OUTBOX_SEARCH_KEY =
-      new MAPIProperty(0x3411, BINARY, "IpmOutboxSearchKey", "PR_IPM_OUTBOX_SEARCH_KEY");
-   public static final MAPIProperty IPM_RETURN_REQUESTED =
-      new MAPIProperty(0xc02, BOOLEAN, "IpmReturnRequested", "PR_IPM_RETURN_REQUESTED");
-   public static final MAPIProperty IPM_SENTMAIL_ENTRY_ID =
-      new MAPIProperty(0x35e4, BINARY, "IpmSentmailEntryId", "PR_IPM_SENTMAIL_ENTRYID");
-   public static final MAPIProperty IPM_SENTMAIL_SEARCH_KEY =
-      new MAPIProperty(0x3413, BINARY, "IpmSentmailSearchKey", "PR_IPM_SENTMAIL_SEARCH_KEY");
-   public static final MAPIProperty IPM_SUBTREE_ENTRY_ID =
-      new MAPIProperty(0x35e0, BINARY, "IpmSubtreeEntryId", "PR_IPM_SUBTREE_ENTRYID");
-   public static final MAPIProperty IPM_SUBTREE_SEARCH_KEY =
-      new MAPIProperty(0x3410, BINARY, "IpmSubtreeSearchKey", "PR_IPM_SUBTREE_SEARCH_KEY");
-   public static final MAPIProperty IPM_WASTEBASKET_ENTRY_ID =
-      new MAPIProperty(0x35e3, BINARY, "IpmWastebasketEntryId", "PR_IPM_WASTEBASKET_ENTRYID");
-   public static final MAPIProperty IPM_WASTEBASKET_SEARCH_KEY =
-      new MAPIProperty(0x3412, BINARY, "IpmWastebasketSearchKey", "PR_IPM_WASTEBASKET_SEARCH_KEY");
-   public static final MAPIProperty ISDN_NUMBER =
-      new MAPIProperty(0x3a2d, ASCII_STRING, "IsdnNumber", "PR_ISDN_NUMBER");
-   public static final MAPIProperty KEYWORD =
-      new MAPIProperty(0x3a0b, ASCII_STRING, "Keyword", "PR_KEYWORD");
-   public static final MAPIProperty LANGUAGE =
-      new MAPIProperty(0x3a0c, ASCII_STRING, "Language", "PR_LANGUAGE");
-   public static final MAPIProperty LANGUAGES =
-      new MAPIProperty(0x2f, ASCII_STRING, "Languages", "PR_LANGUAGES");
-   public static final MAPIProperty LAST_MODIFICATION_TIME =
-      new MAPIProperty(0x3008, TIME, "LastModificationTime", "PR_LAST_MODIFICATION_TIME");
-   public static final MAPIProperty LATEST_DELIVERY_TIME =
-      new MAPIProperty(0x19, TIME, "LatestDeliveryTime", "PR_LATEST_DELIVERY_TIME");
-   public static final MAPIProperty LIST_HELP =
-      new MAPIProperty(0x1043, Types.UNKNOWN,  "ListHelp", "PR_LIST_HELP");
-   public static final MAPIProperty LIST_SUBSCRIBE =
-      new MAPIProperty(0x1044, Types.UNKNOWN,  "ListSubscribe", "PR_LIST_SUBSCRIBE");
-   public static final MAPIProperty LIST_UNSUBSCRIBE =
-      new MAPIProperty(0x1045, Types.UNKNOWN,  "ListUnsubscribe", "PR_LIST_UNSUBSCRIBE");
-   public static final MAPIProperty LOCALITY =
-      new MAPIProperty(0x3a27, ASCII_STRING, "Locality", "PR_LOCALITY");
-   public static final MAPIProperty LOCALLY_DELIVERED =
-      new MAPIProperty(0x6745, Types.UNKNOWN,  "LocallyDelivered", "ptagLocallyDelivered");
-   public static final MAPIProperty LOCATION =
-      new MAPIProperty(0x3a0d, ASCII_STRING, "Location", "PR_LOCATION");
-   public static final MAPIProperty LOCK_BRANCH_ID =
-      new MAPIProperty(0x3800, Types.UNKNOWN,  "LockBranchId", "PR_LOCK_BRANCH_ID");
-   public static final MAPIProperty LOCK_DEPTH =
-      new MAPIProperty(0x3808, Types.UNKNOWN,  "LockDepth", "PR_LOCK_DEPTH");
-   public static final MAPIProperty LOCK_ENLISTMENT_CONTEXT =
-      new MAPIProperty(0x3804, Types.UNKNOWN,  "LockEnlistmentContext", "PR_LOCK_ENLISTMENT_CONTEXT");
-   public static final MAPIProperty LOCK_EXPIRY_TIME =
-      new MAPIProperty(0x380a, Types.UNKNOWN,  "LockExpiryTime", "PR_LOCK_EXPIRY_TIME");
-   public static final MAPIProperty LOCK_PERSISTENT =
-      new MAPIProperty(0x3807, Types.UNKNOWN,  "LockPersistent", "PR_LOCK_PERSISTENT");
-   public static final MAPIProperty LOCK_RESOURCE_DID =
-      new MAPIProperty(0x3802, Types.UNKNOWN,  "LockResourceDid", "PR_LOCK_RESOURCE_DID");
-   public static final MAPIProperty LOCK_RESOURCE_FID =
-      new MAPIProperty(0x3801, Types.UNKNOWN,  "LockResourceFid", "PR_LOCK_RESOURCE_FID");
-   public static final MAPIProperty LOCK_RESOURCE_MID =
-      new MAPIProperty(0x3803, Types.UNKNOWN,  "LockResourceMid", "PR_LOCK_RESOURCE_MID");
-   public static final MAPIProperty LOCK_SCOPE =
-      new MAPIProperty(0x3806, Types.UNKNOWN,  "LockScope", "PR_LOCK_SCOPE");
-   public static final MAPIProperty LOCK_TIMEOUT =
-      new MAPIProperty(0x3809, Types.UNKNOWN,  "LockTimeout", "PR_LOCK_TIMEOUT");
-   public static final MAPIProperty LOCK_TYPE =
-      new MAPIProperty(0x3805, Types.UNKNOWN,  "LockType", "PR_LOCK_TYPE");
-   public static final MAPIProperty MAIL_PERMISSION =
-      new MAPIProperty(0x3a0e, BOOLEAN, "MailPermission", "PR_MAIL_PERMISSION");
-   public static final MAPIProperty MANAGER_NAME =
-      new MAPIProperty(0x3a4e, ASCII_STRING, "ManagerName", "PR_MANAGER_NAME");
-   public static final MAPIProperty MAPPING_SIGNATURE =
-      new MAPIProperty(0xff8, BINARY, "MappingSignature", "PR_MAPPING_SIGNATURE");
-   public static final MAPIProperty MDB_PROVIDER =
-      new MAPIProperty(0x3414, BINARY, "MdbProvider", "PR_MDB_PROVIDER");
-   public static final MAPIProperty MESSAGE_ATTACHMENTS =
-      new MAPIProperty(0xe13, DIRECTORY, "MessageAttachments", "PR_MESSAGE_ATTACHMENTS");
-   public static final MAPIProperty MESSAGE_CC_ME =
-      new MAPIProperty(0x58, BOOLEAN, "MessageCcMe", "PR_MESSAGE_CC_ME");
-   public static final MAPIProperty MESSAGE_CLASS =
-      new MAPIProperty(0x1a, ASCII_STRING, "MessageClass", "PR_MESSAGE_CLASS");
-   public static final MAPIProperty MESSAGE_CODEPAGE =
-      new MAPIProperty(0x3ffd, Types.LONG,  "MessageCodepage", "PR_MESSAGE_CODEPAGE");
-   public static final MAPIProperty MESSAGE_DELIVERY_ID =
-      new MAPIProperty(0x1b, BINARY, "MessageDeliveryId", "PR_MESSAGE_DELIVERY_ID");
-   public static final MAPIProperty MESSAGE_DELIVERY_TIME =
-      new MAPIProperty(0xe06, TIME, "MessageDeliveryTime", "PR_MESSAGE_DELIVERY_TIME");
-   public static final MAPIProperty MESSAGE_DOWNLOAD_TIME =
-      new MAPIProperty(0xe18, LONG, "MessageDownloadTime", "PR_MESSAGE_DOWNLOAD_TIME");
-   public static final MAPIProperty MESSAGE_FLAGS =
-      new MAPIProperty(0xe07, LONG, "MessageFlags", "PR_MESSAGE_FLAGS");
-   public static final MAPIProperty MESSAGE_RECIP_ME =
-      new MAPIProperty(0x59, BOOLEAN, "MessageRecipMe", "PR_MESSAGE_RECIP_ME");
-   public static final MAPIProperty MESSAGE_RECIPIENTS =
-      new MAPIProperty(0xe12, DIRECTORY, "MessageRecipients", "PR_MESSAGE_RECIPIENTS");
-   public static final MAPIProperty MESSAGE_SECURITY_LABEL =
-      new MAPIProperty(30, BINARY, "MessageSecurityLabel", "PR_MESSAGE_SECURITY_LABEL");
-   public static final MAPIProperty MESSAGE_SIZE =
-      new MAPIProperty(0xe08, LONG, "MessageSize", "PR_MESSAGE_SIZE");
-   public static final MAPIProperty MESSAGE_SUBMISSION_ID =
-      new MAPIProperty(0x47, BINARY, "MessageSubmissionId", "PR_MESSAGE_SUBMISSION_ID");
-   public static final MAPIProperty MESSAGE_TO_ME =
-      new MAPIProperty(0x57, BOOLEAN, "MessageToMe", "PR_MESSAGE_TO_ME");
-   public static final MAPIProperty MESSAGE_TOKEN =
-      new MAPIProperty(0xc03, BINARY, "MessageToken", "PR_MESSAGE_TOKEN");
-   public static final MAPIProperty MHS_COMMON_NAME =
-      new MAPIProperty(0x3a0f, ASCII_STRING, "MhsCommonName", "PR_MHS_COMMON_NAME");
-   public static final MAPIProperty MIDDLE_NAME =
-      new MAPIProperty(0x3a44, ASCII_STRING, "MiddleName", "PR_MIDDLE_NAME");
-   public static final MAPIProperty MINI_ICON =
-      new MAPIProperty(0xffc, BINARY, "MiniIcon", "PR_MINI_ICON");
-   public static final MAPIProperty MOBILE_TELEPHONE_NUMBER =
-      new MAPIProperty(0x3a1c, ASCII_STRING, "MobileTelephoneNumber", "PR_MOBILE_TELEPHONE_NUMBER");
-   public static final MAPIProperty MODIFY_VERSION =
-      new MAPIProperty(0xe1a, LONG_LONG, "ModifyVersion", "PR_MODIFY_VERSION");
-   public static final MAPIProperty MSG_STATUS =
-      new MAPIProperty(0xe17, LONG, "MsgStatus", "PR_MSG_STATUS");
-   public static final MAPIProperty NDR_DIAG_CODE =
-      new MAPIProperty(0xc05, LONG, "NdrDiagCode", "PR_NDR_DIAG_CODE");
-   public static final MAPIProperty NDR_REASON_CODE =
-      new MAPIProperty(0xc04, LONG, "NdrReasonCode", "PR_NDR_REASON_CODE");
-   public static final MAPIProperty NDR_STATUS_CODE =
-      new MAPIProperty(0xc20, Types.UNKNOWN,  "NdrStatusCode", "PR_NDR_STATUS_CODE");
-   public static final MAPIProperty NEWSGROUP_NAME =
-      new MAPIProperty(0xe24, ASCII_STRING, "NewsgroupName", "PR_NEWSGROUP_NAME");
-   public static final MAPIProperty NICKNAME =
-      new MAPIProperty(0x3a4f, ASCII_STRING, "Nickname", "PR_NICKNAME");
-   public static final MAPIProperty NNTP_XREF =
-      new MAPIProperty(0x1040, ASCII_STRING, "NntpXref", "PR_NNTP_XREF");
-   public static final MAPIProperty NON_RECEIPT_NOTIFICATION_REQUESTED =
-      new MAPIProperty(0xc06, BOOLEAN, "NonReceiptNotificationRequested", "PR_NON_RECEIPT_NOTIFICATION_REQUESTED");
-   public static final MAPIProperty NON_RECEIPT_REASON =
-      new MAPIProperty(0x3e, LONG, "NonReceiptReason", "PR_NON_RECEIPT_REASON");
-   public static final MAPIProperty NORMALIZED_SUBJECT =
-      new MAPIProperty(0xe1d, ASCII_STRING, "NormalizedSubject", "PR_NORMALIZED_SUBJECT");
-   public static final MAPIProperty NT_SECURITY_DESCRIPTOR =
-      new MAPIProperty(0xe27, Types.UNKNOWN,  "NtSecurityDescriptor", "PR_NT_SECURITY_DESCRIPTOR");
-   public static final MAPIProperty NULL =
-      new MAPIProperty(1, LONG, "Null", "PR_NULL");
-   public static final MAPIProperty OBJECT_TYPE =
-      new MAPIProperty(0xffe, LONG, "ObjectType", "PR_Object_TYPE");
-   public static final MAPIProperty OBSOLETED_IPMS =
-      new MAPIProperty(0x1f, BINARY, "ObsoletedIpms", "PR_OBSOLETED_IPMS");
-   public static final MAPIProperty OFFICE2_TELEPHONE_NUMBER =
-      new MAPIProperty(0x3a1b, ASCII_STRING, "Office2TelephoneNumber", "PR_OFFICE2_TELEPHONE_NUMBER");
-   public static final MAPIProperty OFFICE_LOCATION =
-      new MAPIProperty(0x3a19, ASCII_STRING, "OfficeLocation", "PR_OFFICE_LOCATION");
-   public static final MAPIProperty OFFICE_TELEPHONE_NUMBER =
-      new MAPIProperty(0x3a08, ASCII_STRING, "OfficeTelephoneNumber", "PR_OFFICE_TELEPHONE_NUMBER");
-   public static final MAPIProperty OOF_REPLY_TYPE =
-      new MAPIProperty(0x4080, Types.UNKNOWN,  "OofReplyType", "PR_OOF_REPLY_TYPE");
-   public static final MAPIProperty ORGANIZATIONAL_ID_NUMBER =
-      new MAPIProperty(0x3a10, ASCII_STRING, "OrganizationalIdNumber", "PR_ORGANIZATIONAL_ID_NUMBER");
-   public static final MAPIProperty ORIG_ENTRY_ID =
-      new MAPIProperty(0x300f, Types.UNKNOWN,  "OrigEntryId", "PR_ORIG_ENTRYID");
-   public static final MAPIProperty ORIG_MESSAGE_CLASS =
-      new MAPIProperty(0x4b, ASCII_STRING, "OrigMessageClass", "PR_ORIG_MESSAGE_CLASS");
-   public static final MAPIProperty ORIGIN_CHECK =
-      new MAPIProperty(0x27, BINARY, "OriginCheck", "PR_ORIGIN_CHECK");
-   public static final MAPIProperty ORIGINAL_AUTHOR_ADDRTYPE =
-      new MAPIProperty(0x79, ASCII_STRING, "OriginalAuthorAddrtype", "PR_ORIGINAL_AUTHOR_ADDRTYPE");
-   public static final MAPIProperty ORIGINAL_AUTHOR_EMAIL_ADDRESS =
-      new MAPIProperty(0x7a, ASCII_STRING, "OriginalAuthorEmailAddress", "PR_ORIGINAL_AUTHOR_EMAIL_ADDRESS");
-   public static final MAPIProperty ORIGINAL_AUTHOR_ENTRY_ID =
-      new MAPIProperty(0x4c, BINARY, "OriginalAuthorEntryId", "PR_ORIGINAL_AUTHOR_ENTRYID");
-   public static final MAPIProperty ORIGINAL_AUTHOR_NAME =
-      new MAPIProperty(0x4d, ASCII_STRING, "OriginalAuthorName", "PR_ORIGINAL_AUTHOR_NAME");
-   public static final MAPIProperty ORIGINAL_AUTHOR_SEARCH_KEY =
-      new MAPIProperty(0x56, BINARY, "OriginalAuthorSearchKey", "PR_ORIGINAL_AUTHOR_SEARCH_KEY");
-   public static final MAPIProperty ORIGINAL_DELIVERY_TIME =
-      new MAPIProperty(0x55, TIME, "OriginalDeliveryTime", "PR_ORIGINAL_DELIVERY_TIME");
-   public static final MAPIProperty ORIGINAL_DISPLAY_BCC =
-      new MAPIProperty(0x72, ASCII_STRING, "OriginalDisplayBcc", "PR_ORIGINAL_DISPLAY_BCC");
-   public static final MAPIProperty ORIGINAL_DISPLAY_CC =
-      new MAPIProperty(0x73, ASCII_STRING, "OriginalDisplayCc", "PR_ORIGINAL_DISPLAY_CC");
-   public static final MAPIProperty ORIGINAL_DISPLAY_NAME =
-      new MAPIProperty(0x3a13, ASCII_STRING, "OriginalDisplayName", "PR_ORIGINAL_DISPLAY_NAME");
-   public static final MAPIProperty ORIGINAL_DISPLAY_TO =
-      new MAPIProperty(0x74, ASCII_STRING, "OriginalDisplayTo", "PR_ORIGINAL_DISPLAY_TO");
-   public static final MAPIProperty ORIGINAL_EITS =
-      new MAPIProperty(0x21, BINARY, "OriginalEits", "PR_ORIGINAL_EITS");
-   public static final MAPIProperty ORIGINAL_ENTRY_ID =
-      new MAPIProperty(0x3a12, BINARY, "OriginalEntryId", "PR_ORIGINAL_ENTRYID");
-   public static final MAPIProperty ORIGINAL_SEARCH_KEY =
-      new MAPIProperty(0x3a14, BINARY, "OriginalSearchKey", "PR_ORIGINAL_SEARCH_KEY");
-   public static final MAPIProperty ORIGINAL_SENDER_ADDRTYPE =
-      new MAPIProperty(0x66, ASCII_STRING, "OriginalSenderAddrtype", "PR_ORIGINAL_SENDER_ADDRTYPE");
-   public static final MAPIProperty ORIGINAL_SENDER_EMAIL_ADDRESS =
-      new MAPIProperty(0x67, ASCII_STRING, "OriginalSenderEmailAddress", "PR_ORIGINAL_SENDER_EMAIL_ADDRESS");
-   public static final MAPIProperty ORIGINAL_SENDER_ENTRY_ID =
-      new MAPIProperty(0x5b, BINARY, "OriginalSenderEntryId", "PR_ORIGINAL_SENDER_ENTRYID");
-   public static final MAPIProperty ORIGINAL_SENDER_NAME =
-      new MAPIProperty(90, ASCII_STRING, "OriginalSenderName", "PR_ORIGINAL_SENDER_NAME");
-   public static final MAPIProperty ORIGINAL_SENDER_SEARCH_KEY =
-      new MAPIProperty(0x5c, BINARY, "OriginalSenderSearchKey", "PR_ORIGINAL_SENDER_SEARCH_KEY");
-   public static final MAPIProperty ORIGINAL_SENSITIVITY =
-      new MAPIProperty(0x2e, LONG, "OriginalSensitivity", "PR_ORIGINAL_SENSITIVITY");
-   public static final MAPIProperty ORIGINAL_SENT_REPRESENTING_ADDRTYPE =
-      new MAPIProperty(0x68, ASCII_STRING, "OriginalSentRepresentingAddrtype", "PR_ORIGINAL_SENT_REPRESENTING_ADDRTYPE");
-   public static final MAPIProperty ORIGINAL_SENT_REPRESENTING_EMAIL_ADDRESS =
-      new MAPIProperty(0x69, ASCII_STRING, "OriginalSentRepresentingEmailAddress", "PR_ORIGINAL_SENT_REPRESENTING_EMAIL_ADDRESS");
-   public static final MAPIProperty ORIGINAL_SENT_REPRESENTING_ENTRY_ID =
-      new MAPIProperty(0x5e, BINARY, "OriginalSentRepresentingEntryId", "PR_ORIGINAL_SENT_REPRESENTING_ENTRYID");
-   public static final MAPIProperty ORIGINAL_SENT_REPRESENTING_NAME =
-      new MAPIProperty(0x5d, ASCII_STRING, "OriginalSentRepresentingName", "PR_ORIGINAL_SENT_REPRESENTING_NAME");
-   public static final MAPIProperty ORIGINAL_SENT_REPRESENTING_SEARCH_KEY =
-      new MAPIProperty(0x5f, BINARY, "OriginalSentRepresentingSearchKey", "PR_ORIGINAL_SENT_REPRESENTING_SEARCH_KEY");
-   public static final MAPIProperty ORIGINAL_SUBJECT =
-      new MAPIProperty(0x49, ASCII_STRING, "OriginalSubject", "PR_ORIGINAL_SUBJECT");
-   public static final MAPIProperty ORIGINAL_SUBMIT_TIME =
-      new MAPIProperty(0x4e, TIME, "OriginalSubmitTime", "PR_ORIGINAL_SUBMIT_TIME");
-   public static final MAPIProperty ORIGINALLY_INTENDED_RECIP_ADDRTYPE =
-      new MAPIProperty(0x7b, ASCII_STRING, "OriginallyIntendedRecipAddrtype", "PR_ORIGINALLY_INTENDED_RECIP_ADDRTYPE");
-   public static final MAPIProperty ORIGINALLY_INTENDED_RECIP_EMAIL_ADDRESS =
-      new MAPIProperty(0x7c, ASCII_STRING, "OriginallyIntendedRecipEmailAddress", "PR_ORIGINALLY_INTENDED_RECIP_EMAIL_ADDRESS");
-   public static final MAPIProperty ORIGINALLY_INTENDED_RECIP_ENTRY_ID =
-      new MAPIProperty(0x1012, BINARY, "OriginallyIntendedRecipEntryId", "PR_ORIGINALLY_INTENDED_RECIP_ENTRYID");
-   public static final MAPIProperty ORIGINALLY_INTENDED_RECIPIENT_NAME =
-      new MAPIProperty(0x20, BINARY, "OriginallyIntendedRecipientName", "PR_ORIGINALLY_INTENDED_RECIPIENT_NAME");
-   public static final MAPIProperty ORIGINATING_MTA_CERTIFICATE =
-      new MAPIProperty(0xe25, BINARY, "OriginatingMtaCertificate", "PR_ORIGINATING_MTA_CERTIFICATE");
-   public static final MAPIProperty ORIGINATOR_AND_DL_EXPANSION_HISTORY =
-      new MAPIProperty(0x1002, BINARY, "OriginatorAndDlExpansionHistory", "PR_ORIGINATOR_AND_DL_EXPANSION_HISTORY");
-   public static final MAPIProperty ORIGINATOR_CERTIFICATE =
-      new MAPIProperty(0x22, BINARY, "OriginatorCertificate", "PR_ORIGINATOR_CERTIFICATE");
-   public static final MAPIProperty ORIGINATOR_DELIVERY_REPORT_REQUESTED =
-      new MAPIProperty(0x23, BOOLEAN, "OriginatorDeliveryReportRequested", "PR_ORIGINATOR_DELIVERY_REPORT_REQUESTED");
-   public static final MAPIProperty ORIGINATOR_NON_DELIVERY_REPORT_REQUESTED =
-      new MAPIProperty(0xc08, BOOLEAN, "OriginatorNonDeliveryReportRequested", "PR_ORIGINATOR_NON_DELIVERY_REPORT_REQUESTED");
-   public static final MAPIProperty ORIGINATOR_REQUESTED_ALTERNATE_RECIPIENT =
-      new MAPIProperty(0xc09, BINARY, "OriginatorRequestedAlternateRecipient", "PR_ORIGINATOR_REQUESTED_ALTERNATE_RECIPIENT");
-   public static final MAPIProperty ORIGINATOR_RETURN_ADDRESS =
-      new MAPIProperty(0x24, BINARY, "OriginatorReturnAddress", "PR_ORIGINATOR_RETURN_ADDRESS");
-   public static final MAPIProperty OTHER_ADDRESS_CITY =
-      new MAPIProperty(0x3a5f, ASCII_STRING, "OtherAddressCity", "PR_OTHER_ADDRESS_CITY");
-   public static final MAPIProperty OTHER_ADDRESS_COUNTRY =
-      new MAPIProperty(0x3a60, ASCII_STRING, "OtherAddressCountry", "PR_OTHER_ADDRESS_COUNTRY");
-   public static final MAPIProperty OTHER_ADDRESS_POST_OFFICE_BOX =
-      new MAPIProperty(0x3a64, ASCII_STRING, "OtherAddressPostOfficeBox", "PR_OTHER_ADDRESS_POST_OFFICE_BOX");
-   public static final MAPIProperty OTHER_ADDRESS_POSTAL_CODE =
-      new MAPIProperty(0x3a61, ASCII_STRING, "OtherAddressPostalCode", "PR_OTHER_ADDRESS_POSTAL_CODE");
-   public static final MAPIProperty OTHER_ADDRESS_STATE_OR_PROVINCE =
-      new MAPIProperty(0x3a62, ASCII_STRING, "OtherAddressStateOrProvince", "PR_OTHER_ADDRESS_STATE_OR_PROVINCE");
-   public static final MAPIProperty OTHER_ADDRESS_STREET =
-      new MAPIProperty(0x3a63, ASCII_STRING, "OtherAddressStreet", "PR_OTHER_ADDRESS_STREET");
-   public static final MAPIProperty OTHER_TELEPHONE_NUMBER =
-      new MAPIProperty(0x3a1f, ASCII_STRING, "OtherTelephoneNumber", "PR_OTHER_TELEPHONE_NUMBER");
-   public static final MAPIProperty OWN_STORE_ENTRY_ID =
-      new MAPIProperty(0x3e06, BINARY, "OwnStoreEntryId", "PR_OWN_STORE_ENTRYID");
-   public static final MAPIProperty OWNER_APPT_ID =
-      new MAPIProperty(0x62, LONG, "OwnerApptId", "PR_OWNER_APPT_ID");
-   public static final MAPIProperty PAGER_TELEPHONE_NUMBER =
-      new MAPIProperty(0x3a21, ASCII_STRING, "PagerTelephoneNumber", "PR_PAGER_TELEPHONE_NUMBER");
-   public static final MAPIProperty PARENT_DISPLAY =
-      new MAPIProperty(0xe05, ASCII_STRING, "ParentDisplay", "PR_PARENT_DISPLAY");
-   public static final MAPIProperty PARENT_ENTRY_ID =
-      new MAPIProperty(0xe09, BINARY, "ParentEntryId", "PR_PARENT_ENTRYID");
-   public static final MAPIProperty PARENT_KEY =
-      new MAPIProperty(0x25, BINARY, "ParentKey", "PR_PARENT_KEY");
-   public static final MAPIProperty PERSONAL_HOME_PAGE =
-      new MAPIProperty(0x3a50, ASCII_STRING, "PersonalHomePage", "PR_PERSONAL_HOME_PAGE");
-   public static final MAPIProperty PHYSICAL_DELIVERY_BUREAU_FAX_DELIVERY =
-      new MAPIProperty(0xc0a, BOOLEAN, "PhysicalDeliveryBureauFaxDelivery", "PR_PHYSICAL_DELIVERY_BUREAU_FAX_DELIVERY");
-   public static final MAPIProperty PHYSICAL_DELIVERY_MODE =
-      new MAPIProperty(0xc0b, LONG, "PhysicalDeliveryMode", "PR_PHYSICAL_DELIVERY_MODE");
-   public static final MAPIProperty PHYSICAL_DELIVERY_REPORT_REQUEST =
-      new MAPIProperty(0xc0c, LONG, "PhysicalDeliveryReportRequest", "PR_PHYSICAL_DELIVERY_REPORT_REQUEST");
-   public static final MAPIProperty PHYSICAL_FORWARDING_ADDRESS =
-      new MAPIProperty(0xc0d, BINARY, "PhysicalForwardingAddress", "PR_PHYSICAL_FORWARDING_ADDRESS");
-   public static final MAPIProperty PHYSICAL_FORWARDING_ADDRESS_REQUESTED =
-      new MAPIProperty(0xc0e, BOOLEAN, "PhysicalForwardingAddressRequested", "PR_PHYSICAL_FORWARDING_ADDRESS_REQUESTED");
-   public static final MAPIProperty PHYSICAL_FORWARDING_PROHIBITED =
-      new MAPIProperty(0xc0f, BOOLEAN, "PhysicalForwardingProhibited", "PR_PHYSICAL_FORWARDING_PROHIBITED");
-   public static final MAPIProperty PHYSICAL_RENDITION_ATTRIBUTES =
-      new MAPIProperty(0xc10, BINARY, "PhysicalRenditionAttributes", "PR_PHYSICAL_RENDITION_ATTRIBUTES");
-   public static final MAPIProperty POST_FOLDER_ENTRIES =
-      new MAPIProperty(0x103b, BINARY, "PostFolderEntries", "PR_POST_FOLDER_ENTRIES");
-   public static final MAPIProperty POST_FOLDER_NAMES =
-      new MAPIProperty(0x103c, ASCII_STRING, "PostFolderNames", "PR_POST_FOLDER_NAMES");
-   public static final MAPIProperty POST_OFFICE_BOX =
-      new MAPIProperty(0x3a2b, ASCII_STRING, "PostOfficeBox", "PR_POST_OFFICE_BOX");
-   public static final MAPIProperty POST_REPLY_DENIED =
-      new MAPIProperty(0x103f, BINARY, "PostReplyDenied", "PR_POST_REPLY_DENIED");
-   public static final MAPIProperty POST_REPLY_FOLDER_ENTRIES =
-      new MAPIProperty(0x103d, BINARY, "PostReplyFolderEntries", "PR_POST_REPLY_FOLDER_ENTRIES");
-   public static final MAPIProperty POST_REPLY_FOLDER_NAMES =
-      new MAPIProperty(0x103e, ASCII_STRING, "PostReplyFolderNames", "PR_POST_REPLY_FOLDER_NAMES");
-   public static final MAPIProperty POSTAL_ADDRESS =
-      new MAPIProperty(0x3a15, ASCII_STRING, "PostalAddress", "PR_POSTAL_ADDRESS");
-   public static final MAPIProperty POSTAL_CODE =
-      new MAPIProperty(0x3a2a, ASCII_STRING, "PostalCode", "PR_POSTAL_CODE");
-   public static final MAPIProperty PREPROCESS =
-      new MAPIProperty(0xe22, BOOLEAN, "Preprocess", "PR_PREPROCESS");
-   public static final MAPIProperty PRIMARY_CAPABILITY =
-      new MAPIProperty(0x3904, BINARY, "PrimaryCapability", "PR_PRIMARY_CAPABILITY");
-   public static final MAPIProperty PRIMARY_FAX_NUMBER =
-      new MAPIProperty(0x3a23, ASCII_STRING, "PrimaryFaxNumber", "PR_PRIMARY_FAX_NUMBER");
-   public static final MAPIProperty PRIMARY_TELEPHONE_NUMBER =
-      new MAPIProperty(0x3a1a, ASCII_STRING, "PrimaryTelephoneNumber", "PR_PRIMARY_TELEPHONE_NUMBER");
-   public static final MAPIProperty PRIORITY =
-      new MAPIProperty(0x26, LONG, "Priority", "PR_PRIORITY");
-   public static final MAPIProperty PROFESSION =
-      new MAPIProperty(0x3a46, ASCII_STRING, "Profession", "PR_PROFESSION");
-   public static final MAPIProperty PROFILE_NAME =
-      new MAPIProperty(0x3d12, ASCII_STRING, "ProfileName", "PR_PROFILE_NAME");
-   public static final MAPIProperty PROOF_OF_DELIVERY =
-      new MAPIProperty(0xc11, BINARY, "ProofOfDelivery", "PR_PROOF_OF_DELIVERY");
-   public static final MAPIProperty PROOF_OF_DELIVERY_REQUESTED =
-      new MAPIProperty(0xc12, BOOLEAN, "ProofOfDeliveryRequested", "PR_PROOF_OF_DELIVERY_REQUESTED");
-   public static final MAPIProperty PROOF_OF_SUBMISSION =
-      new MAPIProperty(0xe26, BINARY, "ProofOfSubmission", "PR_PROOF_OF_SUBMISSION");
-   public static final MAPIProperty PROOF_OF_SUBMISSION_REQUESTED =
-      new MAPIProperty(40, BOOLEAN, "ProofOfSubmissionRequested", "PR_PROOF_OF_SUBMISSION_REQUESTED");
-   public static final MAPIProperty PROP_ID_SECURE_MAX =
-      new MAPIProperty(0x67ff, Types.UNKNOWN,  "PropIdSecureMax", "PROP_ID_SECURE_MAX");
-   public static final MAPIProperty PROP_ID_SECURE_MIN =
-      new MAPIProperty(0x67f0, Types.UNKNOWN,  "PropIdSecureMin", "PROP_ID_SECURE_MIN");
-   public static final MAPIProperty PROVIDER_DISPLAY =
-      new MAPIProperty(0x3006, ASCII_STRING, "ProviderDisplay", "PR_PROVIDER_DISPLAY");
-   public static final MAPIProperty PROVIDER_DLL_NAME =
-      new MAPIProperty(0x300a, ASCII_STRING, "ProviderDllName", "PR_PROVIDER_DLL_NAME");
-   public static final MAPIProperty PROVIDER_ORDINAL =
-      new MAPIProperty(0x300d, LONG, "ProviderOrdinal", "PR_PROVIDER_ORDINAL");
-   public static final MAPIProperty PROVIDER_SUBMIT_TIME =
-      new MAPIProperty(0x48, TIME, "ProviderSubmitTime", "PR_PROVIDER_SUBMIT_TIME");
-   public static final MAPIProperty PROVIDER_UID =
-      new MAPIProperty(0x300c, BINARY, "ProviderUid", "PR_PROVIDER_UID");
-   public static final MAPIProperty PUID =
-      new MAPIProperty(0x300e, Types.UNKNOWN, "Puid", "PR_PUID");
-   public static final MAPIProperty RADIO_TELEPHONE_NUMBER =
-      new MAPIProperty(0x3a1d, ASCII_STRING, "RadioTelephoneNumber", "PR_RADIO_TELEPHONE_NUMBER");
-   public static final MAPIProperty RCVD_REPRESENTING_ADDRTYPE =
-      new MAPIProperty(0x77, ASCII_STRING, "RcvdRepresentingAddrtype", "PR_RCVD_REPRESENTING_ADDRTYPE");
-   public static final MAPIProperty RCVD_REPRESENTING_EMAIL_ADDRESS =
-      new MAPIProperty(120, ASCII_STRING, "RcvdRepresentingEmailAddress", "PR_RCVD_REPRESENTING_EMAIL_ADDRESS");
-   public static final MAPIProperty RCVD_REPRESENTING_ENTRY_ID =
-      new MAPIProperty(0x43, BINARY, "RcvdRepresentingEntryId", "PR_RCVD_REPRESENTING_ENTRYID");
-   public static final MAPIProperty RCVD_REPRESENTING_NAME =
-      new MAPIProperty(0x44, ASCII_STRING, "RcvdRepresentingName", "PR_RCVD_REPRESENTING_NAME");
-   public static final MAPIProperty RCVD_REPRESENTING_SEARCH_KEY =
-      new MAPIProperty(0x52, BINARY, "RcvdRepresentingSearchKey", "PR_RCVD_REPRESENTING_SEARCH_KEY");
-   public static final MAPIProperty READ_RECEIPT_ENTRY_ID =
-      new MAPIProperty(70, BINARY, "ReadReceiptEntryId", "PR_READ_RECEIPT_ENTRYID");
-   public static final MAPIProperty READ_RECEIPT_REQUESTED =
-      new MAPIProperty(0x29, BOOLEAN, "ReadReceiptRequested", "PR_READ_RECEIPT_REQUESTED");
-   public static final MAPIProperty READ_RECEIPT_SEARCH_KEY =
-      new MAPIProperty(0x53, BINARY, "ReadReceiptSearchKey", "PR_READ_RECEIPT_SEARCH_KEY");
-   public static final MAPIProperty RECEIPT_TIME =
-      new MAPIProperty(0x2a, TIME, "ReceiptTime", "PR_RECEIPT_TIME");
-   public static final MAPIProperty RECEIVE_FOLDER_SETTINGS =
-      new MAPIProperty(0x3415, DIRECTORY, "ReceiveFolderSettings", "PR_RECEIVE_FOLDER_SETTINGS");
-   public static final MAPIProperty RECEIVED_BY_ADDRTYPE =
-      new MAPIProperty(0x75, ASCII_STRING, "ReceivedByAddrtype", "PR_RECEIVED_BY_ADDRTYPE");
-   public static final MAPIProperty RECEIVED_BY_EMAIL_ADDRESS =
-      new MAPIProperty(0x76, ASCII_STRING, "ReceivedByEmailAddress", "PR_RECEIVED_BY_EMAIL_ADDRESS");
-   public static final MAPIProperty RECEIVED_BY_ENTRY_ID =
-      new MAPIProperty(0x3f, BINARY, "ReceivedByEntryId", "PR_RECEIVED_BY_ENTRYID");
-   public static final MAPIProperty RECEIVED_BY_NAME =
-      new MAPIProperty(0x40, ASCII_STRING, "ReceivedByName", "PR_RECEIVED_BY_NAME");
-   public static final MAPIProperty RECIPIENT_DISPLAY_NAME =
-      new MAPIProperty(0x5ff6, Types.UNICODE_STRING, "RecipientDisplayName", null);
-   public static final MAPIProperty RECIPIENT_ENTRY_ID =
-      new MAPIProperty(0x5ff7, Types.UNKNOWN, "RecipientEntryId", null);
-   public static final MAPIProperty RECIPIENT_FLAGS =
-      new MAPIProperty(0x5ffd, Types.UNKNOWN, "RecipientFlags", null);
-   public static final MAPIProperty RECEIVED_BY_SEARCH_KEY =
-      new MAPIProperty(0x51, BINARY, "ReceivedBySearchKey", "PR_RECEIVED_BY_SEARCH_KEY");
-   public static final MAPIProperty RECIPIENT_CERTIFICATE =
-      new MAPIProperty(0xc13, BINARY, "RecipientCertificate", "PR_RECIPIENT_CERTIFICATE");
-   public static final MAPIProperty RECIPIENT_NUMBER_FOR_ADVICE =
-      new MAPIProperty(0xc14, ASCII_STRING, "RecipientNumberForAdvice", "PR_RECIPIENT_NUMBER_FOR_ADVICE");
-   public static final MAPIProperty RECIPIENT_REASSIGNMENT_PROHIBITED =
-      new MAPIProperty(0x2b, BOOLEAN, "RecipientReassignmentProhibited", "PR_RECIPIENT_REASSIGNMENT_PROHIBITED");
-   public static final MAPIProperty RECIPIENT_STATUS =
-      new MAPIProperty(0xe15, LONG, "RecipientStatus", "PR_RECIPIENT_STATUS");
-   public static final MAPIProperty RECIPIENT_TYPE =
-      new MAPIProperty(0xc15, LONG, "RecipientType", "PR_RECIPIENT_TYPE");
-   public static final MAPIProperty RECORD_KEY =
-      new MAPIProperty(0xff9, BINARY, "RecordKey", "PR_RECORD_KEY");
-   public static final MAPIProperty REDIRECTION_HISTORY =
-      new MAPIProperty(0x2c, BINARY, "RedirectionHistory", "PR_REDIRECTION_HISTORY");
-   public static final MAPIProperty REFERRED_BY_NAME =
-      new MAPIProperty(0x3a47, ASCII_STRING, "ReferredByName", "PR_REFERRED_BY_NAME");
-   public static final MAPIProperty REGISTERED_MAIL_TYPE =
-      new MAPIProperty(0xc16, LONG, "RegisteredMailType", "PR_REGISTERED_MAIL_TYPE");
-   public static final MAPIProperty RELATED_IPMS =
-      new MAPIProperty(0x2d, BINARY, "RelatedIpms", "PR_RELATED_IPMS");
-   public static final MAPIProperty REMOTE_PROGRESS =
-      new MAPIProperty(0x3e0b, LONG, "RemoteProgress", "PR_REMOTE_PROGRESS");
-   public static final MAPIProperty REMOTE_PROGRESS_TEXT =
-      new MAPIProperty(0x3e0c, ASCII_STRING, "RemoteProgressText", "PR_REMOTE_PROGRESS_TEXT");
-   public static final MAPIProperty REMOTE_VALIDATE_OK =
-      new MAPIProperty(0x3e0d, BOOLEAN, "RemoteValidateOk", "PR_REMOTE_VALIDATE_OK");
-   public static final MAPIProperty RENDERING_POSITION =
-      new MAPIProperty(0x370b, LONG, "RenderingPosition", "PR_RENDERING_POSITION");
-   public static final MAPIProperty REPLY_RECIPIENT_ENTRIES =
-      new MAPIProperty(0x4f, BINARY, "ReplyRecipientEntries", "PR_REPLY_RECIPIENT_ENTRIES");
-   public static final MAPIProperty REPLY_RECIPIENT_NAMES =
-      new MAPIProperty(80, ASCII_STRING, "ReplyRecipientNames", "PR_REPLY_RECIPIENT_NAMES");
-   public static final MAPIProperty REPLY_REQUESTED =
-      new MAPIProperty(0xc17, BOOLEAN, "ReplyRequested", "PR_REPLY_REQUESTED");
-   public static final MAPIProperty REPLY_TIME =
-      new MAPIProperty(0x30, TIME, "ReplyTime", "PR_REPLY_TIME");
-   public static final MAPIProperty REPORT_ENTRY_ID =
-      new MAPIProperty(0x45, BINARY, "ReportEntryId", "PR_REPORT_ENTRYID");
-   public static final MAPIProperty REPORT_NAME =
-      new MAPIProperty(0x3a, ASCII_STRING, "ReportName", "PR_REPORT_NAME");
-   public static final MAPIProperty REPORT_SEARCH_KEY =
-      new MAPIProperty(0x54, BINARY, "ReportSearchKey", "PR_REPORT_SEARCH_KEY");
-   public static final MAPIProperty REPORT_TAG =
-      new MAPIProperty(0x31, BINARY, "ReportTag", "PR_REPORT_TAG");
-   public static final MAPIProperty REPORT_TEXT =
-      new MAPIProperty(0x1001, ASCII_STRING, "ReportText", "PR_REPORT_TEXT");
-   public static final MAPIProperty REPORT_TIME =
-      new MAPIProperty(50, TIME, "ReportTime", "PR_REPORT_TIME");
-   public static final MAPIProperty REPORTING_DL_NAME =
-      new MAPIProperty(0x1003, BINARY, "ReportingDlName", "PR_REPORTING_DL_NAME");
-   public static final MAPIProperty REPORTING_MTA_CERTIFICATE =
-      new MAPIProperty(0x1004, BINARY, "ReportingMtaCertificate", "PR_REPORTING_MTA_CERTIFICATE");
-   public static final MAPIProperty REQUESTED_DELIVERY_METHOD =
-      new MAPIProperty(0xc18, LONG, "RequestedDeliveryMethod", "PR_REQUESTED_DELIVERY_METHOD");
-   public static final MAPIProperty RESOURCE_FLAGS =
-      new MAPIProperty(0x3009, LONG, "ResourceFlags", "PR_RESOURCE_FLAGS");
-   public static final MAPIProperty RESOURCE_METHODS =
-      new MAPIProperty(0x3e02, LONG, "ResourceMethods", "PR_RESOURCE_METHODS");
-   public static final MAPIProperty RESOURCE_PATH =
-      new MAPIProperty(0x3e07, ASCII_STRING, "ResourcePath", "PR_RESOURCE_PATH");
-   public static final MAPIProperty RESOURCE_TYPE =
-      new MAPIProperty(0x3e03, LONG, "ResourceType", "PR_RESOURCE_TYPE");
-   public static final MAPIProperty RESPONSE_REQUESTED =
-      new MAPIProperty(0x63, BOOLEAN, "ResponseRequested", "PR_RESPONSE_REQUESTED");
-   public static final MAPIProperty RESPONSIBILITY =
-      new MAPIProperty(0xe0f, BOOLEAN, "Responsibility", "PR_RESPONSIBILITY");
-   public static final MAPIProperty RETURNED_IPM =
-      new MAPIProperty(0x33, BOOLEAN, "ReturnedIpm", "PR_RETURNED_IPM");
-   public static final MAPIProperty ROW_TYPE =
-      new MAPIProperty(0xff5, LONG, "RowType", "PR_ROW_TYPE");
-   public static final MAPIProperty ROWID =
-      new MAPIProperty(0x3000, LONG, "Rowid", "PR_ROWID");
-   public static final MAPIProperty RTF_COMPRESSED =
-      new MAPIProperty(0x1009, BINARY, "RtfCompressed", "PR_RTF_COMPRESSED");
-   public static final MAPIProperty RTF_IN_SYNC =
-      new MAPIProperty(0xe1f, BOOLEAN, "RtfInSync", "PR_RTF_IN_SYNC");
-   public static final MAPIProperty RTF_SYNC_BODY_COUNT =
-      new MAPIProperty(0x1007, LONG, "RtfSyncBodyCount", "PR_RTF_SYNC_BODY_COUNT");
-   public static final MAPIProperty RTF_SYNC_BODY_CRC =
-      new MAPIProperty(0x1006, LONG, "RtfSyncBodyCrc", "PR_RTF_SYNC_BODY_CRC");
-   public static final MAPIProperty RTF_SYNC_BODY_TAG =
-      new MAPIProperty(0x1008, ASCII_STRING, "RtfSyncBodyTag", "PR_RTF_SYNC_BODY_TAG");
-   public static final MAPIProperty RTF_SYNC_PREFIX_COUNT =
-      new MAPIProperty(0x1010, LONG, "RtfSyncPrefixCount", "PR_RTF_SYNC_PREFIX_COUNT");
-   public static final MAPIProperty RTF_SYNC_TRAILING_COUNT =
-      new MAPIProperty(0x1011, LONG, "RtfSyncTrailingCount", "PR_RTF_SYNC_TRAILING_COUNT");
-   public static final MAPIProperty SEARCH =
-      new MAPIProperty(0x3607, DIRECTORY, "Search", "PR_SEARCH");
-   public static final MAPIProperty SEARCH_KEY =
-      new MAPIProperty(0x300b, BINARY, "SearchKey", "PR_SEARCH_KEY");
-   public static final MAPIProperty SECURITY =
-      new MAPIProperty(0x34, LONG, "Security", "PR_SECURITY");
-   public static final MAPIProperty SELECTABLE =
-      new MAPIProperty(0x3609, BOOLEAN, "Selectable", "PR_SELECTABLE");
-   public static final MAPIProperty SEND_INTERNET_ENCODING =
-      new MAPIProperty(0x3a71, LONG, "SendInternetEncoding", "PR_SEND_INTERNET_ENCODING");
-   public static final MAPIProperty SEND_RECALL_REPORT =
-      new MAPIProperty(0x6803, Types.UNKNOWN, "SendRecallReport", "messages");
-   public static final MAPIProperty SEND_RICH_INFO =
-      new MAPIProperty(0x3a40, BOOLEAN, "SendRichInfo", "PR_SEND_RICH_INFO");
-   public static final MAPIProperty SENDER_ADDRTYPE =
-      new MAPIProperty(0xc1e, ASCII_STRING, "SenderAddrtype", "PR_SENDER_ADDRTYPE");
-   public static final MAPIProperty SENDER_EMAIL_ADDRESS =
-      new MAPIProperty(0xc1f, ASCII_STRING, "SenderEmailAddress", "PR_SENDER_EMAIL_ADDRESS");
-   public static final MAPIProperty SENDER_ENTRY_ID =
-      new MAPIProperty(0xc19, BINARY, "SenderEntryId", "PR_SENDER_ENTRYID");
-   public static final MAPIProperty SENDER_NAME =
-      new MAPIProperty(0xc1a, ASCII_STRING, "SenderName", "PR_SENDER_NAME");
-   public static final MAPIProperty SENDER_SEARCH_KEY =
-      new MAPIProperty(0xc1d, BINARY, "SenderSearchKey", "PR_SENDER_SEARCH_KEY");
-   public static final MAPIProperty SENSITIVITY =
-      new MAPIProperty(0x36, LONG, "Sensitivity", "PR_SENSITIVITY");
-   public static final MAPIProperty SENT_REPRESENTING_ADDRTYPE =
-      new MAPIProperty(100, ASCII_STRING, "SentRepresentingAddrtype", "PR_SENT_REPRESENTING_ADDRTYPE");
-   public static final MAPIProperty SENT_REPRESENTING_EMAIL_ADDRESS =
-      new MAPIProperty(0x65, ASCII_STRING, "SentRepresentingEmailAddress", "PR_SENT_REPRESENTING_EMAIL_ADDRESS");
-   public static final MAPIProperty SENT_REPRESENTING_ENTRY_ID =
-      new MAPIProperty(0x41, BINARY, "SentRepresentingEntryId", "PR_SENT_REPRESENTING_ENTRYID");
-   public static final MAPIProperty SENT_REPRESENTING_NAME =
-      new MAPIProperty(0x42, ASCII_STRING, "SentRepresentingName", "PR_SENT_REPRESENTING_NAME");
-   public static final MAPIProperty SENT_REPRESENTING_SEARCH_KEY =
-      new MAPIProperty(0x3b, BINARY, "SentRepresentingSearchKey", "PR_SENT_REPRESENTING_SEARCH_KEY");
-   public static final MAPIProperty SENTMAIL_ENTRY_ID =
-      new MAPIProperty(0xe0a, BINARY, "SentmailEntryId", "PR_SENTMAIL_ENTRYID");
-   public static final MAPIProperty SERVICE_DELETE_FILES =
-      new MAPIProperty(0x3d10, Types.createCustom(4126), "ServiceDeleteFiles", "PR_SERVICE_DELETE_FILES");
-   public static final MAPIProperty SERVICE_DLL_NAME =
-      new MAPIProperty(0x3d0a, ASCII_STRING, "ServiceDllName", "PR_SERVICE_DLL_NAME");
-   public static final MAPIProperty SERVICE_ENTRY_NAME =
-      new MAPIProperty(0x3d0b, ASCII_STRING, "ServiceEntryName", "PR_SERVICE_ENTRY_NAME");
-   public static final MAPIProperty SERVICE_EXTRA_UIDS =
-      new MAPIProperty(0x3d0d, BINARY, "ServiceExtraUids", "PR_SERVICE_EXTRA_UIDS");
-   public static final MAPIProperty SERVICE_NAME =
-      new MAPIProperty(0x3d09, ASCII_STRING, "ServiceName", "PR_SERVICE_NAME");
-   public static final MAPIProperty SERVICE_SUPPORT_FILES =
-      new MAPIProperty(0x3d0f, Types.createCustom(4126), "ServiceSupportFiles", "PR_SERVICE_SUPPORT_FILES");
-   public static final MAPIProperty SERVICE_UID =
-      new MAPIProperty(0x3d0c, BINARY, "ServiceUid", "PR_SERVICE_UID");
-   public static final MAPIProperty SERVICES =
-      new MAPIProperty(0x3d0e, BINARY, "Services", "PR_SERVICES");
-   public static final MAPIProperty SEVEN_BIT_DISPLAY_NAME =
-      new MAPIProperty(0x39ff, ASCII_STRING, "SevenBitDisplayName", "PR_SEVEN_BIT_DISPLAY_NAME");
-   public static final MAPIProperty SMTP_ADDRESS =
-      new MAPIProperty(0x39fe, Types.UNICODE_STRING, "SmtpAddress", "PR_SMTP_ADDRESS");
-   public static final MAPIProperty SPOOLER_STATUS =
-      new MAPIProperty(0xe10, LONG, "SpoolerStatus", "PR_SPOOLER_STATUS");
-   public static final MAPIProperty SPOUSE_NAME =
-      new MAPIProperty(0x3a48, ASCII_STRING, "SpouseName", "PR_SPOUSE_NAME");
-   public static final MAPIProperty START_DATE =
-      new MAPIProperty(0x60, TIME, "StartDate", "PR_START_DATE");
-   public static final MAPIProperty STATE_OR_PROVINCE =
-      new MAPIProperty(0x3a28, ASCII_STRING, "StateOrProvince", "PR_STATE_OR_PROVINCE");
-   public static final MAPIProperty STATUS =
-      new MAPIProperty(0x360b, LONG, "Status", "PR_STATUS");
-   public static final MAPIProperty STATUS_CODE =
-      new MAPIProperty(0x3e04, LONG, "StatusCode", "PR_STATUS_CODE");
-   public static final MAPIProperty STATUS_STRING =
-      new MAPIProperty(0x3e08, ASCII_STRING, "StatusString", "PR_STATUS_STRING");
-   public static final MAPIProperty STORE_ENTRY_ID =
-      new MAPIProperty(0xffb, BINARY, "StoreEntryId", "PR_STORE_ENTRYID");
-   public static final MAPIProperty STORE_PROVIDERS =
-      new MAPIProperty(0x3d00, BINARY, "StoreProviders", "PR_STORE_PROVIDERS");
-   public static final MAPIProperty STORE_RECORD_KEY =
-      new MAPIProperty(0xffa, BINARY, "StoreRecordKey", "PR_STORE_RECORD_KEY");
-   public static final MAPIProperty STORE_STATE =
-      new MAPIProperty(0x340e, LONG, "StoreState", "PR_STORE_STATE");
-   public static final MAPIProperty STORE_SUPPORT_MASK =
-      new MAPIProperty(0x340d, LONG, "StoreSupportMask", "PR_STORE_SUPPORT_MASK");
-   public static final MAPIProperty STREET_ADDRESS =
-      new MAPIProperty(0x3a29, ASCII_STRING, "StreetAddress", "PR_STREET_ADDRESS");
-   public static final MAPIProperty SUBFOLDERS =
-      new MAPIProperty(0x360a, BOOLEAN, "Subfolders", "PR_SUBFOLDERS");
-   public static final MAPIProperty SUBJECT =
-      new MAPIProperty(0x37, ASCII_STRING, "Subject", "PR_SUBJECT");
-   public static final MAPIProperty SUBJECT_IPM =
-      new MAPIProperty(0x38, BINARY, "SubjectIpm", "PR_SUBJECT_IPM");
-   public static final MAPIProperty SUBJECT_PREFIX =
-      new MAPIProperty(0x3d, ASCII_STRING, "SubjectPrefix", "PR_SUBJECT_PREFIX");
-   public static final MAPIProperty SUBMIT_FLAGS =
-      new MAPIProperty(0xe14, LONG, "SubmitFlags", "PR_SUBMIT_FLAGS");
-   public static final MAPIProperty SUPERSEDES =
-      new MAPIProperty(0x103a, ASCII_STRING, "Supersedes", "PR_SUPERSEDES");
-   public static final MAPIProperty SUPPLEMENTARY_INFO =
-      new MAPIProperty(0xc1b, ASCII_STRING, "SupplementaryInfo", "PR_SUPPLEMENTARY_INFO");
-   public static final MAPIProperty SURNAME =
-      new MAPIProperty(0x3a11, ASCII_STRING, "Surname", "PR_SURNAME");
-   public static final MAPIProperty TELEX_NUMBER =
-      new MAPIProperty(0x3a2c, ASCII_STRING, "TelexNumber", "PR_TELEX_NUMBER");
-   public static final MAPIProperty TEMPLATEID =
-      new MAPIProperty(0x3902, BINARY, "Templateid", "PR_TEMPLATEID");
-   public static final MAPIProperty TITLE =
-      new MAPIProperty(0x3a17, ASCII_STRING, "Title", "PR_TITLE");
-   public static final MAPIProperty TNEF_CORRELATION_KEY =
-      new MAPIProperty(0x7f, BINARY, "TnefCorrelationKey", "PR_TNEF_CORRELATION_KEY");
-   public static final MAPIProperty TRANSMITABLE_DISPLAY_NAME =
-      new MAPIProperty(0x3a20, ASCII_STRING, "TransmitableDisplayName", "PR_TRANSMITABLE_DISPLAY_NAME");
-   public static final MAPIProperty TRANSPORT_KEY =
-      new MAPIProperty(0xe16, LONG, "TransportKey", "PR_TRANSPORT_KEY");
-   public static final MAPIProperty TRANSPORT_MESSAGE_HEADERS =
-      new MAPIProperty(0x7d, ASCII_STRING, "TransportMessageHeaders", "PR_TRANSPORT_MESSAGE_HEADERS");
-   public static final MAPIProperty TRANSPORT_PROVIDERS =
-      new MAPIProperty(0x3d02, BINARY, "TransportProviders", "PR_TRANSPORT_PROVIDERS");
-   public static final MAPIProperty TRANSPORT_STATUS =
-      new MAPIProperty(0xe11, LONG, "TransportStatus", "PR_TRANSPORT_STATUS");
-   public static final MAPIProperty TTYTDD_PHONE_NUMBER =
-      new MAPIProperty(0x3a4b, ASCII_STRING, "TtytddPhoneNumber", "PR_TTYTDD_PHONE_NUMBER");
-   public static final MAPIProperty TYPE_OF_MTS_USER =
-      new MAPIProperty(0xc1c, LONG, "TypeOfMtsUser", "PR_TYPE_OF_MTS_USER");
-   public static final MAPIProperty USER_CERTIFICATE =
-      new MAPIProperty(0x3a22, BINARY, "UserCertificate", "PR_USER_CERTIFICATE");
-   public static final MAPIProperty USER_X509_CERTIFICATE =
-      new MAPIProperty(0x3a70, Types.createCustom(4354), "UserX509Certificate", "PR_USER_X509_CERTIFICATE");
-   public static final MAPIProperty VALID_FOLDER_MASK =
-      new MAPIProperty(0x35df, LONG, "ValidFolderMask", "PR_VALID_FOLDER_MASK");
-   public static final MAPIProperty VIEWS_ENTRY_ID =
-      new MAPIProperty(0x35e5, BINARY, "ViewsEntryId", "PR_VIEWS_ENTRYID");
-   public static final MAPIProperty WEDDING_ANNIVERSARY =
-      new MAPIProperty(0x3a41, TIME, "WeddingAnniversary", "PR_WEDDING_ANNIVERSARY");
-   public static final MAPIProperty X400_CONTENT_TYPE =
-      new MAPIProperty(60, BINARY, "X400ContentType", "PR_X400_CONTENT_TYPE");
-   public static final MAPIProperty X400_DEFERRED_DELIVERY_CANCEL =
-      new MAPIProperty(0x3e09, BOOLEAN, "X400DeferredDeliveryCancel", "PR_X400_DEFERRED_DELIVERY_CANCEL");
-   public static final MAPIProperty XPOS =
-      new MAPIProperty(0x3f05, LONG, "Xpos", "PR_XPOS");
-   public static final MAPIProperty YPOS =
-      new MAPIProperty(0x3f06, LONG, "Ypos", "PR_YPOS");
-   
-   public static final MAPIProperty UNKNOWN =
-      new MAPIProperty(-1, Types.UNKNOWN, "Unknown", null);
-   
-   // 0x8??? ones are outlook specific, and not standard MAPI
-   // TODO See http://msdn.microsoft.com/en-us/library/ee157150%28v=exchg.80%29 for some
-   //  info on how we might decode them properly in the future
-   private static final int ID_FIRST_CUSTOM = 0x8000;
-   private static final int ID_LAST_CUSTOM = 0xFFFE;
-   
-   /* ---------------------------------------------------------------------  */
-   
-   public final int id;
-   public final MAPIType usualType;
-   public final String name;
-   public final String mapiProperty;
-   
-   private MAPIProperty(int id, MAPIType usualType, String name, String mapiProperty) {
-      this.id = id;
-      this.usualType = usualType;
-      this.name = name;
-      this.mapiProperty = mapiProperty;
-      
-      // If it isn't unknown or custom, store it for lookup
-      if(id == -1 || (id >= ID_FIRST_CUSTOM && id <= ID_LAST_CUSTOM) 
+    private static Map<Integer, MAPIProperty> attributes = new HashMap<Integer, MAPIProperty>();
+
+    public static final MAPIProperty AB_DEFAULT_DIR =
+        new MAPIProperty(0x3d06, BINARY, "AbDefaultDir", "PR_AB_DEFAULT_DIR");
+    public static final MAPIProperty AB_DEFAULT_PAB =
+        new MAPIProperty(0x3d07, BINARY, "AbDefaultPab", "PR_AB_DEFAULT_PAB");
+    public static final MAPIProperty AB_PROVIDER_ID =
+        new MAPIProperty(0x3615, BINARY, "AbProviderId", "PR_AB_PROVIDER_ID");
+    public static final MAPIProperty AB_PROVIDERS =
+        new MAPIProperty(0x3d01, BINARY, "AbProviders", "PR_AB_PROVIDERS");
+    public static final MAPIProperty AB_SEARCH_PATH =
+        new MAPIProperty(0x3d05, Types.createCustom(4354), "AbSearchPath", "PR_AB_SEARCH_PATH");
+    public static final MAPIProperty AB_SEARCH_PATH_UPDATE =
+        new MAPIProperty(0x3d11, BINARY, "AbSearchPathUpdate", "PR_AB_SEARCH_PATH_UPDATE");
+    public static final MAPIProperty ACCESS =
+        new MAPIProperty(0xff4, LONG, "Access", "PR_ACCESS");
+    public static final MAPIProperty ACCESS_LEVEL =
+        new MAPIProperty(0xff7, LONG, "AccessLevel", "PR_ACCESS_LEVEL");
+    public static final MAPIProperty ACCOUNT =
+        new MAPIProperty(0x3a00, ASCII_STRING, "Account", "PR_ACCOUNT");
+    public static final MAPIProperty ADDRTYPE =
+        new MAPIProperty(0x3002, ASCII_STRING, "Addrtype", "PR_ADDRTYPE");
+    public static final MAPIProperty ALTERNATE_RECIPIENT =
+        new MAPIProperty(0x3a01, BINARY, "AlternateRecipient", "PR_ALTERNATE_RECIPIENT");
+    public static final MAPIProperty ALTERNATE_RECIPIENT_ALLOWED =
+        new MAPIProperty(2, BOOLEAN, "AlternateRecipientAllowed", "PR_ALTERNATE_RECIPIENT_ALLOWED");
+    public static final MAPIProperty ANR =
+        new MAPIProperty(0x360c, ASCII_STRING, "Anr", "PR_ANR");
+    public static final MAPIProperty ASSISTANT =
+        new MAPIProperty(0x3a30, ASCII_STRING, "Assistant", "PR_ASSISTANT");
+    public static final MAPIProperty ASSISTANT_TELEPHONE_NUMBER =
+        new MAPIProperty(0x3a2e, ASCII_STRING, "AssistantTelephoneNumber", "PR_ASSISTANT_TELEPHONE_NUMBER");
+    public static final MAPIProperty ASSOC_CONTENT_COUNT =
+        new MAPIProperty(0x3617, LONG, "AssocContentCount", "PR_ASSOC_CONTENT_COUNT");
+    public static final MAPIProperty ATTACH_ADDITIONAL_INFO =
+        new MAPIProperty(0x370f, BINARY, "AttachAdditionalInfo", "PR_ATTACH_ADDITIONAL_INFO");
+    public static final MAPIProperty ATTACH_CONTENT_BASE =
+        new MAPIProperty(0x3711, Types.UNKNOWN,  "AttachContentBase", "PR_ATTACH_CONTENT_BASE");
+    public static final MAPIProperty ATTACH_CONTENT_ID =
+        new MAPIProperty(0x3712, Types.UNKNOWN,  "AttachContentId", "PR_ATTACH_CONTENT_ID");
+    public static final MAPIProperty ATTACH_CONTENT_LOCATION =
+        new MAPIProperty(0x3713, Types.UNKNOWN,  "AttachContentLocation", "PR_ATTACH_CONTENT_LOCATION");
+    public static final MAPIProperty ATTACH_DATA =
+        new MAPIProperty(0x3701, BINARY, "AttachData", "PR_ATTACH_DATA_OBJ");
+    public static final MAPIProperty ATTACH_DISPOSITION =
+        new MAPIProperty(0x3716, Types.UNKNOWN,  "AttachDisposition", "PR_ATTACH_DISPOSITION");
+    public static final MAPIProperty ATTACH_ENCODING =
+        new MAPIProperty(0x3702, BINARY, "AttachEncoding", "PR_ATTACH_ENCODING");
+    public static final MAPIProperty ATTACH_EXTENSION =
+        new MAPIProperty(0x3703, ASCII_STRING, "AttachExtension", "PR_ATTACH_EXTENSION");
+    public static final MAPIProperty ATTACH_FILENAME =
+        new MAPIProperty(0x3704, ASCII_STRING, "AttachFilename", "PR_ATTACH_FILENAME");
+    public static final MAPIProperty ATTACH_FLAGS =
+        new MAPIProperty(0x3714, Types.UNKNOWN,  "AttachFlags", "PR_ATTACH_FLAGS");
+    public static final MAPIProperty ATTACH_LONG_FILENAME =
+        new MAPIProperty(0x3707, ASCII_STRING, "AttachLongFilename", "PR_ATTACH_LONG_FILENAME");
+    public static final MAPIProperty ATTACH_LONG_PATHNAME =
+        new MAPIProperty(0x370d, ASCII_STRING, "AttachLongPathname", "PR_ATTACH_LONG_PATHNAME");
+    public static final MAPIProperty ATTACH_METHOD =
+        new MAPIProperty(0x3705, LONG, "AttachMethod", "PR_ATTACH_METHOD");
+    public static final MAPIProperty ATTACH_MIME_SEQUENCE =
+        new MAPIProperty(0x3710, Types.UNKNOWN,  "AttachMimeSequence", "PR_ATTACH_MIME_SEQUENCE");
+    public static final MAPIProperty ATTACH_MIME_TAG =
+        new MAPIProperty(0x370e, ASCII_STRING, "AttachMimeTag", "PR_ATTACH_MIME_TAG");
+    public static final MAPIProperty ATTACH_NETSCAPE_MAC_INFO =
+        new MAPIProperty(0x3715, Types.UNKNOWN,  "AttachNetscapeMacInfo", "PR_ATTACH_NETSCAPE_MAC_INFO");
+    public static final MAPIProperty ATTACH_NUM =
+        new MAPIProperty(0xe21, LONG, "AttachNum", "PR_ATTACH_NUM");
+    public static final MAPIProperty ATTACH_PATHNAME =
+        new MAPIProperty(0x3708, ASCII_STRING, "AttachPathname", "PR_ATTACH_PATHNAME");
+    public static final MAPIProperty ATTACH_RENDERING =
+        new MAPIProperty(0x3709, BINARY, "AttachRendering", "PR_ATTACH_RENDERING");
+    public static final MAPIProperty ATTACH_SIZE =
+        new MAPIProperty(0xe20, LONG, "AttachSize", "PR_ATTACH_SIZE");
+    public static final MAPIProperty ATTACH_TAG =
+        new MAPIProperty(0x370a, BINARY, "AttachTag", "PR_ATTACH_TAG");
+    public static final MAPIProperty ATTACH_TRANSPORT_NAME =
+        new MAPIProperty(0x370c, ASCII_STRING, "AttachTransportName", "PR_ATTACH_TRANSPORT_NAME");
+    public static final MAPIProperty ATTACHMENT_X400_PARAMETERS =
+        new MAPIProperty(0x3700, BINARY, "AttachmentX400Parameters", "PR_ATTACHMENT_X400_PARAMETERS");
+    public static final MAPIProperty AUTHORIZING_USERS =
+        new MAPIProperty(3, BINARY, "AuthorizingUsers", "PR_AUTHORIZING_USERS");
+    public static final MAPIProperty AUTO_FORWARD_COMMENT =
+        new MAPIProperty(4, ASCII_STRING, "AutoForwardComment", "PR_AUTO_FORWARD_COMMENT");
+    public static final MAPIProperty AUTO_FORWARDED =
+        new MAPIProperty(5, BOOLEAN, "AutoForwarded", "PR_AUTO_FORWARDED");
+    public static final MAPIProperty AUTO_RESPONSE_SUPPRESS =
+        new MAPIProperty(0x3fdf, Types.UNKNOWN,  "AutoResponseSuppress", "PR_AUTO_RESPONSE_SUPPRESS");
+    public static final MAPIProperty BIRTHDAY =
+        new MAPIProperty(0x3a42, TIME, "Birthday", "PR_BIRTHDAY");
+    public static final MAPIProperty BODY =
+        new MAPIProperty(0x1000, ASCII_STRING, "Body", "PR_BODY");
+    public static final MAPIProperty BODY_CONTENT_ID =
+        new MAPIProperty(0x1015, Types.UNKNOWN,  "BodyContentId", "PR_BODY_CONTENT_ID");
+    public static final MAPIProperty BODY_CONTENT_LOCATION =
+        new MAPIProperty(0x1014, Types.UNKNOWN,  "BodyContentLocation", "PR_BODY_CONTENT_LOCATION");
+    public static final MAPIProperty BODY_CRC =
+        new MAPIProperty(0xe1c, LONG, "BodyCrc", "PR_BODY_CRC");
+    public static final MAPIProperty BODY_HTML =
+        new MAPIProperty(0x1013, Types.UNKNOWN,  "BodyHtml", "data");
+    public static final MAPIProperty BUSINESS_FAX_NUMBER =
+        new MAPIProperty(0x3a24, ASCII_STRING, "BusinessFaxNumber", "PR_BUSINESS_FAX_NUMBER");
+    public static final MAPIProperty BUSINESS_HOME_PAGE =
+        new MAPIProperty(0x3a51, ASCII_STRING, "BusinessHomePage", "PR_BUSINESS_HOME_PAGE");
+    public static final MAPIProperty CALLBACK_TELEPHONE_NUMBER =
+        new MAPIProperty(0x3a02, ASCII_STRING, "CallbackTelephoneNumber", "PR_CALLBACK_TELEPHONE_NUMBER");
+    public static final MAPIProperty CAR_TELEPHONE_NUMBER =
+        new MAPIProperty(0x3a1e, ASCII_STRING, "CarTelephoneNumber", "PR_CAR_TELEPHONE_NUMBER");
+    public static final MAPIProperty CHILDRENS_NAMES =
+        new MAPIProperty(0x3a58, Types.createCustom(4126), "ChildrensNames", "PR_CHILDRENS_NAMES");
+    public static final MAPIProperty CLIENT_SUBMIT_TIME =
+        new MAPIProperty(0x39, TIME, "ClientSubmitTime", "PR_CLIENT_SUBMIT_TIME");
+    public static final MAPIProperty COMMENT =
+        new MAPIProperty(0x3004, ASCII_STRING, "Comment", "PR_COMMENT");
+    public static final MAPIProperty COMMON_VIEWS_ENTRY_ID =
+        new MAPIProperty(0x35e6, BINARY, "CommonViewsEntryId", "PR_COMMON_VIEWS_ENTRYID");
+    public static final MAPIProperty COMPANY_MAIN_PHONE_NUMBER =
+        new MAPIProperty(0x3a57, ASCII_STRING, "CompanyMainPhoneNumber", "PR_COMPANY_MAIN_PHONE_NUMBER");
+    public static final MAPIProperty COMPANY_NAME =
+        new MAPIProperty(0x3a16, ASCII_STRING, "CompanyName", "PR_COMPANY_NAME");
+    public static final MAPIProperty COMPUTER_NETWORK_NAME =
+        new MAPIProperty(0x3a49, ASCII_STRING, "ComputerNetworkName", "PR_COMPUTER_NETWORK_NAME");
+    public static final MAPIProperty CONTACT_ADDRTYPES =
+        new MAPIProperty(0x3a54, Types.createCustom(4126), "ContactAddrtypes", "PR_CONTACT_ADDRTYPES");
+    public static final MAPIProperty CONTACT_DEFAULT_ADDRESS_INDEX =
+        new MAPIProperty(0x3a55, LONG, "ContactDefaultAddressIndex", "PR_CONTACT_DEFAULT_ADDRESS_INDEX");
+    public static final MAPIProperty CONTACT_EMAIL_ADDRESSES =
+        new MAPIProperty(0x3a56, Types.createCustom(4126), "ContactEmailAddresses", "PR_CONTACT_EMAIL_ADDRESSES");
+    public static final MAPIProperty CONTACT_ENTRY_IDS =
+        new MAPIProperty(0x3a53, Types.createCustom(4354), "ContactEntryIds", "PR_CONTACT_ENTRYIDS");
+    public static final MAPIProperty CONTACT_VERSION =
+        new MAPIProperty(0x3a52, CLS_ID, "ContactVersion", "PR_CONTACT_VERSION");
+    public static final MAPIProperty CONTAINER_CLASS =
+        new MAPIProperty(0x3613, ASCII_STRING, "ContainerClass", "PR_CONTAINER_CLASS");
+    public static final MAPIProperty CONTAINER_CONTENTS =
+        new MAPIProperty(0x360f, DIRECTORY, "ContainerContents", "PR_CONTAINER_CONTENTS");
+    public static final MAPIProperty CONTAINER_FLAGS =
+        new MAPIProperty(0x3600, LONG, "ContainerFlags", "PR_CONTAINER_FLAGS");
+    public static final MAPIProperty CONTAINER_HIERARCHY =
+        new MAPIProperty(0x360e, DIRECTORY, "ContainerHierarchy", "PR_CONTAINER_HIERARCHY");
+    public static final MAPIProperty CONTAINER_MODIFY_VERSION =
+        new MAPIProperty(0x3614, LONG_LONG, "ContainerModifyVersion", "PR_CONTAINER_MODIFY_VERSION");
+    public static final MAPIProperty CONTENT_CONFIDENTIALITY_ALGORITHM_ID =
+        new MAPIProperty(6, BINARY, "ContentConfidentialityAlgorithmId", "PR_CONTENT_CONFIDENTIALITY_ALGORITHM_ID");
+    public static final MAPIProperty CONTENT_CORRELATOR =
+        new MAPIProperty(7, BINARY, "ContentCorrelator", "PR_CONTENT_CORRELATOR");
+    public static final MAPIProperty CONTENT_COUNT =
+        new MAPIProperty(0x3602, LONG, "ContentCount", "PR_CONTENT_COUNT");
+    public static final MAPIProperty CONTENT_IDENTIFIER =
+        new MAPIProperty(8, ASCII_STRING, "ContentIdentifier", "PR_CONTENT_IDENTIFIER");
+    public static final MAPIProperty CONTENT_INTEGRITY_CHECK =
+        new MAPIProperty(0xc00, BINARY, "ContentIntegrityCheck", "PR_CONTENT_INTEGRITY_CHECK");
+    public static final MAPIProperty CONTENT_LENGTH =
+        new MAPIProperty(9, LONG, "ContentLength", "PR_CONTENT_LENGTH");
+    public static final MAPIProperty CONTENT_RETURN_REQUESTED =
+        new MAPIProperty(10, BOOLEAN, "ContentReturnRequested", "PR_CONTENT_RETURN_REQUESTED");
+    public static final MAPIProperty CONTENT_UNREAD =
+        new MAPIProperty(0x3603, LONG, "ContentUnread", "PR_CONTENT_UNREAD");
+    public static final MAPIProperty CONTENTS_SORT_ORDER =
+        new MAPIProperty(0x360d, Types.createCustom(4099), "ContentsSortOrder", "PR_CONTENTS_SORT_ORDER");
+    public static final MAPIProperty CONTROL_FLAGS =
+        new MAPIProperty(0x3f00, LONG, "ControlFlags", "PR_CONTROL_FLAGS");
+    public static final MAPIProperty CONTROL_ID =
+        new MAPIProperty(0x3f07, BINARY, "ControlId", "PR_CONTROL_ID");
+    public static final MAPIProperty CONTROL_STRUCTURE =
+        new MAPIProperty(0x3f01, BINARY, "ControlStructure", "PR_CONTROL_STRUCTURE");
+    public static final MAPIProperty CONTROL_TYPE =
+        new MAPIProperty(0x3f02, LONG, "ControlType", "PR_CONTROL_TYPE");
+    public static final MAPIProperty CONVERSATION_INDEX =
+        new MAPIProperty(0x71, BINARY, "ConversationIndex", "PR_CONVERSATION_INDEX");
+    public static final MAPIProperty CONVERSATION_KEY =
+        new MAPIProperty(11, BINARY, "ConversationKey", "PR_CONVERSATION_KEY");
+    public static final MAPIProperty CONVERSATION_TOPIC =
+        new MAPIProperty(0x70, ASCII_STRING, "ConversationTopic", "PR_CONVERSATION_TOPIC");
+    public static final MAPIProperty CONVERSION_EITS =
+        new MAPIProperty(12, BINARY, "ConversionEits", "PR_CONVERSION_EITS");
+    public static final MAPIProperty CONVERSION_PROHIBITED =
+        new MAPIProperty(0x3a03, BOOLEAN, "ConversionProhibited", "PR_CONVERSION_PROHIBITED");
+    public static final MAPIProperty CONVERSION_WITH_LOSS_PROHIBITED =
+        new MAPIProperty(13, BOOLEAN, "ConversionWithLossProhibited", "PR_CONVERSION_WITH_LOSS_PROHIBITED");
+    public static final MAPIProperty CONVERTED_EITS =
+        new MAPIProperty(14, BINARY, "ConvertedEits", "PR_CONVERTED_EITS");
+    public static final MAPIProperty CORRELATE =
+        new MAPIProperty(0xe0c, BOOLEAN, "Correlate", "PR_CORRELATE");
+    public static final MAPIProperty CORRELATE_MTSID =
+        new MAPIProperty(0xe0d, BINARY, "CorrelateMtsid", "PR_CORRELATE_MTSID");
+    public static final MAPIProperty COUNTRY =
+        new MAPIProperty(0x3a26, ASCII_STRING, "Country", "PR_COUNTRY");
+    public static final MAPIProperty CREATE_TEMPLATES =
+        new MAPIProperty(0x3604, DIRECTORY, "CreateTemplates", "PR_CREATE_TEMPLATES");
+    public static final MAPIProperty CREATION_TIME =
+        new MAPIProperty(0x3007, TIME, "CreationTime", "PR_CREATION_TIME");
+    public static final MAPIProperty CREATION_VERSION =
+        new MAPIProperty(0xe19, LONG_LONG, "CreationVersion", "PR_CREATION_VERSION");
+    public static final MAPIProperty CURRENT_VERSION =
+        new MAPIProperty(0xe00, LONG_LONG, "CurrentVersion", "PR_CURRENT_VERSION");
+    public static final MAPIProperty CUSTOMER_ID =
+        new MAPIProperty(0x3a4a, ASCII_STRING, "CustomerId", "PR_CUSTOMER_ID");
+    public static final MAPIProperty DEF_CREATE_DL =
+        new MAPIProperty(0x3611, BINARY, "DefCreateDl", "PR_DEF_CREATE_DL");
+    public static final MAPIProperty DEF_CREATE_MAILUSER =
+        new MAPIProperty(0x3612, BINARY, "DefCreateMailuser", "PR_DEF_CREATE_MAILUSER");
+    public static final MAPIProperty DEFAULT_PROFILE =
+        new MAPIProperty(0x3d04, BOOLEAN, "DefaultProfile", "PR_DEFAULT_PROFILE");
+    public static final MAPIProperty DEFAULT_STORE =
+        new MAPIProperty(0x3400, BOOLEAN, "DefaultStore", "PR_DEFAULT_STORE");
+    public static final MAPIProperty DEFAULT_VIEW_ENTRY_ID =
+        new MAPIProperty(0x3616, BINARY, "DefaultViewEntryId", "PR_DEFAULT_VIEW_ENTRYID");
+    public static final MAPIProperty DEFERRED_DELIVERY_TIME =
+        new MAPIProperty(15, TIME, "DeferredDeliveryTime", "PR_DEFERRED_DELIVERY_TIME");
+    public static final MAPIProperty DELEGATION =
+        new MAPIProperty(0x7e, BINARY, "Delegation", "PR_DELEGATION");
+    public static final MAPIProperty DELETE_AFTER_SUBMIT =
+        new MAPIProperty(0xe01, BOOLEAN, "DeleteAfterSubmit", "PR_DELETE_AFTER_SUBMIT");
+    public static final MAPIProperty DELIVER_TIME =
+        new MAPIProperty(0x10, TIME, "DeliverTime", "PR_DELIVER_TIME");
+    public static final MAPIProperty DELIVERY_POINT =
+        new MAPIProperty(0xc07, LONG, "DeliveryPoint", "PR_DELIVERY_POINT");
+    public static final MAPIProperty DELTAX =
+        new MAPIProperty(0x3f03, LONG, "Deltax", "PR_DELTAX");
+    public static final MAPIProperty DELTAY =
+        new MAPIProperty(0x3f04, LONG, "Deltay", "PR_DELTAY");
+    public static final MAPIProperty DEPARTMENT_NAME =
+        new MAPIProperty(0x3a18, ASCII_STRING, "DepartmentName", "PR_DEPARTMENT_NAME");
+    public static final MAPIProperty DEPTH =
+        new MAPIProperty(0x3005, LONG, "Depth", "PR_DEPTH");
+    public static final MAPIProperty DETAILS_TABLE =
+        new MAPIProperty(0x3605, DIRECTORY, "DetailsTable", "PR_DETAILS_TABLE");
+    public static final MAPIProperty DISC_VAL =
+        new MAPIProperty(0x4a, BOOLEAN, "DiscVal", "PR_DISC_VAL");
+    public static final MAPIProperty DISCARD_REASON =
+        new MAPIProperty(0x11, LONG, "DiscardReason", "PR_DISCARD_REASON");
+    public static final MAPIProperty DISCLOSE_RECIPIENTS =
+        new MAPIProperty(0x3a04, BOOLEAN, "DiscloseRecipients", "PR_DISCLOSE_RECIPIENTS");
+    public static final MAPIProperty DISCLOSURE_OF_RECIPIENTS =
+        new MAPIProperty(0x12, BOOLEAN, "DisclosureOfRecipients", "PR_DISCLOSURE_OF_RECIPIENTS");
+    public static final MAPIProperty DISCRETE_VALUES =
+        new MAPIProperty(0xe0e, BOOLEAN, "DiscreteValues", "PR_DISCRETE_VALUES");
+    public static final MAPIProperty DISPLAY_BCC =
+        new MAPIProperty(0xe02, ASCII_STRING, "DisplayBcc", "PR_DISPLAY_BCC");
+    public static final MAPIProperty DISPLAY_CC =
+        new MAPIProperty(0xe03, ASCII_STRING, "DisplayCc", "PR_DISPLAY_CC");
+    public static final MAPIProperty DISPLAY_NAME =
+        new MAPIProperty(0x3001, ASCII_STRING, "DisplayName", "PR_DISPLAY_NAME");
+    public static final MAPIProperty DISPLAY_NAME_PREFIX =
+        new MAPIProperty(0x3a45, ASCII_STRING, "DisplayNamePrefix", "PR_DISPLAY_NAME_PREFIX");
+    public static final MAPIProperty DISPLAY_TO =
+        new MAPIProperty(0xe04, ASCII_STRING, "DisplayTo", "PR_DISPLAY_TO");
+    public static final MAPIProperty DISPLAY_TYPE =
+        new MAPIProperty(0x3900, LONG, "DisplayType", "PR_DISPLAY_TYPE");
+    public static final MAPIProperty DL_EXPANSION_HISTORY =
+        new MAPIProperty(0x13, BINARY, "DlExpansionHistory", "PR_DL_EXPANSION_HISTORY");
+    public static final MAPIProperty DL_EXPANSION_PROHIBITED =
+        new MAPIProperty(20, BOOLEAN, "DlExpansionProhibited", "PR_DL_EXPANSION_PROHIBITED");
+    public static final MAPIProperty EMAIL_ADDRESS =
+        new MAPIProperty(0x3003, ASCII_STRING, "EmailAddress", "PR_EMAIL_ADDRESS");
+    public static final MAPIProperty END_DATE =
+        new MAPIProperty(0x61, TIME, "EndDate", "PR_END_DATE");
+    public static final MAPIProperty ENTRY_ID =
+        new MAPIProperty(0xfff, BINARY, "EntryId", "PR_ENTRYID");
+    public static final MAPIProperty EXPAND_BEGIN_TIME =
+        new MAPIProperty(0x3618, Types.UNKNOWN,  "ExpandBeginTime", "PR_EXPAND_BEGIN_TIME");
+    public static final MAPIProperty EXPAND_END_TIME =
+        new MAPIProperty(0x3619, Types.UNKNOWN,  "ExpandEndTime", "PR_EXPAND_END_TIME");
+    public static final MAPIProperty EXPANDED_BEGIN_TIME =
+        new MAPIProperty(0x361a, Types.UNKNOWN,  "ExpandedBeginTime", "PR_EXPANDED_BEGIN_TIME");
+    public static final MAPIProperty EXPANDED_END_TIME =
+        new MAPIProperty(0x361b, Types.UNKNOWN,  "ExpandedEndTime", "PR_EXPANDED_END_TIME");
+    public static final MAPIProperty EXPIRY_TIME =
+        new MAPIProperty(0x15, TIME, "ExpiryTime", "PR_EXPIRY_TIME");
+    public static final MAPIProperty EXPLICIT_CONVERSION =
+        new MAPIProperty(0xc01, LONG, "ExplicitConversion", "PR_EXPLICIT_CONVERSION");
+    public static final MAPIProperty FILTERING_HOOKS =
+        new MAPIProperty(0x3d08, BINARY, "FilteringHooks", "PR_FILTERING_HOOKS");
+    public static final MAPIProperty FINDER_ENTRY_ID =
+        new MAPIProperty(0x35e7, BINARY, "FinderEntryId", "PR_FINDER_ENTRYID");
+    public static final MAPIProperty FOLDER_ASSOCIATED_CONTENTS =
+        new MAPIProperty(0x3610, DIRECTORY, "FolderAssociatedContents", "PR_FOLDER_ASSOCIATED_CONTENTS");
+    public static final MAPIProperty FOLDER_TYPE =
+        new MAPIProperty(0x3601, LONG, "FolderType", "PR_FOLDER_TYPE");
+    public static final MAPIProperty FORM_CATEGORY =
+        new MAPIProperty(0x3304, ASCII_STRING, "FormCategory", "PR_FORM_CATEGORY");
+    public static final MAPIProperty FORM_CATEGORY_SUB =
+        new MAPIProperty(0x3305, ASCII_STRING, "FormCategorySub", "PR_FORM_CATEGORY_SUB");
+    public static final MAPIProperty FORM_CLSID =
+        new MAPIProperty(0x3302, CLS_ID, "FormClsid", "PR_FORM_ClsID");
+    public static final MAPIProperty FORM_CONTACT_NAME =
+        new MAPIProperty(0x3303, ASCII_STRING, "FormContactName", "PR_FORM_CONTACT_NAME");
+    public static final MAPIProperty FORM_DESIGNER_GUID =
+        new MAPIProperty(0x3309, CLS_ID, "FormDesignerGuid", "PR_FORM_DESIGNER_GUID");
+    public static final MAPIProperty FORM_DESIGNER_NAME =
+        new MAPIProperty(0x3308, ASCII_STRING, "FormDesignerName", "PR_FORM_DESIGNER_NAME");
+    public static final MAPIProperty FORM_HIDDEN =
+        new MAPIProperty(0x3307, BOOLEAN, "FormHidden", "PR_FORM_HIDDEN");
+    public static final MAPIProperty FORM_HOST_MAP =
+        new MAPIProperty(0x3306, Types.createCustom(4099), "FormHostMap", "PR_FORM_HOST_MAP");
+    public static final MAPIProperty FORM_MESSAGE_BEHAVIOR =
+        new MAPIProperty(0x330a, LONG, "FormMessageBehavior", "PR_FORM_MESSAGE_BEHAVIOR");
+    public static final MAPIProperty FORM_VERSION =
+        new MAPIProperty(0x3301, ASCII_STRING, "FormVersion", "PR_FORM_VERSION");
+    public static final MAPIProperty FTP_SITE =
+        new MAPIProperty(0x3a4c, ASCII_STRING, "FtpSite", "PR_FTP_SITE");
+    public static final MAPIProperty GENDER =
+        new MAPIProperty(0x3a4d, SHORT, "Gender", "PR_GENDER");
+    public static final MAPIProperty GENERATION =
+        new MAPIProperty(0x3a05, ASCII_STRING, "Generation", "PR_GENERATION");
+    public static final MAPIProperty GIVEN_NAME =
+        new MAPIProperty(0x3a06, ASCII_STRING, "GivenName", "PR_GIVEN_NAME");
+    public static final MAPIProperty GOVERNMENT_ID_NUMBER =
+        new MAPIProperty(0x3a07, ASCII_STRING, "GovernmentIdNumber", "PR_GOVERNMENT_ID_NUMBER");
+    public static final MAPIProperty HASATTACH =
+        new MAPIProperty(0xe1b, BOOLEAN, "Hasattach", "PR_HASATTACH");
+    public static final MAPIProperty HEADER_FOLDER_ENTRY_ID =
+        new MAPIProperty(0x3e0a, BINARY, "HeaderFolderEntryId", "PR_HEADER_FOLDER_ENTRYID");
+    public static final MAPIProperty HOBBIES =
+        new MAPIProperty(0x3a43, ASCII_STRING, "Hobbies", "PR_HOBBIES");
+    public static final MAPIProperty HOME2_TELEPHONE_NUMBER =
+        new MAPIProperty(0x3a2f, ASCII_STRING, "Home2TelephoneNumber", "PR_HOME2_TELEPHONE_NUMBER");
+    public static final MAPIProperty HOME_ADDRESS_CITY =
+        new MAPIProperty(0x3a59, ASCII_STRING, "HomeAddressCity", "PR_HOME_ADDRESS_CITY");
+    public static final MAPIProperty HOME_ADDRESS_COUNTRY =
+        new MAPIProperty(0x3a5a, ASCII_STRING, "HomeAddressCountry", "PR_HOME_ADDRESS_COUNTRY");
+    public static final MAPIProperty HOME_ADDRESS_POST_OFFICE_BOX =
+        new MAPIProperty(0x3a5e, ASCII_STRING, "HomeAddressPostOfficeBox", "PR_HOME_ADDRESS_POST_OFFICE_BOX");
+    public static final MAPIProperty HOME_ADDRESS_POSTAL_CODE =
+        new MAPIProperty(0x3a5b, ASCII_STRING, "HomeAddressPostalCode", "PR_HOME_ADDRESS_POSTAL_CODE");
+    public static final MAPIProperty HOME_ADDRESS_STATE_OR_PROVINCE =
+        new MAPIProperty(0x3a5c, ASCII_STRING, "HomeAddressStateOrProvince", "PR_HOME_ADDRESS_STATE_OR_PROVINCE");
+    public static final MAPIProperty HOME_ADDRESS_STREET =
+        new MAPIProperty(0x3a5d, ASCII_STRING, "HomeAddressStreet", "PR_HOME_ADDRESS_STREET");
+    public static final MAPIProperty HOME_FAX_NUMBER =
+        new MAPIProperty(0x3a25, ASCII_STRING, "HomeFaxNumber", "PR_HOME_FAX_NUMBER");
+    public static final MAPIProperty HOME_TELEPHONE_NUMBER =
+        new MAPIProperty(0x3a09, ASCII_STRING, "HomeTelephoneNumber", "PR_HOME_TELEPHONE_NUMBER");
+    public static final MAPIProperty INET_MAIL_OVERRIDE_CHARSET =
+        new MAPIProperty(0x5903, Types.UNKNOWN,  "INetMailOverrideCharset", "Charset");
+    public static final MAPIProperty INET_MAIL_OVERRIDE_FORMAT =
+        new MAPIProperty(0x5902, Types.UNKNOWN,  "INetMailOverrideFormat", "Format");
+    public static final MAPIProperty ICON =
+        new MAPIProperty(0xffd, BINARY, "Icon", "PR_ICON");
+    public static final MAPIProperty IDENTITY_DISPLAY =
+        new MAPIProperty(0x3e00, ASCII_STRING, "IdentityDisplay", "PR_IDENTITY_DISPLAY");
+    public static final MAPIProperty IDENTITY_ENTRY_ID =
+        new MAPIProperty(0x3e01, BINARY, "IdentityEntryId", "PR_IDENTITY_ENTRYID");
+    public static final MAPIProperty IDENTITY_SEARCH_KEY =
+        new MAPIProperty(0x3e05, BINARY, "IdentitySearchKey", "PR_IDENTITY_SEARCH_KEY");
+    public static final MAPIProperty IMPLICIT_CONVERSION_PROHIBITED =
+        new MAPIProperty(0x16, BOOLEAN, "ImplicitConversionProhibited", "PR_IMPLICIT_CONVERSION_PROHIBITED");
+    public static final MAPIProperty IMPORTANCE =
+        new MAPIProperty(0x17, LONG, "Importance", "PR_IMPORTANCE");
+    public static final MAPIProperty IN_REPLY_TO_ID =
+        new MAPIProperty(0x1042, Types.UNKNOWN,  "InReplyToId", "PR_IN_REPLY_TO_ID");
+    public static final MAPIProperty INCOMPLETE_COPY =
+        new MAPIProperty(0x35, BOOLEAN, "IncompleteCopy", "PR_INCOMPLETE_COPY");
+    public static final MAPIProperty INITIAL_DETAILS_PANE =
+        new MAPIProperty(0x3f08, LONG, "InitialDetailsPane", "PR_INITIAL_DETAILS_PANE");
+    public static final MAPIProperty INITIALS =
+        new MAPIProperty(0x3a0a, ASCII_STRING, "Initials", "PR_INITIALS");
+    public static final MAPIProperty INSTANCE_KEY =
+        new MAPIProperty(0xff6, BINARY, "InstanceKey", "PR_INSTANCE_KEY");
+    public static final MAPIProperty INTERNET_APPROVED =
+        new MAPIProperty(0x1030, ASCII_STRING, "InternetApproved", "PR_INTERNET_APPROVED");
+    public static final MAPIProperty INTERNET_ARTICLE_NUMBER =
+        new MAPIProperty(0xe23, LONG, "InternetArticleNumber", "PR_INTERNET_ARTICLE_NUMBER");
+    public static final MAPIProperty INTERNET_CPID =
+        new MAPIProperty(0x3fde, Types.LONG,  "InternetCPID", "PR_INTERNET_CPID");
+    public static final MAPIProperty INTERNET_CONTROL =
+        new MAPIProperty(0x1031, ASCII_STRING, "InternetControl", "PR_INTERNET_CONTROL");
+    public static final MAPIProperty INTERNET_DISTRIBUTION =
+        new MAPIProperty(0x1032, ASCII_STRING, "InternetDistribution", "PR_INTERNET_DISTRIBUTION");
+    public static final MAPIProperty INTERNET_FOLLOWUP_TO =
+        new MAPIProperty(0x1033, ASCII_STRING, "InternetFollowupTo", "PR_INTERNET_FOLLOWUP_TO");
+    public static final MAPIProperty INTERNET_LINES =
+        new MAPIProperty(0x1034, LONG, "InternetLines", "PR_INTERNET_LINES");
+    public static final MAPIProperty INTERNET_MESSAGE_ID =
+        new MAPIProperty(0x1035, ASCII_STRING, "InternetMessageId", "PR_INTERNET_MESSAGE_ID");
+    public static final MAPIProperty INTERNET_NEWSGROUPS =
+        new MAPIProperty(0x1036, ASCII_STRING, "InternetNewsgroups", "PR_INTERNET_NEWSGROUPS");
+    public static final MAPIProperty INTERNET_NNTP_PATH =
+        new MAPIProperty(0x1038, ASCII_STRING, "InternetNntpPath", "PR_INTERNET_NNTP_PATH");
+    public static final MAPIProperty INTERNET_ORGANIZATION =
+        new MAPIProperty(0x1037, ASCII_STRING, "InternetOrganization", "PR_INTERNET_ORGANIZATION");
+    public static final MAPIProperty INTERNET_PRECEDENCE =
+        new MAPIProperty(0x1041, ASCII_STRING, "InternetPrecedence", "PR_INTERNET_PRECEDENCE");
+    public static final MAPIProperty INTERNET_REFERENCES =
+        new MAPIProperty(0x1039, ASCII_STRING, "InternetReferences", "PR_INTERNET_REFERENCES");
+    public static final MAPIProperty IPM_ID =
+        new MAPIProperty(0x18, BINARY, "IpmId", "PR_IPM_ID");
+    public static final MAPIProperty IPM_OUTBOX_ENTRY_ID =
+        new MAPIProperty(0x35e2, BINARY, "IpmOutboxEntryId", "PR_IPM_OUTBOX_ENTRYID");
+    public static final MAPIProperty IPM_OUTBOX_SEARCH_KEY =
+        new MAPIProperty(0x3411, BINARY, "IpmOutboxSearchKey", "PR_IPM_OUTBOX_SEARCH_KEY");
+    public static final MAPIProperty IPM_RETURN_REQUESTED =
+        new MAPIProperty(0xc02, BOOLEAN, "IpmReturnRequested", "PR_IPM_RETURN_REQUESTED");
+    public static final MAPIProperty IPM_SENTMAIL_ENTRY_ID =
+        new MAPIProperty(0x35e4, BINARY, "IpmSentmailEntryId", "PR_IPM_SENTMAIL_ENTRYID");
+    public static final MAPIProperty IPM_SENTMAIL_SEARCH_KEY =
+        new MAPIProperty(0x3413, BINARY, "IpmSentmailSearchKey", "PR_IPM_SENTMAIL_SEARCH_KEY");
+    public static final MAPIProperty IPM_SUBTREE_ENTRY_ID =
+        new MAPIProperty(0x35e0, BINARY, "IpmSubtreeEntryId", "PR_IPM_SUBTREE_ENTRYID");
+    public static final MAPIProperty IPM_SUBTREE_SEARCH_KEY =
+        new MAPIProperty(0x3410, BINARY, "IpmSubtreeSearchKey", "PR_IPM_SUBTREE_SEARCH_KEY");
+    public static final MAPIProperty IPM_WASTEBASKET_ENTRY_ID =
+        new MAPIProperty(0x35e3, BINARY, "IpmWastebasketEntryId", "PR_IPM_WASTEBASKET_ENTRYID");
+    public static final MAPIProperty IPM_WASTEBASKET_SEARCH_KEY =
+        new MAPIProperty(0x3412, BINARY, "IpmWastebasketSearchKey", "PR_IPM_WASTEBASKET_SEARCH_KEY");
+    public static final MAPIProperty ISDN_NUMBER =
+        new MAPIProperty(0x3a2d, ASCII_STRING, "IsdnNumber", "PR_ISDN_NUMBER");
+    public static final MAPIProperty KEYWORD =
+        new MAPIProperty(0x3a0b, ASCII_STRING, "Keyword", "PR_KEYWORD");
+    public static final MAPIProperty LANGUAGE =
+        new MAPIProperty(0x3a0c, ASCII_STRING, "Language", "PR_LANGUAGE");
+    public static final MAPIProperty LANGUAGES =
+        new MAPIProperty(0x2f, ASCII_STRING, "Languages", "PR_LANGUAGES");
+    public static final MAPIProperty LAST_MODIFICATION_TIME =
+        new MAPIProperty(0x3008, TIME, "LastModificationTime", "PR_LAST_MODIFICATION_TIME");
+    public static final MAPIProperty LATEST_DELIVERY_TIME =
+        new MAPIProperty(0x19, TIME, "LatestDeliveryTime", "PR_LATEST_DELIVERY_TIME");
+    public static final MAPIProperty LIST_HELP =
+        new MAPIProperty(0x1043, Types.UNKNOWN,  "ListHelp", "PR_LIST_HELP");
+    public static final MAPIProperty LIST_SUBSCRIBE =
+        new MAPIProperty(0x1044, Types.UNKNOWN,  "ListSubscribe", "PR_LIST_SUBSCRIBE");
+    public static final MAPIProperty LIST_UNSUBSCRIBE =
+        new MAPIProperty(0x1045, Types.UNKNOWN,  "ListUnsubscribe", "PR_LIST_UNSUBSCRIBE");
+    public static final MAPIProperty LOCALITY =
+        new MAPIProperty(0x3a27, ASCII_STRING, "Locality", "PR_LOCALITY");
+    public static final MAPIProperty LOCALLY_DELIVERED =
+        new MAPIProperty(0x6745, Types.UNKNOWN,  "LocallyDelivered", "ptagLocallyDelivered");
+    public static final MAPIProperty LOCATION =
+        new MAPIProperty(0x3a0d, ASCII_STRING, "Location", "PR_LOCATION");
+    public static final MAPIProperty LOCK_BRANCH_ID =
+        new MAPIProperty(0x3800, Types.UNKNOWN,  "LockBranchId", "PR_LOCK_BRANCH_ID");
+    public static final MAPIProperty LOCK_DEPTH =
+        new MAPIProperty(0x3808, Types.UNKNOWN,  "LockDepth", "PR_LOCK_DEPTH");
+    public static final MAPIProperty LOCK_ENLISTMENT_CONTEXT =
+        new MAPIProperty(0x3804, Types.UNKNOWN,  "LockEnlistmentContext", "PR_LOCK_ENLISTMENT_CONTEXT");
+    public static final MAPIProperty LOCK_EXPIRY_TIME =
+        new MAPIProperty(0x380a, Types.UNKNOWN,  "LockExpiryTime", "PR_LOCK_EXPIRY_TIME");
+    public static final MAPIProperty LOCK_PERSISTENT =
+        new MAPIProperty(0x3807, Types.UNKNOWN,  "LockPersistent", "PR_LOCK_PERSISTENT");
+    public static final MAPIProperty LOCK_RESOURCE_DID =
+        new MAPIProperty(0x3802, Types.UNKNOWN,  "LockResourceDid", "PR_LOCK_RESOURCE_DID");
+    public static final MAPIProperty LOCK_RESOURCE_FID =
+        new MAPIProperty(0x3801, Types.UNKNOWN,  "LockResourceFid", "PR_LOCK_RESOURCE_FID");
+    public static final MAPIProperty LOCK_RESOURCE_MID =
+        new MAPIProperty(0x3803, Types.UNKNOWN,  "LockResourceMid", "PR_LOCK_RESOURCE_MID");
+    public static final MAPIProperty LOCK_SCOPE =
+        new MAPIProperty(0x3806, Types.UNKNOWN,  "LockScope", "PR_LOCK_SCOPE");
+    public static final MAPIProperty LOCK_TIMEOUT =
+        new MAPIProperty(0x3809, Types.UNKNOWN,  "LockTimeout", "PR_LOCK_TIMEOUT");
+    public static final MAPIProperty LOCK_TYPE =
+        new MAPIProperty(0x3805, Types.UNKNOWN,  "LockType", "PR_LOCK_TYPE");
+    public static final MAPIProperty MAIL_PERMISSION =
+        new MAPIProperty(0x3a0e, BOOLEAN, "MailPermission", "PR_MAIL_PERMISSION");
+    public static final MAPIProperty MANAGER_NAME =
+        new MAPIProperty(0x3a4e, ASCII_STRING, "ManagerName", "PR_MANAGER_NAME");
+    public static final MAPIProperty MAPPING_SIGNATURE =
+        new MAPIProperty(0xff8, BINARY, "MappingSignature", "PR_MAPPING_SIGNATURE");
+    public static final MAPIProperty MDB_PROVIDER =
+        new MAPIProperty(0x3414, BINARY, "MdbProvider", "PR_MDB_PROVIDER");
+    public static final MAPIProperty MESSAGE_ATTACHMENTS =
+        new MAPIProperty(0xe13, DIRECTORY, "MessageAttachments", "PR_MESSAGE_ATTACHMENTS");
+    public static final MAPIProperty MESSAGE_CC_ME =
+        new MAPIProperty(0x58, BOOLEAN, "MessageCcMe", "PR_MESSAGE_CC_ME");
+    public static final MAPIProperty MESSAGE_CLASS =
+        new MAPIProperty(0x1a, ASCII_STRING, "MessageClass", "PR_MESSAGE_CLASS");
+    public static final MAPIProperty MESSAGE_CODEPAGE =
+        new MAPIProperty(0x3ffd, Types.LONG,  "MessageCodepage", "PR_MESSAGE_CODEPAGE");
+    public static final MAPIProperty MESSAGE_DELIVERY_ID =
+        new MAPIProperty(0x1b, BINARY, "MessageDeliveryId", "PR_MESSAGE_DELIVERY_ID");
+    public static final MAPIProperty MESSAGE_DELIVERY_TIME =
+        new MAPIProperty(0xe06, TIME, "MessageDeliveryTime", "PR_MESSAGE_DELIVERY_TIME");
+    public static final MAPIProperty MESSAGE_DOWNLOAD_TIME =
+        new MAPIProperty(0xe18, LONG, "MessageDownloadTime", "PR_MESSAGE_DOWNLOAD_TIME");
+    public static final MAPIProperty MESSAGE_FLAGS =
+        new MAPIProperty(0xe07, LONG, "MessageFlags", "PR_MESSAGE_FLAGS");
+    public static final MAPIProperty MESSAGE_RECIP_ME =
+        new MAPIProperty(0x59, BOOLEAN, "MessageRecipMe", "PR_MESSAGE_RECIP_ME");
+    public static final MAPIProperty MESSAGE_RECIPIENTS =
+        new MAPIProperty(0xe12, DIRECTORY, "MessageRecipients", "PR_MESSAGE_RECIPIENTS");
+    public static final MAPIProperty MESSAGE_SECURITY_LABEL =
+        new MAPIProperty(30, BINARY, "MessageSecurityLabel", "PR_MESSAGE_SECURITY_LABEL");
+    public static final MAPIProperty MESSAGE_SIZE =
+        new MAPIProperty(0xe08, LONG, "MessageSize", "PR_MESSAGE_SIZE");
+    public static final MAPIProperty MESSAGE_SUBMISSION_ID =
+        new MAPIProperty(0x47, BINARY, "MessageSubmissionId", "PR_MESSAGE_SUBMISSION_ID");
+    public static final MAPIProperty MESSAGE_TO_ME =
+        new MAPIProperty(0x57, BOOLEAN, "MessageToMe", "PR_MESSAGE_TO_ME");
+    public static final MAPIProperty MESSAGE_TOKEN =
+        new MAPIProperty(0xc03, BINARY, "MessageToken", "PR_MESSAGE_TOKEN");
+    public static final MAPIProperty MHS_COMMON_NAME =
+        new MAPIProperty(0x3a0f, ASCII_STRING, "MhsCommonName", "PR_MHS_COMMON_NAME");
+    public static final MAPIProperty MIDDLE_NAME =
+        new MAPIProperty(0x3a44, ASCII_STRING, "MiddleName", "PR_MIDDLE_NAME");
+    public static final MAPIProperty MINI_ICON =
+        new MAPIProperty(0xffc, BINARY, "MiniIcon", "PR_MINI_ICON");
+    public static final MAPIProperty MOBILE_TELEPHONE_NUMBER =
+        new MAPIProperty(0x3a1c, ASCII_STRING, "MobileTelephoneNumber", "PR_MOBILE_TELEPHONE_NUMBER");
+    public static final MAPIProperty MODIFY_VERSION =
+        new MAPIProperty(0xe1a, LONG_LONG, "ModifyVersion", "PR_MODIFY_VERSION");
+    public static final MAPIProperty MSG_STATUS =
+        new MAPIProperty(0xe17, LONG, "MsgStatus", "PR_MSG_STATUS");
+    public static final MAPIProperty NDR_DIAG_CODE =
+        new MAPIProperty(0xc05, LONG, "NdrDiagCode", "PR_NDR_DIAG_CODE");
+    public static final MAPIProperty NDR_REASON_CODE =
+        new MAPIProperty(0xc04, LONG, "NdrReasonCode", "PR_NDR_REASON_CODE");
+    public static final MAPIProperty NDR_STATUS_CODE =
+        new MAPIProperty(0xc20, Types.UNKNOWN,  "NdrStatusCode", "PR_NDR_STATUS_CODE");
+    public static final MAPIProperty NEWSGROUP_NAME =
+        new MAPIProperty(0xe24, ASCII_STRING, "NewsgroupName", "PR_NEWSGROUP_NAME");
+    public static final MAPIProperty NICKNAME =
+        new MAPIProperty(0x3a4f, ASCII_STRING, "Nickname", "PR_NICKNAME");
+    public static final MAPIProperty NNTP_XREF =
+        new MAPIProperty(0x1040, ASCII_STRING, "NntpXref", "PR_NNTP_XREF");
+    public static final MAPIProperty NON_RECEIPT_NOTIFICATION_REQUESTED =
+        new MAPIProperty(0xc06, BOOLEAN, "NonReceiptNotificationRequested", "PR_NON_RECEIPT_NOTIFICATION_REQUESTED");
+    public static final MAPIProperty NON_RECEIPT_REASON =
+        new MAPIProperty(0x3e, LONG, "NonReceiptReason", "PR_NON_RECEIPT_REASON");
+    public static final MAPIProperty NORMALIZED_SUBJECT =
+        new MAPIProperty(0xe1d, ASCII_STRING, "NormalizedSubject", "PR_NORMALIZED_SUBJECT");
+    public static final MAPIProperty NT_SECURITY_DESCRIPTOR =
+        new MAPIProperty(0xe27, Types.UNKNOWN,  "NtSecurityDescriptor", "PR_NT_SECURITY_DESCRIPTOR");
+    public static final MAPIProperty NULL =
+        new MAPIProperty(1, LONG, "Null", "PR_NULL");
+    public static final MAPIProperty OBJECT_TYPE =
+        new MAPIProperty(0xffe, LONG, "ObjectType", "PR_Object_TYPE");
+    public static final MAPIProperty OBSOLETED_IPMS =
+        new MAPIProperty(0x1f, BINARY, "ObsoletedIpms", "PR_OBSOLETED_IPMS");
+    public static final MAPIProperty OFFICE2_TELEPHONE_NUMBER =
+        new MAPIProperty(0x3a1b, ASCII_STRING, "Office2TelephoneNumber", "PR_OFFICE2_TELEPHONE_NUMBER");
+    public static final MAPIProperty OFFICE_LOCATION =
+        new MAPIProperty(0x3a19, ASCII_STRING, "OfficeLocation", "PR_OFFICE_LOCATION");
+    public static final MAPIProperty OFFICE_TELEPHONE_NUMBER =
+        new MAPIProperty(0x3a08, ASCII_STRING, "OfficeTelephoneNumber", "PR_OFFICE_TELEPHONE_NUMBER");
+    public static final MAPIProperty OOF_REPLY_TYPE =
+        new MAPIProperty(0x4080, Types.UNKNOWN,  "OofReplyType", "PR_OOF_REPLY_TYPE");
+    public static final MAPIProperty ORGANIZATIONAL_ID_NUMBER =
+        new MAPIProperty(0x3a10, ASCII_STRING, "OrganizationalIdNumber", "PR_ORGANIZATIONAL_ID_NUMBER");
+    public static final MAPIProperty ORIG_ENTRY_ID =
+        new MAPIProperty(0x300f, Types.UNKNOWN,  "OrigEntryId", "PR_ORIG_ENTRYID");
+    public static final MAPIProperty ORIG_MESSAGE_CLASS =
+        new MAPIProperty(0x4b, ASCII_STRING, "OrigMessageClass", "PR_ORIG_MESSAGE_CLASS");
+    public static final MAPIProperty ORIGIN_CHECK =
+        new MAPIProperty(0x27, BINARY, "OriginCheck", "PR_ORIGIN_CHECK");
+    public static final MAPIProperty ORIGINAL_AUTHOR_ADDRTYPE =
+        new MAPIProperty(0x79, ASCII_STRING, "OriginalAuthorAddrtype", "PR_ORIGINAL_AUTHOR_ADDRTYPE");
+    public static final MAPIProperty ORIGINAL_AUTHOR_EMAIL_ADDRESS =
+        new MAPIProperty(0x7a, ASCII_STRING, "OriginalAuthorEmailAddress", "PR_ORIGINAL_AUTHOR_EMAIL_ADDRESS");
+    public static final MAPIProperty ORIGINAL_AUTHOR_ENTRY_ID =
+        new MAPIProperty(0x4c, BINARY, "OriginalAuthorEntryId", "PR_ORIGINAL_AUTHOR_ENTRYID");
+    public static final MAPIProperty ORIGINAL_AUTHOR_NAME =
+        new MAPIProperty(0x4d, ASCII_STRING, "OriginalAuthorName", "PR_ORIGINAL_AUTHOR_NAME");
+    public static final MAPIProperty ORIGINAL_AUTHOR_SEARCH_KEY =
+        new MAPIProperty(0x56, BINARY, "OriginalAuthorSearchKey", "PR_ORIGINAL_AUTHOR_SEARCH_KEY");
+    public static final MAPIProperty ORIGINAL_DELIVERY_TIME =
+        new MAPIProperty(0x55, TIME, "OriginalDeliveryTime", "PR_ORIGINAL_DELIVERY_TIME");
+    public static final MAPIProperty ORIGINAL_DISPLAY_BCC =
+        new MAPIProperty(0x72, ASCII_STRING, "OriginalDisplayBcc", "PR_ORIGINAL_DISPLAY_BCC");
+    public static final MAPIProperty ORIGINAL_DISPLAY_CC =
+        new MAPIProperty(0x73, ASCII_STRING, "OriginalDisplayCc", "PR_ORIGINAL_DISPLAY_CC");
+    public static final MAPIProperty ORIGINAL_DISPLAY_NAME =
+        new MAPIProperty(0x3a13, ASCII_STRING, "OriginalDisplayName", "PR_ORIGINAL_DISPLAY_NAME");
+    public static final MAPIProperty ORIGINAL_DISPLAY_TO =
+        new MAPIProperty(0x74, ASCII_STRING, "OriginalDisplayTo", "PR_ORIGINAL_DISPLAY_TO");
+    public static final MAPIProperty ORIGINAL_EITS =
+        new MAPIProperty(0x21, BINARY, "OriginalEits", "PR_ORIGINAL_EITS");
+    public static final MAPIProperty ORIGINAL_ENTRY_ID =
+        new MAPIProperty(0x3a12, BINARY, "OriginalEntryId", "PR_ORIGINAL_ENTRYID");
+    public static final MAPIProperty ORIGINAL_SEARCH_KEY =
+        new MAPIProperty(0x3a14, BINARY, "OriginalSearchKey", "PR_ORIGINAL_SEARCH_KEY");
+    public static final MAPIProperty ORIGINAL_SENDER_ADDRTYPE =
+        new MAPIProperty(0x66, ASCII_STRING, "OriginalSenderAddrtype", "PR_ORIGINAL_SENDER_ADDRTYPE");
+    public static final MAPIProperty ORIGINAL_SENDER_EMAIL_ADDRESS =
+        new MAPIProperty(0x67, ASCII_STRING, "OriginalSenderEmailAddress", "PR_ORIGINAL_SENDER_EMAIL_ADDRESS");
+    public static final MAPIProperty ORIGINAL_SENDER_ENTRY_ID =
+        new MAPIProperty(0x5b, BINARY, "OriginalSenderEntryId", "PR_ORIGINAL_SENDER_ENTRYID");
+    public static final MAPIProperty ORIGINAL_SENDER_NAME =
+        new MAPIProperty(90, ASCII_STRING, "OriginalSenderName", "PR_ORIGINAL_SENDER_NAME");
+    public static final MAPIProperty ORIGINAL_SENDER_SEARCH_KEY =
+        new MAPIProperty(0x5c, BINARY, "OriginalSenderSearchKey", "PR_ORIGINAL_SENDER_SEARCH_KEY");
+    public static final MAPIProperty ORIGINAL_SENSITIVITY =
+        new MAPIProperty(0x2e, LONG, "OriginalSensitivity", "PR_ORIGINAL_SENSITIVITY");
+    public static final MAPIProperty ORIGINAL_SENT_REPRESENTING_ADDRTYPE =
+        new MAPIProperty(0x68, ASCII_STRING, "OriginalSentRepresentingAddrtype", "PR_ORIGINAL_SENT_REPRESENTING_ADDRTYPE");
+    public static final MAPIProperty ORIGINAL_SENT_REPRESENTING_EMAIL_ADDRESS =
+        new MAPIProperty(0x69, ASCII_STRING, "OriginalSentRepresentingEmailAddress", "PR_ORIGINAL_SENT_REPRESENTING_EMAIL_ADDRESS");
+    public static final MAPIProperty ORIGINAL_SENT_REPRESENTING_ENTRY_ID =
+        new MAPIProperty(0x5e, BINARY, "OriginalSentRepresentingEntryId", "PR_ORIGINAL_SENT_REPRESENTING_ENTRYID");
+    public static final MAPIProperty ORIGINAL_SENT_REPRESENTING_NAME =
+        new MAPIProperty(0x5d, ASCII_STRING, "OriginalSentRepresentingName", "PR_ORIGINAL_SENT_REPRESENTING_NAME");
+    public static final MAPIProperty ORIGINAL_SENT_REPRESENTING_SEARCH_KEY =
+        new MAPIProperty(0x5f, BINARY, "OriginalSentRepresentingSearchKey", "PR_ORIGINAL_SENT_REPRESENTING_SEARCH_KEY");
+    public static final MAPIProperty ORIGINAL_SUBJECT =
+        new MAPIProperty(0x49, ASCII_STRING, "OriginalSubject", "PR_ORIGINAL_SUBJECT");
+    public static final MAPIProperty ORIGINAL_SUBMIT_TIME =
+        new MAPIProperty(0x4e, TIME, "OriginalSubmitTime", "PR_ORIGINAL_SUBMIT_TIME");
+    public static final MAPIProperty ORIGINALLY_INTENDED_RECIP_ADDRTYPE =
+        new MAPIProperty(0x7b, ASCII_STRING, "OriginallyIntendedRecipAddrtype", "PR_ORIGINALLY_INTENDED_RECIP_ADDRTYPE");
+    public static final MAPIProperty ORIGINALLY_INTENDED_RECIP_EMAIL_ADDRESS =
+        new MAPIProperty(0x7c, ASCII_STRING, "OriginallyIntendedRecipEmailAddress", "PR_ORIGINALLY_INTENDED_RECIP_EMAIL_ADDRESS");
+    public static final MAPIProperty ORIGINALLY_INTENDED_RECIP_ENTRY_ID =
+        new MAPIProperty(0x1012, BINARY, "OriginallyIntendedRecipEntryId", "PR_ORIGINALLY_INTENDED_RECIP_ENTRYID");
+    public static final MAPIProperty ORIGINALLY_INTENDED_RECIPIENT_NAME =
+        new MAPIProperty(0x20, BINARY, "OriginallyIntendedRecipientName", "PR_ORIGINALLY_INTENDED_RECIPIENT_NAME");
+    public static final MAPIProperty ORIGINATING_MTA_CERTIFICATE =
+        new MAPIProperty(0xe25, BINARY, "OriginatingMtaCertificate", "PR_ORIGINATING_MTA_CERTIFICATE");
+    public static final MAPIProperty ORIGINATOR_AND_DL_EXPANSION_HISTORY =
+        new MAPIProperty(0x1002, BINARY, "OriginatorAndDlExpansionHistory", "PR_ORIGINATOR_AND_DL_EXPANSION_HISTORY");
+    public static final MAPIProperty ORIGINATOR_CERTIFICATE =
+        new MAPIProperty(0x22, BINARY, "OriginatorCertificate", "PR_ORIGINATOR_CERTIFICATE");
+    public static final MAPIProperty ORIGINATOR_DELIVERY_REPORT_REQUESTED =
+        new MAPIProperty(0x23, BOOLEAN, "OriginatorDeliveryReportRequested", "PR_ORIGINATOR_DELIVERY_REPORT_REQUESTED");
+    public static final MAPIProperty ORIGINATOR_NON_DELIVERY_REPORT_REQUESTED =
+        new MAPIProperty(0xc08, BOOLEAN, "OriginatorNonDeliveryReportRequested", "PR_ORIGINATOR_NON_DELIVERY_REPORT_REQUESTED");
+    public static final MAPIProperty ORIGINATOR_REQUESTED_ALTERNATE_RECIPIENT =
+        new MAPIProperty(0xc09, BINARY, "OriginatorRequestedAlternateRecipient", "PR_ORIGINATOR_REQUESTED_ALTERNATE_RECIPIENT");
+    public static final MAPIProperty ORIGINATOR_RETURN_ADDRESS =
+        new MAPIProperty(0x24, BINARY, "OriginatorReturnAddress", "PR_ORIGINATOR_RETURN_ADDRESS");
+    public static final MAPIProperty OTHER_ADDRESS_CITY =
+        new MAPIProperty(0x3a5f, ASCII_STRING, "OtherAddressCity", "PR_OTHER_ADDRESS_CITY");
+    public static final MAPIProperty OTHER_ADDRESS_COUNTRY =
+        new MAPIProperty(0x3a60, ASCII_STRING, "OtherAddressCountry", "PR_OTHER_ADDRESS_COUNTRY");
+    public static final MAPIProperty OTHER_ADDRESS_POST_OFFICE_BOX =
+        new MAPIProperty(0x3a64, ASCII_STRING, "OtherAddressPostOfficeBox", "PR_OTHER_ADDRESS_POST_OFFICE_BOX");
+    public static final MAPIProperty OTHER_ADDRESS_POSTAL_CODE =
+        new MAPIProperty(0x3a61, ASCII_STRING, "OtherAddressPostalCode", "PR_OTHER_ADDRESS_POSTAL_CODE");
+    public static final MAPIProperty OTHER_ADDRESS_STATE_OR_PROVINCE =
+        new MAPIProperty(0x3a62, ASCII_STRING, "OtherAddressStateOrProvince", "PR_OTHER_ADDRESS_STATE_OR_PROVINCE");
+    public static final MAPIProperty OTHER_ADDRESS_STREET =
+        new MAPIProperty(0x3a63, ASCII_STRING, "OtherAddressStreet", "PR_OTHER_ADDRESS_STREET");
+    public static final MAPIProperty OTHER_TELEPHONE_NUMBER =
+        new MAPIProperty(0x3a1f, ASCII_STRING, "OtherTelephoneNumber", "PR_OTHER_TELEPHONE_NUMBER");
+    public static final MAPIProperty OWN_STORE_ENTRY_ID =
+        new MAPIProperty(0x3e06, BINARY, "OwnStoreEntryId", "PR_OWN_STORE_ENTRYID");
+    public static final MAPIProperty OWNER_APPT_ID =
+        new MAPIProperty(0x62, LONG, "OwnerApptId", "PR_OWNER_APPT_ID");
+    public static final MAPIProperty PAGER_TELEPHONE_NUMBER =
+        new MAPIProperty(0x3a21, ASCII_STRING, "PagerTelephoneNumber", "PR_PAGER_TELEPHONE_NUMBER");
+    public static final MAPIProperty PARENT_DISPLAY =
+        new MAPIProperty(0xe05, ASCII_STRING, "ParentDisplay", "PR_PARENT_DISPLAY");
+    public static final MAPIProperty PARENT_ENTRY_ID =
+        new MAPIProperty(0xe09, BINARY, "ParentEntryId", "PR_PARENT_ENTRYID");
+    public static final MAPIProperty PARENT_KEY =
+        new MAPIProperty(0x25, BINARY, "ParentKey", "PR_PARENT_KEY");
+    public static final MAPIProperty PERSONAL_HOME_PAGE =
+        new MAPIProperty(0x3a50, ASCII_STRING, "PersonalHomePage", "PR_PERSONAL_HOME_PAGE");
+    public static final MAPIProperty PHYSICAL_DELIVERY_BUREAU_FAX_DELIVERY =
+        new MAPIProperty(0xc0a, BOOLEAN, "PhysicalDeliveryBureauFaxDelivery", "PR_PHYSICAL_DELIVERY_BUREAU_FAX_DELIVERY");
+    public static final MAPIProperty PHYSICAL_DELIVERY_MODE =
+        new MAPIProperty(0xc0b, LONG, "PhysicalDeliveryMode", "PR_PHYSICAL_DELIVERY_MODE");
+    public static final MAPIProperty PHYSICAL_DELIVERY_REPORT_REQUEST =
+        new MAPIProperty(0xc0c, LONG, "PhysicalDeliveryReportRequest", "PR_PHYSICAL_DELIVERY_REPORT_REQUEST");
+    public static final MAPIProperty PHYSICAL_FORWARDING_ADDRESS =
+        new MAPIProperty(0xc0d, BINARY, "PhysicalForwardingAddress", "PR_PHYSICAL_FORWARDING_ADDRESS");
+    public static final MAPIProperty PHYSICAL_FORWARDING_ADDRESS_REQUESTED =
+        new MAPIProperty(0xc0e, BOOLEAN, "PhysicalForwardingAddressRequested", "PR_PHYSICAL_FORWARDING_ADDRESS_REQUESTED");
+    public static final MAPIProperty PHYSICAL_FORWARDING_PROHIBITED =
+        new MAPIProperty(0xc0f, BOOLEAN, "PhysicalForwardingProhibited", "PR_PHYSICAL_FORWARDING_PROHIBITED");
+    public static final MAPIProperty PHYSICAL_RENDITION_ATTRIBUTES =
+        new MAPIProperty(0xc10, BINARY, "PhysicalRenditionAttributes", "PR_PHYSICAL_RENDITION_ATTRIBUTES");
+    public static final MAPIProperty POST_FOLDER_ENTRIES =
+        new MAPIProperty(0x103b, BINARY, "PostFolderEntries", "PR_POST_FOLDER_ENTRIES");
+    public static final MAPIProperty POST_FOLDER_NAMES =
+        new MAPIProperty(0x103c, ASCII_STRING, "PostFolderNames", "PR_POST_FOLDER_NAMES");
+    public static final MAPIProperty POST_OFFICE_BOX =
+        new MAPIProperty(0x3a2b, ASCII_STRING, "PostOfficeBox", "PR_POST_OFFICE_BOX");
+    public static final MAPIProperty POST_REPLY_DENIED =
+        new MAPIProperty(0x103f, BINARY, "PostReplyDenied", "PR_POST_REPLY_DENIED");
+    public static final MAPIProperty POST_REPLY_FOLDER_ENTRIES =
+        new MAPIProperty(0x103d, BINARY, "PostReplyFolderEntries", "PR_POST_REPLY_FOLDER_ENTRIES");
+    public static final MAPIProperty POST_REPLY_FOLDER_NAMES =
+        new MAPIProperty(0x103e, ASCII_STRING, "PostReplyFolderNames", "PR_POST_REPLY_FOLDER_NAMES");
+    public static final MAPIProperty POSTAL_ADDRESS =
+        new MAPIProperty(0x3a15, ASCII_STRING, "PostalAddress", "PR_POSTAL_ADDRESS");
+    public static final MAPIProperty POSTAL_CODE =
+        new MAPIProperty(0x3a2a, ASCII_STRING, "PostalCode", "PR_POSTAL_CODE");
+    public static final MAPIProperty PREPROCESS =
+        new MAPIProperty(0xe22, BOOLEAN, "Preprocess", "PR_PREPROCESS");
+    public static final MAPIProperty PRIMARY_CAPABILITY =
+        new MAPIProperty(0x3904, BINARY, "PrimaryCapability", "PR_PRIMARY_CAPABILITY");
+    public static final MAPIProperty PRIMARY_FAX_NUMBER =
+        new MAPIProperty(0x3a23, ASCII_STRING, "PrimaryFaxNumber", "PR_PRIMARY_FAX_NUMBER");
+    public static final MAPIProperty PRIMARY_TELEPHONE_NUMBER =
+        new MAPIProperty(0x3a1a, ASCII_STRING, "PrimaryTelephoneNumber", "PR_PRIMARY_TELEPHONE_NUMBER");
+    public static final MAPIProperty PRIORITY =
+        new MAPIProperty(0x26, LONG, "Priority", "PR_PRIORITY");
+    public static final MAPIProperty PROFESSION =
+        new MAPIProperty(0x3a46, ASCII_STRING, "Profession", "PR_PROFESSION");
+    public static final MAPIProperty PROFILE_NAME =
+        new MAPIProperty(0x3d12, ASCII_STRING, "ProfileName", "PR_PROFILE_NAME");
+    public static final MAPIProperty PROOF_OF_DELIVERY =
+        new MAPIProperty(0xc11, BINARY, "ProofOfDelivery", "PR_PROOF_OF_DELIVERY");
+    public static final MAPIProperty PROOF_OF_DELIVERY_REQUESTED =
+        new MAPIProperty(0xc12, BOOLEAN, "ProofOfDeliveryRequested", "PR_PROOF_OF_DELIVERY_REQUESTED");
+    public static final MAPIProperty PROOF_OF_SUBMISSION =
+        new MAPIProperty(0xe26, BINARY, "ProofOfSubmission", "PR_PROOF_OF_SUBMISSION");
+    public static final MAPIProperty PROOF_OF_SUBMISSION_REQUESTED =
+        new MAPIProperty(40, BOOLEAN, "ProofOfSubmissionRequested", "PR_PROOF_OF_SUBMISSION_REQUESTED");
+    public static final MAPIProperty PROP_ID_SECURE_MAX =
+        new MAPIProperty(0x67ff, Types.UNKNOWN,  "PropIdSecureMax", "PROP_ID_SECURE_MAX");
+    public static final MAPIProperty PROP_ID_SECURE_MIN =
+        new MAPIProperty(0x67f0, Types.UNKNOWN,  "PropIdSecureMin", "PROP_ID_SECURE_MIN");
+    public static final MAPIProperty PROVIDER_DISPLAY =
+        new MAPIProperty(0x3006, ASCII_STRING, "ProviderDisplay", "PR_PROVIDER_DISPLAY");
+    public static final MAPIProperty PROVIDER_DLL_NAME =
+        new MAPIProperty(0x300a, ASCII_STRING, "ProviderDllName", "PR_PROVIDER_DLL_NAME");
+    public static final MAPIProperty PROVIDER_ORDINAL =
+        new MAPIProperty(0x300d, LONG, "ProviderOrdinal", "PR_PROVIDER_ORDINAL");
+    public static final MAPIProperty PROVIDER_SUBMIT_TIME =
+        new MAPIProperty(0x48, TIME, "ProviderSubmitTime", "PR_PROVIDER_SUBMIT_TIME");
+    public static final MAPIProperty PROVIDER_UID =
+        new MAPIProperty(0x300c, BINARY, "ProviderUid", "PR_PROVIDER_UID");
+    public static final MAPIProperty PUID =
+        new MAPIProperty(0x300e, Types.UNKNOWN, "Puid", "PR_PUID");
+    public static final MAPIProperty RADIO_TELEPHONE_NUMBER =
+        new MAPIProperty(0x3a1d, ASCII_STRING, "RadioTelephoneNumber", "PR_RADIO_TELEPHONE_NUMBER");
+    public static final MAPIProperty RCVD_REPRESENTING_ADDRTYPE =
+        new MAPIProperty(0x77, ASCII_STRING, "RcvdRepresentingAddrtype", "PR_RCVD_REPRESENTING_ADDRTYPE");
+    public static final MAPIProperty RCVD_REPRESENTING_EMAIL_ADDRESS =
+        new MAPIProperty(120, ASCII_STRING, "RcvdRepresentingEmailAddress", "PR_RCVD_REPRESENTING_EMAIL_ADDRESS");
+    public static final MAPIProperty RCVD_REPRESENTING_ENTRY_ID =
+        new MAPIProperty(0x43, BINARY, "RcvdRepresentingEntryId", "PR_RCVD_REPRESENTING_ENTRYID");
+    public static final MAPIProperty RCVD_REPRESENTING_NAME =
+        new MAPIProperty(0x44, ASCII_STRING, "RcvdRepresentingName", "PR_RCVD_REPRESENTING_NAME");
+    public static final MAPIProperty RCVD_REPRESENTING_SEARCH_KEY =
+        new MAPIProperty(0x52, BINARY, "RcvdRepresentingSearchKey", "PR_RCVD_REPRESENTING_SEARCH_KEY");
+    public static final MAPIProperty READ_RECEIPT_ENTRY_ID =
+        new MAPIProperty(70, BINARY, "ReadReceiptEntryId", "PR_READ_RECEIPT_ENTRYID");
+    public static final MAPIProperty READ_RECEIPT_REQUESTED =
+        new MAPIProperty(0x29, BOOLEAN, "ReadReceiptRequested", "PR_READ_RECEIPT_REQUESTED");
+    public static final MAPIProperty READ_RECEIPT_SEARCH_KEY =
+        new MAPIProperty(0x53, BINARY, "ReadReceiptSearchKey", "PR_READ_RECEIPT_SEARCH_KEY");
+    public static final MAPIProperty RECEIPT_TIME =
+        new MAPIProperty(0x2a, TIME, "ReceiptTime", "PR_RECEIPT_TIME");
+    public static final MAPIProperty RECEIVE_FOLDER_SETTINGS =
+        new MAPIProperty(0x3415, DIRECTORY, "ReceiveFolderSettings", "PR_RECEIVE_FOLDER_SETTINGS");
+    public static final MAPIProperty RECEIVED_BY_ADDRTYPE =
+        new MAPIProperty(0x75, ASCII_STRING, "ReceivedByAddrtype", "PR_RECEIVED_BY_ADDRTYPE");
+    public static final MAPIProperty RECEIVED_BY_EMAIL_ADDRESS =
+        new MAPIProperty(0x76, ASCII_STRING, "ReceivedByEmailAddress", "PR_RECEIVED_BY_EMAIL_ADDRESS");
+    public static final MAPIProperty RECEIVED_BY_ENTRY_ID =
+        new MAPIProperty(0x3f, BINARY, "ReceivedByEntryId", "PR_RECEIVED_BY_ENTRYID");
+    public static final MAPIProperty RECEIVED_BY_NAME =
+        new MAPIProperty(0x40, ASCII_STRING, "ReceivedByName", "PR_RECEIVED_BY_NAME");
+    public static final MAPIProperty RECIPIENT_DISPLAY_NAME =
+        new MAPIProperty(0x5ff6, Types.UNICODE_STRING, "RecipientDisplayName", null);
+    public static final MAPIProperty RECIPIENT_ENTRY_ID =
+        new MAPIProperty(0x5ff7, Types.UNKNOWN, "RecipientEntryId", null);
+    public static final MAPIProperty RECIPIENT_FLAGS =
+        new MAPIProperty(0x5ffd, Types.UNKNOWN, "RecipientFlags", null);
+    public static final MAPIProperty RECEIVED_BY_SEARCH_KEY =
+        new MAPIProperty(0x51, BINARY, "ReceivedBySearchKey", "PR_RECEIVED_BY_SEARCH_KEY");
+    public static final MAPIProperty RECIPIENT_CERTIFICATE =
+        new MAPIProperty(0xc13, BINARY, "RecipientCertificate", "PR_RECIPIENT_CERTIFICATE");
+    public static final MAPIProperty RECIPIENT_NUMBER_FOR_ADVICE =
+        new MAPIProperty(0xc14, ASCII_STRING, "RecipientNumberForAdvice", "PR_RECIPIENT_NUMBER_FOR_ADVICE");
+    public static final MAPIProperty RECIPIENT_REASSIGNMENT_PROHIBITED =
+        new MAPIProperty(0x2b, BOOLEAN, "RecipientReassignmentProhibited", "PR_RECIPIENT_REASSIGNMENT_PROHIBITED");
+    public static final MAPIProperty RECIPIENT_STATUS =
+        new MAPIProperty(0xe15, LONG, "RecipientStatus", "PR_RECIPIENT_STATUS");
+    public static final MAPIProperty RECIPIENT_TYPE =
+        new MAPIProperty(0xc15, LONG, "RecipientType", "PR_RECIPIENT_TYPE");
+    public static final MAPIProperty RECORD_KEY =
+        new MAPIProperty(0xff9, BINARY, "RecordKey", "PR_RECORD_KEY");
+    public static final MAPIProperty REDIRECTION_HISTORY =
+        new MAPIProperty(0x2c, BINARY, "RedirectionHistory", "PR_REDIRECTION_HISTORY");
+    public static final MAPIProperty REFERRED_BY_NAME =
+        new MAPIProperty(0x3a47, ASCII_STRING, "ReferredByName", "PR_REFERRED_BY_NAME");
+    public static final MAPIProperty REGISTERED_MAIL_TYPE =
+        new MAPIProperty(0xc16, LONG, "RegisteredMailType", "PR_REGISTERED_MAIL_TYPE");
+    public static final MAPIProperty RELATED_IPMS =
+        new MAPIProperty(0x2d, BINARY, "RelatedIpms", "PR_RELATED_IPMS");
+    public static final MAPIProperty REMOTE_PROGRESS =
+        new MAPIProperty(0x3e0b, LONG, "RemoteProgress", "PR_REMOTE_PROGRESS");
+    public static final MAPIProperty REMOTE_PROGRESS_TEXT =
+        new MAPIProperty(0x3e0c, ASCII_STRING, "RemoteProgressText", "PR_REMOTE_PROGRESS_TEXT");
+    public static final MAPIProperty REMOTE_VALIDATE_OK =
+        new MAPIProperty(0x3e0d, BOOLEAN, "RemoteValidateOk", "PR_REMOTE_VALIDATE_OK");
+    public static final MAPIProperty RENDERING_POSITION =
+        new MAPIProperty(0x370b, LONG, "RenderingPosition", "PR_RENDERING_POSITION");
+    public static final MAPIProperty REPLY_RECIPIENT_ENTRIES =
+        new MAPIProperty(0x4f, BINARY, "ReplyRecipientEntries", "PR_REPLY_RECIPIENT_ENTRIES");
+    public static final MAPIProperty REPLY_RECIPIENT_NAMES =
+        new MAPIProperty(80, ASCII_STRING, "ReplyRecipientNames", "PR_REPLY_RECIPIENT_NAMES");
+    public static final MAPIProperty REPLY_REQUESTED =
+        new MAPIProperty(0xc17, BOOLEAN, "ReplyRequested", "PR_REPLY_REQUESTED");
+    public static final MAPIProperty REPLY_TIME =
+        new MAPIProperty(0x30, TIME, "ReplyTime", "PR_REPLY_TIME");
+    public static final MAPIProperty REPORT_ENTRY_ID =
+        new MAPIProperty(0x45, BINARY, "ReportEntryId", "PR_REPORT_ENTRYID");
+    public static final MAPIProperty REPORT_NAME =
+        new MAPIProperty(0x3a, ASCII_STRING, "ReportName", "PR_REPORT_NAME");
+    public static final MAPIProperty REPORT_SEARCH_KEY =
+        new MAPIProperty(0x54, BINARY, "ReportSearchKey", "PR_REPORT_SEARCH_KEY");
+    public static final MAPIProperty REPORT_TAG =
+        new MAPIProperty(0x31, BINARY, "ReportTag", "PR_REPORT_TAG");
+    public static final MAPIProperty REPORT_TEXT =
+        new MAPIProperty(0x1001, ASCII_STRING, "ReportText", "PR_REPORT_TEXT");
+    public static final MAPIProperty REPORT_TIME =
+        new MAPIProperty(50, TIME, "ReportTime", "PR_REPORT_TIME");
+    public static final MAPIProperty REPORTING_DL_NAME =
+        new MAPIProperty(0x1003, BINARY, "ReportingDlName", "PR_REPORTING_DL_NAME");
+    public static final MAPIProperty REPORTING_MTA_CERTIFICATE =
+        new MAPIProperty(0x1004, BINARY, "ReportingMtaCertificate", "PR_REPORTING_MTA_CERTIFICATE");
+    public static final MAPIProperty REQUESTED_DELIVERY_METHOD =
+        new MAPIProperty(0xc18, LONG, "RequestedDeliveryMethod", "PR_REQUESTED_DELIVERY_METHOD");
+    public static final MAPIProperty RESOURCE_FLAGS =
+        new MAPIProperty(0x3009, LONG, "ResourceFlags", "PR_RESOURCE_FLAGS");
+    public static final MAPIProperty RESOURCE_METHODS =
+        new MAPIProperty(0x3e02, LONG, "ResourceMethods", "PR_RESOURCE_METHODS");
+    public static final MAPIProperty RESOURCE_PATH =
+        new MAPIProperty(0x3e07, ASCII_STRING, "ResourcePath", "PR_RESOURCE_PATH");
+    public static final MAPIProperty RESOURCE_TYPE =
+        new MAPIProperty(0x3e03, LONG, "ResourceType", "PR_RESOURCE_TYPE");
+    public static final MAPIProperty RESPONSE_REQUESTED =
+        new MAPIProperty(0x63, BOOLEAN, "ResponseRequested", "PR_RESPONSE_REQUESTED");
+    public static final MAPIProperty RESPONSIBILITY =
+        new MAPIProperty(0xe0f, BOOLEAN, "Responsibility", "PR_RESPONSIBILITY");
+    public static final MAPIProperty RETURNED_IPM =
+        new MAPIProperty(0x33, BOOLEAN, "ReturnedIpm", "PR_RETURNED_IPM");
+    public static final MAPIProperty ROW_TYPE =
+        new MAPIProperty(0xff5, LONG, "RowType", "PR_ROW_TYPE");
+    public static final MAPIProperty ROWID =
+        new MAPIProperty(0x3000, LONG, "Rowid", "PR_ROWID");
+    public static final MAPIProperty RTF_COMPRESSED =
+        new MAPIProperty(0x1009, BINARY, "RtfCompressed", "PR_RTF_COMPRESSED");
+    public static final MAPIProperty RTF_IN_SYNC =
+        new MAPIProperty(0xe1f, BOOLEAN, "RtfInSync", "PR_RTF_IN_SYNC");
+    public static final MAPIProperty RTF_SYNC_BODY_COUNT =
+        new MAPIProperty(0x1007, LONG, "RtfSyncBodyCount", "PR_RTF_SYNC_BODY_COUNT");
+    public static final MAPIProperty RTF_SYNC_BODY_CRC =
+        new MAPIProperty(0x1006, LONG, "RtfSyncBodyCrc", "PR_RTF_SYNC_BODY_CRC");
+    public static final MAPIProperty RTF_SYNC_BODY_TAG =
+        new MAPIProperty(0x1008, ASCII_STRING, "RtfSyncBodyTag", "PR_RTF_SYNC_BODY_TAG");
+    public static final MAPIProperty RTF_SYNC_PREFIX_COUNT =
+        new MAPIProperty(0x1010, LONG, "RtfSyncPrefixCount", "PR_RTF_SYNC_PREFIX_COUNT");
+    public static final MAPIProperty RTF_SYNC_TRAILING_COUNT =
+        new MAPIProperty(0x1011, LONG, "RtfSyncTrailingCount", "PR_RTF_SYNC_TRAILING_COUNT");
+    public static final MAPIProperty SEARCH =
+        new MAPIProperty(0x3607, DIRECTORY, "Search", "PR_SEARCH");
+    public static final MAPIProperty SEARCH_KEY =
+        new MAPIProperty(0x300b, BINARY, "SearchKey", "PR_SEARCH_KEY");
+    public static final MAPIProperty SECURITY =
+        new MAPIProperty(0x34, LONG, "Security", "PR_SECURITY");
+    public static final MAPIProperty SELECTABLE =
+        new MAPIProperty(0x3609, BOOLEAN, "Selectable", "PR_SELECTABLE");
+    public static final MAPIProperty SEND_INTERNET_ENCODING =
+        new MAPIProperty(0x3a71, LONG, "SendInternetEncoding", "PR_SEND_INTERNET_ENCODING");
+    public static final MAPIProperty SEND_RECALL_REPORT =
+        new MAPIProperty(0x6803, Types.UNKNOWN, "SendRecallReport", "messages");
+    public static final MAPIProperty SEND_RICH_INFO =
+        new MAPIProperty(0x3a40, BOOLEAN, "SendRichInfo", "PR_SEND_RICH_INFO");
+    public static final MAPIProperty SENDER_ADDRTYPE =
+        new MAPIProperty(0xc1e, ASCII_STRING, "SenderAddrtype", "PR_SENDER_ADDRTYPE");
+    public static final MAPIProperty SENDER_EMAIL_ADDRESS =
+        new MAPIProperty(0xc1f, ASCII_STRING, "SenderEmailAddress", "PR_SENDER_EMAIL_ADDRESS");
+    public static final MAPIProperty SENDER_ENTRY_ID =
+        new MAPIProperty(0xc19, BINARY, "SenderEntryId", "PR_SENDER_ENTRYID");
+    public static final MAPIProperty SENDER_NAME =
+        new MAPIProperty(0xc1a, ASCII_STRING, "SenderName", "PR_SENDER_NAME");
+    public static final MAPIProperty SENDER_SEARCH_KEY =
+        new MAPIProperty(0xc1d, BINARY, "SenderSearchKey", "PR_SENDER_SEARCH_KEY");
+    public static final MAPIProperty SENSITIVITY =
+        new MAPIProperty(0x36, LONG, "Sensitivity", "PR_SENSITIVITY");
+    public static final MAPIProperty SENT_REPRESENTING_ADDRTYPE =
+        new MAPIProperty(100, ASCII_STRING, "SentRepresentingAddrtype", "PR_SENT_REPRESENTING_ADDRTYPE");
+    public static final MAPIProperty SENT_REPRESENTING_EMAIL_ADDRESS =
+        new MAPIProperty(0x65, ASCII_STRING, "SentRepresentingEmailAddress", "PR_SENT_REPRESENTING_EMAIL_ADDRESS");
+    public static final MAPIProperty SENT_REPRESENTING_ENTRY_ID =
+        new MAPIProperty(0x41, BINARY, "SentRepresentingEntryId", "PR_SENT_REPRESENTING_ENTRYID");
+    public static final MAPIProperty SENT_REPRESENTING_NAME =
+        new MAPIProperty(0x42, ASCII_STRING, "SentRepresentingName", "PR_SENT_REPRESENTING_NAME");
+    public static final MAPIProperty SENT_REPRESENTING_SEARCH_KEY =
+        new MAPIProperty(0x3b, BINARY, "SentRepresentingSearchKey", "PR_SENT_REPRESENTING_SEARCH_KEY");
+    public static final MAPIProperty SENTMAIL_ENTRY_ID =
+        new MAPIProperty(0xe0a, BINARY, "SentmailEntryId", "PR_SENTMAIL_ENTRYID");
+    public static final MAPIProperty SERVICE_DELETE_FILES =
+        new MAPIProperty(0x3d10, Types.createCustom(4126), "ServiceDeleteFiles", "PR_SERVICE_DELETE_FILES");
+    public static final MAPIProperty SERVICE_DLL_NAME =
+        new MAPIProperty(0x3d0a, ASCII_STRING, "ServiceDllName", "PR_SERVICE_DLL_NAME");
+    public static final MAPIProperty SERVICE_ENTRY_NAME =
+        new MAPIProperty(0x3d0b, ASCII_STRING, "ServiceEntryName", "PR_SERVICE_ENTRY_NAME");
+    public static final MAPIProperty SERVICE_EXTRA_UIDS =
+        new MAPIProperty(0x3d0d, BINARY, "ServiceExtraUids", "PR_SERVICE_EXTRA_UIDS");
+    public static final MAPIProperty SERVICE_NAME =
+        new MAPIProperty(0x3d09, ASCII_STRING, "ServiceName", "PR_SERVICE_NAME");
+    public static final MAPIProperty SERVICE_SUPPORT_FILES =
+        new MAPIProperty(0x3d0f, Types.createCustom(4126), "ServiceSupportFiles", "PR_SERVICE_SUPPORT_FILES");
+    public static final MAPIProperty SERVICE_UID =
+        new MAPIProperty(0x3d0c, BINARY, "ServiceUid", "PR_SERVICE_UID");
+    public static final MAPIProperty SERVICES =
+        new MAPIProperty(0x3d0e, BINARY, "Services", "PR_SERVICES");
+    public static final MAPIProperty SEVEN_BIT_DISPLAY_NAME =
+        new MAPIProperty(0x39ff, ASCII_STRING, "SevenBitDisplayName", "PR_SEVEN_BIT_DISPLAY_NAME");
+    public static final MAPIProperty SMTP_ADDRESS =
+        new MAPIProperty(0x39fe, Types.UNICODE_STRING, "SmtpAddress", "PR_SMTP_ADDRESS");
+    public static final MAPIProperty SPOOLER_STATUS =
+        new MAPIProperty(0xe10, LONG, "SpoolerStatus", "PR_SPOOLER_STATUS");
+    public static final MAPIProperty SPOUSE_NAME =
+        new MAPIProperty(0x3a48, ASCII_STRING, "SpouseName", "PR_SPOUSE_NAME");
+    public static final MAPIProperty START_DATE =
+        new MAPIProperty(0x60, TIME, "StartDate", "PR_START_DATE");
+    public static final MAPIProperty STATE_OR_PROVINCE =
+        new MAPIProperty(0x3a28, ASCII_STRING, "StateOrProvince", "PR_STATE_OR_PROVINCE");
+    public static final MAPIProperty STATUS =
+        new MAPIProperty(0x360b, LONG, "Status", "PR_STATUS");
+    public static final MAPIProperty STATUS_CODE =
+        new MAPIProperty(0x3e04, LONG, "StatusCode", "PR_STATUS_CODE");
+    public static final MAPIProperty STATUS_STRING =
+        new MAPIProperty(0x3e08, ASCII_STRING, "StatusString", "PR_STATUS_STRING");
+    public static final MAPIProperty STORE_ENTRY_ID =
+        new MAPIProperty(0xffb, BINARY, "StoreEntryId", "PR_STORE_ENTRYID");
+    public static final MAPIProperty STORE_PROVIDERS =
+        new MAPIProperty(0x3d00, BINARY, "StoreProviders", "PR_STORE_PROVIDERS");
+    public static final MAPIProperty STORE_RECORD_KEY =
+        new MAPIProperty(0xffa, BINARY, "StoreRecordKey", "PR_STORE_RECORD_KEY");
+    public static final MAPIProperty STORE_STATE =
+        new MAPIProperty(0x340e, LONG, "StoreState", "PR_STORE_STATE");
+    public static final MAPIProperty STORE_SUPPORT_MASK =
+        new MAPIProperty(0x340d, LONG, "StoreSupportMask", "PR_STORE_SUPPORT_MASK");
+    public static final MAPIProperty STREET_ADDRESS =
+        new MAPIProperty(0x3a29, ASCII_STRING, "StreetAddress", "PR_STREET_ADDRESS");
+    public static final MAPIProperty SUBFOLDERS =
+        new MAPIProperty(0x360a, BOOLEAN, "Subfolders", "PR_SUBFOLDERS");
+    public static final MAPIProperty SUBJECT =
+        new MAPIProperty(0x37, ASCII_STRING, "Subject", "PR_SUBJECT");
+    public static final MAPIProperty SUBJECT_IPM =
+        new MAPIProperty(0x38, BINARY, "SubjectIpm", "PR_SUBJECT_IPM");
+    public static final MAPIProperty SUBJECT_PREFIX =
+        new MAPIProperty(0x3d, ASCII_STRING, "SubjectPrefix", "PR_SUBJECT_PREFIX");
+    public static final MAPIProperty SUBMIT_FLAGS =
+        new MAPIProperty(0xe14, LONG, "SubmitFlags", "PR_SUBMIT_FLAGS");
+    public static final MAPIProperty SUPERSEDES =
+        new MAPIProperty(0x103a, ASCII_STRING, "Supersedes", "PR_SUPERSEDES");
+    public static final MAPIProperty SUPPLEMENTARY_INFO =
+        new MAPIProperty(0xc1b, ASCII_STRING, "SupplementaryInfo", "PR_SUPPLEMENTARY_INFO");
+    public static final MAPIProperty SURNAME =
+        new MAPIProperty(0x3a11, ASCII_STRING, "Surname", "PR_SURNAME");
+    public static final MAPIProperty TELEX_NUMBER =
+        new MAPIProperty(0x3a2c, ASCII_STRING, "TelexNumber", "PR_TELEX_NUMBER");
+    public static final MAPIProperty TEMPLATEID =
+        new MAPIProperty(0x3902, BINARY, "Templateid", "PR_TEMPLATEID");
+    public static final MAPIProperty TITLE =
+        new MAPIProperty(0x3a17, ASCII_STRING, "Title", "PR_TITLE");
+    public static final MAPIProperty TNEF_CORRELATION_KEY =
+        new MAPIProperty(0x7f, BINARY, "TnefCorrelationKey", "PR_TNEF_CORRELATION_KEY");
+    public static final MAPIProperty TRANSMITABLE_DISPLAY_NAME =
+        new MAPIProperty(0x3a20, ASCII_STRING, "TransmitableDisplayName", "PR_TRANSMITABLE_DISPLAY_NAME");
+    public static final MAPIProperty TRANSPORT_KEY =
+        new MAPIProperty(0xe16, LONG, "TransportKey", "PR_TRANSPORT_KEY");
+    public static final MAPIProperty TRANSPORT_MESSAGE_HEADERS =
+        new MAPIProperty(0x7d, ASCII_STRING, "TransportMessageHeaders", "PR_TRANSPORT_MESSAGE_HEADERS");
+    public static final MAPIProperty TRANSPORT_PROVIDERS =
+        new MAPIProperty(0x3d02, BINARY, "TransportProviders", "PR_TRANSPORT_PROVIDERS");
+    public static final MAPIProperty TRANSPORT_STATUS =
+        new MAPIProperty(0xe11, LONG, "TransportStatus", "PR_TRANSPORT_STATUS");
+    public static final MAPIProperty TTYTDD_PHONE_NUMBER =
+        new MAPIProperty(0x3a4b, ASCII_STRING, "TtytddPhoneNumber", "PR_TTYTDD_PHONE_NUMBER");
+    public static final MAPIProperty TYPE_OF_MTS_USER =
+        new MAPIProperty(0xc1c, LONG, "TypeOfMtsUser", "PR_TYPE_OF_MTS_USER");
+    public static final MAPIProperty USER_CERTIFICATE =
+        new MAPIProperty(0x3a22, BINARY, "UserCertificate", "PR_USER_CERTIFICATE");
+    public static final MAPIProperty USER_X509_CERTIFICATE =
+        new MAPIProperty(0x3a70, Types.createCustom(4354), "UserX509Certificate", "PR_USER_X509_CERTIFICATE");
+    public static final MAPIProperty VALID_FOLDER_MASK =
+        new MAPIProperty(0x35df, LONG, "ValidFolderMask", "PR_VALID_FOLDER_MASK");
+    public static final MAPIProperty VIEWS_ENTRY_ID =
+        new MAPIProperty(0x35e5, BINARY, "ViewsEntryId", "PR_VIEWS_ENTRYID");
+    public static final MAPIProperty WEDDING_ANNIVERSARY =
+        new MAPIProperty(0x3a41, TIME, "WeddingAnniversary", "PR_WEDDING_ANNIVERSARY");
+    public static final MAPIProperty X400_CONTENT_TYPE =
+        new MAPIProperty(60, BINARY, "X400ContentType", "PR_X400_CONTENT_TYPE");
+    public static final MAPIProperty X400_DEFERRED_DELIVERY_CANCEL =
+        new MAPIProperty(0x3e09, BOOLEAN, "X400DeferredDeliveryCancel", "PR_X400_DEFERRED_DELIVERY_CANCEL");
+    public static final MAPIProperty XPOS =
+        new MAPIProperty(0x3f05, LONG, "Xpos", "PR_XPOS");
+    public static final MAPIProperty YPOS =
+        new MAPIProperty(0x3f06, LONG, "Ypos", "PR_YPOS");
+
+    public static final MAPIProperty UNKNOWN =
+        new MAPIProperty(-1, Types.UNKNOWN, "Unknown", null);
+
+    // 0x8??? ones are outlook specific, and not standard MAPI
+    // TODO See http://msdn.microsoft.com/en-us/library/ee157150%28v=exchg.80%29
+    // for some
+    // info on how we might decode them properly in the future
+    private static final int ID_FIRST_CUSTOM = 0x8000;
+    private static final int ID_LAST_CUSTOM = 0xFFFE;
+
+    /* --------------------------------------------------------------------- */
+
+    public final int id;
+    public final MAPIType usualType;
+    public final String name;
+    public final String mapiProperty;
+
+    private MAPIProperty(int id, MAPIType usualType, String name,
+            String mapiProperty) {
+        this.id = id;
+        this.usualType = usualType;
+        this.name = name;
+        this.mapiProperty = mapiProperty;
+
+        // If it isn't unknown or custom, store it for lookup
+        if (id == -1 
+            || (id >= ID_FIRST_CUSTOM && id <= ID_LAST_CUSTOM)
             || (this instanceof CustomMAPIProperty)) {
-         // Custom/Unknown, skip
-      } else {
-         if(attributes.containsKey(id)) {
-            throw new IllegalArgumentException(
-                  "Duplicate MAPI Property with ID " + id + " : " +
-                  toString() + " vs " + attributes.get(id).toString()
-            );
-         }
-         attributes.put(id, this);
-      }
-   }
-   
-   public String asFileName() {
-      String str = Integer.toHexString(id).toUpperCase(Locale.ROOT);
-      while(str.length() < 4) {
-         str = "0" + str;
-      }
-      return str + usualType.asFileEnding();
-   }
+            // Custom/Unknown, skip
+        } else {
+            if (attributes.containsKey(id)) {
+                throw new IllegalArgumentException(
+                    "Duplicate MAPI Property with ID " + id + " : "
+                    + toString() + " vs "
+                    + attributes.get(id).toString());
+            }
+            attributes.put(id, this);
+        }
+    }
+
+    public String asFileName() {
+        String str = Integer.toHexString(id).toUpperCase(Locale.ROOT);
+        while (str.length() < 4) {
+            str = "0" + str;
+        }
+        return str + usualType.asFileEnding();
+    }
+
+    public String toString() {
+        StringBuffer str = new StringBuffer();
+        str.append(name);
+        str.append(" [");
+        str.append(id);
+        str.append("]");
+        if (mapiProperty != null) {
+            str.append(" (");
+            str.append(mapiProperty);
+            str.append(")");
+        }
+        return str.toString();
+    }
+
+    public static MAPIProperty get(int id) {
+        MAPIProperty attr = attributes.get(id);
+        if (attr != null) {
+            return attr;
+        } else {
+            return UNKNOWN;
+        }
+    }
+
+    public static Collection<MAPIProperty> getAll() {
+        return Collections.unmodifiableCollection(attributes.values());
+    }
+
+    public static MAPIProperty createCustom(int id, MAPIType type, String name) {
+        return new CustomMAPIProperty(id, type, name, null);
+    }
 
-   public String toString() {
-      StringBuffer str = new StringBuffer();
-      str.append(name);
-      str.append(" [");
-      str.append(id);
-      str.append("]");
-      if(mapiProperty != null) {
-         str.append(" (");
-         str.append(mapiProperty);
-         str.append(")");
-      }
-      return str.toString();
-   }
-   
-   public static MAPIProperty get(int id) {
-      MAPIProperty attr = attributes.get(id);
-      if(attr != null) {
-         return attr;
-      } else {
-         return UNKNOWN;
-      }
-   }
-   public static Collection<MAPIProperty> getAll() {
-      return Collections.unmodifiableCollection( attributes.values() );
-   }
-   
-   public static MAPIProperty createCustom(int id, MAPIType type, String name) {
-      return new CustomMAPIProperty(id, type, name, null);
-   }
-   
-   private static class CustomMAPIProperty extends MAPIProperty {
-      private CustomMAPIProperty(int id, MAPIType usualType, String name, String mapiProperty) {
-         super(id, usualType, name, mapiProperty);
-      }
-   }
+    private static class CustomMAPIProperty extends MAPIProperty {
+        private CustomMAPIProperty(int id, MAPIType usualType, String name, String mapiProperty) {
+            super(id, usualType, name, mapiProperty);
+        }
+    }
 }
index dbf77c51c6ee62ce2f73613d0900ec061c8ab9e9..ecc11a176759f9548c0091dca8d2a65c11b9a612 100644 (file)
@@ -24,66 +24,68 @@ import java.io.OutputStream;
 import org.apache.poi.util.LittleEndian;
 
 /**
- * A {@link PropertiesChunk} for a Message or Embedded-Message.
- * This has a 32 byte header
+ * A {@link PropertiesChunk} for a Message or Embedded-Message. This has a 32
+ * byte header
  */
 public class MessagePropertiesChunk extends PropertiesChunk {
-   private long nextRecipientId;
-   private long nextAttachmentId;
-   private long recipientCount;
-   private long attachmentCount;
-
-   public MessagePropertiesChunk(ChunkGroup parentGroup) {
-      super(parentGroup);
-   }
-   
-   public long getNextRecipientId() {
-      return nextRecipientId;
-   }
-   public long getNextAttachmentId() {
-      return nextAttachmentId;
-   }
-
-   public long getRecipientCount() {
-      return recipientCount;
-   }
-   public long getAttachmentCount() {
-      return attachmentCount;
-   }
-
-   @Override
-   public void readValue(InputStream stream) throws IOException {
-      // 8 bytes of reserved zeros
-      LittleEndian.readLong(stream);
-      
-      // Nexts and counts
-      nextRecipientId = LittleEndian.readUInt(stream);
-      nextAttachmentId = LittleEndian.readUInt(stream);
-      recipientCount = LittleEndian.readUInt(stream);
-      attachmentCount = LittleEndian.readUInt(stream);
-      
-      // 8 bytes of reserved zeros
-      LittleEndian.readLong(stream);
-      
-      // Now properties
-      readProperties(stream);
-   }
-
-   @Override
-   public void writeValue(OutputStream out) throws IOException {
-      // 8 bytes of reserved zeros
-      out.write(new byte[8]);
-      
-      // Nexts and counts
-      LittleEndian.putUInt(nextRecipientId, out);
-      LittleEndian.putUInt(nextAttachmentId, out);
-      LittleEndian.putUInt(recipientCount, out);
-      LittleEndian.putUInt(attachmentCount, out);
-      
-      // 8 bytes of reserved zeros
-      out.write(new byte[8]);
-      
-      // Now properties
-      writeProperties(out);
-   }
+    private long nextRecipientId;
+    private long nextAttachmentId;
+    private long recipientCount;
+    private long attachmentCount;
+
+    public MessagePropertiesChunk(ChunkGroup parentGroup) {
+        super(parentGroup);
+    }
+
+    public long getNextRecipientId() {
+        return nextRecipientId;
+    }
+
+    public long getNextAttachmentId() {
+        return nextAttachmentId;
+    }
+
+    public long getRecipientCount() {
+        return recipientCount;
+    }
+
+    public long getAttachmentCount() {
+        return attachmentCount;
+    }
+
+    @Override
+    public void readValue(InputStream stream) throws IOException {
+        // 8 bytes of reserved zeros
+        LittleEndian.readLong(stream);
+
+        // Nexts and counts
+        nextRecipientId = LittleEndian.readUInt(stream);
+        nextAttachmentId = LittleEndian.readUInt(stream);
+        recipientCount = LittleEndian.readUInt(stream);
+        attachmentCount = LittleEndian.readUInt(stream);
+
+        // 8 bytes of reserved zeros
+        LittleEndian.readLong(stream);
+
+        // Now properties
+        readProperties(stream);
+    }
+
+    @Override
+    public void writeValue(OutputStream out) throws IOException {
+        // 8 bytes of reserved zeros
+        out.write(new byte[8]);
+
+        // Nexts and counts
+        LittleEndian.putUInt(nextRecipientId, out);
+        LittleEndian.putUInt(nextAttachmentId, out);
+        LittleEndian.putUInt(recipientCount, out);
+        LittleEndian.putUInt(attachmentCount, out);
+
+        // 8 bytes of reserved zeros
+        out.write(new byte[8]);
+
+        // Now properties
+        writeProperties(out);
+    }
 }
index fa81d55f72d609069a64285334ce2f295dbe919d..409da20c049f8181fe7742e8f50173a99dfb35d8 100644 (file)
@@ -31,100 +31,106 @@ import org.apache.poi.util.POILogFactory;
 import org.apache.poi.util.POILogger;
 
 /**
- * A Chunk that holds the details given back by the
- *  server at submission time.
- * This includes the date the message was given to the
- *  server, and an ID that's used if you want to cancel
- *  a message or similar
+ * A Chunk that holds the details given back by the server at submission time.
+ * This includes the date the message was given to the server, and an ID that's
+ * used if you want to cancel a message or similar
  */
 public class MessageSubmissionChunk extends Chunk {
-   private static POILogger logger = POILogFactory.getLogger(MessageSubmissionChunk.class);
-   private String rawId;
-   private Calendar date;
-
-   private static final Pattern datePatern = 
-            Pattern.compile("(\\d\\d)(\\d\\d)(\\d\\d)(\\d\\d)(\\d\\d)(\\d\\d)Z?"); 
-
-   /**
-    * Creates a Byte Chunk.
-    */
-   public MessageSubmissionChunk(String namePrefix, int chunkId, MAPIType type) {
-      super(namePrefix, chunkId, type);
-   }
-
-   /**
-    * Create a Byte Chunk, with the specified
-    *  type.
-    */
-   public MessageSubmissionChunk(int chunkId, MAPIType type) {
-      super(chunkId, type);
-   }
-
-   public void readValue(InputStream value) throws IOException {
-      // Stored in the file as us-ascii
-     byte[] data = IOUtils.toByteArray(value); 
-     rawId = new String(data, Charset.forName("ASCII"));
-      
-      // Now process the date
-      String[] parts = rawId.split(";");
-      for(String part : parts) {
-         if(part.startsWith("l=")) {
-            // Format of this bit appears to be l=<id>-<time>-<number>
-            // ID may contain hyphens.
-
-            String dateS = null;
-            final int numberPartBegin = part.lastIndexOf('-');
-            if (numberPartBegin != -1) {
-                final int datePartBegin = part.lastIndexOf('-', numberPartBegin-1);
-                if (datePartBegin != -1 && 
-                        // cannot extract date if only one hyphen is in the string...
-                        numberPartBegin > datePartBegin) {
-                    dateS = part.substring(datePartBegin + 1, numberPartBegin);
+    private static POILogger logger = POILogFactory
+            .getLogger(MessageSubmissionChunk.class);
+    private String rawId;
+    private Calendar date;
+
+    private static final Pattern datePatern = Pattern
+        .compile("(\\d\\d)(\\d\\d)(\\d\\d)(\\d\\d)(\\d\\d)(\\d\\d)Z?");
+
+    /**
+     * Creates a Byte Chunk.
+     */
+    public MessageSubmissionChunk(String namePrefix, int chunkId,
+            MAPIType type) {
+        super(namePrefix, chunkId, type);
+    }
+
+    /**
+     * Create a Byte Chunk, with the specified type.
+     */
+    public MessageSubmissionChunk(int chunkId, MAPIType type) {
+        super(chunkId, type);
+    }
+
+    public void readValue(InputStream value) throws IOException {
+        // Stored in the file as us-ascii
+        byte[] data = IOUtils.toByteArray(value);
+        rawId = new String(data, Charset.forName("ASCII"));
+
+        // Now process the date
+        String[] parts = rawId.split(";");
+        for (String part : parts) {
+            if (part.startsWith("l=")) {
+                // Format of this bit appears to be l=<id>-<time>-<number>
+                // ID may contain hyphens.
+
+                String dateS = null;
+                final int numberPartBegin = part.lastIndexOf('-');
+                if (numberPartBegin != -1) {
+                    final int datePartBegin = part.lastIndexOf('-',
+                            numberPartBegin - 1);
+                    if (datePartBegin != -1 &&
+                    // cannot extract date if only one hyphen is in the
+                    // string...
+                            numberPartBegin > datePartBegin) {
+                        dateS = part.substring(datePartBegin + 1,
+                                numberPartBegin);
+                    }
+                }
+                if (dateS != null) {
+                    // Should be yymmddhhmmssZ
+                    Matcher m = datePatern.matcher(dateS);
+                    if (m.matches()) {
+                        date = LocaleUtil.getLocaleCalendar();
+
+                        // work around issues with dates like 1989, which appear as "89" here
+                        int year = Integer.parseInt(m.group(1));
+                        date.set(Calendar.YEAR, year + (year > 80 ? 1900 : 2000));
+
+                        // Java is 0 based
+                        date.set(Calendar.MONTH, Integer.parseInt(m.group(2)) - 1);
+                        date.set(Calendar.DATE, Integer.parseInt(m.group(3)));
+                        date.set(Calendar.HOUR_OF_DAY,
+                                Integer.parseInt(m.group(4)));
+                        date.set(Calendar.MINUTE, Integer.parseInt(m.group(5)));
+                        date.set(Calendar.SECOND, Integer.parseInt(m.group(6)));
+                        date.clear(Calendar.MILLISECOND);
+                    } else {
+                        logger.log(POILogger.WARN,
+                                "Warning - unable to make sense of date "
+                                        + dateS);
+                    }
                 }
             }
-            if (dateS != null) {
-               // Should be yymmddhhmmssZ
-               Matcher m = datePatern.matcher(dateS);
-               if(m.matches()) {
-                  date = LocaleUtil.getLocaleCalendar();
-
-                  // work around issues with dates like 1989, which appear as "89" here
-                  int year = Integer.parseInt(m.group(1));
-                  date.set(Calendar.YEAR,  year + (year > 80 ? 1900 : 2000));
-
-                  date.set(Calendar.MONTH, Integer.parseInt(m.group(2)) - 1); // Java is 0 based
-                  date.set(Calendar.DATE,  Integer.parseInt(m.group(3)));
-                  date.set(Calendar.HOUR_OF_DAY, Integer.parseInt(m.group(4)));
-                  date.set(Calendar.MINUTE,      Integer.parseInt(m.group(5)));
-                  date.set(Calendar.SECOND,      Integer.parseInt(m.group(6)));
-                  date.clear(Calendar.MILLISECOND);
-               } else {
-                  logger.log(POILogger.WARN, "Warning - unable to make sense of date " + dateS);
-               }
-            }
-         }
-      }
-   }
-
-   public void writeValue(OutputStream out) throws IOException {
-     byte[] data = rawId.getBytes(Charset.forName("ASCII")); 
-     out.write(data);
-   }
-   
-   /**
-    * @return the date that the server accepted the
-    *  message, as found from the message ID it generated.
-    *
-    */
-   public Calendar getAcceptedAtTime() {
-      return date;
-   }
-   
-   /**
-    * @return the full ID that the server generated when
-    *  it accepted the message.
-    */
-   public String getSubmissionId() {
-      return rawId;
-   }
+        }
+    }
+
+    public void writeValue(OutputStream out) throws IOException {
+        byte[] data = rawId.getBytes(Charset.forName("ASCII"));
+        out.write(data);
+    }
+
+    /**
+     * @return the date that the server accepted the message, as found from the
+     *         message ID it generated.
+     *
+     */
+    public Calendar getAcceptedAtTime() {
+        return date;
+    }
+
+    /**
+     * @return the full ID that the server generated when it accepted the
+     *         message.
+     */
+    public String getSubmissionId() {
+        return rawId;
+    }
 }
index a976d9395f2793585301b191503cf4bb88b9bcb6..e31c8ab639bbbaf44e99f910ab277b74cdc81f84 100644 (file)
@@ -20,37 +20,35 @@ package org.apache.poi.hsmf.datatypes;
 import java.util.ArrayList;
 import java.util.List;
 
-
 /**
- * Collection of convenience chunks for the
- *  NameID part of an outlook file
+ * Collection of convenience chunks for the NameID part of an outlook file
  */
 public final class NameIdChunks implements ChunkGroup {
-   public static final String NAME = "__nameid_version1.0";
-   
-   /** Holds all the chunks that were found. */
-   private List<Chunk> allChunks = new ArrayList<Chunk>();
-   
-   public Chunk[] getAll() {
-      return allChunks.toArray(new Chunk[allChunks.size()]);
-   }
-   public Chunk[] getChunks() {
-      return getAll();
-   }
-       
-   /**
-    * Called by the parser whenever a chunk is found.
-    */
-   public void record(Chunk chunk) {
-      allChunks.add(chunk);
-   }
-   
-   /**
-    * Used to flag that all the chunks of the NameID
-     have now been located.
-    */
-   public void chunksComplete() {
-      // Currently, we don't need to do anything special once
-      //  all the chunks have been located
-   }
+    public static final String NAME = "__nameid_version1.0";
+
+    /** Holds all the chunks that were found. */
+    private List<Chunk> allChunks = new ArrayList<Chunk>();
+
+    public Chunk[] getAll() {
+        return allChunks.toArray(new Chunk[allChunks.size()]);
+    }
+
+    public Chunk[] getChunks() {
+        return getAll();
+    }
+
+    /**
+     * Called by the parser whenever a chunk is found.
+     */
+    public void record(Chunk chunk) {
+        allChunks.add(chunk);
+    }
+
+    /**
+     * Used to flag that all the chunks of the NameID have now been located.
+     */
+    public void chunksComplete() {
+        // Currently, we don't need to do anything special once
+        // all the chunks have been located
+    }
 }
index 076c15f2b01dae585a8b8fb73e200b4099571835..0efea0d0eb2eaf7043fe1561659fc298be31daf9 100644 (file)
@@ -42,240 +42,238 @@ import org.apache.poi.util.POILogFactory;
 import org.apache.poi.util.POILogger;
 
 /**
- * <p>A Chunk which holds (single) fixed-length properties, and pointer
- *  to the variable length ones / multi-valued ones (which get their 
- *  own chunk).
- * <p>There are two kinds of PropertiesChunks, which differ only in 
- *  their headers.
+ * <p>
+ * A Chunk which holds (single) fixed-length properties, and pointer to the
+ * variable length ones / multi-valued ones (which get their own chunk).
+ * <p>
+ * There are two kinds of PropertiesChunks, which differ only in their headers.
  */
 public abstract class PropertiesChunk extends Chunk {
-   public static final String NAME = "__properties_version1.0";
-   
-   /** For logging problems we spot with the file */
-   private POILogger logger = POILogFactory.getLogger(PropertiesChunk.class);
+    public static final String NAME = "__properties_version1.0";
 
-   /**
-    * Holds properties, indexed by type. If a property is multi-valued,
-    *  or variable length, it will be held via a {@link ChunkBasedPropertyValue}.
-    */
-   private Map<MAPIProperty, PropertyValue> properties = 
-         new HashMap<MAPIProperty, PropertyValue>();
+    /** For logging problems we spot with the file */
+    private POILogger logger = POILogFactory.getLogger(PropertiesChunk.class);
 
-   /**
-    * The ChunkGroup that these properties apply to. Used when
-    *  matching chunks to variable sized and multi-valued properties
-    */
-   private ChunkGroup parentGroup;
-   
-   /**
-    * Creates a Properties Chunk.
-    */
-   protected PropertiesChunk(ChunkGroup parentGroup) {
-       super(NAME, -1, Types.UNKNOWN);
-       this.parentGroup = parentGroup;
-   }
+    /**
+     * Holds properties, indexed by type. If a property is multi-valued, or
+     * variable length, it will be held via a {@link ChunkBasedPropertyValue}.
+     */
+    private Map<MAPIProperty, PropertyValue> properties = new HashMap<MAPIProperty, PropertyValue>();
 
-   @Override
-   public String getEntryName() {
-       return NAME;
-   }
-       
-   /**
-    * Returns all the properties in the chunk, without
-    *  looking up any chunk-based values
-    */
-   public Map<MAPIProperty, PropertyValue> getRawProperties() {
-      return properties;
-   }
+    /**
+     * The ChunkGroup that these properties apply to. Used when matching chunks
+     * to variable sized and multi-valued properties
+     */
+    private ChunkGroup parentGroup;
 
-   /**
-    * <p>Returns all the properties in the chunk, along with their
-    *  values.
-    * <p>Any chunk-based values will be looked up and returned as such
-    */
-   public Map<MAPIProperty, List<PropertyValue>> getProperties() {
-       Map<MAPIProperty, List<PropertyValue>> props = 
-               new HashMap<MAPIProperty, List<PropertyValue>>(properties.size());
-       for (MAPIProperty prop : properties.keySet()) {
-           props.put(prop, getValues(prop));
-       }
-       return props;
-   }
+    /**
+     * Creates a Properties Chunk.
+     */
+    protected PropertiesChunk(ChunkGroup parentGroup) {
+        super(NAME, -1, Types.UNKNOWN);
+        this.parentGroup = parentGroup;
+    }
 
-   /**
-    * Returns all values for the given property, looking up chunk based
-    *  ones as required, of null if none exist
-    */
-   public List<PropertyValue> getValues(MAPIProperty property) {
-       PropertyValue val = properties.get(property);
-       if (val == null) {
-           return null;
-       }
-       if (val instanceof ChunkBasedPropertyValue) {
-           // ChunkBasedPropertyValue cval = (ChunkBasedPropertyValue)val;
-           // TODO Lookup
-           return Collections.emptyList();
-       } else {
-           return Collections.singletonList(val);
-       }
-   }
+    @Override
+    public String getEntryName() {
+        return NAME;
+    }
 
-   /**
-    * Returns the value / pointer to the value chunk of 
-    *  the property, or null if none exists
-    */
-   public PropertyValue getRawValue(MAPIProperty property) {
-       return properties.get(property);
-   }
-       
-   /**
-    * Called once the parent ChunkGroup has been populated, to match
-    *  up the Chunks in it with our Variable Sized Properties.
-    */
-   protected void matchVariableSizedPropertiesToChunks() {
-      // Index the Parent Group chunks for easy lookup
-      // TODO Is this the right way?
-      Map<Integer,Chunk> chunks = new HashMap<Integer, Chunk>();
-      for (Chunk chunk : parentGroup.getChunks()) {
-         chunks.put(chunk.chunkId, chunk);
-      }
-      
-      // Loop over our values, looking for chunk based ones
-      for (PropertyValue val : properties.values()) {
-           if (val instanceof ChunkBasedPropertyValue) {
-              ChunkBasedPropertyValue cVal = (ChunkBasedPropertyValue)val;
-              Chunk chunk = chunks.get(cVal.getProperty().id);
-//System.err.println(cVal.getProperty() + " = " + cVal + " -> " + HexDump.toHex(cVal.data));                  
-                  
-              // TODO Make sense of the raw offset value
-              
-              if (chunk != null) {
-                 cVal.setValue(chunk);
-              } else {
-                 logger.log(POILogger.WARN, "No chunk found matching Property " + cVal);
-              }
-         }
-      }
-   }
+    /**
+     * Returns all the properties in the chunk, without looking up any
+     * chunk-based values
+     */
+    public Map<MAPIProperty, PropertyValue> getRawProperties() {
+        return properties;
+    }
 
-   protected void readProperties(InputStream value) throws IOException {
-      boolean going = true;
-      while (going) {
-         try {
-            // Read in the header
-            int typeID = LittleEndian.readUShort(value);
-            int id     = LittleEndian.readUShort(value);
-            long flags = LittleEndian.readUInt(value);
-            
-            // Turn the Type and ID into helper objects
-            MAPIType type = Types.getById(typeID);
-            MAPIProperty prop = MAPIProperty.get(id);
-            
-            // Wrap properties we don't know about as custom ones
-            if (prop == MAPIProperty.UNKNOWN) {
-                prop = MAPIProperty.createCustom(id, type, "Unknown " + id);
-            }
-            if (type == null) {
-                logger.log(POILogger.WARN, "Invalid type found, expected ", prop.usualType, 
-                        " but got ", typeID, " for property ", prop);
-                going = false;
-                break;
-            }
-            
-            // Sanity check the property's type against the value's type
-            if (prop.usualType != type) {
-                // Is it an allowed substitution?
-                if (type == Types.ASCII_STRING && prop.usualType == Types.UNICODE_STRING ||
-                    type == Types.UNICODE_STRING && prop.usualType == Types.ASCII_STRING) {
-                    // It's fine to go with the specified instead of the normal
-                } else if (prop.usualType == Types.UNKNOWN) {
-                    // We don't know what this property normally is, but it has come
-                    // through with a valid type, so use that
-                    logger.log(POILogger.INFO, "Property definition for ", prop, 
-                            " is missing a type definition, found a value with type ", type);
+    /**
+     * <p>
+     * Returns all the properties in the chunk, along with their values.
+     * <p>
+     * Any chunk-based values will be looked up and returned as such
+     */
+    public Map<MAPIProperty, List<PropertyValue>> getProperties() {
+        Map<MAPIProperty, List<PropertyValue>> props =
+            new HashMap<MAPIProperty, List<PropertyValue>>(properties.size());
+        for (MAPIProperty prop : properties.keySet()) {
+            props.put(prop, getValues(prop));
+        }
+        return props;
+    }
+
+    /**
+     * Returns all values for the given property, looking up chunk based ones as
+     * required, of null if none exist
+     */
+    public List<PropertyValue> getValues(MAPIProperty property) {
+        PropertyValue val = properties.get(property);
+        if (val == null) {
+            return null;
+        }
+        if (val instanceof ChunkBasedPropertyValue) {
+            // ChunkBasedPropertyValue cval = (ChunkBasedPropertyValue)val;
+            // TODO Lookup
+            return Collections.emptyList();
+        } else {
+            return Collections.singletonList(val);
+        }
+    }
+
+    /**
+     * Returns the value / pointer to the value chunk of the property, or null
+     * if none exists
+     */
+    public PropertyValue getRawValue(MAPIProperty property) {
+        return properties.get(property);
+    }
+
+    /**
+     * Called once the parent ChunkGroup has been populated, to match up the
+     * Chunks in it with our Variable Sized Properties.
+     */
+    protected void matchVariableSizedPropertiesToChunks() {
+        // Index the Parent Group chunks for easy lookup
+        // TODO Is this the right way?
+        Map<Integer, Chunk> chunks = new HashMap<Integer, Chunk>();
+        for (Chunk chunk : parentGroup.getChunks()) {
+            chunks.put(chunk.chunkId, chunk);
+        }
+
+        // Loop over our values, looking for chunk based ones
+        for (PropertyValue val : properties.values()) {
+            if (val instanceof ChunkBasedPropertyValue) {
+                ChunkBasedPropertyValue cVal = (ChunkBasedPropertyValue) val;
+                Chunk chunk = chunks.get(cVal.getProperty().id);
+                // System.err.println(cVal.getProperty() + " = " + cVal + " -> "
+                // + HexDump.toHex(cVal.data));
+
+                // TODO Make sense of the raw offset value
+
+                if (chunk != null) {
+                    cVal.setValue(chunk);
                 } else {
-                   // Oh dear, something has gone wrong...
-                   logger.log(POILogger.WARN, "Type mismatch, expected ", prop.usualType, 
-                              " but got ", type, " for property ", prop);
-                   going = false;
-                   break;
+                    logger.log(POILogger.WARN, "No chunk found matching Property " + cVal);
                 }
             }
-            
-            // TODO Detect if it is multi-valued, since if it is
-            //  then even fixed-length strings store their multiple
-            //  values in another chunk (much as variable length ones)
-            
-            // Work out how long the "data" is
-            // This might be the actual data, or just a pointer
-            //  to another chunk which holds the data itself
-            boolean isPointer = false;
-            int length = type.getLength();
-            if (! type.isFixedLength()) {
-               isPointer = true;
-               length = 8;
-            }
-            
-            // Grab the data block
-            byte[] data = new byte[length];
-            IOUtils.readFully(value, data);
-            
-            // Skip over any padding
-            if (length < 8) {
-                byte[] padding = new byte[8-length];
-                IOUtils.readFully(value, padding);
-            }
-            
-            // Wrap and store
-            PropertyValue propVal = null;
-            if (isPointer) {
-                // We'll match up the chunk later
-                propVal = new ChunkBasedPropertyValue(prop, flags, data);
-            }
-            else if (type == Types.NULL) {
-                propVal = new NullPropertyValue(prop, flags, data);
-            }
-            else if (type == Types.BOOLEAN) {
-                propVal = new BooleanPropertyValue(prop, flags, data);
-            }
-            else if (type == Types.SHORT) {
-                propVal = new ShortPropertyValue(prop, flags, data);
-            }
-            else if (type == Types.LONG) {
-                propVal = new LongPropertyValue(prop, flags, data);
-            }
-            else if (type == Types.LONG_LONG) {
-                propVal = new LongLongPropertyValue(prop, flags, data);
-            }
-            else if (type == Types.FLOAT) {
-                propVal = new FloatPropertyValue(prop, flags, data);
-            }
-            else if (type == Types.DOUBLE) {
-                propVal = new DoublePropertyValue(prop, flags, data);
-            }
-            else if (type == Types.CURRENCY) {
-                propVal = new CurrencyPropertyValue(prop, flags, data);
-            }
-            else if (type == Types.TIME) {
-                propVal = new TimePropertyValue(prop, flags, data);
-            }
-            // TODO Add in the rest of the types
-            else {
-                propVal = new PropertyValue(prop, flags, data);
-            }
+        }
+    }
+
+    protected void readProperties(InputStream value) throws IOException {
+        boolean going = true;
+        while (going) {
+            try {
+                // Read in the header
+                int typeID = LittleEndian.readUShort(value);
+                int id = LittleEndian.readUShort(value);
+                long flags = LittleEndian.readUInt(value);
+
+                // Turn the Type and ID into helper objects
+                MAPIType type = Types.getById(typeID);
+                MAPIProperty prop = MAPIProperty.get(id);
+
+                // Wrap properties we don't know about as custom ones
+                if (prop == MAPIProperty.UNKNOWN) {
+                    prop = MAPIProperty.createCustom(id, type, "Unknown " + id);
+                }
+                if (type == null) {
+                    logger.log(POILogger.WARN, "Invalid type found, expected ",
+                            prop.usualType, " but got ", typeID,
+                            " for property ", prop);
+                    going = false;
+                    break;
+                }
+
+                // Sanity check the property's type against the value's type
+                if (prop.usualType != type) {
+                    // Is it an allowed substitution?
+                    if (type == Types.ASCII_STRING
+                        && prop.usualType == Types.UNICODE_STRING
+                        || type == Types.UNICODE_STRING
+                        && prop.usualType == Types.ASCII_STRING) {
+                        // It's fine to go with the specified instead of the
+                        // normal
+                    } else if (prop.usualType == Types.UNKNOWN) {
+                        // We don't know what this property normally is, but it
+                        // has come
+                        // through with a valid type, so use that
+                        logger.log(POILogger.INFO, "Property definition for ", prop,
+                            " is missing a type definition, found a value with type ", type);
+                    } else {
+                        // Oh dear, something has gone wrong...
+                        logger.log(POILogger.WARN, "Type mismatch, expected ",
+                            prop.usualType, " but got ", type, " for property ", prop);
+                        going = false;
+                        break;
+                    }
+                }
+
+                // TODO Detect if it is multi-valued, since if it is
+                // then even fixed-length strings store their multiple
+                // values in another chunk (much as variable length ones)
 
-            if (properties.get(prop) != null) {
-                logger.log(POILogger.WARN, "Duplicate values found for " + prop);
+                // Work out how long the "data" is
+                // This might be the actual data, or just a pointer
+                // to another chunk which holds the data itself
+                boolean isPointer = false;
+                int length = type.getLength();
+                if (!type.isFixedLength()) {
+                    isPointer = true;
+                    length = 8;
+                }
+
+                // Grab the data block
+                byte[] data = new byte[length];
+                IOUtils.readFully(value, data);
+
+                // Skip over any padding
+                if (length < 8) {
+                    byte[] padding = new byte[8 - length];
+                    IOUtils.readFully(value, padding);
+                }
+
+                // Wrap and store
+                PropertyValue propVal = null;
+                if (isPointer) {
+                    // We'll match up the chunk later
+                    propVal = new ChunkBasedPropertyValue(prop, flags, data);
+                } else if (type == Types.NULL) {
+                    propVal = new NullPropertyValue(prop, flags, data);
+                } else if (type == Types.BOOLEAN) {
+                    propVal = new BooleanPropertyValue(prop, flags, data);
+                } else if (type == Types.SHORT) {
+                    propVal = new ShortPropertyValue(prop, flags, data);
+                } else if (type == Types.LONG) {
+                    propVal = new LongPropertyValue(prop, flags, data);
+                } else if (type == Types.LONG_LONG) {
+                    propVal = new LongLongPropertyValue(prop, flags, data);
+                } else if (type == Types.FLOAT) {
+                    propVal = new FloatPropertyValue(prop, flags, data);
+                } else if (type == Types.DOUBLE) {
+                    propVal = new DoublePropertyValue(prop, flags, data);
+                } else if (type == Types.CURRENCY) {
+                    propVal = new CurrencyPropertyValue(prop, flags, data);
+                } else if (type == Types.TIME) {
+                    propVal = new TimePropertyValue(prop, flags, data);
+                }
+                // TODO Add in the rest of the types
+                else {
+                    propVal = new PropertyValue(prop, flags, data);
+                }
+
+                if (properties.get(prop) != null) {
+                    logger.log(POILogger.WARN,
+                            "Duplicate values found for " + prop);
+                }
+                properties.put(prop, propVal);
+            } catch (BufferUnderrunException e) {
+                // Invalid property, ended short
+                going = false;
             }
-            properties.put(prop, propVal);
-         } catch (BufferUnderrunException e) {
-            // Invalid property, ended short
-            going = false;
-         }
-      }
-   }
+        }
+    }
 
-   protected void writeProperties(OutputStream out) throws IOException {
-       // TODO
-   }
+    protected void writeProperties(OutputStream out) throws IOException {
+        // TODO
+    }
 }
index a22927c7b604478e7c72d5fd582539de9be37f48..cd6527656579cc5ec773353edcaa03581fe7e34f 100644 (file)
@@ -24,212 +24,228 @@ import org.apache.poi.util.LittleEndian;
 import org.apache.poi.util.LocaleUtil;
 
 /**
- * An instance of a {@link MAPIProperty} inside a {@link PropertiesChunk}.
- * Where the {@link Types} type is a fixed length one, this will contain the
- *  actual value.
- * Where the {@link Types} type is a variable length one, this will contain
- *  the length of the property, and the value will be in the associated {@link Chunk}.
+ * An instance of a {@link MAPIProperty} inside a {@link PropertiesChunk}. Where
+ * the {@link Types} type is a fixed length one, this will contain the actual
+ * value. Where the {@link Types} type is a variable length one, this will
+ * contain the length of the property, and the value will be in the associated
+ * {@link Chunk}.
  */
 public class PropertyValue {
-   private MAPIProperty property;
-   private long flags;
-   protected byte[] data;
-   
-   public PropertyValue(MAPIProperty property, long flags, byte[] data) {
-      this.property = property;
-      this.flags = flags;
-      this.data = data;
-   }
-   
-   public MAPIProperty getProperty() {
-      return property;
-   }
-
-   /**
-    * Get the raw value flags.
-    * TODO Also provide getters for the flag meanings
-    */
-   public long getFlags() {
-      return flags;
-   }
-
-   public Object getValue() {
-      return data;
-   }
-   public void setRawValue(byte[] value) {
-      this.data = value;
-   }
-   
-   public String toString() {
-      Object v = getValue();
-      if (v == null)
-          return "(No value available)";
-      
-      if (v instanceof byte[]) {
-          return ByteChunk.toDebugFriendlyString((byte[])v);
-      } else {
-          // Just use the normal toString on the value
-          return v.toString();
-      }
-   }
-   
-   public static class NullPropertyValue extends PropertyValue {
-       public NullPropertyValue(MAPIProperty property, long flags, byte[] data) {
-          super(property, flags, data);
-       }
-       
-       public Void getValue() {
-           return null;
-       }
-   }
-   
-   public static class BooleanPropertyValue extends PropertyValue {
-       public BooleanPropertyValue(MAPIProperty property, long flags, byte[] data) {
-          super(property, flags, data);
-       }
-       
-       public Boolean getValue() {
-          short val = LittleEndian.getShort(data);
-          return val > 0;
-       }
-       public void setValue(boolean value) {
-          if (data.length != 2) {
-             data = new byte[2];
-          }
-          if (value) {
-              LittleEndian.putShort(data, 0, (short)1);
-          }
-       }
-   }
-    
-   public static class ShortPropertyValue extends PropertyValue {
-       public ShortPropertyValue(MAPIProperty property, long flags, byte[] data) {
-          super(property, flags, data);
-       }
-       
-       public Short getValue() {
-          return LittleEndian.getShort(data);
-       }
-       public void setValue(short value) {
-          if (data.length != 2) {
-             data = new byte[2];
-          }
-          LittleEndian.putShort(data, 0, value);
-       }
-   }
-    
-   public static class LongPropertyValue extends PropertyValue {
-       public LongPropertyValue(MAPIProperty property, long flags, byte[] data) {
-          super(property, flags, data);
-       }
-       
-       public Integer getValue() {
-          return LittleEndian.getInt(data);
-       }
-       public void setValue(int value) {
-          if (data.length != 4) {
-             data = new byte[4];
-          }
-          LittleEndian.putInt(data, 0, value);
-       }
+    private MAPIProperty property;
+    private long flags;
+    protected byte[] data;
+
+    public PropertyValue(MAPIProperty property, long flags, byte[] data) {
+        this.property = property;
+        this.flags = flags;
+        this.data = data;
+    }
+
+    public MAPIProperty getProperty() {
+        return property;
+    }
+
+    /**
+     * Get the raw value flags. TODO Also provide getters for the flag meanings
+     */
+    public long getFlags() {
+        return flags;
+    }
+
+    public Object getValue() {
+        return data;
+    }
+
+    public void setRawValue(byte[] value) {
+        this.data = value;
+    }
+
+    public String toString() {
+        Object v = getValue();
+        if (v == null)
+            return "(No value available)";
+
+        if (v instanceof byte[]) {
+            return ByteChunk.toDebugFriendlyString((byte[]) v);
+        } else {
+            // Just use the normal toString on the value
+            return v.toString();
+        }
+    }
+
+    public static class NullPropertyValue extends PropertyValue {
+        public NullPropertyValue(MAPIProperty property, long flags,
+                byte[] data) {
+            super(property, flags, data);
+        }
+
+        public Void getValue() {
+            return null;
+        }
+    }
+
+    public static class BooleanPropertyValue extends PropertyValue {
+        public BooleanPropertyValue(MAPIProperty property, long flags,
+                byte[] data) {
+            super(property, flags, data);
+        }
+
+        public Boolean getValue() {
+            short val = LittleEndian.getShort(data);
+            return val > 0;
+        }
+
+        public void setValue(boolean value) {
+            if (data.length != 2) {
+                data = new byte[2];
+            }
+            if (value) {
+                LittleEndian.putShort(data, 0, (short) 1);
+            }
+        }
+    }
+
+    public static class ShortPropertyValue extends PropertyValue {
+        public ShortPropertyValue(MAPIProperty property, long flags,
+                byte[] data) {
+            super(property, flags, data);
+        }
+
+        public Short getValue() {
+            return LittleEndian.getShort(data);
+        }
+
+        public void setValue(short value) {
+            if (data.length != 2) {
+                data = new byte[2];
+            }
+            LittleEndian.putShort(data, 0, value);
+        }
+    }
+
+    public static class LongPropertyValue extends PropertyValue {
+        public LongPropertyValue(MAPIProperty property, long flags, byte[] data) {
+            super(property, flags, data);
+        }
+
+        public Integer getValue() {
+            return LittleEndian.getInt(data);
+        }
+
+        public void setValue(int value) {
+            if (data.length != 4) {
+                data = new byte[4];
+            }
+            LittleEndian.putInt(data, 0, value);
+        }
+    }
+
+    public static class LongLongPropertyValue extends PropertyValue {
+        public LongLongPropertyValue(MAPIProperty property, long flags,
+                byte[] data) {
+            super(property, flags, data);
+        }
+
+        public Long getValue() {
+            return LittleEndian.getLong(data);
+        }
+
+        public void setValue(long value) {
+            if (data.length != 8) {
+                data = new byte[8];
+            }
+            LittleEndian.putLong(data, 0, value);
+        }
+    }
+
+    public static class FloatPropertyValue extends PropertyValue {
+        public FloatPropertyValue(MAPIProperty property, long flags,
+                byte[] data) {
+            super(property, flags, data);
+        }
+
+        public Float getValue() {
+            return LittleEndian.getFloat(data);
+        }
+
+        public void setValue(float value) {
+            if (data.length != 4) {
+                data = new byte[4];
+            }
+            LittleEndian.putFloat(data, 0, value);
+        }
+    }
+
+    public static class DoublePropertyValue extends PropertyValue {
+        public DoublePropertyValue(MAPIProperty property, long flags, byte[] data) {
+            super(property, flags, data);
+        }
+
+        public Double getValue() {
+            return LittleEndian.getDouble(data);
+        }
+
+        public void setValue(double value) {
+            if (data.length != 8) {
+                data = new byte[8];
+            }
+            LittleEndian.putDouble(data, 0, value);
+        }
+    }
+
+    /**
+     * signed 64-bit integer that represents a base ten decimal, with four
+     * digits to the right of the decimal point
+     */
+    public static class CurrencyPropertyValue extends PropertyValue {
+        private static final BigInteger SHIFT = BigInteger.valueOf(10000);
+
+        public CurrencyPropertyValue(MAPIProperty property, long flags, byte[] data) {
+            super(property, flags, data);
+        }
+
+        public BigInteger getValue() {
+            long unshifted = LittleEndian.getLong(data);
+            return BigInteger.valueOf(unshifted).divide(SHIFT);
+        }
+
+        public void setValue(BigInteger value) {
+            if (data.length != 8) {
+                data = new byte[8];
+            }
+            long shifted = value.multiply(SHIFT).longValue();
+            LittleEndian.putLong(data, 0, shifted);
+        }
+    }
+
+    /**
+     * 64-bit integer specifying the number of 100ns periods since Jan 1, 1601
+     */
+    public static class TimePropertyValue extends PropertyValue {
+        private static final long OFFSET = 1000L * 60L * 60L * 24L
+                * (365L * 369L + 89L);
+
+        public TimePropertyValue(MAPIProperty property, long flags, byte[] data) {
+            super(property, flags, data);
+        }
+
+        public Calendar getValue() {
+            long time = LittleEndian.getLong(data);
+            time = (time / 10 / 1000) - OFFSET;
+
+            Calendar timeC = LocaleUtil.getLocaleCalendar();
+            timeC.setTimeInMillis(time);
+
+            return timeC;
+        }
+
+        public void setValue(Calendar value) {
+            if (data.length != 8) {
+                data = new byte[8];
+            }
+            long time = value.getTimeInMillis();
+            time = (time + OFFSET) * 10 * 1000;
+            LittleEndian.putLong(data, 0, time);
+        }
     }
-    
-   public static class LongLongPropertyValue extends PropertyValue {
-      public LongLongPropertyValue(MAPIProperty property, long flags, byte[] data) {
-         super(property, flags, data);
-      }
-      
-      public Long getValue() {
-         return LittleEndian.getLong(data);
-      }
-      public void setValue(long value) {
-         if (data.length != 8) {
-            data = new byte[8];
-         }
-         LittleEndian.putLong(data, 0, value);
-      }
-   }
-   
-   public static class FloatPropertyValue extends PropertyValue {
-       public FloatPropertyValue(MAPIProperty property, long flags, byte[] data) {
-          super(property, flags, data);
-       }
-       
-       public Float getValue() {
-          return LittleEndian.getFloat(data);
-       }
-       public void setValue(float value) {
-          if (data.length != 4) {
-             data = new byte[4];
-          }
-          LittleEndian.putFloat(data, 0, value);
-       }
-   }
-    
-   public static class DoublePropertyValue extends PropertyValue {
-       public DoublePropertyValue(MAPIProperty property, long flags, byte[] data) {
-          super(property, flags, data);
-       }
-       
-       public Double getValue() {
-          return LittleEndian.getDouble(data);
-       }
-       public void setValue(double value) {
-          if (data.length != 8) {
-             data = new byte[8];
-          }
-          LittleEndian.putDouble(data, 0, value);
-       }
-   }
-    
-   /**
-    * signed 64-bit integer that represents a base ten decimal, 
-    * with four digits to the right of the decimal point
-    */
-   public static class CurrencyPropertyValue extends PropertyValue {
-       private static final BigInteger SHIFT = BigInteger.valueOf(10000);
-       public CurrencyPropertyValue(MAPIProperty property, long flags, byte[] data) {
-          super(property, flags, data);
-       }
-       
-       public BigInteger getValue() {
-           long unshifted = LittleEndian.getLong(data);
-           return BigInteger.valueOf(unshifted).divide(SHIFT);
-       }
-       public void setValue(BigInteger value) {
-          if (data.length != 8) {
-             data = new byte[8];
-          }
-          long shifted = value.multiply(SHIFT).longValue();
-          LittleEndian.putLong(data, 0, shifted);
-       }
-   }
-    
-   /**
-    * 64-bit integer specifying the number of 100ns periods since Jan 1, 1601
-    */
-   public static class TimePropertyValue extends PropertyValue {
-      private static final long OFFSET = 1000L * 60L * 60L * 24L * (365L * 369L + 89L);
-      public TimePropertyValue(MAPIProperty property, long flags, byte[] data) {
-         super(property, flags, data);
-      }
-      
-      public Calendar getValue() {
-         long time = LittleEndian.getLong(data);
-         time = (time / 10 / 1000) - OFFSET;
-
-         Calendar timeC = LocaleUtil.getLocaleCalendar();
-         timeC.setTimeInMillis(time);
-
-         return timeC;
-      }
-      public void setValue(Calendar value) {
-         if (data.length != 8) {
-            data = new byte[8];
-         }
-         long time = value.getTimeInMillis();
-         time = (time + OFFSET) *10*1000;
-         LittleEndian.putLong(data, 0, time);
-      }
-   }
 }
index 2cfd3c480d939ff113ceca6ccc900deca1d12d4f..f9afb601b3d39988081b7e82b1db5dc2c39e7ed5 100644 (file)
@@ -27,209 +27,199 @@ import java.util.Map;
 import org.apache.poi.util.POILogFactory;
 import org.apache.poi.util.POILogger;
 
-
 /**
- * Collection of convenience chunks for the
- *  Recip(ient) part of an outlook file.
+ * Collection of convenience chunks for the Recip(ient) part of an outlook file.
  * 
- * If a message has multiple recipients, there will be
- *  several of these.
+ * If a message has multiple recipients, there will be several of these.
  */
 public final class RecipientChunks implements ChunkGroupWithProperties {
-   private static POILogger logger = POILogFactory.getLogger(RecipientChunks.class);
-
-   public static final String PREFIX = "__recip_version1.0_#";
-   
-   public static final MAPIProperty RECIPIENT_NAME   = MAPIProperty.DISPLAY_NAME;
-   public static final MAPIProperty DELIVERY_TYPE    = MAPIProperty.ADDRTYPE;
-   public static final MAPIProperty RECIPIENT_EMAIL_ADDRESS = MAPIProperty.EMAIL_ADDRESS;
-   public static final MAPIProperty RECIPIENT_SEARCH        = MAPIProperty.SEARCH_KEY;
-   public static final MAPIProperty RECIPIENT_SMTP_ADDRESS  = MAPIProperty.SMTP_ADDRESS;
-   public static final MAPIProperty RECIPIENT_DISPLAY_NAME  = MAPIProperty.RECIPIENT_DISPLAY_NAME;
-   
-   /** Our 0 based position in the list of recipients */
-   public int recipientNumber;
-   
-   /** TODO */
-   public ByteChunk recipientSearchChunk;
-   /**
-    * The "name", which could be their name if an
-    *  internal person, or their email address
-    *  if an external person
-    */
-   public StringChunk recipientNameChunk;
-   /** 
-    * The email address of the recipient, which
-    *  could be in SMTP or SEARCH format, but
-    *  isn't always present...
-    */
-   public StringChunk recipientEmailChunk;
-   /** 
-    * The smtp destination email address of
-    *  the recipient, but isn't always present...
-    */
-   public StringChunk recipientSMTPChunk;
-   /**
-    * Normally EX or SMTP. Will generally affect
-    *  where the email address ends up.
-    */
-   public StringChunk deliveryTypeChunk;
-   /**
-    * The display name of the recipient.
-    * Normally seems to hold the same value
-    *  as in recipientNameChunk
-    */
-   public StringChunk recipientDisplayNameChunk;
-   /**
-    * Holds the fixed sized properties, and the
-    *  pointers to the data of variable sized ones
-    */
-   private PropertiesChunk recipientProperties;
-   
-   public RecipientChunks(String name) {
-      recipientNumber = -1;
-      int splitAt = name.lastIndexOf('#');
-      if(splitAt > -1) {
-         String number = name.substring(splitAt+1);
-         try {
-            recipientNumber = Integer.parseInt(number, 16);
-         } catch(NumberFormatException e) {
-                logger.log(POILogger.ERROR, "Invalid recipient number in name " + name);
-         }
-      }
-   }
-   
-   /**
-    * Tries to find their name,
-    *  in whichever chunk holds it.
-    */
-   public String getRecipientName() {
-      if(recipientNameChunk != null) {
-         return recipientNameChunk.getValue();
-      }
-      if(recipientDisplayNameChunk != null) {
-         return recipientDisplayNameChunk.getValue();
-      }
-      
-      // Can't find it
-      return null;
-   }
-   
-   /**
-    * Tries to find their email address, in
-    *  whichever chunk holds it given the
-    *  delivery type.
-    */
-   public String getRecipientEmailAddress() {
-      // If we have this, it really has the email 
-      if(recipientSMTPChunk != null) {
-         return recipientSMTPChunk.getValue();
-      }
-      
-      // This might be a real email, or might be
-      //  in CN=... format
-      if(recipientEmailChunk != null) {
-         String email = recipientEmailChunk.getValue();
-         int cne = email.indexOf("/CN="); 
-         if(cne == -1) {
-            // Normal smtp address
-            return email;
-         } else {
-            // /O=..../CN=em@ail
-            return email.substring(cne+4);
-         }
-      }
-      
-      // Might be in the name field, check there
-      if(recipientNameChunk != null) {
-         String name = recipientNameChunk.getValue();
-         if(name.indexOf('@') > -1) {
-            // Strip leading and trailing quotes if needed
-            if(name.startsWith("'") && name.endsWith("'")) {
-               return name.substring(1, name.length()-1);
+    private static POILogger logger = POILogFactory.getLogger(RecipientChunks.class);
+
+    public static final String PREFIX = "__recip_version1.0_#";
+
+    public static final MAPIProperty RECIPIENT_NAME = MAPIProperty.DISPLAY_NAME;
+    public static final MAPIProperty DELIVERY_TYPE = MAPIProperty.ADDRTYPE;
+    public static final MAPIProperty RECIPIENT_EMAIL_ADDRESS = MAPIProperty.EMAIL_ADDRESS;
+    public static final MAPIProperty RECIPIENT_SEARCH = MAPIProperty.SEARCH_KEY;
+    public static final MAPIProperty RECIPIENT_SMTP_ADDRESS = MAPIProperty.SMTP_ADDRESS;
+    public static final MAPIProperty RECIPIENT_DISPLAY_NAME = MAPIProperty.RECIPIENT_DISPLAY_NAME;
+
+    /** Our 0 based position in the list of recipients */
+    public int recipientNumber;
+
+    /** TODO */
+    public ByteChunk recipientSearchChunk;
+    /**
+     * The "name", which could be their name if an internal person, or their
+     * email address if an external person
+     */
+    public StringChunk recipientNameChunk;
+    /**
+     * The email address of the recipient, which could be in SMTP or SEARCH
+     * format, but isn't always present...
+     */
+    public StringChunk recipientEmailChunk;
+    /**
+     * The smtp destination email address of the recipient, but isn't always
+     * present...
+     */
+    public StringChunk recipientSMTPChunk;
+    /**
+     * Normally EX or SMTP. Will generally affect where the email address ends
+     * up.
+     */
+    public StringChunk deliveryTypeChunk;
+    /**
+     * The display name of the recipient. Normally seems to hold the same value
+     * as in recipientNameChunk
+     */
+    public StringChunk recipientDisplayNameChunk;
+    /**
+     * Holds the fixed sized properties, and the pointers to the data of
+     * variable sized ones
+     */
+    private PropertiesChunk recipientProperties;
+
+    public RecipientChunks(String name) {
+        recipientNumber = -1;
+        int splitAt = name.lastIndexOf('#');
+        if (splitAt > -1) {
+            String number = name.substring(splitAt + 1);
+            try {
+                recipientNumber = Integer.parseInt(number, 16);
+            } catch (NumberFormatException e) {
+                logger.log(POILogger.ERROR,
+                        "Invalid recipient number in name " + name);
+            }
+        }
+    }
+
+    /**
+     * Tries to find their name, in whichever chunk holds it.
+     */
+    public String getRecipientName() {
+        if (recipientNameChunk != null) {
+            return recipientNameChunk.getValue();
+        }
+        if (recipientDisplayNameChunk != null) {
+            return recipientDisplayNameChunk.getValue();
+        }
+
+        // Can't find it
+        return null;
+    }
+
+    /**
+     * Tries to find their email address, in whichever chunk holds it given the
+     * delivery type.
+     */
+    public String getRecipientEmailAddress() {
+        // If we have this, it really has the email
+        if (recipientSMTPChunk != null) {
+            return recipientSMTPChunk.getValue();
+        }
+
+        // This might be a real email, or might be
+        // in CN=... format
+        if (recipientEmailChunk != null) {
+            String email = recipientEmailChunk.getValue();
+            int cne = email.indexOf("/CN=");
+            if (cne == -1) {
+                // Normal smtp address
+                return email;
+            } else {
+                // /O=..../CN=em@ail
+                return email.substring(cne + 4);
+            }
+        }
+
+        // Might be in the name field, check there
+        if (recipientNameChunk != null) {
+            String name = recipientNameChunk.getValue();
+            if (name.indexOf('@') > -1) {
+                // Strip leading and trailing quotes if needed
+                if (name.startsWith("'") && name.endsWith("'")) {
+                    return name.substring(1, name.length() - 1);
+                }
+                return name;
+            }
+        }
+
+        // Check the search chunk, see if it's
+        // encoded as a SMTP destination in there.
+        if (recipientSearchChunk != null) {
+            String search = recipientSearchChunk.getAs7bitString();
+            if (search.indexOf("SMTP:") != -1) {
+                return search.substring(search.indexOf("SMTP:") + 5);
             }
-            return name;
-         }
-      }
-      
-      // Check the search chunk, see if it's 
-      //  encoded as a SMTP destination in there.
-      if(recipientSearchChunk != null) {
-         String search = recipientSearchChunk.getAs7bitString();
-         if(search.indexOf("SMTP:") != -1) {
-            return search.substring(search.indexOf("SMTP:") + 5);
-         }
-      }
-      
-      // Can't find it
-      return null;
-   }
-   
-   /** Holds all the chunks that were found. */
-   private List<Chunk> allChunks = new ArrayList<Chunk>();
-
-   public Map<MAPIProperty,List<PropertyValue>> getProperties() {
-      if (recipientProperties != null) {
-         return recipientProperties.getProperties();
-      }
-      else return Collections.emptyMap();
-   }
-   public Chunk[] getAll() {
-      return allChunks.toArray(new Chunk[allChunks.size()]);
-   }
-   public Chunk[] getChunks() {
-      return getAll();
-   }
-       
-   /**
-    * Called by the parser whenever a chunk is found.
-    */
-   public void record(Chunk chunk) {
-      if(chunk.getChunkId() == RECIPIENT_SEARCH.id) {
-         // TODO - parse
-         recipientSearchChunk = (ByteChunk)chunk;
-      }
-      else if(chunk.getChunkId() == RECIPIENT_NAME.id) {
-         recipientDisplayNameChunk = (StringChunk)chunk;
-      }
-      else if(chunk.getChunkId() == RECIPIENT_DISPLAY_NAME.id) {
-         recipientNameChunk = (StringChunk)chunk;
-      }
-      else if(chunk.getChunkId() == RECIPIENT_EMAIL_ADDRESS.id) {
-         recipientEmailChunk = (StringChunk)chunk;
-      }
-      else if(chunk.getChunkId() == RECIPIENT_SMTP_ADDRESS.id) {
-         recipientSMTPChunk = (StringChunk)chunk;
-      }
-      else if(chunk.getChunkId() == DELIVERY_TYPE.id) {
-         deliveryTypeChunk = (StringChunk)chunk;
-      }
-      else if(chunk instanceof PropertiesChunk) {
-         recipientProperties = (PropertiesChunk) chunk;
-      }
-
-      // And add to the main list
-      allChunks.add(chunk);
-   }
-   
-   public void chunksComplete() {
-      if (recipientProperties != null) {
-         recipientProperties.matchVariableSizedPropertiesToChunks();
-      } else {
-         logger.log(POILogger.WARN, "Recipeints Chunk didn't contain a list of properties!");
-      }
-   }
-
-   /**
-    * Orders by the recipient number.
-    */
-   public static class RecipientChunksSorter implements Comparator<RecipientChunks>, Serializable {
-      public int compare(RecipientChunks a, RecipientChunks b) {
-         if(a.recipientNumber < b.recipientNumber)
-            return -1;
-         if(a.recipientNumber > b.recipientNumber)
-            return +1;
-         return 0;
-      }
-   }
+        }
+
+        // Can't find it
+        return null;
+    }
+
+    /** Holds all the chunks that were found. */
+    private List<Chunk> allChunks = new ArrayList<Chunk>();
+
+    public Map<MAPIProperty, List<PropertyValue>> getProperties() {
+        if (recipientProperties != null) {
+            return recipientProperties.getProperties();
+        } else
+            return Collections.emptyMap();
+    }
+
+    public Chunk[] getAll() {
+        return allChunks.toArray(new Chunk[allChunks.size()]);
+    }
+
+    public Chunk[] getChunks() {
+        return getAll();
+    }
+
+    /**
+     * Called by the parser whenever a chunk is found.
+     */
+    public void record(Chunk chunk) {
+        if (chunk.getChunkId() == RECIPIENT_SEARCH.id) {
+            // TODO - parse
+            recipientSearchChunk = (ByteChunk) chunk;
+        } else if (chunk.getChunkId() == RECIPIENT_NAME.id) {
+            recipientDisplayNameChunk = (StringChunk) chunk;
+        } else if (chunk.getChunkId() == RECIPIENT_DISPLAY_NAME.id) {
+            recipientNameChunk = (StringChunk) chunk;
+        } else if (chunk.getChunkId() == RECIPIENT_EMAIL_ADDRESS.id) {
+            recipientEmailChunk = (StringChunk) chunk;
+        } else if (chunk.getChunkId() == RECIPIENT_SMTP_ADDRESS.id) {
+            recipientSMTPChunk = (StringChunk) chunk;
+        } else if (chunk.getChunkId() == DELIVERY_TYPE.id) {
+            deliveryTypeChunk = (StringChunk) chunk;
+        } else if (chunk instanceof PropertiesChunk) {
+            recipientProperties = (PropertiesChunk) chunk;
+        }
+
+        // And add to the main list
+        allChunks.add(chunk);
+    }
+
+    public void chunksComplete() {
+        if (recipientProperties != null) {
+            recipientProperties.matchVariableSizedPropertiesToChunks();
+        } else {
+            logger.log(POILogger.WARN, "Recipeints Chunk didn't contain a list of properties!");
+        }
+    }
+
+    /**
+     * Orders by the recipient number.
+     */
+    public static class RecipientChunksSorter
+            implements Comparator<RecipientChunks>, Serializable {
+        public int compare(RecipientChunks a, RecipientChunks b) {
+            if (a.recipientNumber < b.recipientNumber)
+                return -1;
+            if (a.recipientNumber > b.recipientNumber)
+                return +1;
+            return 0;
+        }
+    }
 }
index 5cb0d4bc7c77c3b58125eb6bace51b302880d252..50b393d21b823d140595fab3d4974d3e9d7c6690 100644 (file)
@@ -24,30 +24,29 @@ import java.io.OutputStream;
 import org.apache.poi.util.LittleEndian;
 
 /**
- * A {@link PropertiesChunk} for a Storage Properties, such as
- *  Attachments and Recipients.
- * This only has a 8 byte header
+ * A {@link PropertiesChunk} for a Storage Properties, such as Attachments and
+ * Recipients. This only has a 8 byte header
  */
 public class StoragePropertiesChunk extends PropertiesChunk {
-   public StoragePropertiesChunk(ChunkGroup parentGroup) {
-      super(parentGroup);
-   }
-   
-   @Override
-   public void readValue(InputStream stream) throws IOException {
-      // 8 bytes of reserved zeros
-      LittleEndian.readLong(stream);
-      
-      // Now properties
-      readProperties(stream);
-   }
-
-   @Override
-   public void writeValue(OutputStream out) throws IOException {
-      // 8 bytes of reserved zeros
-      out.write(new byte[8]);
-      
-      // Now properties
-      writeProperties(out);
-   }
+    public StoragePropertiesChunk(ChunkGroup parentGroup) {
+        super(parentGroup);
+    }
+
+    @Override
+    public void readValue(InputStream stream) throws IOException {
+        // 8 bytes of reserved zeros
+        LittleEndian.readLong(stream);
+
+        // Now properties
+        readProperties(stream);
+    }
+
+    @Override
+    public void writeValue(OutputStream out) throws IOException {
+        // 8 bytes of reserved zeros
+        out.write(new byte[8]);
+
+        // Now properties
+        writeProperties(out);
+    }
 }
\ No newline at end of file
index be541ec114d176aa1499f4336a3d0f286bdd7bb0..5f0538a6522e5b65365b1dfa64539e326eee2f3d 100644 (file)
@@ -30,120 +30,119 @@ import org.apache.poi.util.StringUtil;
  * A Chunk made up of a single string.
  */
 public class StringChunk extends Chunk {
-   private static final String DEFAULT_ENCODING = "CP1252"; 
-   private String encoding7Bit = DEFAULT_ENCODING;
-   private byte[] rawValue;
-   private String value;
-
-   /**
-    * Creates a String Chunk.
-    */
-   public StringChunk(String namePrefix, int chunkId, MAPIType type) {
-      super(namePrefix, chunkId, type);
-   }
-
-   /**
-    * Create a String Chunk, with the specified
-    *  type.
-    */
-   public StringChunk(int chunkId, MAPIType type) {
-      super(chunkId, type);
-   }
-
-   /**
-    * Returns the Encoding that will be used to
-    *  decode any "7 bit" (non unicode) data.
-    * Most files default to CP1252
-    */
-   public String get7BitEncoding() {
-      return encoding7Bit;
-   }
-
-   /**
-    * Sets the Encoding that will be used to
-    *  decode any "7 bit" (non unicode) data.
-    * This doesn't appear to be stored anywhere
-    *  specific in the file, so you may need
-    *  to guess by looking at headers etc
-    */
-   public void set7BitEncoding(String encoding) {
-      this.encoding7Bit = encoding;
-
-      // Re-read the String if we're a 7 bit one
-      if(type == Types.ASCII_STRING) {
-         parseString();
-      }
-   }
-
-   public void readValue(InputStream value) throws IOException {
-      rawValue = IOUtils.toByteArray(value);
-      parseString();
-   }
-   private void parseString() {
-      String tmpValue;
-      if (type == Types.ASCII_STRING) {
-         tmpValue = parseAs7BitData(rawValue, encoding7Bit);
-      } else if (type == Types.UNICODE_STRING) {
-         tmpValue = StringUtil.getFromUnicodeLE(rawValue);
-      } else {
-         throw new IllegalArgumentException("Invalid type " + type + " for String Chunk");
-      }
-
-      // Clean up
-      this.value = tmpValue.replace("\0", "");
-   }
-
-   public void writeValue(OutputStream out) throws IOException {
-      out.write(rawValue);
-   }
-   private void storeString() {
-      if (type == Types.ASCII_STRING) {
-         rawValue = value.getBytes(Charset.forName(encoding7Bit));
-      } else if (type == Types.UNICODE_STRING) {
-         rawValue = StringUtil.getToUnicodeLE(value);
-      } else {
-         throw new IllegalArgumentException("Invalid type " + type + " for String Chunk");
-      }
-   }
-
-   /**
-    * Returns the Text value of the chunk
-    */
-   public String getValue() {
-      return this.value;
-   }
-
-   public byte[] getRawValue() {
-      return this.rawValue;
-   }
-
-   public void setValue(String str) {
-      this.value = str;
-      storeString();
-   }
-
-   public String toString() {
-      return this.value;
-   }
-   
-   /**
-    * Parses as non-unicode, supposedly 7 bit CP1252 data
-    *  and returns the string that that yields.
-    */
-   protected static String parseAs7BitData(byte[] data) {
-      return parseAs7BitData(data, DEFAULT_ENCODING);
-   }
-   /**
-    * Parses as non-unicode, supposedly 7 bit data
-    *  and returns the string that that yields.
-    */
-   protected static String parseAs7BitData(byte[] data, String encoding) {
-      // Handle any encoding aliases, where outlook describes it differently
-      if ("ansi".equals(encoding)) {
-          encoding = DEFAULT_ENCODING;
-      }
-      
-      // Decode
-      return new String(data, Charset.forName(encoding));
-   }
+    private static final String DEFAULT_ENCODING = "CP1252";
+    private String encoding7Bit = DEFAULT_ENCODING;
+    private byte[] rawValue;
+    private String value;
+
+    /**
+     * Creates a String Chunk.
+     */
+    public StringChunk(String namePrefix, int chunkId, MAPIType type) {
+        super(namePrefix, chunkId, type);
+    }
+
+    /**
+     * Create a String Chunk, with the specified type.
+     */
+    public StringChunk(int chunkId, MAPIType type) {
+        super(chunkId, type);
+    }
+
+    /**
+     * Returns the Encoding that will be used to decode any "7 bit" (non
+     * unicode) data. Most files default to CP1252
+     */
+    public String get7BitEncoding() {
+        return encoding7Bit;
+    }
+
+    /**
+     * Sets the Encoding that will be used to decode any "7 bit" (non unicode)
+     * data. This doesn't appear to be stored anywhere specific in the file, so
+     * you may need to guess by looking at headers etc
+     */
+    public void set7BitEncoding(String encoding) {
+        this.encoding7Bit = encoding;
+
+        // Re-read the String if we're a 7 bit one
+        if (type == Types.ASCII_STRING) {
+            parseString();
+        }
+    }
+
+    public void readValue(InputStream value) throws IOException {
+        rawValue = IOUtils.toByteArray(value);
+        parseString();
+    }
+
+    private void parseString() {
+        String tmpValue;
+        if (type == Types.ASCII_STRING) {
+            tmpValue = parseAs7BitData(rawValue, encoding7Bit);
+        } else if (type == Types.UNICODE_STRING) {
+            tmpValue = StringUtil.getFromUnicodeLE(rawValue);
+        } else {
+            throw new IllegalArgumentException("Invalid type " + type + " for String Chunk");
+        }
+
+        // Clean up
+        this.value = tmpValue.replace("\0", "");
+    }
+
+    public void writeValue(OutputStream out) throws IOException {
+        out.write(rawValue);
+    }
+
+    private void storeString() {
+        if (type == Types.ASCII_STRING) {
+            rawValue = value.getBytes(Charset.forName(encoding7Bit));
+        } else if (type == Types.UNICODE_STRING) {
+            rawValue = StringUtil.getToUnicodeLE(value);
+        } else {
+            throw new IllegalArgumentException("Invalid type " + type + " for String Chunk");
+        }
+    }
+
+    /**
+     * Returns the Text value of the chunk
+     */
+    public String getValue() {
+        return this.value;
+    }
+
+    public byte[] getRawValue() {
+        return this.rawValue;
+    }
+
+    public void setValue(String str) {
+        this.value = str;
+        storeString();
+    }
+
+    public String toString() {
+        return this.value;
+    }
+
+    /**
+     * Parses as non-unicode, supposedly 7 bit CP1252 data and returns the
+     * string that that yields.
+     */
+    protected static String parseAs7BitData(byte[] data) {
+        return parseAs7BitData(data, DEFAULT_ENCODING);
+    }
+
+    /**
+     * Parses as non-unicode, supposedly 7 bit data and returns the string that
+     * that yields.
+     */
+    protected static String parseAs7BitData(byte[] data, String encoding) {
+        // Handle any encoding aliases, where outlook describes it differently
+        if ("ansi".equals(encoding)) {
+            encoding = DEFAULT_ENCODING;
+        }
+
+        // Decode
+        return new String(data, Charset.forName(encoding));
+    }
 }
index 4716cc1c33b4d8d663e805956021ffe9901e7512..f273c880fa18823843cbf80db4032b56b8826b0c 100644 (file)
@@ -23,158 +23,169 @@ import java.util.Map;
 
 /**
  * The types list and details are available from
- *  http://msdn.microsoft.com/en-us/library/microsoft.exchange.data.contenttypes.tnef.tnefpropertytype%28v=EXCHG.140%29.aspx
+ * http://msdn.microsoft.com/en-us/library/microsoft.exchange.data.contenttypes.tnef.tnefpropertytype%28v=EXCHG.140%29.aspx
  */
 public final class Types {
-   private static Map<Integer, MAPIType> builtInTypes = new HashMap<Integer, MAPIType>();
-   private static Map<Integer, MAPIType> customTypes = new HashMap<Integer, Types.MAPIType>();
-
-   /** Unspecified */
-   public static final MAPIType UNSPECIFIED = new MAPIType(0x0000, "Unspecified", -1);
-   /** Unknown */
-   public static final MAPIType UNKNOWN = new MAPIType(-1, "Unknown", -1);
-
-   /** Null - NULL property value */
-   public static final MAPIType NULL = new MAPIType(0x0001, "Null", 0);
-   /** I2 - signed 16-bit value */
-   public static final MAPIType SHORT = new MAPIType(0x0002, "Short", 2);
-   /** Long - signed 32-bit value */
-   public static final MAPIType LONG = new MAPIType(0x0003, "Long", 4);
-   /** R4 - 4-byte floating point value */
-   public static final MAPIType FLOAT = new MAPIType(0x0004, "Float", 4);
-   /** Double - floating point double */
-   public static final MAPIType DOUBLE = new MAPIType(0x0005, "Double", 8);
-   /** Currency - signed 64-bit integer that represents a base ten decimal with four digits to the right of the decimal point */
-   public static final MAPIType CURRENCY = new MAPIType(0x0006, "Currency", 8);
-   /** AppTime - application time value */
-   public static final MAPIType APP_TIME = new MAPIType(0x0007, "Application Time", 8);
-   /** Error - 32-bit error value */
-   public static final MAPIType ERROR = new MAPIType(0x000A, "Error", 4);
-   /** Boolean - 16-bit Boolean value. '0' is false. Non-zero is true */
-   public static final MAPIType BOOLEAN = new MAPIType(0x000B, "Boolean", 2);
-   /** Object/Directory - embedded object in a property */
-   public static final MAPIType DIRECTORY = new MAPIType(0x000D, "Directory", -1);
-   /** I8 - 8-byte signed integer */
-   public static final MAPIType LONG_LONG = new MAPIType(0x0014, "Long Long", 8);
-   /** SysTime - FILETIME 64-bit integer specifying the number of 100ns periods since Jan 1, 1601 */
-   public static final MAPIType TIME = new MAPIType(0x0040, "Time", 8);
-   /** ClassId - OLE GUID */
-   public static final MAPIType CLS_ID = new MAPIType(0x0048, "CLS ID GUID", 16);
-
-   /** Binary - counted byte array */
-   public static final MAPIType BINARY = new MAPIType(0x0102, "Binary", -1);
-
-   /** 
-    * An 8-bit string, probably in CP1252, but don't quote us...
-    * Normally used for everything before Outlook 3.0, and some
-    *  fields in Outlook 3.0.
-    */
-   public static final MAPIType ASCII_STRING = new MAPIType(0x001E, "ASCII String", -1);
-   /** A string, from Outlook 3.0 onwards. Normally unicode */
-   public static final MAPIType UNICODE_STRING = new MAPIType(0x001F, "Unicode String", -1);
-
-   /** MultiValued - Value part contains multiple values */
-   public static final int MULTIVALUED_FLAG = 0x1000;
-
-   public static final class MAPIType {
-      private final int id;
-      private final String name;
-      private final int length;
-   
-      /**
-       * Creates a standard, built-in type
-       */
-      private MAPIType(int id, String name, int length) {
-         this.id = id;
-         this.name = name;
-         this.length = length;
-         builtInTypes.put(id, this);
-      }
-      /**
-       * Creates a custom type
-       */
-      private MAPIType(int id, int length) {
-         this.id = id;
-         this.name = asCustomName(id);
-         this.length = length;
-         customTypes.put(id, this);
-      }
-      
-      /**
-       * Returns the length, in bytes, of values of this type, or
-       *  -1 if it is a variable length type.
-       */
-      public int getLength() {
-         return length;
-      }
-      /**
-       * Is this type a fixed-length type, or a variable-length one?
-       */
-      public boolean isFixedLength() {
-         return (length != -1);
-      }
-      
-      public int getId() {
-         return id;
-      }
-      public String getName() {
-         return name;
-      }
-      
-      public String toString() {
-         return id + " / 0x" + asFileEnding() + " - " + name + " @ " + length;
-      }
-      
-      /**
-       * Return the 4 character hex encoded version,
-       *  as used in file endings
-       */
-      public String asFileEnding() {
-         return Types.asFileEnding(id);
-      }
-   }
-   
-   public static MAPIType getById(int typeId) {
-      return builtInTypes.get(typeId);
-   }
-
-   public static String asFileEnding(int type) {
-      String str = Integer.toHexString(type).toUpperCase(Locale.ROOT);
-      while(str.length() < 4) {
-         str = "0" + str;
-      }
-      return str;
-   }
-   public static String asName(int typeId) {
-      MAPIType type = builtInTypes.get(typeId);
-      if (type != null) {
-         return type.name;
-      }
-      return asCustomName(typeId);
-   }
-   private static String asCustomName(int typeId) {
-      return "0x" + Integer.toHexString(typeId);
-   }
-   
-   public static MAPIType createCustom(int typeId) {
-      // Check they're not being silly, and asking for a built-in one...
-      if (getById(typeId) != null) {
-         return getById(typeId);
-      }
-      
-      // Try to get an existing definition of this
-      MAPIType type = customTypes.get(typeId);
-      
-      // If none, do a thread-safe creation
-      if (type == null) {
-         synchronized (customTypes) {
-            type = customTypes.get(typeId);
-            if (type == null) {
-               type = new MAPIType(typeId, -1);
+    private static Map<Integer, MAPIType> builtInTypes = new HashMap<Integer, MAPIType>();
+    private static Map<Integer, MAPIType> customTypes = new HashMap<Integer, Types.MAPIType>();
+
+    /** Unspecified */
+    public static final MAPIType UNSPECIFIED = new MAPIType(0x0000,
+            "Unspecified", -1);
+    /** Unknown */
+    public static final MAPIType UNKNOWN = new MAPIType(-1, "Unknown", -1);
+
+    /** Null - NULL property value */
+    public static final MAPIType NULL = new MAPIType(0x0001, "Null", 0);
+    /** I2 - signed 16-bit value */
+    public static final MAPIType SHORT = new MAPIType(0x0002, "Short", 2);
+    /** Long - signed 32-bit value */
+    public static final MAPIType LONG = new MAPIType(0x0003, "Long", 4);
+    /** R4 - 4-byte floating point value */
+    public static final MAPIType FLOAT = new MAPIType(0x0004, "Float", 4);
+    /** Double - floating point double */
+    public static final MAPIType DOUBLE = new MAPIType(0x0005, "Double", 8);
+    /**
+     * Currency - signed 64-bit integer that represents a base ten decimal with
+     * four digits to the right of the decimal point
+     */
+    public static final MAPIType CURRENCY = new MAPIType(0x0006, "Currency", 8);
+    /** AppTime - application time value */
+    public static final MAPIType APP_TIME = new MAPIType(0x0007, "Application Time", 8);
+    /** Error - 32-bit error value */
+    public static final MAPIType ERROR = new MAPIType(0x000A, "Error", 4);
+    /** Boolean - 16-bit Boolean value. '0' is false. Non-zero is true */
+    public static final MAPIType BOOLEAN = new MAPIType(0x000B, "Boolean", 2);
+    /** Object/Directory - embedded object in a property */
+    public static final MAPIType DIRECTORY = new MAPIType(0x000D, "Directory", -1);
+    /** I8 - 8-byte signed integer */
+    public static final MAPIType LONG_LONG = new MAPIType(0x0014, "Long Long", 8);
+    /**
+     * SysTime - FILETIME 64-bit integer specifying the number of 100ns periods
+     * since Jan 1, 1601
+     */
+    public static final MAPIType TIME = new MAPIType(0x0040, "Time", 8);
+    /** ClassId - OLE GUID */
+    public static final MAPIType CLS_ID = new MAPIType(0x0048, "CLS ID GUID", 16);
+
+    /** Binary - counted byte array */
+    public static final MAPIType BINARY = new MAPIType(0x0102, "Binary", -1);
+
+    /**
+     * An 8-bit string, probably in CP1252, but don't quote us... Normally used
+     * for everything before Outlook 3.0, and some fields in Outlook 3.0.
+     */
+    public static final MAPIType ASCII_STRING = new MAPIType(0x001E, "ASCII String", -1);
+    /** A string, from Outlook 3.0 onwards. Normally unicode */
+    public static final MAPIType UNICODE_STRING = new MAPIType(0x001F, "Unicode String", -1);
+
+    /** MultiValued - Value part contains multiple values */
+    public static final int MULTIVALUED_FLAG = 0x1000;
+
+    public static final class MAPIType {
+        private final int id;
+        private final String name;
+        private final int length;
+
+        /**
+         * Creates a standard, built-in type
+         */
+        private MAPIType(int id, String name, int length) {
+            this.id = id;
+            this.name = name;
+            this.length = length;
+            builtInTypes.put(id, this);
+        }
+
+        /**
+         * Creates a custom type
+         */
+        private MAPIType(int id, int length) {
+            this.id = id;
+            this.name = asCustomName(id);
+            this.length = length;
+            customTypes.put(id, this);
+        }
+
+        /**
+         * Returns the length, in bytes, of values of this type, or -1 if it is
+         * a variable length type.
+         */
+        public int getLength() {
+            return length;
+        }
+
+        /**
+         * Is this type a fixed-length type, or a variable-length one?
+         */
+        public boolean isFixedLength() {
+            return (length != -1);
+        }
+
+        public int getId() {
+            return id;
+        }
+
+        public String getName() {
+            return name;
+        }
+
+        public String toString() {
+            return id + " / 0x" + asFileEnding() + " - " + name + " @ "
+                    + length;
+        }
+
+        /**
+         * Return the 4 character hex encoded version, as used in file endings
+         */
+        public String asFileEnding() {
+            return Types.asFileEnding(id);
+        }
+    }
+
+    public static MAPIType getById(int typeId) {
+        return builtInTypes.get(typeId);
+    }
+
+    public static String asFileEnding(int type) {
+        String str = Integer.toHexString(type).toUpperCase(Locale.ROOT);
+        while (str.length() < 4) {
+            str = "0" + str;
+        }
+        return str;
+    }
+
+    public static String asName(int typeId) {
+        MAPIType type = builtInTypes.get(typeId);
+        if (type != null) {
+            return type.name;
+        }
+        return asCustomName(typeId);
+    }
+
+    private static String asCustomName(int typeId) {
+        return "0x" + Integer.toHexString(typeId);
+    }
+
+    public static MAPIType createCustom(int typeId) {
+        // Check they're not being silly, and asking for a built-in one...
+        if (getById(typeId) != null) {
+            return getById(typeId);
+        }
+
+        // Try to get an existing definition of this
+        MAPIType type = customTypes.get(typeId);
+
+        // If none, do a thread-safe creation
+        if (type == null) {
+            synchronized (customTypes) {
+                type = customTypes.get(typeId);
+                if (type == null) {
+                    type = new MAPIType(typeId, -1);
+                }
             }
-         }
-      }
-      
-      return type;
-   }
+        }
+
+        return type;
+    }
 }