private static HashMap getNestedTraitDetails(final AtlasClassification atlasClassification) { return new HashMap<String, Object>() {{ put("$typeName$", atlasClassification.getTypeName()); if (MapUtils.isNotEmpty(atlasClassification.getAttributes())) { putAll(atlasClassification.getAttributes()); } }}; }
AtlasStruct atlasStruct = (AtlasStruct) value; for (Map.Entry<String, Object> entry : atlasStruct.getAttributes().entrySet()) { sb.append(entry.getKey()).append(FULL_TEXT_DELIMITER); mapAttribute(entry.getValue(), entityExtInfo, sb, processedGuids);
/** * Map newly associated/defined classifications for the entity with given GUID * @param guid Entity guid * @param classifications new classifications added to the entity * @return Full text string ONLY for the added classifications * @throws AtlasBaseException */ public String getIndexTextForClassifications(String guid, List<AtlasClassification> classifications) throws AtlasBaseException { String ret = null; AtlasEntityWithExtInfo entityWithExtInfo = getAndCacheEntity(guid); if (entityWithExtInfo != null) { StringBuilder sb = new StringBuilder(); if (CollectionUtils.isNotEmpty(classifications)) { for (AtlasClassification classification : classifications) { sb.append(classification.getTypeName()).append(FULL_TEXT_DELIMITER); Set<String> excludeAttributes = getExcludeAttributesForIndexText(classification.getTypeName()); mapAttributes(classification.getAttributes(), entityWithExtInfo, sb, new HashSet<String>(), excludeAttributes); } } ret = sb.toString(); } if (LOG.isDebugEnabled()) { LOG.debug("FullTextMapperV2.map({}): {}", guid, ret); } return ret; }
public AtlasClassification(AtlasClassification other) { if (other != null) { setTypeName(other.getTypeName()); setAttributes(other.getAttributes()); } }
private void map(AtlasEntity entity, AtlasEntityExtInfo entityExtInfo, StringBuilder sb, Set<String> processedGuids) throws AtlasBaseException { if (entity == null || processedGuids.contains(entity.getGuid())) { return; } processedGuids.add(entity.getGuid()); sb.append(entity.getTypeName()).append(FULL_TEXT_DELIMITER); Set<String> excludeAttributes = getExcludeAttributesForIndexText(entity.getTypeName()); mapAttributes(entity.getAttributes(), entityExtInfo, sb, processedGuids, excludeAttributes); List<AtlasClassification> classifications = entity.getClassifications(); if (CollectionUtils.isNotEmpty(classifications)) { for (AtlasClassification classification : classifications) { sb.append(classification.getTypeName()).append(FULL_TEXT_DELIMITER); Set<String> excludeClassificationAttributes = getExcludeAttributesForIndexText(classification.getTypeName()); mapAttributes(classification.getAttributes(), entityExtInfo, sb, processedGuids, excludeClassificationAttributes); } } }
superTypeClassification.setPropagate(classification.isPropagate()); if (MapUtils.isNotEmpty(classification.getAttributes())) { AtlasClassificationType superType = typeRegistry.getClassificationTypeByName(superTypeName); Map<String, Object> superTypeClassificationAttributes = new HashMap<>(); for (Map.Entry<String, Object> attrEntry : classification.getAttributes().entrySet()) { String attrName = attrEntry.getKey();
Map<String, Object> updatedAttributes = classification.getAttributes();
Map<String, Object> updatedAttributes = classification.getAttributes();
public AtlasClassification(AtlasClassification other) { if (other != null) { setTypeName(other.getTypeName()); setAttributes(other.getAttributes()); setEntityGuid(other.getEntityGuid()); setEntityStatus(other.getEntityStatus()); setPropagate(other.isPropagate()); setValidityPeriods(other.getValidityPeriods()); setRemovePropagationsOnEntityDelete(other.getRemovePropagationsOnEntityDelete()); } }