io.swagger.client.api.BioentitysetApi.java Source code

Java tutorial

Introduction

Here is the source code for io.swagger.client.api.BioentitysetApi.java

Source

/**
 * BioLink API
 * API integration layer for linked biological objects.   __Source:__ https://github.com/monarch-initiative/biolink-api/
 *
 * OpenAPI spec version: 0.1
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package io.swagger.client.api;

import io.swagger.client.ApiCallback;
import io.swagger.client.ApiClient;
import io.swagger.client.ApiException;
import io.swagger.client.ApiResponse;
import io.swagger.client.Configuration;
import io.swagger.client.Pair;
import io.swagger.client.ProgressRequestBody;
import io.swagger.client.ProgressResponseBody;

import com.google.gson.reflect.TypeToken;

import java.io.IOException;

import io.swagger.client.model.AssociationResults;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class BioentitysetApi {
    private ApiClient apiClient;

    public BioentitysetApi() {
        this(Configuration.getDefaultApiClient());
    }

    public BioentitysetApi(ApiClient apiClient) {
        this.apiClient = apiClient;
    }

    public ApiClient getApiClient() {
        return apiClient;
    }

    public void setApiClient(ApiClient apiClient) {
        this.apiClient = apiClient;
    }

    /* Build call for getEntitySetAssociations */
    private com.squareup.okhttp.Call getEntitySetAssociationsCall(String objectSlim, String objectCategory,
            List<String> subject, List<String> background,
            final ProgressResponseBody.ProgressListener progressListener,
            final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/bioentityset/associations/".replaceAll("\\{format\\}", "json");

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        if (objectSlim != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("", "object_slim", objectSlim));
        if (objectCategory != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("", "object_category", objectCategory));
        if (subject != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "subject", subject));
        if (background != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "background", background));

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = { "application/json" };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null)
            localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = { "application/json" };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if (progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain)
                        throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                            .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();
                }
            });
        }

        String[] localVarAuthNames = new String[] {};
        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams,
                localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    /**
     * Returns compact associations for a given input set
     * 
     * @param objectSlim Slim or subset to which the descriptors are to be mapped, NOT IMPLEMENTED (optional)
     * @param objectCategory E.g. phenotype, function (optional)
     * @param subject Entity ids to be examined, e.g. NCBIGene:9342, NCBIGene:7227, NCBIGene:8131, NCBIGene:157570, NCBIGene:51164, NCBIGene:6689, NCBIGene:6387 (optional)
     * @param background Entity ids in background set, e.g. NCBIGene:84570, NCBIGene:3630; used in over-representation tests (optional)
     * @return List&lt;AssociationResults&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public List<AssociationResults> getEntitySetAssociations(String objectSlim, String objectCategory,
            List<String> subject, List<String> background) throws ApiException {
        ApiResponse<List<AssociationResults>> resp = getEntitySetAssociationsWithHttpInfo(objectSlim,
                objectCategory, subject, background);
        return resp.getData();
    }

    /**
     * Returns compact associations for a given input set
     * 
     * @param objectSlim Slim or subset to which the descriptors are to be mapped, NOT IMPLEMENTED (optional)
     * @param objectCategory E.g. phenotype, function (optional)
     * @param subject Entity ids to be examined, e.g. NCBIGene:9342, NCBIGene:7227, NCBIGene:8131, NCBIGene:157570, NCBIGene:51164, NCBIGene:6689, NCBIGene:6387 (optional)
     * @param background Entity ids in background set, e.g. NCBIGene:84570, NCBIGene:3630; used in over-representation tests (optional)
     * @return ApiResponse&lt;List&lt;AssociationResults&gt;&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<List<AssociationResults>> getEntitySetAssociationsWithHttpInfo(String objectSlim,
            String objectCategory, List<String> subject, List<String> background) throws ApiException {
        com.squareup.okhttp.Call call = getEntitySetAssociationsCall(objectSlim, objectCategory, subject,
                background, null, null);
        Type localVarReturnType = new TypeToken<List<AssociationResults>>() {
        }.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     * Returns compact associations for a given input set (asynchronously)
     * 
     * @param objectSlim Slim or subset to which the descriptors are to be mapped, NOT IMPLEMENTED (optional)
     * @param objectCategory E.g. phenotype, function (optional)
     * @param subject Entity ids to be examined, e.g. NCBIGene:9342, NCBIGene:7227, NCBIGene:8131, NCBIGene:157570, NCBIGene:51164, NCBIGene:6689, NCBIGene:6387 (optional)
     * @param background Entity ids in background set, e.g. NCBIGene:84570, NCBIGene:3630; used in over-representation tests (optional)
     * @param callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     */
    public com.squareup.okhttp.Call getEntitySetAssociationsAsync(String objectSlim, String objectCategory,
            List<String> subject, List<String> background, final ApiCallback<List<AssociationResults>> callback)
            throws ApiException {

        ProgressResponseBody.ProgressListener progressListener = null;
        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;

        if (callback != null) {
            progressListener = new ProgressResponseBody.ProgressListener() {
                @Override
                public void update(long bytesRead, long contentLength, boolean done) {
                    callback.onDownloadProgress(bytesRead, contentLength, done);
                }
            };

            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
                @Override
                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
                    callback.onUploadProgress(bytesWritten, contentLength, done);
                }
            };
        }

        com.squareup.okhttp.Call call = getEntitySetAssociationsCall(objectSlim, objectCategory, subject,
                background, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken<List<AssociationResults>>() {
        }.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }

    /* Build call for getEntitySetGraphResource */
    private com.squareup.okhttp.Call getEntitySetGraphResourceCall(String objectSlim, String objectCategory,
            List<String> subject, List<String> background,
            final ProgressResponseBody.ProgressListener progressListener,
            final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/bioentityset/graph/".replaceAll("\\{format\\}", "json");

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        if (objectSlim != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("", "object_slim", objectSlim));
        if (objectCategory != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("", "object_category", objectCategory));
        if (subject != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "subject", subject));
        if (background != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "background", background));

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = { "application/json" };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null)
            localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = { "application/json" };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if (progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain)
                        throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                            .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();
                }
            });
        }

        String[] localVarAuthNames = new String[] {};
        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams,
                localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    /**
     * TODO Graph object spanning all entities
     * 
     * @param objectSlim Slim or subset to which the descriptors are to be mapped, NOT IMPLEMENTED (optional)
     * @param objectCategory E.g. phenotype, function (optional)
     * @param subject Entity ids to be examined, e.g. NCBIGene:9342, NCBIGene:7227, NCBIGene:8131, NCBIGene:157570, NCBIGene:51164, NCBIGene:6689, NCBIGene:6387 (optional)
     * @param background Entity ids in background set, e.g. NCBIGene:84570, NCBIGene:3630; used in over-representation tests (optional)
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public void getEntitySetGraphResource(String objectSlim, String objectCategory, List<String> subject,
            List<String> background) throws ApiException {
        getEntitySetGraphResourceWithHttpInfo(objectSlim, objectCategory, subject, background);
    }

    /**
     * TODO Graph object spanning all entities
     * 
     * @param objectSlim Slim or subset to which the descriptors are to be mapped, NOT IMPLEMENTED (optional)
     * @param objectCategory E.g. phenotype, function (optional)
     * @param subject Entity ids to be examined, e.g. NCBIGene:9342, NCBIGene:7227, NCBIGene:8131, NCBIGene:157570, NCBIGene:51164, NCBIGene:6689, NCBIGene:6387 (optional)
     * @param background Entity ids in background set, e.g. NCBIGene:84570, NCBIGene:3630; used in over-representation tests (optional)
     * @return ApiResponse&lt;Void&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<Void> getEntitySetGraphResourceWithHttpInfo(String objectSlim, String objectCategory,
            List<String> subject, List<String> background) throws ApiException {
        com.squareup.okhttp.Call call = getEntitySetGraphResourceCall(objectSlim, objectCategory, subject,
                background, null, null);
        return apiClient.execute(call);
    }

    /**
     * TODO Graph object spanning all entities (asynchronously)
     * 
     * @param objectSlim Slim or subset to which the descriptors are to be mapped, NOT IMPLEMENTED (optional)
     * @param objectCategory E.g. phenotype, function (optional)
     * @param subject Entity ids to be examined, e.g. NCBIGene:9342, NCBIGene:7227, NCBIGene:8131, NCBIGene:157570, NCBIGene:51164, NCBIGene:6689, NCBIGene:6387 (optional)
     * @param background Entity ids in background set, e.g. NCBIGene:84570, NCBIGene:3630; used in over-representation tests (optional)
     * @param callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     */
    public com.squareup.okhttp.Call getEntitySetGraphResourceAsync(String objectSlim, String objectCategory,
            List<String> subject, List<String> background, final ApiCallback<Void> callback) throws ApiException {

        ProgressResponseBody.ProgressListener progressListener = null;
        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;

        if (callback != null) {
            progressListener = new ProgressResponseBody.ProgressListener() {
                @Override
                public void update(long bytesRead, long contentLength, boolean done) {
                    callback.onDownloadProgress(bytesRead, contentLength, done);
                }
            };

            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
                @Override
                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
                    callback.onUploadProgress(bytesWritten, contentLength, done);
                }
            };
        }

        com.squareup.okhttp.Call call = getEntitySetGraphResourceCall(objectSlim, objectCategory, subject,
                background, progressListener, progressRequestListener);
        apiClient.executeAsync(call, callback);
        return call;
    }

    /* Build call for getEntitySetHomologsDeprecated */
    private com.squareup.okhttp.Call getEntitySetHomologsDeprecatedCall(String objectSlim, String objectCategory,
            List<String> subject, List<String> background,
            final ProgressResponseBody.ProgressListener progressListener,
            final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/bioentityset/DEPRECATEDhomologs/".replaceAll("\\{format\\}", "json");

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        if (objectSlim != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("", "object_slim", objectSlim));
        if (objectCategory != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("", "object_category", objectCategory));
        if (subject != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "subject", subject));
        if (background != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "background", background));

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = { "application/json" };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null)
            localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = { "application/json" };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if (progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain)
                        throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                            .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();
                }
            });
        }

        String[] localVarAuthNames = new String[] {};
        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams,
                localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    /**
     * Returns homology associations for a given input set of genes
     * 
     * @param objectSlim Slim or subset to which the descriptors are to be mapped, NOT IMPLEMENTED (optional)
     * @param objectCategory E.g. phenotype, function (optional)
     * @param subject Entity ids to be examined, e.g. NCBIGene:9342, NCBIGene:7227, NCBIGene:8131, NCBIGene:157570, NCBIGene:51164, NCBIGene:6689, NCBIGene:6387 (optional)
     * @param background Entity ids in background set, e.g. NCBIGene:84570, NCBIGene:3630; used in over-representation tests (optional)
     * @return List&lt;AssociationResults&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public List<AssociationResults> getEntitySetHomologsDeprecated(String objectSlim, String objectCategory,
            List<String> subject, List<String> background) throws ApiException {
        ApiResponse<List<AssociationResults>> resp = getEntitySetHomologsDeprecatedWithHttpInfo(objectSlim,
                objectCategory, subject, background);
        return resp.getData();
    }

    /**
     * Returns homology associations for a given input set of genes
     * 
     * @param objectSlim Slim or subset to which the descriptors are to be mapped, NOT IMPLEMENTED (optional)
     * @param objectCategory E.g. phenotype, function (optional)
     * @param subject Entity ids to be examined, e.g. NCBIGene:9342, NCBIGene:7227, NCBIGene:8131, NCBIGene:157570, NCBIGene:51164, NCBIGene:6689, NCBIGene:6387 (optional)
     * @param background Entity ids in background set, e.g. NCBIGene:84570, NCBIGene:3630; used in over-representation tests (optional)
     * @return ApiResponse&lt;List&lt;AssociationResults&gt;&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<List<AssociationResults>> getEntitySetHomologsDeprecatedWithHttpInfo(String objectSlim,
            String objectCategory, List<String> subject, List<String> background) throws ApiException {
        com.squareup.okhttp.Call call = getEntitySetHomologsDeprecatedCall(objectSlim, objectCategory, subject,
                background, null, null);
        Type localVarReturnType = new TypeToken<List<AssociationResults>>() {
        }.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     * Returns homology associations for a given input set of genes (asynchronously)
     * 
     * @param objectSlim Slim or subset to which the descriptors are to be mapped, NOT IMPLEMENTED (optional)
     * @param objectCategory E.g. phenotype, function (optional)
     * @param subject Entity ids to be examined, e.g. NCBIGene:9342, NCBIGene:7227, NCBIGene:8131, NCBIGene:157570, NCBIGene:51164, NCBIGene:6689, NCBIGene:6387 (optional)
     * @param background Entity ids in background set, e.g. NCBIGene:84570, NCBIGene:3630; used in over-representation tests (optional)
     * @param callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     */
    public com.squareup.okhttp.Call getEntitySetHomologsDeprecatedAsync(String objectSlim, String objectCategory,
            List<String> subject, List<String> background, final ApiCallback<List<AssociationResults>> callback)
            throws ApiException {

        ProgressResponseBody.ProgressListener progressListener = null;
        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;

        if (callback != null) {
            progressListener = new ProgressResponseBody.ProgressListener() {
                @Override
                public void update(long bytesRead, long contentLength, boolean done) {
                    callback.onDownloadProgress(bytesRead, contentLength, done);
                }
            };

            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
                @Override
                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
                    callback.onUploadProgress(bytesWritten, contentLength, done);
                }
            };
        }

        com.squareup.okhttp.Call call = getEntitySetHomologsDeprecatedCall(objectSlim, objectCategory, subject,
                background, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken<List<AssociationResults>>() {
        }.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }

    /* Build call for getEntitySetOverRepresentationAnalysis */
    private com.squareup.okhttp.Call getEntitySetOverRepresentationAnalysisCall(String objectCategory,
            String objectCategory2, String objectSlim, List<String> subject, List<String> background,
            final ProgressResponseBody.ProgressListener progressListener,
            final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // verify the required parameter 'objectCategory' is set
        if (objectCategory == null) {
            throw new ApiException(
                    "Missing the required parameter 'objectCategory' when calling getEntitySetOverRepresentationAnalysis(Async)");
        }

        // verify the required parameter 'objectCategory2' is set
        if (objectCategory2 == null) {
            throw new ApiException(
                    "Missing the required parameter 'objectCategory2' when calling getEntitySetOverRepresentationAnalysis(Async)");
        }

        // create path and map variables
        String localVarPath = "/bioentityset/ora/".replaceAll("\\{format\\}", "json")
                .replaceAll("\\{" + "object_category" + "\\}", apiClient.escapeString(objectCategory.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        if (objectSlim != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("", "object_slim", objectSlim));
        if (objectCategory2 != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("", "object_category", objectCategory2));
        if (subject != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "subject", subject));
        if (background != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "background", background));

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = { "application/json" };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null)
            localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = { "application/json" };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if (progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain)
                        throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                            .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();
                }
            });
        }

        String[] localVarAuthNames = new String[] {};
        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams,
                localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    /**
     * TODO Over-representation analysis
     * 
     * @param objectCategory CATEGORY of entity at link OBJECT (target), e.g. phenotype, disease (required)
     * @param objectCategory2 E.g. phenotype, function (required)
     * @param objectSlim Slim or subset to which the descriptors are to be mapped, NOT IMPLEMENTED (optional)
     * @param subject Entity ids to be examined, e.g. NCBIGene:9342, NCBIGene:7227, NCBIGene:8131, NCBIGene:157570, NCBIGene:51164, NCBIGene:6689, NCBIGene:6387 (optional)
     * @param background Entity ids in background set, e.g. NCBIGene:84570, NCBIGene:3630; used in over-representation tests (optional)
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public void getEntitySetOverRepresentationAnalysis(String objectCategory, String objectCategory2,
            String objectSlim, List<String> subject, List<String> background) throws ApiException {
        getEntitySetOverRepresentationAnalysisWithHttpInfo(objectCategory, objectCategory2, objectSlim, subject,
                background);
    }

    /**
     * TODO Over-representation analysis
     * 
     * @param objectCategory CATEGORY of entity at link OBJECT (target), e.g. phenotype, disease (required)
     * @param objectCategory2 E.g. phenotype, function (required)
     * @param objectSlim Slim or subset to which the descriptors are to be mapped, NOT IMPLEMENTED (optional)
     * @param subject Entity ids to be examined, e.g. NCBIGene:9342, NCBIGene:7227, NCBIGene:8131, NCBIGene:157570, NCBIGene:51164, NCBIGene:6689, NCBIGene:6387 (optional)
     * @param background Entity ids in background set, e.g. NCBIGene:84570, NCBIGene:3630; used in over-representation tests (optional)
     * @return ApiResponse&lt;Void&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<Void> getEntitySetOverRepresentationAnalysisWithHttpInfo(String objectCategory,
            String objectCategory2, String objectSlim, List<String> subject, List<String> background)
            throws ApiException {
        com.squareup.okhttp.Call call = getEntitySetOverRepresentationAnalysisCall(objectCategory, objectCategory2,
                objectSlim, subject, background, null, null);
        return apiClient.execute(call);
    }

    /**
     * TODO Over-representation analysis (asynchronously)
     * 
     * @param objectCategory CATEGORY of entity at link OBJECT (target), e.g. phenotype, disease (required)
     * @param objectCategory2 E.g. phenotype, function (required)
     * @param objectSlim Slim or subset to which the descriptors are to be mapped, NOT IMPLEMENTED (optional)
     * @param subject Entity ids to be examined, e.g. NCBIGene:9342, NCBIGene:7227, NCBIGene:8131, NCBIGene:157570, NCBIGene:51164, NCBIGene:6689, NCBIGene:6387 (optional)
     * @param background Entity ids in background set, e.g. NCBIGene:84570, NCBIGene:3630; used in over-representation tests (optional)
     * @param callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     */
    public com.squareup.okhttp.Call getEntitySetOverRepresentationAnalysisAsync(String objectCategory,
            String objectCategory2, String objectSlim, List<String> subject, List<String> background,
            final ApiCallback<Void> callback) throws ApiException {

        ProgressResponseBody.ProgressListener progressListener = null;
        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;

        if (callback != null) {
            progressListener = new ProgressResponseBody.ProgressListener() {
                @Override
                public void update(long bytesRead, long contentLength, boolean done) {
                    callback.onDownloadProgress(bytesRead, contentLength, done);
                }
            };

            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
                @Override
                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
                    callback.onUploadProgress(bytesWritten, contentLength, done);
                }
            };
        }

        com.squareup.okhttp.Call call = getEntitySetOverRepresentationAnalysisCall(objectCategory, objectCategory2,
                objectSlim, subject, background, progressListener, progressRequestListener);
        apiClient.executeAsync(call, callback);
        return call;
    }

    /* Build call for getEntitySetOverRepresentationAnalysis_0 */
    private com.squareup.okhttp.Call getEntitySetOverRepresentationAnalysis_0Call(String objectCategory,
            String objectCategory2, String objectSlim, List<String> subject, List<String> background,
            final ProgressResponseBody.ProgressListener progressListener,
            final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // verify the required parameter 'objectCategory' is set
        if (objectCategory == null) {
            throw new ApiException(
                    "Missing the required parameter 'objectCategory' when calling getEntitySetOverRepresentationAnalysis_0(Async)");
        }

        // verify the required parameter 'objectCategory2' is set
        if (objectCategory2 == null) {
            throw new ApiException(
                    "Missing the required parameter 'objectCategory2' when calling getEntitySetOverRepresentationAnalysis_0(Async)");
        }

        // create path and map variables
        String localVarPath = "/bioentityset/ora/{object_category}/".replaceAll("\\{format\\}", "json")
                .replaceAll("\\{" + "object_category" + "\\}", apiClient.escapeString(objectCategory.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        if (objectSlim != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("", "object_slim", objectSlim));
        if (objectCategory2 != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("", "object_category", objectCategory2));
        if (subject != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "subject", subject));
        if (background != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "background", background));

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = { "application/json" };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null)
            localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = { "application/json" };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if (progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain)
                        throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                            .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();
                }
            });
        }

        String[] localVarAuthNames = new String[] {};
        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams,
                localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    /**
     * TODO Over-representation analysis
     * 
     * @param objectCategory CATEGORY of entity at link OBJECT (target), e.g. phenotype, disease (required)
     * @param objectCategory2 E.g. phenotype, function (required)
     * @param objectSlim Slim or subset to which the descriptors are to be mapped, NOT IMPLEMENTED (optional)
     * @param subject Entity ids to be examined, e.g. NCBIGene:9342, NCBIGene:7227, NCBIGene:8131, NCBIGene:157570, NCBIGene:51164, NCBIGene:6689, NCBIGene:6387 (optional)
     * @param background Entity ids in background set, e.g. NCBIGene:84570, NCBIGene:3630; used in over-representation tests (optional)
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public void getEntitySetOverRepresentationAnalysis_0(String objectCategory, String objectCategory2,
            String objectSlim, List<String> subject, List<String> background) throws ApiException {
        getEntitySetOverRepresentationAnalysis_0WithHttpInfo(objectCategory, objectCategory2, objectSlim, subject,
                background);
    }

    /**
     * TODO Over-representation analysis
     * 
     * @param objectCategory CATEGORY of entity at link OBJECT (target), e.g. phenotype, disease (required)
     * @param objectCategory2 E.g. phenotype, function (required)
     * @param objectSlim Slim or subset to which the descriptors are to be mapped, NOT IMPLEMENTED (optional)
     * @param subject Entity ids to be examined, e.g. NCBIGene:9342, NCBIGene:7227, NCBIGene:8131, NCBIGene:157570, NCBIGene:51164, NCBIGene:6689, NCBIGene:6387 (optional)
     * @param background Entity ids in background set, e.g. NCBIGene:84570, NCBIGene:3630; used in over-representation tests (optional)
     * @return ApiResponse&lt;Void&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<Void> getEntitySetOverRepresentationAnalysis_0WithHttpInfo(String objectCategory,
            String objectCategory2, String objectSlim, List<String> subject, List<String> background)
            throws ApiException {
        com.squareup.okhttp.Call call = getEntitySetOverRepresentationAnalysis_0Call(objectCategory,
                objectCategory2, objectSlim, subject, background, null, null);
        return apiClient.execute(call);
    }

    /**
     * TODO Over-representation analysis (asynchronously)
     * 
     * @param objectCategory CATEGORY of entity at link OBJECT (target), e.g. phenotype, disease (required)
     * @param objectCategory2 E.g. phenotype, function (required)
     * @param objectSlim Slim or subset to which the descriptors are to be mapped, NOT IMPLEMENTED (optional)
     * @param subject Entity ids to be examined, e.g. NCBIGene:9342, NCBIGene:7227, NCBIGene:8131, NCBIGene:157570, NCBIGene:51164, NCBIGene:6689, NCBIGene:6387 (optional)
     * @param background Entity ids in background set, e.g. NCBIGene:84570, NCBIGene:3630; used in over-representation tests (optional)
     * @param callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     */
    public com.squareup.okhttp.Call getEntitySetOverRepresentationAnalysis_0Async(String objectCategory,
            String objectCategory2, String objectSlim, List<String> subject, List<String> background,
            final ApiCallback<Void> callback) throws ApiException {

        ProgressResponseBody.ProgressListener progressListener = null;
        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;

        if (callback != null) {
            progressListener = new ProgressResponseBody.ProgressListener() {
                @Override
                public void update(long bytesRead, long contentLength, boolean done) {
                    callback.onDownloadProgress(bytesRead, contentLength, done);
                }
            };

            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
                @Override
                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
                    callback.onUploadProgress(bytesWritten, contentLength, done);
                }
            };
        }

        com.squareup.okhttp.Call call = getEntitySetOverRepresentationAnalysis_0Call(objectCategory,
                objectCategory2, objectSlim, subject, background, progressListener, progressRequestListener);
        apiClient.executeAsync(call, callback);
        return call;
    }

    /* Build call for getEntitySetSummary */
    private com.squareup.okhttp.Call getEntitySetSummaryCall(String objectSlim, String objectCategory,
            List<String> subject, List<String> background,
            final ProgressResponseBody.ProgressListener progressListener,
            final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/bioentityset/descriptor/counts/".replaceAll("\\{format\\}", "json");

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        if (objectSlim != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("", "object_slim", objectSlim));
        if (objectCategory != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("", "object_category", objectCategory));
        if (subject != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "subject", subject));
        if (background != null)
            localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "background", background));

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = { "application/json" };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null)
            localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = { "application/json" };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if (progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain)
                        throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                            .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();
                }
            });
        }

        String[] localVarAuthNames = new String[] {};
        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams,
                localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    /**
     * Summary statistics for objects associated
     * 
     * @param objectSlim Slim or subset to which the descriptors are to be mapped, NOT IMPLEMENTED (optional)
     * @param objectCategory E.g. phenotype, function (optional)
     * @param subject Entity ids to be examined, e.g. NCBIGene:9342, NCBIGene:7227, NCBIGene:8131, NCBIGene:157570, NCBIGene:51164, NCBIGene:6689, NCBIGene:6387 (optional)
     * @param background Entity ids in background set, e.g. NCBIGene:84570, NCBIGene:3630; used in over-representation tests (optional)
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public void getEntitySetSummary(String objectSlim, String objectCategory, List<String> subject,
            List<String> background) throws ApiException {
        getEntitySetSummaryWithHttpInfo(objectSlim, objectCategory, subject, background);
    }

    /**
     * Summary statistics for objects associated
     * 
     * @param objectSlim Slim or subset to which the descriptors are to be mapped, NOT IMPLEMENTED (optional)
     * @param objectCategory E.g. phenotype, function (optional)
     * @param subject Entity ids to be examined, e.g. NCBIGene:9342, NCBIGene:7227, NCBIGene:8131, NCBIGene:157570, NCBIGene:51164, NCBIGene:6689, NCBIGene:6387 (optional)
     * @param background Entity ids in background set, e.g. NCBIGene:84570, NCBIGene:3630; used in over-representation tests (optional)
     * @return ApiResponse&lt;Void&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<Void> getEntitySetSummaryWithHttpInfo(String objectSlim, String objectCategory,
            List<String> subject, List<String> background) throws ApiException {
        com.squareup.okhttp.Call call = getEntitySetSummaryCall(objectSlim, objectCategory, subject, background,
                null, null);
        return apiClient.execute(call);
    }

    /**
     * Summary statistics for objects associated (asynchronously)
     * 
     * @param objectSlim Slim or subset to which the descriptors are to be mapped, NOT IMPLEMENTED (optional)
     * @param objectCategory E.g. phenotype, function (optional)
     * @param subject Entity ids to be examined, e.g. NCBIGene:9342, NCBIGene:7227, NCBIGene:8131, NCBIGene:157570, NCBIGene:51164, NCBIGene:6689, NCBIGene:6387 (optional)
     * @param background Entity ids in background set, e.g. NCBIGene:84570, NCBIGene:3630; used in over-representation tests (optional)
     * @param callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     */
    public com.squareup.okhttp.Call getEntitySetSummaryAsync(String objectSlim, String objectCategory,
            List<String> subject, List<String> background, final ApiCallback<Void> callback) throws ApiException {

        ProgressResponseBody.ProgressListener progressListener = null;
        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;

        if (callback != null) {
            progressListener = new ProgressResponseBody.ProgressListener() {
                @Override
                public void update(long bytesRead, long contentLength, boolean done) {
                    callback.onDownloadProgress(bytesRead, contentLength, done);
                }
            };

            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
                @Override
                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
                    callback.onUploadProgress(bytesWritten, contentLength, done);
                }
            };
        }

        com.squareup.okhttp.Call call = getEntitySetSummaryCall(objectSlim, objectCategory, subject, background,
                progressListener, progressRequestListener);
        apiClient.executeAsync(call, callback);
        return call;
    }
}