Class ExifToolProcessor
- java.lang.Object
-
- org.nuxeo.binary.metadata.internals.ExifToolProcessor
-
- All Implemented Interfaces:
BinaryMetadataProcessor
public class ExifToolProcessor extends Object implements BinaryMetadataProcessor
- Since:
- 7.1
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
COMMAND_NOT_AVAILABLE
protected static String
COMMAND_NOT_EXECUTABLE_NULL_BLOB
protected com.fasterxml.jackson.databind.ObjectMapper
jacksonMapper
protected static Pattern
VALID_EXT
-
Constructor Summary
Constructors Constructor Description ExifToolProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected List<String>
getCommandTags(List<String> metadataList)
protected List<String>
getCommandTags(Map<String,Object> metadataMap)
protected Blob
getTemporaryBlob(Blob blob)
Gets a new blob on a temporary file which is a copy of the blob's.protected CloseableFile
getTemporaryFile(Blob blob)
We don't want to rely onBlob.getCloseableFile()
because it may return the original and we always want a temporary one to be sure we have a clean filename to pass.protected void
parseDates(Map<String,Object> resultMap)
protected Map<String,Object>
readMetadata(String command, Blob blob, List<String> metadata)
protected Map<String,Object>
readMetadata(String command, Blob blob, List<String> metadata, boolean ignorePrefix)
Deprecated.since 11.5, usereadMetadata(String, Blob, List)
insteadMap<String,Object>
readMetadata(Blob blob, boolean ignorePrefix)
Read all metadata from a given blob.Map<String,Object>
readMetadata(Blob blob, List<String> metadata, boolean ignorePrefix)
Read from a given blob given metadata map.protected Map<String,Object>
returnResultMap(ExecResult er)
Blob
writeMetadata(Blob blob, Map<String,Object> metadata, boolean ignorePrefix)
Write given metadata into given blob.
-
-
-
Field Detail
-
COMMAND_NOT_AVAILABLE
protected static final String COMMAND_NOT_AVAILABLE
- See Also:
- Constant Field Values
-
COMMAND_NOT_EXECUTABLE_NULL_BLOB
protected static final String COMMAND_NOT_EXECUTABLE_NULL_BLOB
- See Also:
- Constant Field Values
-
jacksonMapper
protected final com.fasterxml.jackson.databind.ObjectMapper jacksonMapper
-
VALID_EXT
protected static final Pattern VALID_EXT
-
-
Method Detail
-
writeMetadata
public Blob writeMetadata(Blob blob, Map<String,Object> metadata, boolean ignorePrefix)
Description copied from interface:BinaryMetadataProcessor
Write given metadata into given blob. Since 7.3 ignorePrefix is added.- Specified by:
writeMetadata
in interfaceBinaryMetadataProcessor
- Parameters:
blob
- Blob to write.metadata
- Metadata to inject.- Returns:
- the updated blob, or
null
if there was an error (since 7.4)
-
readMetadata
@Deprecated(since="11.5") protected Map<String,Object> readMetadata(String command, Blob blob, List<String> metadata, boolean ignorePrefix)
Deprecated.since 11.5, usereadMetadata(String, Blob, List)
instead
-
readMetadata
protected Map<String,Object> readMetadata(String command, Blob blob, List<String> metadata)
- Since:
- 11.5
-
readMetadata
public Map<String,Object> readMetadata(Blob blob, List<String> metadata, boolean ignorePrefix)
Description copied from interface:BinaryMetadataProcessor
Read from a given blob given metadata map. Since 7.3 ignorePrefix is added.- Specified by:
readMetadata
in interfaceBinaryMetadataProcessor
- Parameters:
blob
- Blob to read.metadata
- Metadata to extract.- Returns:
- Metadata map.
-
readMetadata
public Map<String,Object> readMetadata(Blob blob, boolean ignorePrefix)
Description copied from interface:BinaryMetadataProcessor
Read all metadata from a given blob. Since 7.3 ignorePrefix is added.- Specified by:
readMetadata
in interfaceBinaryMetadataProcessor
- Parameters:
blob
- Blob to read.- Returns:
- Metadata map.
-
returnResultMap
protected Map<String,Object> returnResultMap(ExecResult er) throws IOException
- Throws:
IOException
-
getTemporaryFile
protected CloseableFile getTemporaryFile(Blob blob) throws IOException
We don't want to rely onBlob.getCloseableFile()
because it may return the original and we always want a temporary one to be sure we have a clean filename to pass.- Throws:
IOException
- Since:
- 7.4
-
getTemporaryBlob
protected Blob getTemporaryBlob(Blob blob) throws IOException
Gets a new blob on a temporary file which is a copy of the blob's.- Throws:
IOException
- Since:
- 7.4
-
-