Remove a variant study metadata (from study ID).

@param studyId     Study ID
181763
public void removeVariantStudyMetadata(String studyId) {
        // Sanity check
        if (StringUtils.isEmpty(studyId)) {
            logger.error("Variant study metadata ID {} is null or empty.", studyId);
            return;
        }
        VariantStudyMetadata variantStudyMetadata = getVariantStudyMetadata(studyId);
        if (variantStudyMetadata == null) {
            logger.error("Dataset not found. Check your study ID: '{}'", studyId);
            return;
        }
        for (int i = 0; i < variantMetadata.getStudies().size(); i++) {
            if (studyId.equals(variantMetadata.getStudies().get(i).getId())) {
                variantMetadata.getStudies().remove(i);
                return;
            }
        }
    }
965589
public void deleteMetadata(String templateName) {
        String scope = Metadata.scopeBasedOnType(templateName);
        this.deleteMetadata(templateName, scope);
    }
403487
public void removeFile(VariantFileMetadata file, String studyId) {
        // Sanity check
        if (file == null) {
            logger.error("Variant file metadata is null.");
            return;
        }
        removeFile(file.getId(), studyId);
    }
1102576
def removeVariantSet(self, variantSet):
        
        for variantSetRecord in models.Variantset.select().where(
                        models.Variantset.id == variantSet.getId()):
            variantSetRecord.delete_instance(recursive=True)
576496
public void addCohort(Cohort cohort, String studyId) {
        // Sanity check
        if (cohort == null || StringUtils.isEmpty(cohort.getId())) {
            logger.error("Cohort (or its ID) is null or empty.");
            return;
        }

        VariantStudyMetadata variantStudyMetadata = getVariantStudyMetadata(studyId);
        if (variantStudyMetadata == null) {
            logger.error("Study not found. Check your study ID: '{}'", studyId);
            return;
        }
        if (variantStudyMetadata.getCohorts() == null) {
            variantStudyMetadata.setCohorts(new ArrayList<>());
        }
        for (Cohort coho: variantStudyMetadata.getCohorts()) {
            if (coho.getId() != null && coho.getId().equals(cohort.getId())) {
                logger.error("Cohort with id '{}' already exists in study '{}'", cohort.getId(),
                        studyId);
                return;
            }
        }
        variantStudyMetadata.getCohorts().add(cohort);
    }
605633
@Override
	public void removeByCommerceShipment(long commerceShipmentId) {
		for (CommerceShipmentItem commerceShipmentItem : findByCommerceShipment(
				commerceShipmentId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(commerceShipmentItem);
		}
	}
1086556
private function removeFromMetaData($id) {
        $storageFileName = $this->directory . $id . '.info';
        if (file_exists($storageFileName) && is_writable($storageFileName)) {
            unset($storageFileName);
            return true;
        }
        return false;
    }
1194074
public static void removeRequest (@Nonnull @Nonempty final String sRequestID)
  {
    final RequestTracker aTracker = getGlobalSingletonIfInstantiated (RequestTracker.class);
    if (aTracker != null)
      aTracker.m_aRequestTrackingMgr.removeRequest (sRequestID, s_aParallelRunningCallbacks);
  }
1176691
public void remove(Id id){
        String dir = getBaseDirectory(id.getDatabase(),id.getCollection());
        boolean i1 = new File(dir+File.separator+id.getEntity()).delete();
        boolean i2 = new File(dir+File.separator+id.getEntity()+".json").delete();
        if(LOG.isDebugEnabled())
            LOG.debug("File removed successfully("+(i1&&i2)+") id: "+id);
    }
586373
@Override
	public void removeByGroupId(long groupId) {
		for (CPOptionCategory cpOptionCategory : findByGroupId(groupId,
				QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(cpOptionCategory);
		}
	}
1106967
@Override
	public void removeByGroupId(long groupId) {
		for (CommerceAvailabilityEstimate commerceAvailabilityEstimate : findByGroupId(
				groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(commerceAvailabilityEstimate);
		}
	}
713763
public void removeDataSerieFromHistogram(String histogramID, int index) {
        if (this.histograms.containsKey(histogramID)) {
            this.histograms.get(histogramID).removeSeries(index);
        }
    }
999251
protected void removeExistingEntity(String localId) {
		if (StringUtils.isEmpty(localId))
			return;
		List<Scope> scopes = projectRepo.getScopeIdById(localId);

		if (CollectionUtils.isEmpty(scopes))
			return;

		ObjectId tempEntId = scopes.get(0).getId();
		if (localId.equalsIgnoreCase(scopes.get(0).getpId())) {
			projectRepo.delete(tempEntId);
		}
	}
927780
@Override
	public void removeByGroupId(long groupId) {
		for (CommerceShipment commerceShipment : findByGroupId(groupId,
				QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(commerceShipment);
		}
	}
1247326
private void unregisterInternal(final JobID id) {

		// Use spin lock here
		while (this.lockMap.putIfAbsent(id, LOCK_OBJECT) != null);

		if (decrementReferenceCounter(id) == 0) {
			this.libraryManagerEntries.remove(id);
		}

		this.lockMap.remove(id);
	}
419264
@Override
	public void removeByCommerceWarehouseId(long commerceWarehouseId) {
		for (CommerceWarehouseItem commerceWarehouseItem : findByCommerceWarehouseId(
				commerceWarehouseId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(commerceWarehouseItem);
		}
	}
1340735
private void remove(final String id, final StringBuilder sql) {
        sql.append("DELETE FROM ").append(getName()).append(" WHERE ").append(JdbcRepositories.getDefaultKeyName()).append(" = '").
                append(id).append("'");
    }