code: private AtlasEdge addOrUpdateClassVertex(AtlasVertex instanceVertex, AtlasEdge currentEdge,
              ITypedReferenceableInstance newAttributeValue, AttributeInfo attributeInfo,
              String edgeLabel) throws AtlasException {
          AtlasVertex newReferenceVertex = getClassVertex(newAttributeValue);
          if( ! GraphHelper.elementExists(newReferenceVertex) && newAttributeValue != null) {
              LOG.error("Could not find vertex for Class Reference {}", newAttributeValue);
              throw new EntityNotFoundException("Could not find vertex for Class Reference " + newAttributeValue);
          }
  
          AtlasEdge newEdge = null;
          if (GraphHelper.elementExists(currentEdge) && newAttributeValue != null) {
              newEdge = updateClassEdge(instanceVertex, currentEdge, newAttributeValue, newReferenceVertex,
                      attributeInfo, edgeLabel);
          } else if (! GraphHelper.elementExists(currentEdge) && newAttributeValue != null){
              newEdge = addClassEdge(instanceVertex, newReferenceVertex, edgeLabel);
  
          }
          return newEdge;
      }
docs: ****************************************** CLASS *************************************************