1 | /*
|
---|
2 | * This is public domain software - that is, you can do whatever you want
|
---|
3 | * with it, and include it software that is licensed under the GNU or the
|
---|
4 | * BSD license, or whatever other licence you choose, including proprietary
|
---|
5 | * closed source licenses. I do ask that you leave this header in tact.
|
---|
6 | *
|
---|
7 | * If you make modifications to this code that you think would benefit the
|
---|
8 | * wider community, please send me a copy and I'll post it on my site.
|
---|
9 | *
|
---|
10 | * If you make use of this code, I'd appreciate hearing about it.
|
---|
11 | * drew@drewnoakes.com
|
---|
12 | * Latest version of this software kept at
|
---|
13 | * http://drewnoakes.com/
|
---|
14 | *
|
---|
15 | * Created by dnoakes on 26-Nov-2002 01:26:39 using IntelliJ IDEA.
|
---|
16 | */
|
---|
17 | package com.drew.metadata.iptc;
|
---|
18 |
|
---|
19 | import com.drew.metadata.Directory;
|
---|
20 |
|
---|
21 | import java.util.HashMap;
|
---|
22 |
|
---|
23 | /**
|
---|
24 | *
|
---|
25 | */
|
---|
26 | public class IptcDirectory extends Directory
|
---|
27 | {
|
---|
28 | public static final int TAG_RECORD_VERSION = 0x0200;
|
---|
29 | public static final int TAG_CAPTION = 0x0278;
|
---|
30 | public static final int TAG_WRITER = 0x027a;
|
---|
31 | public static final int TAG_HEADLINE = 0x0269;
|
---|
32 | public static final int TAG_SPECIAL_INSTRUCTIONS = 0x0228;
|
---|
33 | public static final int TAG_BY_LINE = 0x0250;
|
---|
34 | public static final int TAG_BY_LINE_TITLE = 0x0255;
|
---|
35 | public static final int TAG_CREDIT = 0x026e;
|
---|
36 | public static final int TAG_SOURCE = 0x0273;
|
---|
37 | public static final int TAG_OBJECT_NAME = 0x0205;
|
---|
38 | public static final int TAG_DATE_CREATED = 0x0237;
|
---|
39 | public static final int TAG_CITY = 0x025a;
|
---|
40 | public static final int TAG_PROVINCE_OR_STATE = 0x025f;
|
---|
41 | public static final int TAG_COUNTRY_OR_PRIMARY_LOCATION = 0x0265;
|
---|
42 | public static final int TAG_ORIGINAL_TRANSMISSION_REFERENCE = 0x0267;
|
---|
43 | public static final int TAG_CATEGORY = 0x020f;
|
---|
44 | public static final int TAG_SUPPLEMENTAL_CATEGORIES = 0x0214;
|
---|
45 | public static final int TAG_URGENCY = 0x0200 | 10;
|
---|
46 | public static final int TAG_KEYWORDS = 0x0200 | 25;
|
---|
47 | public static final int TAG_COPYRIGHT_NOTICE = 0x0274;
|
---|
48 | public static final int TAG_RELEASE_DATE = 0x0200 | 30;
|
---|
49 | public static final int TAG_RELEASE_TIME = 0x0200 | 35;
|
---|
50 | public static final int TAG_TIME_CREATED = 0x0200 | 60;
|
---|
51 | public static final int TAG_ORIGINATING_PROGRAM = 0x0200 | 65;
|
---|
52 |
|
---|
53 | protected static final HashMap tagNameMap = new HashMap();
|
---|
54 |
|
---|
55 | static
|
---|
56 | {
|
---|
57 | tagNameMap.put(new Integer(TAG_RECORD_VERSION), "Directory Version");
|
---|
58 | tagNameMap.put(new Integer(TAG_CAPTION), "Caption/Abstract");
|
---|
59 | tagNameMap.put(new Integer(TAG_WRITER), "Writer/Editor");
|
---|
60 | tagNameMap.put(new Integer(TAG_HEADLINE), "Headline");
|
---|
61 | tagNameMap.put(new Integer(TAG_SPECIAL_INSTRUCTIONS), "Special Instructions");
|
---|
62 | tagNameMap.put(new Integer(TAG_BY_LINE), "By-line");
|
---|
63 | tagNameMap.put(new Integer(TAG_BY_LINE_TITLE), "By-line Title");
|
---|
64 | tagNameMap.put(new Integer(TAG_CREDIT), "Credit");
|
---|
65 | tagNameMap.put(new Integer(TAG_SOURCE), "Source");
|
---|
66 | tagNameMap.put(new Integer(TAG_OBJECT_NAME), "Object Name");
|
---|
67 | tagNameMap.put(new Integer(TAG_DATE_CREATED), "Date Created");
|
---|
68 | tagNameMap.put(new Integer(TAG_CITY), "City");
|
---|
69 | tagNameMap.put(new Integer(TAG_PROVINCE_OR_STATE), "Province/State");
|
---|
70 | tagNameMap.put(new Integer(TAG_COUNTRY_OR_PRIMARY_LOCATION), "Country/Primary Location");
|
---|
71 | tagNameMap.put(new Integer(TAG_ORIGINAL_TRANSMISSION_REFERENCE), "Original Transmission Reference");
|
---|
72 | tagNameMap.put(new Integer(TAG_CATEGORY), "Category");
|
---|
73 | tagNameMap.put(new Integer(TAG_SUPPLEMENTAL_CATEGORIES), "Supplemental Category(s)");
|
---|
74 | tagNameMap.put(new Integer(TAG_URGENCY), "Urgency");
|
---|
75 | tagNameMap.put(new Integer(TAG_KEYWORDS), "Keywords");
|
---|
76 | tagNameMap.put(new Integer(TAG_COPYRIGHT_NOTICE), "Copyright Notice");
|
---|
77 | tagNameMap.put(new Integer(TAG_RELEASE_DATE), "Release Date");
|
---|
78 | tagNameMap.put(new Integer(TAG_RELEASE_TIME), "Release Time");
|
---|
79 | tagNameMap.put(new Integer(TAG_TIME_CREATED), "Time Created");
|
---|
80 | tagNameMap.put(new Integer(TAG_ORIGINATING_PROGRAM), "Originating Program");
|
---|
81 | }
|
---|
82 |
|
---|
83 | public IptcDirectory()
|
---|
84 | {
|
---|
85 | this.setDescriptor(new IptcDescriptor(this));
|
---|
86 | }
|
---|
87 |
|
---|
88 | public String getName()
|
---|
89 | {
|
---|
90 | return "Iptc";
|
---|
91 | }
|
---|
92 |
|
---|
93 | protected HashMap getTagNameMap()
|
---|
94 | {
|
---|
95 | return tagNameMap;
|
---|
96 | }
|
---|
97 | }
|
---|