Package fr.gouv.vitam.common.format.identification.siegfried

# Class FormatIdentifierSiegfried

java.lang.Object
fr.gouv.vitam.common.format.identification.siegfried.FormatIdentifierSiegfried

All Implemented Interfaces:
  `FormatIdentifier`

public class FormatIdentifierSiegfried extends Object implements FormatIdentifier
Siegfried implementation of format identifier

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `PRONOM_NAMESPACE`
  Pronom namespace
  `static final String`
  `UNKNOW_NAMESPACE`
  Unknown namespace

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FormatIdentifierSiegfried(SiegfriedClientFactory siegfriedClientFactory, Path versionPath)`
  For JUnit ONLY
  `FormatIdentifierSiegfried(Map<String,Object> configurationProperties)`
  Configuration should come with 'client', 'rootPath' and 'versionPath' mandatory parameters.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<FormatIdentifierResponse>`
  `analysePath(Path path)`
  Identify the format of the file identified by its path
  `FormatIdentifierInfo`
  `status()`
  Get format identifier status

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### PRONOM_NAMESPACE

    public static final String PRONOM_NAMESPACE
    Pronom namespace
    See Also:
      - Constant Field Values

  - ### UNKNOW_NAMESPACE

    public static final String UNKNOW_NAMESPACE
    Unknown namespace
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### FormatIdentifierSiegfried

    public FormatIdentifierSiegfried(Map<String,Object> configurationProperties) throws FormatIdentifierTechnicalException
    Configuration 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 created
      `IllegalArgumentException` - if mandatory parameter are not given or null

  - ### FormatIdentifierSiegfried

    public FormatIdentifierSiegfried(SiegfriedClientFactory siegfriedClientFactory, Path versionPath)
    For JUnit ONLY
    Parameters:
      `siegfriedClientFactory` - a custom instance of siegfried client
      `versionPath` - the version request path

- ## Method Details

  - ### status

    public FormatIdentifierInfo status() throws FormatIdentifierTechnicalException, FormatIdentifierNotFoundException
    Description copied from interface: `FormatIdentifier`
    Get format identifier status
    Specified by:
      `status` in interface `FormatIdentifier`
    Returns:
      The format identifier software information containing version
    Throws:
      `FormatIdentifierTechnicalException` - for any other technical exception
      `FormatIdentifierNotFoundException` - 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 interface `FormatIdentifier`
    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 identifier
      `FormatIdentifierBadRequestException` - if the given path dont match a file
      `FormatIdentifierTechnicalException` - for any other technical exception
      `FormatIdentifierNotFoundException` - if the given identifier could not responds