source: josm/trunk/src/com/drew/metadata/TagDescriptor.java@ 4258

Last change on this file since 4258 was 4231, checked in by stoecker, 13 years ago

add signpost and metadata extractor code to repository directly

File size: 1.8 KB
Line 
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 */
15package com.drew.metadata;
16
17import java.io.Serializable;
18
19/**
20 * Abstract base class for all tag descriptor classes. Implementations are responsible for
21 * providing the human-readable string represenation of tag values stored in a directory.
22 * The directory is provided to the tag descriptor via its constructor.
23 */
24public abstract class TagDescriptor implements Serializable
25{
26 protected final Directory _directory;
27
28 public TagDescriptor(Directory directory)
29 {
30 _directory = directory;
31 }
32
33 /**
34 * Returns a descriptive value of the the specified tag for this image.
35 * Where possible, known values will be substituted here in place of the raw
36 * tokens actually kept in the Exif segment. If no substitution is
37 * available, the value provided by getString(int) will be returned.
38 * <p>
39 * This and getString(int) are the only 'get' methods that won't throw an
40 * exception.
41 * @param tagType the tag to find a description for
42 * @return a description of the image's value for the specified tag, or
43 * <code>null</code> if the tag hasn't been defined.
44 */
45 public abstract String getDescription(int tagType) throws MetadataException;
46}
Note: See TracBrowser for help on using the repository browser.