Package org.apache.sling.cms
Interface FileMetadataExtractor
-
@ProviderType public interface FileMetadataExtractorService for extracting metadata from a file
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Map<String,Object>extractMetadata(File file)Extract the metadata from the specified file and return the resulting metadatavoidupdateMetadata(File file)Extract the metadata from the specified file and persist the results under the jcr:content/metadata node of the file resourcevoidupdateMetadata(File file, boolean persist)Extract the metadata from the specified file and persist the results under the jcr:content/metadata node of the file resource
-
-
-
Method Detail
-
extractMetadata
Map<String,Object> extractMetadata(File file) throws IOException
Extract the metadata from the specified file and return the resulting metadata- Parameters:
file- the file from which to extract the metadata- Returns:
- the metadata from the file
- Throws:
IOException- an exception occurs extracting the metadata
-
updateMetadata
void updateMetadata(File file) throws IOException
Extract the metadata from the specified file and persist the results under the jcr:content/metadata node of the file resource- Parameters:
file- the file to extract the metadata from- Throws:
IOException- an exception occurs updating the metadata
-
updateMetadata
void updateMetadata(File file, boolean persist) throws IOException
Extract the metadata from the specified file and persist the results under the jcr:content/metadata node of the file resource- Parameters:
file- the file to extract the metadata frompersist- if true, persist the results, if not leave the changes unpersisted- Throws:
IOException- an exception occurs updating the metadata
-
-