private void updateRelationshipAttributes(AtlasRelationship relationship, AtlasRelatedCategoryHeader relatedCategoryHeader) { if (Objects.nonNull(relationship)) { relationship.setAttribute("description", relatedCategoryHeader.getDescription()); } }
private void updateRelationshipAttributes(AtlasRelationship relationship, AtlasRelatedCategoryHeader relatedCategoryHeader) { if (Objects.nonNull(relationship)) { relationship.setAttribute("description", relatedCategoryHeader.getDescription()); } }
private void updateRelationshipAttributes(AtlasRelationship relationship, AtlasRelatedObjectId relatedObjectId) { AtlasStruct relationshipAttributes = relatedObjectId.getRelationshipAttributes(); if (Objects.nonNull(relationshipAttributes)) { for (Map.Entry<String, Object> attrEntry : relationshipAttributes.getAttributes().entrySet()) { relationship.setAttribute(attrEntry.getKey(), attrEntry.getValue()); } } }
private void updateRelationshipAttributes(AtlasRelationship relationship, AtlasRelatedObjectId relatedObjectId) { AtlasStruct relationshipAttributes = relatedObjectId.getRelationshipAttributes(); if (Objects.nonNull(relationshipAttributes)) { for (Map.Entry<String, Object> attrEntry : relationshipAttributes.getAttributes().entrySet()) { relationship.setAttribute(attrEntry.getKey(), attrEntry.getValue()); } } }
protected void updateRelationshipAttributes(AtlasRelationship relationship, AtlasRelatedTermHeader relatedTermHeader) { if (Objects.nonNull(relationship)) { relationship.setAttribute(TERM_RELATION_ATTR_EXPRESSION, relatedTermHeader.getExpression()); relationship.setAttribute(TERM_RELATION_ATTR_DESCRIPTION, relatedTermHeader.getDescription()); relationship.setAttribute(TERM_RELATION_ATTR_STEWARD, relatedTermHeader.getSteward()); relationship.setAttribute(TERM_RELATION_ATTR_SOURCE, relatedTermHeader.getSource()); if (Objects.nonNull(relatedTermHeader.getStatus())) { relationship.setAttribute(TERM_RELATION_ATTR_STATUS, relatedTermHeader.getStatus().name()); } } }
protected void updateRelationshipAttributes(AtlasRelationship relationship, AtlasRelatedTermHeader relatedTermHeader) { if (Objects.nonNull(relationship)) { relationship.setAttribute(TERM_RELATION_ATTR_EXPRESSION, relatedTermHeader.getExpression()); relationship.setAttribute(TERM_RELATION_ATTR_DESCRIPTION, relatedTermHeader.getDescription()); relationship.setAttribute(TERM_RELATION_ATTR_STEWARD, relatedTermHeader.getSteward()); relationship.setAttribute(TERM_RELATION_ATTR_SOURCE, relatedTermHeader.getSource()); if (Objects.nonNull(relatedTermHeader.getStatus())) { relationship.setAttribute(TERM_RELATION_ATTR_STATUS, relatedTermHeader.getStatus().name()); } } }
private void updateRelationshipAttributes(AtlasRelationship relationship, AtlasTermCategorizationHeader categorizationHeader) { if (Objects.nonNull(relationship)) { relationship.setAttribute(TERM_RELATION_ATTR_DESCRIPTION, categorizationHeader.getDescription()); if (Objects.nonNull(categorizationHeader.getStatus())) { relationship.setAttribute(TERM_RELATION_ATTR_STATUS, categorizationHeader.getStatus().name()); } } }
private void updateRelationshipAttributes(AtlasRelationship relationship, AtlasTermCategorizationHeader categorizationHeader) { if (Objects.nonNull(relationship)) { relationship.setAttribute(TERM_RELATION_ATTR_DESCRIPTION, categorizationHeader.getDescription()); if (Objects.nonNull(categorizationHeader.getStatus())) { relationship.setAttribute(TERM_RELATION_ATTR_STATUS, categorizationHeader.getStatus().name()); } } }
private void mapAttributes(AtlasEdge edge, AtlasRelationshipWithExtInfo relationshipWithExtInfo) throws AtlasBaseException { AtlasRelationship relationship = relationshipWithExtInfo.getRelationship(); AtlasType objType = typeRegistry.getType(relationship.getTypeName()); if (!(objType instanceof AtlasRelationshipType)) { throw new AtlasBaseException(AtlasErrorCode.TYPE_NAME_INVALID, relationship.getTypeName()); } AtlasRelationshipType relationshipType = (AtlasRelationshipType) objType; for (AtlasAttribute attribute : relationshipType.getAllAttributes().values()) { // mapping only primitive attributes Object attrValue = mapVertexToPrimitive(edge, attribute.getVertexPropertyName(), attribute.getAttributeDef()); relationship.setAttribute(attribute.getName(), attrValue); } } }
private void mapAttributes(AtlasEdge edge, AtlasRelationshipWithExtInfo relationshipWithExtInfo) throws AtlasBaseException { AtlasRelationship relationship = relationshipWithExtInfo.getRelationship(); AtlasType objType = typeRegistry.getType(relationship.getTypeName()); if (!(objType instanceof AtlasRelationshipType)) { throw new AtlasBaseException(AtlasErrorCode.TYPE_NAME_INVALID, relationship.getTypeName()); } AtlasRelationshipType relationshipType = (AtlasRelationshipType) objType; for (AtlasAttribute attribute : relationshipType.getAllAttributes().values()) { // mapping only primitive attributes Object attrValue = mapVertexToPrimitive(edge, attribute.getVertexPropertyName(), attribute.getAttributeDef()); relationship.setAttribute(attribute.getName(), attrValue); } } }