public static Confidence createConfidence(String value, String unitMi, String unitName){ Unit unit = createCvType( Unit.class, unitMi, unitName); return new Confidence(unit, value); }
public psidev.psi.mi.xml.model.Confidence intactToPsi( T intactObject ) { psidev.psi.mi.xml.model.Confidence confidence = new psidev.psi.mi.xml.model.Confidence(); confidence.setValue( intactObject.getValue()); Unit unit = confidenceTyeConverter.intactToPsi(intactObject.getCvConfidenceType()); confidence.setUnit(unit); return confidence; }
if (IntactConverterUtils.AUTH_CONF_MI.equals(annotation.getCvTopic().getIdentifier())){ if (annotation.getAnnotationText() != null){ psidev.psi.mi.xml.model.Confidence confidence = new psidev.psi.mi.xml.model.Confidence(); confidence.setValue(annotation.getAnnotationText());
public psidev.psi.mi.xml.model.Confidence fromJaxb( psidev.psi.mi.xml253.jaxb.ConfidenceListType.Confidence jConfidence ) throws ConverterException { if ( jConfidence == null ) { throw new IllegalArgumentException( "You must give a non null JAXB Confidence." ); } checkDependencies(); psidev.psi.mi.xml.model.Confidence mConfidence = new psidev.psi.mi.xml.model.Confidence(); // Initialise the model reading the Jaxb object // 1. set attributes mConfidence.setValue( jConfidence.getValue() ); // 2. set encapsulated objects mConfidence.setUnit( openCvTypeConverter.fromJaxb( jConfidence.getUnit(), psidev.psi.mi.xml.model.Unit.class ) ); // experiments if ( jConfidence.getExperimentRefList() != null ) { PsiDAO<ExperimentDescription> experimentDAO = factory.getExperimentDAO(); for ( Integer experimentId : jConfidence.getExperimentRefList().getExperimentReves() ) { ExperimentDescription experimentDescription = experimentDAO.retreive( experimentId ); if ( experimentDescription == null ) { mConfidence.getExperimentRefs().add( new ExperimentRef( experimentId ) ); } else { mConfidence.getExperiments().add( experimentDescription ); } } } return mConfidence; }
public psidev.psi.mi.xml.model.Confidence fromJaxb( psidev.psi.mi.xml254.jaxb.Confidence jConfidence ) throws ConverterException { if ( jConfidence == null ) { throw new IllegalArgumentException( "You must give a non null JAXB Confidence." ); } checkDependencies(); psidev.psi.mi.xml.model.Confidence mConfidence = new psidev.psi.mi.xml.model.Confidence(); // Initialise the model reading the Jaxb object // 1. set attributes mConfidence.setValue( jConfidence.getValue() ); // 2. set encapsulated objects mConfidence.setUnit( openCvTypeConverter.fromJaxb( jConfidence.getUnit(), psidev.psi.mi.xml.model.Unit.class ) ); // experiments if ( jConfidence.getExperimentRefList() != null ) { PsiDAO<ExperimentDescription> experimentDAO = factory.getExperimentDAO(); for ( Integer experimentId : jConfidence.getExperimentRefList().getExperimentReves() ) { ExperimentDescription experimentDescription = experimentDAO.retreive( experimentId ); if ( experimentDescription == null ) { mConfidence.getExperimentRefs().add( new ExperimentRef( experimentId ) ); } else { mConfidence.getExperiments().add( experimentDescription ); } } } return mConfidence; }
if (tabConfidence.getText() != null) unit.getNames().setFullName(tabConfidence.getText()); Confidence confidence = new Confidence(unit, tabConfidence.getValue()); interaction.getConfidences().add(confidence);