Class FormatIdentifierSiegfried
java.lang.Object
fr.gouv.vitam.common.format.identification.siegfried.FormatIdentifierSiegfried
- All Implemented Interfaces:
FormatIdentifier
Siegfried implementation of format identifier
-
Field Summary
-
Constructor Summary
ConstructorDescriptionFormatIdentifierSiegfried
(SiegfriedClientFactory siegfriedClientFactory, Path versionPath) For JUnit ONLYFormatIdentifierSiegfried
(Map<String, Object> configurationProperties) Configuration should come with 'client', 'rootPath' and 'versionPath' mandatory parameters. -
Method Summary
Modifier and TypeMethodDescriptionanalysePath
(Path path) Identify the format of the file identified by its pathstatus()
Get format identifier status
-
Field Details
-
PRONOM_NAMESPACE
Pronom namespace- See Also:
-
UNKNOW_NAMESPACE
Unknown namespace- See Also:
-
-
Constructor Details
-
FormatIdentifierSiegfried
public FormatIdentifierSiegfried(Map<String, Object> configurationProperties) throws FormatIdentifierTechnicalExceptionConfiguration should come with 'client', 'rootPath' and 'versionPath' mandatory parameters. If client is 'http': 'host' and 'port' are mandatory. If not, mock client is used.- Parameters:
configurationProperties
- the configuration properties needed to instantiate Siegfried format identifier- Throws:
FormatIdentifierTechnicalException
- If a technical error occures when the version path is createdIllegalArgumentException
- if mandatory parameter are not given or null
-
FormatIdentifierSiegfried
For JUnit ONLY- Parameters:
siegfriedClientFactory
- a custom instance of siegfried clientversionPath
- the version request path
-
-
Method Details
-
status
public FormatIdentifierInfo status() throws FormatIdentifierTechnicalException, FormatIdentifierNotFoundExceptionDescription copied from interface:FormatIdentifier
Get format identifier status- Specified by:
status
in interfaceFormatIdentifier
- Returns:
- The format identifier software information containing version
- Throws:
FormatIdentifierTechnicalException
- for any other technical exceptionFormatIdentifierNotFoundException
- if the given identifier could not responds
-
analysePath
public List<FormatIdentifierResponse> analysePath(Path path) throws FileFormatNotFoundException, FormatIdentifierBadRequestException, FormatIdentifierTechnicalException, FormatIdentifierNotFoundException Description copied from interface:FormatIdentifier
Identify the format of the file identified by its path- Specified by:
analysePath
in interfaceFormatIdentifier
- Parameters:
path
- the path to the file to be identified- Returns:
- the FormatIdentifierResponse containing information about the format of the file
- Throws:
FileFormatNotFoundException
- if a file format is not found by the identifierFormatIdentifierBadRequestException
- if the given path dont match a fileFormatIdentifierTechnicalException
- for any other technical exceptionFormatIdentifierNotFoundException
- if the given identifier could not responds
-