Directory Class Reference
Inherits java::io::Serializable.
Inherited by CanonMakernoteDirectory, CasioMakernoteDirectory, ExifDirectory, ExifInteropDirectory, FujiFilmMakernoteDirectory, GpsDirectory, NikonType1MakernoteDirectory, NikonType2MakernoteDirectory, NikonType3MakernoteDirectory, OlympusMakernoteDirectory, IptcDirectory, JpegCommentDirectory, and JpegDirectory.
List of all members.
|
Public Member Functions |
| void | addError (String message) |
| boolean | containsTag (int tagType) |
| | Directory () |
| boolean | getBoolean (int tagType) throws MetadataException |
| byte[] | getByteArray (int tagType) throws MetadataException |
| java.util.Date | getDate (int tagType) throws MetadataException |
| String | getDescription (int tagType) throws MetadataException |
| double | getDouble (int tagType) throws MetadataException |
| int | getErrorCount () |
| Iterator | getErrors () |
| float | getFloat (int tagType) throws MetadataException |
| int | getInt (int tagType) throws MetadataException |
| int[] | getIntArray (int tagType) throws MetadataException |
| long | getLong (int tagType) throws MetadataException |
| abstract String | getName () |
| Object | getObject (int tagType) |
| Rational | getRational (int tagType) throws MetadataException |
| Rational[] | getRationalArray (int tagType) throws MetadataException |
| String | getString (int tagType) |
| String[] | getStringArray (int tagType) throws MetadataException |
| int | getTagCount () |
| Iterator | getTagIterator () |
| String | getTagName (int tagType) |
| boolean | hasErrors () |
| void | setBoolean (int tagType, boolean value) |
| void | setByteArray (int tagType, byte[] bytes) |
| void | setDate (int tagType, java.util.Date value) |
| void | setDescriptor (TagDescriptor descriptor) |
| void | setDouble (int tagType, double value) |
| void | setFloat (int tagType, float value) |
| void | setInt (int tagType, int value) |
| void | setIntArray (int tagType, int[] ints) |
| void | setLong (int tagType, long value) |
| void | setObject (int tagType, Object value) |
| void | setObjectArray (int tagType, Object array) |
| void | setRational (int tagType, Rational rational) |
| void | setRationalArray (int tagType, Rational[] rationals) |
| void | setString (int tagType, String value) |
| void | setStringArray (int tagType, String[] strings) |
Protected Member Functions |
| abstract HashMap | getTagNameMap () |
Protected Attributes |
| final List | _definedTagList |
| TagDescriptor | _descriptor |
| final HashMap | _tagMap |
Private Attributes |
| List | _errorList |
Detailed Description
Base class for all
Metadata directory types with supporting methods for setting and getting tag values.
Constructor & Destructor Documentation
Member Function Documentation
| void addError |
( |
String |
message |
) |
|
| boolean containsTag |
( |
int |
tagType |
) |
|
Indicates whether the specified tag type has been set.
- Parameters:
-
| tagType | the tag type to check for |
- Returns:
- true if a value exists for the specified tag type, false if not
Returns the specified tag's value as a boolean, if possible.
Gets the specified tag's value as an byte array, if possible. Only supported where the tag is set as String, int[], byte[] or Rational[].
- Parameters:
-
| tagType | the tag identifier |
- Returns:
- the tag's value as a byte array
- Exceptions:
-
| MetadataException | if the tag has not been set, or cannot be converted to a byte array |
Returns the specified tag's value as a java.util.Date, if possible.
Provides a description of a tag's value using the descriptor set by setDescriptor(Descriptor).
- Parameters:
-
| tagType | the tag type identifier |
- Returns:
- the tag value's description as a String
- Exceptions:
-
| MetadataException | if a descriptor hasn't been set, or if an error occurs during calculation of the description within the Descriptor |
Returns the specified tag's value as a double, if possible.
Returns the specified tag's value as a float, if possible.
Returns the specified tag's value as an int, if possible.
Gets the specified tag's value as an int array, if possible. Only supported where the tag is set as String, int[], byte[] or Rational[].
- Parameters:
-
| tagType | the tag identifier |
- Returns:
- the tag's value as an int array
- Exceptions:
-
| MetadataException | if the tag has not been set, or cannot be converted to an int array |
Returns the specified tag's value as a long, if possible.
| abstract String getName |
( |
|
) |
[pure virtual] |
Provides the name of the directory, for display purposes. E.g. Exif
- Returns:
- the name of the directory
Implemented in CanonMakernoteDirectory, CasioMakernoteDirectory, ExifDirectory, ExifInteropDirectory, FujiFilmMakernoteDirectory, GpsDirectory, NikonType1MakernoteDirectory, NikonType2MakernoteDirectory, NikonType3MakernoteDirectory, OlympusMakernoteDirectory, IptcDirectory, JpegCommentDirectory, and JpegDirectory.
| Object getObject |
( |
int |
tagType |
) |
|
Returns the object hashed for the particular tag type specified, if available.
- Parameters:
-
| tagType | the tag type identifier |
- Returns:
- the tag's value as an Object if available, else null
Returns the specified tag's value as a Rational, if possible.
| String getString |
( |
int |
tagType |
) |
|
Returns the specified tag's value as a String. This value is the 'raw' value. A more presentable decoding of this value may be obtained from the corresponding Descriptor.
- Returns:
- the String reprensentation of the tag's value, or
null if the tag hasn't been defined.
Gets the specified tag's value as a String array, if possible. Only supported where the tag is set as String[], String, int[], byte[] or Rational[].
- Parameters:
-
| tagType | the tag identifier |
- Returns:
- the tag's value as an array of Strings
- Exceptions:
-
Returns the number of tags set in this Directory.
- Returns:
- the number of tags set in this Directory
| Iterator getTagIterator |
( |
|
) |
|
Returns an Iterator of Tag instances that have been set in this Directory.
- Returns:
- an Iterator of Tag instances
| String getTagName |
( |
int |
tagType |
) |
|
Returns the name of a specified tag as a String.
- Parameters:
-
| tagType | the tag type identifier |
- Returns:
- the tag's name as a String
| abstract HashMap getTagNameMap |
( |
|
) |
[protected, pure virtual] |
Provides the map of tag names, hashed by tag type identifier.
- Returns:
- the map of tag names
Implemented in CanonMakernoteDirectory, CasioMakernoteDirectory, ExifDirectory, ExifInteropDirectory, FujiFilmMakernoteDirectory, GpsDirectory, NikonType1MakernoteDirectory, NikonType2MakernoteDirectory, NikonType3MakernoteDirectory, OlympusMakernoteDirectory, IptcDirectory, JpegCommentDirectory, and JpegDirectory.
| void setBoolean |
( |
int |
tagType, |
|
|
boolean |
value | |
|
) |
| | |
Sets an int value for the specified tag.
- Parameters:
-
| tagType | the tag's value as an int |
| value | the value for the specified tag as a boolean |
| void setByteArray |
( |
int |
tagType, |
|
|
byte[] |
bytes | |
|
) |
| | |
Sets a byte array for the specified tag.
- Parameters:
-
| tagType | the tag identifier |
| bytes | the byte array to store |
| void setDate |
( |
int |
tagType, |
|
|
java.util.Date |
value | |
|
) |
| | |
Sets a java.util.Date value for the specified tag.
- Parameters:
-
| tagType | the tag's value as an int |
| value | the value for the specified tag as a java.util.Date |
Sets the descriptor used to interperet tag values.
- Parameters:
-
| descriptor | the descriptor used to interperet tag values |
| void setDouble |
( |
int |
tagType, |
|
|
double |
value | |
|
) |
| | |
Sets a double value for the specified tag.
- Parameters:
-
| tagType | the tag's value as an int |
| value | the value for the specified tag as a double |
| void setFloat |
( |
int |
tagType, |
|
|
float |
value | |
|
) |
| | |
Sets a float value for the specified tag.
- Parameters:
-
| tagType | the tag's value as an int |
| value | the value for the specified tag as a float |
| void setInt |
( |
int |
tagType, |
|
|
int |
value | |
|
) |
| | |
Sets an int value for the specified tag.
- Parameters:
-
| tagType | the tag's value as an int |
| value | the value for the specified tag as an int |
| void setIntArray |
( |
int |
tagType, |
|
|
int[] |
ints | |
|
) |
| | |
Sets an int array for the specified tag.
- Parameters:
-
| tagType | the tag identifier |
| ints | the int array to store |
Reimplemented in CanonMakernoteDirectory.
| void setLong |
( |
int |
tagType, |
|
|
long |
value | |
|
) |
| | |
Sets a long value for the specified tag.
- Parameters:
-
| tagType | the tag's value as an int |
| value | the value for the specified tag as a long |
| void setObject |
( |
int |
tagType, |
|
|
Object |
value | |
|
) |
| | |
Private helper method, containing common functionality for all 'add' methods.
- Parameters:
-
| tagType | the tag's value as an int |
| value | the value for the specified tag |
- Exceptions:
-
| NullPointerException | if value is null |
| void setObjectArray |
( |
int |
tagType, |
|
|
Object |
array | |
|
) |
| | |
Private helper method, containing common functionality for all 'add...Array' methods.
- Parameters:
-
| tagType | the tag's value as an int |
| array | the array of values for the specified tag |
| void setRational |
( |
int |
tagType, |
|
|
Rational |
rational | |
|
) |
| | |
Sets a Rational value for the specified tag.
- Parameters:
-
| tagType | the tag's value as an int |
| rational | rational number |
| void setRationalArray |
( |
int |
tagType, |
|
|
Rational[] |
rationals | |
|
) |
| | |
Sets a Rational array for the specified tag.
- Parameters:
-
| tagType | the tag identifier |
| rationals | the Rational array to store |
| void setString |
( |
int |
tagType, |
|
|
String |
value | |
|
) |
| | |
Sets an int value for the specified tag.
- Parameters:
-
| tagType | the tag's value as an int |
| value | the value for the specified tag as a String |
| void setStringArray |
( |
int |
tagType, |
|
|
String[] |
strings | |
|
) |
| | |
Sets a String array for the specified tag.
- Parameters:
-
| tagType | the tag identifier |
| strings | the String array to store |
Member Data Documentation
A convenient list holding tag values in the order in which they were stored. This is used for creation of an iterator, and for counting the number of defined tags.
The descriptor used to interperet tag values.
Map of values hashed by type identifiers.
The documentation for this class was generated from the following file:
- /opt/source/Wonder/Frameworks/BusinessLogic/ERAttachment/Sources/com/drew/metadata/Directory.java