Interface ClassificationApi


  • public interface ClassificationApi
    • Method Detail

      • findClassifications

        PagedResponse<Classification> findClassifications​(FindClassificationsRequest request)
        Finds all the Classifications matching given search criteria.
        Parameters:
        request - search criteria specifying what classifications to search for
        Returns:
        classifications matching given criteria.
      • getClassification

        Classification getClassification​(UUID classificationId)
        Finds the Classification with given id.
        Parameters:
        classificationId - id of classification
        Returns:
        classification with given id.
      • removeClassification

        void removeClassification​(UUID classificationId)
        Removes Classification with given id.

        WARNING: This will also remove all ClassificationMatches that are joined with this Classification!

        Parameters:
        classificationId - ID of Classification to remove
      • removeClassifications

        void removeClassifications​(List<UUID> classificationsIds)
        Removes all Classifications with given ids.

        WARNING: This will also remove all ClassificationMatches that are joined with these Classifications!

        Parameters:
        classificationsIds - IDs of Classifications to remove
      • classify

        Job classify​(UUID id)
        Starts a job that classifies assets by external service based on sample data. The assets that can be classified must be of type : Column, Table, Schema or Data Set. In all cases columns are the ones being classified (all columns related to given assets).
        Parameters:
        id - UUID of asset
        Returns:
        started job
      • classificationJob

        Job classificationJob​(ClassifyRequest classifyRequest)
        Starts a job that classifies assets by external service based on sample data. The assets that can be classified must be of type : Column, Table, Schema or Data Set. In all cases columns are the ones being classified (all columns related to given assets).
        Parameters:
        classifyRequest - request containing data of assets to classify
        Returns:
        classification job that is running the classification process.
        Throws:
        ApiIllegalArgumentException - when no assetIds provided
      • mergeClassifications

        List<ClassificationMatch> mergeClassifications​(String targetClassificationName,
                                                       List<UUID> classificationIds)
        Searches for all the relations between classifications mentioned in classificationIds and changes the assets to be related to targetClassification instead. After that, it removes all the classes from classificationIds list. Only UserDefinedClassifications can be part of classifications which are going to be merged. It is related to the fact that CollibrainClassification cannot be deleted.
        Parameters:
        targetClassificationName - - the name of the target classification, which all the assets will be related to. If classification does not exist yet, it will be created. Can be either UserDefined or Collibrain.
        classificationIds - - the list of the classifications which will be merged into target classification and removed. Only UserDefined classifications are allowed.
        Returns:
        The list of all the ClassificationMatch objects which are assigned to the target classification of the merge.