/**
   * Deletes a type vertex - can be entity(class type) or just vertex(struct/trait type)
   *
   * @param instanceVertex
   * @param typeCategory
   * @throws AtlasException
   */
  protected void deleteTypeVertex(
      AtlasVertex instanceVertex, DataTypes.TypeCategory typeCategory, boolean force)
      throws AtlasException {
    switch (typeCategory) {
      case STRUCT:
      case TRAIT:
        deleteTypeVertex(instanceVertex, force);
        break;

      case CLASS:
        deleteEntities(Collections.singletonList(instanceVertex));
        break;

      default:
        throw new IllegalStateException("Type category " + typeCategory + " not handled");
    }
  }