Interface OntologyService
-
- All Superinterfaces:
java.lang.AutoCloseable,VitamAutoCloseable
- All Known Implementing Classes:
OntologyServiceImpl
public interface OntologyService extends VitamAutoCloseable
This service manages CRUD on Ontologies
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RequestResponseOK<OntologyModel>findOntologies(com.fasterxml.jackson.databind.JsonNode queryDsl)find an ontology by QueryDslRequestResponseOK<OntologyModel>findOntologiesForCache(com.fasterxml.jackson.databind.JsonNode queryDsl)find an ontology by QueryDsl (find directly in db)RequestResponse<OntologyModel>importOntologies(boolean forceUpdate, java.util.List<OntologyModel> ontologyList)Import a collections of ontologies After passing the validation steps.-
Methods inherited from interface fr.gouv.vitam.common.model.VitamAutoCloseable
close
-
-
-
-
Method Detail
-
importOntologies
RequestResponse<OntologyModel> importOntologies(boolean forceUpdate, java.util.List<OntologyModel> ontologyList) throws VitamException, java.io.IOException
Import a collections of ontologies After passing the validation steps. If all the ontologies are valid, they are stored in the collection and indexed. The ontologies are not valid in the following situations :- The json is invalid
- The json contains an already used identifier
- One or more mandatory field is missing
- A field has an invalid format
- Parameters:
ontologyList- the list of ontologies to be importedforceUpdate-- Returns:
- RequestResponseOK if success or VitamError
- Throws:
VitamException- if in error occurs while validating ontologiesjava.io.IOException
-
findOntologies
RequestResponseOK<OntologyModel> findOntologies(com.fasterxml.jackson.databind.JsonNode queryDsl) throws ReferentialException, InvalidParseOperationException
find an ontology by QueryDsl- Parameters:
queryDsl- the query as a json to be executed- Returns:
- list of OntologyModel
- Throws:
ReferentialException- thrown if the query could not be executedInvalidParseOperationException- thrown if the query could not be executed
-
findOntologiesForCache
RequestResponseOK<OntologyModel> findOntologiesForCache(com.fasterxml.jackson.databind.JsonNode queryDsl) throws ReferentialException, InvalidParseOperationException
find an ontology by QueryDsl (find directly in db)- Parameters:
queryDsl- the query as a json to be executed- Returns:
- list of OntologyModel
- Throws:
ReferentialException- thrown if the query could not be executedInvalidParseOperationException- thrown if the query could not be executed
-
-