Package uk.ac.bbsrc.tgac.miso.core.util

Examples of uk.ac.bbsrc.tgac.miso.core.util.AliasComparator


                "getAlias",
                saveSet,
                new HashSet(requestManager.listAllLibrariesByProjectId(json.getLong("projectId"))));
                        */
        List<Library> sortedList = new ArrayList<Library>(saveSet);
        Collections.sort(sortedList, new AliasComparator(Library.class));
        for (Library library : sortedList) {
          requestManager.saveLibrary(library);
        }
       
        return JSONUtils.SimpleJSONResponse("All libraries saved successfully");
View Full Code Here


  }

  public void setSamples(Collection<Sample> samples) {
    this.samples = samples;
    try {
      Collections.sort(Arrays.asList(this.samples), new AliasComparator(Sample.class));
    }
    catch (NoSuchMethodException e) {
      e.printStackTrace();
    }
  }
View Full Code Here

  }

  public void setRuns(Collection<Run> runs) {
    this.runs = runs;
    try {
      Collections.sort(Arrays.asList(this.runs), new AliasComparator(Run.class));
    }
    catch (NoSuchMethodException e) {
      e.printStackTrace();
    }
  }
View Full Code Here

  }

  public void addSample(Sample sample) {
    this.samples.add(sample);
    try {
      Collections.sort(Arrays.asList(this.samples), new AliasComparator(Sample.class));
    }
    catch (NoSuchMethodException e) {
      e.printStackTrace();
    }
  }
View Full Code Here

  }

  public void setStudies(Collection<Study> studies) {
    this.studies = studies;
    try {
      Collections.sort(Arrays.asList(this.studies), new AliasComparator(Study.class));
    }
    catch (NoSuchMethodException e) {
      e.printStackTrace();
    }
  }
View Full Code Here

        if (complement != null && !complement.isEmpty()) {
          List<Sample> sortedList = new ArrayList<Sample>(complement);
          List<String> savedSamples = new ArrayList<String>();
          List<String> taxonErrorSamples = new ArrayList<String>();
          Collections.sort(sortedList, new AliasComparator(Sample.class));

          for (Sample sample : sortedList) {
            if ((Boolean) session.getServletContext().getAttribute("taxonLookupEnabled")) {
              log.info("Checking taxon: " + sample.getScientificName());
              String taxon = TaxonomyUtils.checkScientificNameAtNCBI(sample.getScientificName());
View Full Code Here

      if (sampleId != null) {
        Sample sample = requestManager.getSampleById(sampleId);
        model.put("sample", sample);

        List<Sample> projectSamples = new ArrayList<Sample>(requestManager.listAllSamplesByProjectId(sample.getProject().getProjectId()));
        Collections.sort(projectSamples, new AliasComparator(Sample.class));
        model.put("projectSamples", projectSamples);

        String regex = "([A-z0-9]+)_S([A-z0-9]+)_(.*)";
        Pattern pat = Pattern.compile(regex);
        Matcher mat = pat.matcher(sample.getAlias());
View Full Code Here

  }

  public Collection<Run> populateProjectRuns(long projectId) throws IOException {
    List<Run> runs = new ArrayList<Run>(requestManager.listAllRunsByProjectId(projectId));
    try {
      Collections.sort(runs, new AliasComparator(Run.class));
      for (Run r : runs) {
        RunImpl ri = (RunImpl) r;
        ri.setSequencerPartitionContainers(new ArrayList<SequencerPartitionContainer<SequencerPoolPartition>>(
                requestManager.listSequencerPartitionContainersByRunId(r.getId())));
      }
View Full Code Here

  }

  public Collection<Library> populateProjectLibraries(long projectId) throws IOException {
    List<Library> libraries = new ArrayList<Library>(requestManager.listAllLibrariesByProjectId(projectId));
    try {
      Collections.sort(libraries, new AliasComparator(Library.class));
      for (Library l : libraries) {
        for (LibraryQC qc : requestManager.listAllLibraryQCsByLibraryId(l.getId())) {
          try {
            l.addQc(qc);
          }
View Full Code Here

TOP

Related Classes of uk.ac.bbsrc.tgac.miso.core.util.AliasComparator

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.