else if(reader.getQualityAssessment(qcmlStr, qaStr).getAttachmentParameter(cmd.getOptionValue("ap")) == null) {
logger.error("Invalid attachmentParameter specified: <{}>", cmd.getOptionValue("ap"));
throw new IllegalArgumentException("Invalid attachmentParameter specified");
}
else {
AttachmentParameter param = reader.getQualityAssessment(qcmlStr, qaStr).getAttachmentParameter(cmd.getOptionValue("ap"));
sb.append("attachmentParameter <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.getQualityParameterRef() != null)
sb.append("\tqualityParameter = ").append(param.getQualityParameterRef()).append("\n");
if(param.getBinary() != null)
sb.append("\tbinary = ").append(param.getBinary()).append("\n");
else if(param.getTable() != null)
sb.append("\ttable = ").append(Arrays.deepToString(param.getTable().toArray())).append("\n");
}
// print result
System.out.print(sb.toString());
}