本文整理汇总了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);
}