Interface OntologyService

All Known Implementing Classes:
OntologyServiceImpl

public interface OntologyService
This service manages CRUD on Ontologies
  • Method Details

    • importOntologies

      RequestResponse<OntologyModel> importOntologies(boolean forceUpdate, List<OntologyModel> ontologyList) throws VitamException, 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 imported
      forceUpdate -
      Returns:
      RequestResponseOK if success or VitamError
      Throws:
      VitamException - if in error occurs while validating ontologies
      IOException
    • importInternalOntologies

      RequestResponse<OntologyModel> importInternalOntologies(List<OntologyModel> ontologyList) throws VitamException, 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. If there is some external ontologies used by vitam at the moment of import, they will be preserved and merged with the new internal ontologies being imported
      Parameters:
      ontologyList - the list of internal ontologies to be imported
      Returns:
      RequestResponseOK if success or VitamError
      Throws:
      VitamException - if in error occurs while validating ontologies
      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 executed
      InvalidParseOperationException - 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 executed
      InvalidParseOperationException - thrown if the query could not be executed
    • checkUpgradeOntologies

      RequestResponse<OntologyModel> checkUpgradeOntologies(List<OntologyModel> ontologyList) throws VitamException
      Check the safety of ontology import at vitam reinstall/upgrade
      Parameters:
      ontologyList - the list of internal ontologies to check
      Returns:
      Response the response of check
      Throws:
      VitamException - if in error occurs while validating ontologies