本文整理匯總了Java中com.drew.metadata.Directory.getName方法的典型用法代碼示例。如果您正苦於以下問題:Java Directory.getName方法的具體用法?Java Directory.getName怎麽用?Java Directory.getName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.drew.metadata.Directory
的用法示例。
在下文中一共展示了Directory.getName方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onExtractionSuccess
import com.drew.metadata.Directory; //導入方法依賴的package包/類
@Override
public void onExtractionSuccess(@NotNull File file, @NotNull Metadata metadata, @NotNull String relativePath, @NotNull PrintStream log)
{
super.onExtractionSuccess(file, metadata, relativePath, log);
// Iterate through all values, calling toString to flush out any formatting exceptions
for (Directory directory : metadata.getDirectories()) {
directory.getName();
for (Tag tag : directory.getTags()) {
tag.getTagName();
tag.getDescription();
}
}
}
示例2: onExtracted
import com.drew.metadata.Directory; //導入方法依賴的package包/類
@Override
public void onExtracted(@NotNull File file, @NotNull Metadata metadata)
{
super.onExtracted(file, metadata);
// Iterate through all values, calling toString to flush out any formatting exceptions
for (Directory directory : metadata.getDirectories()) {
directory.getName();
for (Tag tag : directory.getTags()) {
tag.getTagName();
tag.getDescription();
}
}
}
示例3: copy
import com.drew.metadata.Directory; //導入方法依賴的package包/類
private void copy(final Directory directory, final Map<String, Object> metadata) {
final TagDescriptor<?> descriptor = MetadataHelper.getDescriptor(directory);
final LazyDynaClass directoryClass = new LazyDynaClass(directory.getName(), null, directory.getTags()
.parallelStream()
.map(t -> new DynaProperty(t.getTagName().replaceAll(NON_WORD_CHARS, ""), String.class))
.toArray(DynaProperty[]::new));
directoryClass.setReturnNull(true);
final DynaBean directoryMetadata = new LazyDynaBean(directoryClass);
directory.getTags().stream().forEach(t -> directoryMetadata.set(
t.getTagName().replaceAll(NON_WORD_CHARS, ""),
descriptor.getDescription(t.getTagType())
));
metadata.put(directory.getName().replaceAll(NON_WORD_CHARS, ""), directoryMetadata);
}