Package com.google.api.services.genomics.model

Examples of com.google.api.services.genomics.model.ListDatasetsResponse


    command.projectNumber = 10L;
    command.includeDetails = true;

    Mockito.when(datasets.list()).thenReturn(datasetList);
    Mockito.when(datasetList.setProjectNumber(10L)).thenReturn(datasetList);
    Mockito.when(datasetList.execute()).thenReturn(new ListDatasetsResponse()
        .setDatasets(Lists.newArrayList(
            new Dataset().setId("id1").setName("name").setProjectNumber(1234L))));

    // Readset summary
    Mockito.when(readsets.search(new SearchReadGroupSetsRequest()
View Full Code Here


    ListDatasetsCommand command = new ListDatasetsCommand();
    command.projectNumber = 10L;

    Mockito.when(datasets.list()).thenReturn(datasetList);
    Mockito.when(datasetList.setProjectNumber(10L)).thenReturn(datasetList);
    Mockito.when(datasetList.execute()).thenReturn(new ListDatasetsResponse());
    command.handleRequest(genomics);
  }
View Full Code Here

  @Override
  public void handleRequest(Genomics genomics) throws IOException {

    if (projectNumber != null) {
      ListDatasetsResponse datasets = genomics.datasets().list()
          .setProjectNumber(projectNumber).execute();
      if (datasets.getDatasets() == null) {
        return;
      }
      for (Dataset dataset : datasets.getDatasets()) {
        printDataset(genomics, dataset, includeDetails);
      }

    } else {
      Map<String, String> datasets = getPreviousDatasets();
      if (datasets.isEmpty()) {
        System.out.println("There aren't any recently used datasets. " +
            "Specify a --project_number flag to get datasets for a specific project, or use the " +
            "'createdataset' command to make a new dataset.\n" +
            "You can find Google Genomics Public Data in project 761052378059");
        return;
      }

      for (Map.Entry<String, String> dataset : datasets.entrySet()) {
        printDataset(genomics, dataset.getKey(), dataset.getValue(), null, includeDetails);
      }
    }
  }
View Full Code Here

TOP

Related Classes of com.google.api.services.genomics.model.ListDatasetsResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.