public interface MDExtractorPlugin
Interface for metadata extractors.
Each extractor handles a specific format and extracts its attributes.
This plugin interface only supports java implementation.
Modifier and Type | Method and Description |
---|---|
void |
extract(java.lang.String file)
Extracts a file's attributes according to the given file path.
|
java.lang.String |
getAgent()
Returns the software agent key compatible with the application key in the application library.
|
java.lang.String |
getAttributeByName(java.lang.String attributeName)
Returns the attribute value according to the given attribute name.
|
java.util.List<java.lang.String> |
getExtractionErrors()
Return extraction errors.
|
java.lang.String |
getFormatName()
Returns the format name of the file that is fetched by the extraction.
|
java.lang.String |
getFormatVersion()
Returns the format version of the file that is fetched by the extraction.
|
java.lang.Integer |
getImageCount()
This method is relevant only for image extractors.
|
java.lang.String |
getMimeType()
Returns the MIME type of the file that is fetched by the extraction.
|
java.util.List<java.lang.String> |
getSupportedAttributeNames()
Returns a list of all attributes that are supported by the extractor implementation.
|
boolean |
isValid()
Implementation of a general file validation.
|
boolean |
isWellFormed()
Implementation of a file formed check.
|
void extract(java.lang.String file) throws java.lang.Exception
file
- the file path to extractjava.lang.Exception
- if an unexpected exception occurs, such as IOException.java.lang.String getAttributeByName(java.lang.String attributeName)
attributeName
- java.util.List<java.lang.String> getSupportedAttributeNames()
java.lang.String getAgent()
java.lang.String getFormatName()
java.lang.String getFormatVersion()
java.lang.String getMimeType()
java.lang.Integer getImageCount()
java.util.List<java.lang.String> getExtractionErrors()
boolean isValid()
boolean isWellFormed()