public void removeFile(String fileId, String studyId) {
        // Sanity check
        if (StringUtils.isEmpty(fileId)) {
            logger.error("Variant file metadata ID {} is null or empty.", fileId);
            return;
        }

        VariantStudyMetadata variantStudyMetadata = getVariantStudyMetadata(studyId);
        if (variantStudyMetadata == null) {
            logger.error("Study not found. Check your study ID: '{}'", studyId);
            return;
        }
        if (variantStudyMetadata.getFiles() != null) {
            for (int i = 0; i < variantStudyMetadata.getFiles().size(); i++) {
                if (fileId.equals(variantStudyMetadata.getFiles().get(i).getId())) {
                    variantStudyMetadata.getFiles().remove(i);
                    return;
                }
            }
        }
    }
public void removeFile ( String fileId , String studyId ) { if ( StringUtils . isEmpty ( fileId ) ) { logger . error ( "Variant file metadata ID {} is null or empty." , fileId ) ; return ; } VariantStudyMetadata variantStudyMetadata = getVariantStudyMetadata ( studyId ) ; if ( variantStudyMetadata == null ) { logger . error ( "Study not found. Check your study ID: '{}'" , studyId ) ; return ; } if ( variantStudyMetadata . getFiles ( ) != null ) { for ( int i = 0 ; i < variantStudyMetadata . getFiles ( ) . size ( ) ; i ++ ) { if ( fileId . equals ( variantStudyMetadata . getFiles ( ) . get ( i ) . getId ( ) ) ) { variantStudyMetadata . getFiles ( ) . remove ( i ) ; return ; } } } }
Remove a variant file metadata (from file ID) of a given variant study metadata (from study ID).

@param fileId      File ID
@param studyId     Study ID