public class OntologyServiceImpl extends Object implements OntologyService
Modifier and Type | Field and Description |
---|---|
static Integer |
ADMIN_TENANT |
Constructor and Description |
---|
OntologyServiceImpl(MongoDbAccessAdminImpl mongoAccess,
VitamCounterService vitamCounterService,
FunctionalBackupService functionalBackupService)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
backupReport(InputStream stream,
GUID eip)
Save the report stream
|
void |
close() |
RequestResponseOK<OntologyModel> |
findOntologies(com.fasterxml.jackson.databind.JsonNode queryDsl)
find an ontology by QueryDsl
|
RequestResponseOK<OntologyModel> |
findOntologiesForCache(com.fasterxml.jackson.databind.JsonNode queryDsl)
find an ontology by QueryDsl (find directly in db)
|
InputStream |
generateErrorReport(Map<String,List<ErrorReportOntologies>> errors,
StatusCode status,
GUID eipMaster)
generate an error Report
|
RequestResponse<OntologyModel> |
importOntologies(boolean forceUpdate,
List<OntologyModel> ontologyModelList)
Import a collections of ontologies After passing the validation steps.
|
public static final Integer ADMIN_TENANT
public OntologyServiceImpl(MongoDbAccessAdminImpl mongoAccess, VitamCounterService vitamCounterService, FunctionalBackupService functionalBackupService)
mongoAccess
- MongoDB clientvitamCounterService
- the vitam counter servicefunctionalBackupService
- the functional backup servicepublic RequestResponse<OntologyModel> importOntologies(boolean forceUpdate, List<OntologyModel> ontologyModelList) throws VitamException, IOException
OntologyService
importOntologies
in interface OntologyService
ontologyModelList
- the list of ontologies to be importedVitamException
- if in error occurs while validating ontologiesIOException
public RequestResponseOK<OntologyModel> findOntologiesForCache(com.fasterxml.jackson.databind.JsonNode queryDsl) throws ReferentialException, InvalidParseOperationException
OntologyService
findOntologiesForCache
in interface OntologyService
queryDsl
- the query as a json to be executedReferentialException
- thrown if the query could not be executedInvalidParseOperationException
- thrown if the query could not be executedpublic RequestResponseOK<OntologyModel> findOntologies(com.fasterxml.jackson.databind.JsonNode queryDsl) throws ReferentialException, InvalidParseOperationException
OntologyService
findOntologies
in interface OntologyService
queryDsl
- the query as a json to be executedReferentialException
- thrown if the query could not be executedInvalidParseOperationException
- thrown if the query could not be executedpublic void close()
close
in interface VitamAutoCloseable
close
in interface AutoCloseable
public InputStream generateErrorReport(Map<String,List<ErrorReportOntologies>> errors, StatusCode status, GUID eipMaster)
errors
- the list of error for generated errorsstatus
- statuseipMaster
- eipMasterpublic void backupReport(InputStream stream, GUID eip) throws VitamException, IOException
stream
- eip
- VitamException
IOException
Copyright © 2018 Vitam. All rights reserved.