public T psiToIntact( psidev.psi.mi.xml.model.Confidence psiObject ) { String value = psiObject.getValue(); T confidence = newConfidenceInstance(value); CvConfidenceType cvConfType = confidenceTyeConverter.psiToIntact( psiObject.getUnit()); confidence.setCvConfidenceType( cvConfType); return confidence; }
private Score getScoreOrConfidence(Confidence psiConfidence) { // check args if (psiConfidence == null) return null; // psiConfidence.value maps to confidence.confidence-value String value = psiConfidence.getValue(); // get psiConfidence unit OpenCvType ocv = psiConfidence.getUnit(); // psiConfidence.unit.xref maps to confidence.xref Set<Xref> bpXrefs = new HashSet<Xref>(); if (ocv != null && ocv.getXref() != null) { bpXrefs.addAll(getXrefs(ocv.getXref())); } // used to store names and attributes Set<String> comments = new HashSet<String>(); // psiConfidence.unit.names maps to confidence comment if (ocv != null && ocv.getNames() != null) { String unitName = getName(ocv.getNames()); if (unitName != null) comments.add(unitName); } // unit.attributelist maps to confidence.comment if (ocv.hasAttributes()) { comments.addAll(getAttributes(ocv.getAttributes())); } Score ret = createScore(value, bpXrefs, comments); return ret; }
final Unit unit = confidence.getUnit();
jConfidence.setUnit( openCvTypeConverter.toJaxb( mConfidence.getUnit() ) );
jConfidence.setUnit( openCvTypeConverter.toJaxb( mConfidence.getUnit() ) );