package org.apache.poi.hsmf.datatypes;
import static org.apache.poi.hsmf.datatypes.MAPIProperty.ATTACH_CONTENT_ID;
+import static org.apache.poi.hsmf.datatypes.MAPIProperty.ATTACH_CONTENT_LOCATION;
import static org.apache.poi.hsmf.datatypes.MAPIProperty.ATTACH_DATA;
import static org.apache.poi.hsmf.datatypes.MAPIProperty.ATTACH_EXTENSION;
import static org.apache.poi.hsmf.datatypes.MAPIProperty.ATTACH_FILENAME;
import static org.apache.poi.hsmf.datatypes.MAPIProperty.ATTACH_LONG_FILENAME;
+import static org.apache.poi.hsmf.datatypes.MAPIProperty.ATTACH_LONG_PATHNAME;
import static org.apache.poi.hsmf.datatypes.MAPIProperty.ATTACH_MIME_TAG;
import static org.apache.poi.hsmf.datatypes.MAPIProperty.ATTACH_RENDERING;
+import static org.apache.poi.hsmf.datatypes.MAPIProperty.DISPLAY_NAME;
+import static org.apache.poi.hsmf.datatypes.MAPIProperty.LANGUAGE;
+import static org.apache.poi.hsmf.datatypes.MAPIProperty.RECORD_KEY;
import java.io.IOException;
import java.io.Serializable;
private StringChunk attachExtension;
private StringChunk attachFileName;
private StringChunk attachLongFileName;
+ private StringChunk attachLongPathName;
+ private StringChunk attachDisplayName;
private StringChunk attachMimeTag;
private DirectoryChunk attachmentDirectory;
private StringChunk attachContentId;
+ private StringChunk attachLanguage;
+ private StringChunk attachContentLocation;
+ private ByteChunk attachRecordKey;
/**
* This is in WMF Format. You'll probably want to pass it to Apache Batik to
return attachLongFileName;
}
+ /**
+ * @return long path name for the attachment
+ */
+ public StringChunk getAttachLongPathName() {
+ return attachLongPathName;
+ }
+
+ /**
+ * @return attachment content location -- relative or absolute URI matching reference in html body
+ */
+ public StringChunk getAttachContentLocation() {
+ return attachContentLocation;
+ }
+
+ /**
+ *
+ * @return the display name of the attachment
+ */
+ public StringChunk getAttachDisplayName() {
+ return attachDisplayName;
+ }
+
+ /**
+ * @return the language property for the attachment
+ */
+ public StringChunk getAttachLanguage() {
+ return attachLanguage;
+ }
+
/**
* @return the attachment mimetag
*/
return attachContentId;
}
+ /**
+ * @return record key
+ */
+ public ByteChunk getAttachRecordKey() {
+ return attachRecordKey;
+ }
+
/**
* Called by the parser whenever a chunk is found.
*/
// - ATTACH_DISPOSITION
// - ATTACH_ENCODING
// - ATTACH_FLAGS
- // - ATTACH_LONG_PATHNAME
// - ATTACH_SIZE
final int chunkId = chunk.getChunkId();
attachRenderingWMF = (ByteChunk) chunk;
} else if (chunkId == ATTACH_CONTENT_ID.id) {
attachContentId = (StringChunk) chunk;
+ } else if (chunkId == DISPLAY_NAME.id) {
+ attachDisplayName = (StringChunk) chunk;
+ } else if (chunkId == LANGUAGE.id) {
+ attachLanguage = (StringChunk) chunk;
+ } else if (chunkId == ATTACH_LONG_PATHNAME.id) {
+ attachLongPathName = (StringChunk) chunk;
+ } else if (chunkId == ATTACH_CONTENT_LOCATION.id) {
+ attachContentLocation = (StringChunk) chunk;
+ } else if (chunkId == RECORD_KEY.id) {
+ attachRecordKey = (ByteChunk) chunk;
} else {
LOG.atWarn().log("Currently unsupported attachment chunk property will be ignored. {}", chunk.getEntryName());
}