| 1 |
package com.drew.metadata.eps; |
| 2 |
|
| 3 |
|
| 4 |
import com.drew.lang.annotations.NotNull; |
| 5 |
import com.drew.metadata.Directory; |
| 6 |
|
| 7 |
import java.util.HashMap; |
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
public class EpsDirectory extends Directory |
| 13 |
{ |
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
public static final int TAG_DSC_VERSION = 1; |
| 20 |
public static final int TAG_AUTHOR = 2; |
| 21 |
public static final int TAG_BOUNDING_BOX = 3; |
| 22 |
public static final int TAG_COPYRIGHT = 4; |
| 23 |
public static final int TAG_CREATION_DATE = 5; |
| 24 |
public static final int TAG_CREATOR = 6; |
| 25 |
public static final int TAG_FOR = 7; |
| 26 |
public static final int TAG_IMAGE_DATA = 8; |
| 27 |
public static final int TAG_KEYWORDS = 9; |
| 28 |
public static final int TAG_MODIFY_DATE = 10; |
| 29 |
public static final int TAG_PAGES = 11; |
| 30 |
public static final int TAG_ROUTING = 12; |
| 31 |
public static final int TAG_SUBJECT = 13; |
| 32 |
public static final int TAG_TITLE = 14; |
| 33 |
public static final int TAG_VERSION = 15; |
| 34 |
public static final int TAG_DOCUMENT_DATA = 16; |
| 35 |
public static final int TAG_EMULATION = 17; |
| 36 |
public static final int TAG_EXTENSIONS = 18; |
| 37 |
public static final int TAG_LANGUAGE_LEVEL = 19; |
| 38 |
public static final int TAG_ORIENTATION = 20; |
| 39 |
public static final int TAG_PAGE_ORDER = 21; |
| 40 |
public static final int TAG_OPERATOR_INTERNVENTION = 22; |
| 41 |
public static final int TAG_OPERATOR_MESSAGE = 23; |
| 42 |
public static final int TAG_PROOF_MODE = 24; |
| 43 |
public static final int TAG_REQUIREMENTS = 25; |
| 44 |
public static final int TAG_VM_LOCATION = 26; |
| 45 |
public static final int TAG_VM_USAGE = 27; |
| 46 |
public static final int TAG_IMAGE_WIDTH = 28; |
| 47 |
public static final int TAG_IMAGE_HEIGHT = 29; |
| 48 |
public static final int TAG_COLOR_TYPE = 30; |
| 49 |
public static final int TAG_RAM_SIZE = 31; |
| 50 |
public static final int TAG_TIFF_PREVIEW_SIZE = 32; |
| 51 |
public static final int TAG_TIFF_PREVIEW_OFFSET = 33; |
| 52 |
public static final int TAG_WMF_PREVIEW_SIZE = 34; |
| 53 |
public static final int TAG_WMF_PREVIEW_OFFSET = 35; |
| 54 |
public static final int TAG_CONTINUE_LINE = 36; |
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
@NotNull |
| 65 |
static final HashMap<Integer, String> _tagNameMap = new HashMap<Integer, String>(); |
| 66 |
|
| 67 |
@NotNull |
| 68 |
static final HashMap<String, Integer> _tagIntegerMap = new HashMap<String, Integer>(); |
| 69 |
|
| 70 |
static { |
| 71 |
_tagIntegerMap.put("%!PS-Adobe-", TAG_DSC_VERSION); |
| 72 |
_tagIntegerMap.put("%%Author", TAG_AUTHOR); |
| 73 |
_tagIntegerMap.put("%%BoundingBox", TAG_BOUNDING_BOX); |
| 74 |
_tagIntegerMap.put("%%Copyright", TAG_COPYRIGHT); |
| 75 |
_tagIntegerMap.put("%%CreationDate", TAG_CREATION_DATE); |
| 76 |
_tagIntegerMap.put("%%Creator", TAG_CREATOR); |
| 77 |
_tagIntegerMap.put("%%For", TAG_FOR); |
| 78 |
_tagIntegerMap.put("%ImageData", TAG_IMAGE_DATA); |
| 79 |
_tagIntegerMap.put("%%Keywords", TAG_KEYWORDS); |
| 80 |
_tagIntegerMap.put("%%ModDate", TAG_MODIFY_DATE); |
| 81 |
_tagIntegerMap.put("%%Pages", TAG_PAGES); |
| 82 |
_tagIntegerMap.put("%%Routing", TAG_ROUTING); |
| 83 |
_tagIntegerMap.put("%%Subject", TAG_SUBJECT); |
| 84 |
_tagIntegerMap.put("%%Title", TAG_TITLE); |
| 85 |
_tagIntegerMap.put("%%Version", TAG_VERSION); |
| 86 |
_tagIntegerMap.put("%%DocumentData", TAG_DOCUMENT_DATA); |
| 87 |
_tagIntegerMap.put("%%Emulation", TAG_EMULATION); |
| 88 |
_tagIntegerMap.put("%%Extensions", TAG_EXTENSIONS); |
| 89 |
_tagIntegerMap.put("%%LanguageLevel", TAG_LANGUAGE_LEVEL); |
| 90 |
_tagIntegerMap.put("%%Orientation", TAG_ORIENTATION); |
| 91 |
_tagIntegerMap.put("%%PageOrder", TAG_PAGE_ORDER); |
| 92 |
_tagIntegerMap.put("%%OperatorIntervention", TAG_OPERATOR_INTERNVENTION); |
| 93 |
_tagIntegerMap.put("%%OperatorMessage", TAG_OPERATOR_MESSAGE); |
| 94 |
_tagIntegerMap.put("%%ProofMode", TAG_PROOF_MODE); |
| 95 |
_tagIntegerMap.put("%%Requirements", TAG_REQUIREMENTS); |
| 96 |
_tagIntegerMap.put("%%VMlocation", TAG_VM_LOCATION); |
| 97 |
_tagIntegerMap.put("%%VMusage", TAG_VM_USAGE); |
| 98 |
_tagIntegerMap.put("Image Width", TAG_IMAGE_WIDTH); |
| 99 |
_tagIntegerMap.put("Image Height", TAG_IMAGE_HEIGHT); |
| 100 |
_tagIntegerMap.put("Color Type", TAG_COLOR_TYPE); |
| 101 |
_tagIntegerMap.put("Ram Size", TAG_RAM_SIZE); |
| 102 |
_tagIntegerMap.put("TIFFPreview", TAG_TIFF_PREVIEW_SIZE); |
| 103 |
_tagIntegerMap.put("TIFFPreviewOffset", TAG_TIFF_PREVIEW_OFFSET); |
| 104 |
_tagIntegerMap.put("WMFPreview", TAG_WMF_PREVIEW_SIZE); |
| 105 |
_tagIntegerMap.put("WMFPreviewOffset", TAG_WMF_PREVIEW_OFFSET); |
| 106 |
_tagIntegerMap.put("%%+", TAG_CONTINUE_LINE); |
| 107 |
|
| 108 |
_tagNameMap.put(TAG_CONTINUE_LINE, "Line Continuation"); |
| 109 |
_tagNameMap.put(TAG_BOUNDING_BOX, "Bounding Box"); |
| 110 |
_tagNameMap.put(TAG_COPYRIGHT, "Copyright"); |
| 111 |
_tagNameMap.put(TAG_DOCUMENT_DATA, "Document Data"); |
| 112 |
_tagNameMap.put(TAG_EMULATION, "Emulation"); |
| 113 |
_tagNameMap.put(TAG_EXTENSIONS, "Extensions"); |
| 114 |
_tagNameMap.put(TAG_LANGUAGE_LEVEL, "Language Level"); |
| 115 |
_tagNameMap.put(TAG_ORIENTATION, "Orientation"); |
| 116 |
_tagNameMap.put(TAG_PAGE_ORDER, "Page Order"); |
| 117 |
_tagNameMap.put(TAG_VERSION, "Version"); |
| 118 |
_tagNameMap.put(TAG_IMAGE_DATA, "Image Data"); |
| 119 |
_tagNameMap.put(TAG_IMAGE_WIDTH, "Image Width"); |
| 120 |
_tagNameMap.put(TAG_IMAGE_HEIGHT, "Image Height"); |
| 121 |
_tagNameMap.put(TAG_COLOR_TYPE, "Color Type"); |
| 122 |
_tagNameMap.put(TAG_RAM_SIZE, "Ram Size"); |
| 123 |
_tagNameMap.put(TAG_CREATOR, "Creator"); |
| 124 |
_tagNameMap.put(TAG_CREATION_DATE, "Creation Date"); |
| 125 |
_tagNameMap.put(TAG_FOR, "For"); |
| 126 |
_tagNameMap.put(TAG_REQUIREMENTS, "Requirements"); |
| 127 |
_tagNameMap.put(TAG_ROUTING, "Routing"); |
| 128 |
_tagNameMap.put(TAG_TITLE, "Title"); |
| 129 |
_tagNameMap.put(TAG_DSC_VERSION, "DSC Version"); |
| 130 |
_tagNameMap.put(TAG_PAGES, "Pages"); |
| 131 |
_tagNameMap.put(TAG_OPERATOR_INTERNVENTION, "Operator Intervention"); |
| 132 |
_tagNameMap.put(TAG_OPERATOR_MESSAGE, "Operator Message"); |
| 133 |
_tagNameMap.put(TAG_PROOF_MODE, "Proof Mode"); |
| 134 |
_tagNameMap.put(TAG_VM_LOCATION, "VM Location"); |
| 135 |
_tagNameMap.put(TAG_VM_USAGE, "VM Usage"); |
| 136 |
_tagNameMap.put(TAG_AUTHOR, "Author"); |
| 137 |
_tagNameMap.put(TAG_KEYWORDS, "Keywords"); |
| 138 |
_tagNameMap.put(TAG_MODIFY_DATE, "Modify Date"); |
| 139 |
_tagNameMap.put(TAG_SUBJECT, "Subject"); |
| 140 |
_tagNameMap.put(TAG_TIFF_PREVIEW_SIZE, "TIFF Preview Size"); |
| 141 |
_tagNameMap.put(TAG_TIFF_PREVIEW_OFFSET, "TIFF Preview Offset"); |
| 142 |
_tagNameMap.put(TAG_WMF_PREVIEW_SIZE, "WMF Preview Size"); |
| 143 |
_tagNameMap.put(TAG_WMF_PREVIEW_OFFSET, "WMF Preview Offset"); |
| 144 |
} |
| 145 |
|
| 146 |
public EpsDirectory() |
| 147 |
{ |
| 148 |
this.setDescriptor(new EpsDescriptor(this)); |
| 149 |
} |
| 150 |
|
| 151 |
@Override |
| 152 |
@NotNull |
| 153 |
public String getName() |
| 154 |
{ |
| 155 |
return "EPS"; |
| 156 |
} |
| 157 |
|
| 158 |
@Override |
| 159 |
@NotNull |
| 160 |
protected HashMap<Integer, String> getTagNameMap() |
| 161 |
{ |
| 162 |
return _tagNameMap; |
| 163 |
} |
| 164 |
} |