public class ReferentialFormatFileImpl extends Object implements ReferentialFile<FileFormat>, VitamAutoCloseable
| Modifier and Type | Field and Description |
|---|---|
static String |
FILE_FORMAT_REPORT |
| Constructor and Description |
|---|
ReferentialFormatFileImpl(MongoDbAccessAdminImpl dbConfiguration,
VitamCounterService vitamCounterService)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
List<FileFormatModel> |
checkFile(InputStream xmlPronom)
check PRONOM File and return all format as arraynode
|
void |
close() |
FileFormat |
findDocumentById(String id)
find document based on a given Id
|
RequestResponseOK<FileFormat> |
findDocuments(com.fasterxml.jackson.databind.JsonNode select)
find document based on DSL query
|
void |
importFile(InputStream xmlPronom,
String filename)
importFile : import reference file to database
|
public static final String FILE_FORMAT_REPORT
public ReferentialFormatFileImpl(MongoDbAccessAdminImpl dbConfiguration, VitamCounterService vitamCounterService)
dbConfiguration - the mongo access for reference format configurationvitamCounterService - public void importFile(InputStream xmlPronom, String filename) throws VitamException
ReferentialFileimportFile in interface ReferentialFile<FileFormat>xmlPronom - as InputStreamfilename - file nameReferentialException - when there is error of importDatabaseConflictException - when there is a database conflictInvalidParseOperationExceptionVitamExceptionpublic List<FileFormatModel> checkFile(InputStream xmlPronom) throws ReferentialException
xmlPronom - format file streamReferentialExceptionpublic FileFormat findDocumentById(String id)
ReferentialFilefindDocumentById in interface ReferentialFile<FileFormat>id - of vitam documentpublic RequestResponseOK<FileFormat> findDocuments(com.fasterxml.jackson.databind.JsonNode select) throws ReferentialException
ReferentialFilefindDocuments in interface ReferentialFile<FileFormat>select - filterFileFormatNotFoundException - when no results foundReferentialException - when error occurspublic void close()
close in interface VitamAutoCloseableclose in interface AutoCloseableCopyright © 2021 Vitam. All rights reserved.