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; }
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 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; }
jConfidence.setValue( mConfidence.getValue() ); jConfidence.setUnit( openCvTypeConverter.toJaxb( mConfidence.getUnit() ) ); if ( mConfidence.hasExperiments() ) { if ( jConfidence.getExperimentRefList() == null ) { jConfidence.setExperimentRefList( new ExperimentRefList() ); for ( ExperimentDescription mExperiment : mConfidence.getExperiments() ) { jConfidence.getExperimentRefList().getExperimentReves().add( mExperiment.getId() ); } else if ( mConfidence.hasExperimentRefs() ) { if ( jConfidence.getExperimentRefList() == null ) { jConfidence.setExperimentRefList( new ExperimentRefList() ); for ( ExperimentRef mExperiment : mConfidence.getExperimentRefs() ) { jConfidence.getExperimentRefList().getExperimentReves().add( mExperiment.getRef() );
public static Confidence createConfidence(String value, String unitMi, String unitName){ Unit unit = createCvType( Unit.class, unitMi, unitName); return new Confidence(unit, value); }
if (conf.hasExperimentRefs()){ for (ExperimentRef eref : conf.getExperimentRefs()){ if( !interaction.getExperiments().isEmpty() ) { ExperimentDescription ed = findExperimentDescriptionInInteraction(eref, interaction); conf.getExperiments().add( ed ); " all the interactions and participants then use references to pre-declared experiments or all the experiments are only described at the level of the interactions and no experiment reference can be used."); conf.getExperiments().add( ed ); conf.getExperimentRefs().clear();
jConfidence.setValue( mConfidence.getValue() ); jConfidence.setUnit( openCvTypeConverter.toJaxb( mConfidence.getUnit() ) ); if ( mConfidence.hasExperiments() ) { if ( jConfidence.getExperimentRefList() == null ) { jConfidence.setExperimentRefList( new ExperimentRefListType() ); for ( ExperimentDescription mExperiment : mConfidence.getExperiments() ) { jConfidence.getExperimentRefList().getExperimentReves().add( mExperiment.getId() ); } else if ( mConfidence.hasExperimentRefs() ) { if ( jConfidence.getExperimentRefList() == null ) { jConfidence.setExperimentRefList( new ExperimentRefListType() ); for ( ExperimentRef mExperiment : mConfidence.getExperimentRefs() ) { jConfidence.getExperimentRefList().getExperimentReves().add( mExperiment.getRef() );
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()); unit.setXref(xref); confidence.setUnit(unit);
if (tabConfidence.getText() != null) unit.getNames().setFullName(tabConfidence.getText()); Confidence confidence = new Confidence(unit, tabConfidence.getValue()); interaction.getConfidences().add(confidence);
if ( c.hasExperimentRefs() ) { if( hasInteractionExperimentDescription && !parentInteraction.getExperiments().isEmpty() ) { for ( ExperimentRef eref : c.getExperimentRefs()) { ExperimentDescription ed = findExperimentDescriptionInInteraction(eref, parentInteraction); c.getExperiments().add( ed ); c.getExperimentRefs().clear(); for ( ExperimentRef eref : c.getExperimentRefs()) { " all the interactions and participants then use references to pre-declared experiments or all the experiments are only described at the level of the interactions and no experiment reference can be used."); c.getExperiments().add( ed ); c.getExperimentRefs().clear();
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; }
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; }
Unit unit1 = conf1.getUnit(); Unit unit2 = conf2.getUnit(); if (unit1 != null && unit2 == null){ return false; if (conf1.getValue() != null && conf2.getValue() == null){ return false; else if (conf1.getValue() == null && conf2.getValue() != null){ return false; else if (conf1.getValue() != null && conf2.getValue() != null && !conf1.getValue().equalsIgnoreCase(conf2.getValue())) { return false;