Package com.drew.metadata
Class Metadata
- java.lang.Object
-
- com.drew.metadata.Metadata
-
-
Constructor Summary
Constructors Constructor Description Metadata()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends Directory>
voidaddDirectory(T directory)Adds a directory to this metadata collection.booleancontainsDirectoryOfType(Class<? extends Directory> type)Indicates whether an instance of the given directory type exists in this Metadata instance.Iterable<Directory>getDirectories()Returns an iterable set of theDirectoryinstances contained in this metadata collection.<T extends Directory>
Collection<T>getDirectoriesOfType(Class<T> type)intgetDirectoryCount()Returns the count of directories in this metadata collection.<T extends Directory>
TgetFirstDirectoryOfType(Class<T> type)Gets the firstDirectoryof the specified type contained within this metadata collection.booleanhasErrors()Indicates whether any errors were reported during the reading of metadata values.StringtoString()
-
-
-
Method Detail
-
getDirectories
public Iterable<Directory> getDirectories()
Returns an iterable set of theDirectoryinstances contained in this metadata collection.- Returns:
- an iterable set of directories
-
getDirectoriesOfType
public <T extends Directory> Collection<T> getDirectoriesOfType(Class<T> type)
-
getDirectoryCount
public int getDirectoryCount()
Returns the count of directories in this metadata collection.- Returns:
- the number of unique directory types set for this metadata collection
-
addDirectory
public <T extends Directory> void addDirectory(T directory)
Adds a directory to this metadata collection.- Parameters:
directory- theDirectoryto add into this metadata collection.
-
getFirstDirectoryOfType
public <T extends Directory> T getFirstDirectoryOfType(Class<T> type)
Gets the firstDirectoryof the specified type contained within this metadata collection. If no instances of this type are present,nullis returned.- Type Parameters:
T- the Directory type- Parameters:
type- the Directory type- Returns:
- the first Directory of type T in this metadata collection, or
nullif none exist
-
containsDirectoryOfType
public boolean containsDirectoryOfType(Class<? extends Directory> type)
Indicates whether an instance of the given directory type exists in this Metadata instance.
-
hasErrors
public boolean hasErrors()
Indicates whether any errors were reported during the reading of metadata values. This value will be true if Directory.hasErrors() is true for one of the containedDirectoryobjects.- Returns:
- whether one of the contained directories has an error
-
-