Class SchemaCommonService


  • public class SchemaCommonService
    extends java.lang.Object
    This Common service for managing schema
    • Field Detail

      • SCHEMA_COLLECTION

        public static final java.lang.String SCHEMA_COLLECTION
        See Also:
        Constant Field Values
    • Constructor Detail

      • SchemaCommonService

        public SchemaCommonService()
    • Method Detail

      • extractLeafFromPath

        public static java.lang.String extractLeafFromPath​(java.lang.String schemaPath)
      • mapSchemaFromInputParameters

        public static java.util.List<Schema> mapSchemaFromInputParameters​(java.util.List<SchemaInputModel> externalSchemaInputList,
                                                                          java.util.Map<java.lang.String,​OntologyModel> ontologyEltsMapByIdentifier)
        Map Schema intput to db entity
      • getVitamError

        public static VitamError getVitamError​(java.lang.String vitamCode,
                                               java.lang.String error,
                                               StatusCode statusCode)
      • fillSchemaImportReportOK

        public static SchemaImportReport fillSchemaImportReportOK​(SchemaImportReport schemaImportReport,
                                                                  java.util.List<Schema> schemaList,
                                                                  GUID eip)
        generate Ok Report
        Parameters:
        schemaList - the list of created schema
        Returns:
        the error report inputStream
      • fillSchemaImportReportError

        public static SchemaImportReport fillSchemaImportReportError​(SchemaImportReport schemaImportReport,
                                                                     java.util.Set<java.lang.String> errorPathList,
                                                                     StatusCode status,
                                                                     GUID eip)
        generate Error Report
        Parameters:
        errorPathList - the list of created schema
        Returns:
        the error report inputStream
      • buildOntologyQueryDslByIdentifiers

        public static com.fasterxml.jackson.databind.JsonNode buildOntologyQueryDslByIdentifiers​(java.util.Set<java.lang.String> ontologyIdentifiers)
                                                                                          throws InvalidCreateOperationException
        Build dsl query from ontology identifiers
        Parameters:
        ontologyIdentifiers -
        Returns:
        Throws:
        InvalidCreateOperationException