Examples of QualityParameter


Examples of inspector.jqcml.model.QualityParameter

    Cv cv = new Cv("name", "uri", "cv");
    qcml.addCv(cv);

    QualityAssessment run = new QualityAssessment("run");
    QualityParameter param = new QualityParameter("name", cv, "param");
    param.setAccession("accession");
    run.addQualityParameter(param);
    qcml.addRunQuality(run);

    assertEquals(version, qcml.getVersion());
View Full Code Here

Examples of inspector.jqcml.model.QualityParameter

        Cv cv = new Cv("name", "uri", "id");
        qcml.addCv(cv);

        QualityAssessment run = new QualityAssessment("id");
        QualityParameter param = new QualityParameter("name", cv, "id");
        param.setAccession("accession");
        run.addQualityParameter(param);
        qcml.addRunQuality(run);

        writer.writeQcML(qcml);
    }
View Full Code Here

Examples of inspector.jqcml.model.QualityParameter

    public void writeQcML_missingContent() {
        QcML qcml = new QcML();
        qcml.setFileName("Invalid.qcML");

        QualityAssessment run = new QualityAssessment("run");
        QualityParameter param = new QualityParameter("name", new Cv("name", "uri", "cv"), "param");
        param.setAccession("accession");
        run.addQualityParameter(param);
        qcml.addRunQuality(run);

        writer.writeQcML(qcml);
    }
View Full Code Here

Examples of inspector.jqcml.model.QualityParameter

   * @param qa  the QualityAssessment for which the primary keys of the (unit) cv refs in the child elements will be checked
   */
  private void mergeCv(Map<String, Integer> cvIds, QualityAssessment qa) {
    // check all QualityParameters in this QualityAssessment
    for(Iterator<QualityParameter> it = qa.getQualityParameterIterator(); it.hasNext(); ) {
      QualityParameter qp = it.next();
      if(qp.getCvRef() != null && qp.getCvRef().getPrimaryKey() == 0) {
        Integer key = cvIds.get(qp.getCvRef().getId());
        if(key != null)
          qp.getCvRef().setPrimaryKey(key);
      }
      if(qp.getUnitCvRef() != null && qp.getUnitCvRef().getPrimaryKey() == 0) {
        Integer key = cvIds.get(qp.getUnitCvRef().getId());
        if(key != null)
          qp.getUnitCvRef().setPrimaryKey(key);
      }
     
      // check all Thresholds
      for(Iterator<Threshold> thresholdIt = qp.getThresholdIterator(); thresholdIt.hasNext(); ) {
        Threshold threshold = thresholdIt.next();
        if(threshold.getCvRef() != null && threshold.getCvRef().getPrimaryKey() == 0) {
          Integer key = cvIds.get(threshold.getCvRef().getId());
          if(key != null)
            threshold.getCvRef().setPrimaryKey(key);
View Full Code Here

Examples of inspector.jqcml.model.QualityParameter

        else if(reader.getQualityAssessment(qcmlStr, qaStr).getQualityParameter(cmd.getOptionValue("qp")) == null) {
            logger.error("Invalid qualityParameter specified: <{}>", cmd.getOptionValue("qp"));
            throw new IllegalArgumentException("Invalid qualityParameter specified");
        }
        else {
            QualityParameter param = reader.getQualityAssessment(qcmlStr, qaStr).getQualityParameter(cmd.getOptionValue("qp"));
            sb.append("qualityParameter <ID=").append(param.getId()).append(">\n");
            sb.append("\tname = ").append(param.getName()).append("\n");
            sb.append("\taccession = ").append(param.getAccession()).append("\n");
            sb.append("\tcv = ").append(param.getCvRef()).append("\n");
            if(param.getValue() != null)
                sb.append("\tvalue = ").append(param.getValue()).append("\n");
            if(param.getUnitName() != null)
                sb.append("\tunit name = ").append(param.getUnitName()).append("\n");
            if(param.getUnitAccession() != null)
                sb.append("\tunit accession = ").append(param.getUnitAccession()).append("\n");
            if(param.getUnitCvRef() != null)
                sb.append("\tunit cv = ").append(param.getUnitCvRef()).append("\n");
            if(param.hasFlag()) {
                sb.append("\tthreshold file(s) = ");
                for(Iterator<Threshold> it = param.getThresholdIterator(); it.hasNext(); ) {
                    sb.append(it.next().getFileName());
                    if(it.hasNext())
                        sb.append(", ");
                }
                sb.append("\n");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.