Source code: com/drew/metadata/TagDescriptor.java
1 /*
2 * Created by dnoakes on 12-Nov-2002 22:18:13 using IntelliJ IDEA.
3 */
4 package com.drew.metadata;
5
6 import java.io.Serializable;
7
8 /**
9 *
10 */
11 public abstract class TagDescriptor implements Serializable
12 {
13 protected final Directory _directory;
14
15 public TagDescriptor(Directory directory)
16 {
17 _directory = directory;
18 }
19
20 /**
21 * Returns a descriptive value of the the specified tag for this image.
22 * Where possible, known values will be substituted here in place of the raw
23 * tokens actually kept in the Exif segment. If no substitution is
24 * available, the value provided by getString(int) will be returned.
25 * <p>
26 * This and getString(int) are the only 'get' methods that won't throw an
27 * exception.
28 * @param tagType the tag to find a description for
29 * @return a description of the image's value for the specified tag, or
30 * <code>null</code> if the tag hasn't been defined.
31 */
32 public abstract String getDescription(int tagType) throws MetadataException;
33 }