private void readClassificationsFromEdge(AtlasEdge edge, AtlasRelationshipWithExtInfo relationshipWithExtInfo, boolean extendedInfo) throws AtlasBaseException { List<AtlasVertex> classificationVertices = getClassificationVertices(edge); List<String> blockedClassificationIds = getBlockedClassificationIds(edge); AtlasRelationship relationship = relationshipWithExtInfo.getRelationship(); Set<AtlasClassification> propagatedClassifications = new HashSet<>(); Set<AtlasClassification> blockedClassifications = new HashSet<>(); for (AtlasVertex classificationVertex : classificationVertices) { String classificationId = classificationVertex.getIdForDisplay(); AtlasClassification classification = toAtlasClassification(classificationVertex); String entityGuid = classification.getEntityGuid(); if (blockedClassificationIds.contains(classificationId)) { blockedClassifications.add(classification); } else { propagatedClassifications.add(classification); } // add entity headers to referred entities if (extendedInfo) { addToReferredEntities(relationshipWithExtInfo, entityGuid); } } relationship.setPropagatedClassifications(propagatedClassifications); relationship.setBlockedPropagatedClassifications(blockedClassifications); }
private void readClassificationsFromEdge(AtlasEdge edge, AtlasRelationshipWithExtInfo relationshipWithExtInfo, boolean extendedInfo) throws AtlasBaseException { List<AtlasVertex> classificationVertices = getClassificationVertices(edge); List<String> blockedClassificationIds = getBlockedClassificationIds(edge); AtlasRelationship relationship = relationshipWithExtInfo.getRelationship(); Set<AtlasClassification> propagatedClassifications = new HashSet<>(); Set<AtlasClassification> blockedClassifications = new HashSet<>(); for (AtlasVertex classificationVertex : classificationVertices) { String classificationId = classificationVertex.getIdForDisplay(); AtlasClassification classification = toAtlasClassification(classificationVertex); String entityGuid = classification.getEntityGuid(); if (blockedClassificationIds.contains(classificationId)) { blockedClassifications.add(classification); } else { propagatedClassifications.add(classification); } // add entity headers to referred entities if (extendedInfo) { addToReferredEntities(relationshipWithExtInfo, entityGuid); } } relationship.setPropagatedClassifications(propagatedClassifications); relationship.setBlockedPropagatedClassifications(blockedClassifications); }
private void init(String guid, String homeId, AtlasObjectId end1, AtlasObjectId end2, String label, PropagateTags propagateTags, Status status, String createdBy, String updatedBy, Date createTime, Date updateTime, Long version, Set<AtlasClassification> propagatedClassifications, Set<AtlasClassification> blockedPropagatedClassifications) { setGuid(guid); setHomeId(homeId); setEnd1(end1); setEnd2(end2); setLabel(label); setPropagateTags(propagateTags); setStatus(status); setCreatedBy(createdBy); setUpdatedBy(updatedBy); setCreateTime(createTime); setUpdateTime(updateTime); setVersion(version); setPropagatedClassifications(propagatedClassifications); setBlockedPropagatedClassifications(blockedPropagatedClassifications); }
process3_employee_union_relationship.setBlockedPropagatedClassifications(new HashSet<>(Arrays.asList(PII_tag3))); relationshipStore.update(process3_employee_union_relationship); process3_employee_union_relationship.setBlockedPropagatedClassifications(Collections.emptySet()); relationshipStore.update(process3_employee_union_relationship);
process3_employee_union_relationship.setBlockedPropagatedClassifications(new HashSet<>(Arrays.asList(PII_tag3))); relationshipStore.update(process3_employee_union_relationship); process3_employee_union_relationship.setBlockedPropagatedClassifications(Collections.emptySet()); relationshipStore.update(process3_employee_union_relationship);
PII_tag3.setEntityGuid(employees2.getGuid()); process3_employee_union_relationship.setBlockedPropagatedClassifications(new HashSet<>(Arrays.asList(PII_tag2, PII_tag3))); relationshipStore.update(process3_employee_union_relationship);
PII_tag3.setEntityGuid(employees2.getGuid()); process3_employee_union_relationship.setBlockedPropagatedClassifications(new HashSet<>(Arrays.asList(PII_tag2, PII_tag3))); relationshipStore.update(process3_employee_union_relationship);