Interface ClassificationApi
-
public interface ClassificationApi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Classification
addClassification(AddClassificationRequest request)
Adds newClassification
.Classification
changeClassification(ChangeClassificationRequest request)
Changes givenClassification
.Job
classificationJob(ClassifyRequest classifyRequest)
Starts a job that classifies assets by external service based on sample data.Job
classify(UUID id)
Starts a job that classifies assets by external service based on sample data.PagedResponse<Classification>
findClassifications(FindClassificationsRequest request)
Finds all theClassification
s matching given search criteria.Classification
getClassification(UUID classificationId)
Finds theClassification
with given id.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.void
removeClassification(UUID classificationId)
RemovesClassification
with given id.void
removeClassifications(List<UUID> classificationsIds)
Removes allClassification
s with given ids.
-
-
-
Method Detail
-
findClassifications
PagedResponse<Classification> findClassifications(FindClassificationsRequest request)
Finds all theClassification
s 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 theClassification
with given id.- Parameters:
classificationId
- id of classification- Returns:
- classification with given id.
-
addClassification
Classification addClassification(AddClassificationRequest request)
Adds newClassification
.- Parameters:
request
- parameters to create newClassification
- Returns:
- newly created
Classification
-
changeClassification
Classification changeClassification(ChangeClassificationRequest request)
Changes givenClassification
.- Parameters:
request
- parameters to changeClassification
- Returns:
- changed
Classification
or null if couldn't fulfill the request
-
removeClassification
void removeClassification(UUID classificationId)
RemovesClassification
with given id.WARNING: This will also remove all ClassificationMatches that are joined with this Classification!
- Parameters:
classificationId
- ID ofClassification
to remove
-
removeClassifications
void removeClassifications(List<UUID> classificationsIds)
Removes allClassification
s with given ids.WARNING: This will also remove all ClassificationMatches that are joined with these Classifications!
- Parameters:
classificationsIds
- IDs ofClassification
s 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.
-
-