jCvType.setXref( xrefConverter.toJaxb( mCvType.getXref() ) );
jCvType.setXref( xrefConverter.toJaxb( mCvType.getXref() ) );
private <T extends ControlledVocabulary> T findOrCreateControlledVocabulary(CvType cvType, Class<T> bpCvClass) { if (cvType == null) return null; // try full name first, else try short name String term = null; if (cvType.hasNames()) { term = getName(cvType.getNames()); } //xref and primaryRef must always exist, acc. to the schema UnificationXref bpXref = getPrimaryUnificationXref(cvType.getXref()); T toReturn = findOrCreateControlledVocabulary(term, bpXref, bpCvClass); return toReturn; }
/** * @param mCvType instance of the model implementation of OpenCvType. * @return */ public psidev.psi.mi.xml253.jaxb.CvType toJaxb( psidev.psi.mi.xml.model.CvType mCvType ) { if ( mCvType == null ) { throw new IllegalArgumentException( "You must give a non null JAXB OpenCvType." ); } psidev.psi.mi.xml253.jaxb.CvType jCvType = new psidev.psi.mi.xml253.jaxb.CvType(); // Initialise the model reading the Jaxb object // 1. set encapsulated objects // names jCvType.setNames( namesConverter.toJaxb( mCvType.getNames() ) ); // xref jCvType.setXref( xrefConverter.toJaxb( mCvType.getXref() ) ); return jCvType; }
/** * @param mCvType instance of the model implementation of OpenCvType. * @return */ public psidev.psi.mi.xml254.jaxb.CvType toJaxb( psidev.psi.mi.xml.model.CvType mCvType ) { if ( mCvType == null ) { throw new IllegalArgumentException( "You must give a non null JAXB OpenCvType." ); } psidev.psi.mi.xml254.jaxb.CvType jCvType = new psidev.psi.mi.xml254.jaxb.CvType(); // Initialise the model reading the Jaxb object // 1. set encapsulated objects // names jCvType.setNames( namesConverter.toJaxb( mCvType.getNames() ) ); // xref jCvType.setXref( xrefConverter.toJaxb( mCvType.getXref() ) ); return jCvType; }
public C psiToIntact(T psiObject) { psiStartConversion(psiObject); C cv = newCvInstance(intactCvClass); cv.setOwner(getInstitution()); IntactConverterUtils.populateNames(psiObject.getNames(), cv, aliasConverter); IntactConverterUtils.populateXref(psiObject.getXref(), cv, xrefConverter); psiEndConversion(psiObject); return cv; }