@Deprecated public void setMiIdentifier(String mi) { setIdentifier(mi); }
@Deprecated public void setMiIdentifier(String mi) { setIdentifier(mi); }
@PrePersist @PreUpdate public void prepareParentMi() { CvObject parent = (CvObject) getParent(); if (parent == null) { throw new IllegalStateException("Trying to persist or update an cv xref without parent: "+this); } if (CvXrefQualifier.IDENTITY_MI_REF.equals(getCvXrefQualifier().getIdentifier())) { if (CvDatabase.PSI_MI_MI_REF.equals(getCvDatabase().getIdentifier())) { parent.setIdentifier(getPrimaryId()); } else { if (parent.getIdentifier() == null) { parent.setIdentifier(getPrimaryId()); } } } }
@PrePersist @PreUpdate public void prepareParentMi() { CvObject parent = (CvObject) getParent(); if (parent == null) { throw new IllegalStateException("Trying to persist or update an cv xref without parent: "+this); } if (CvXrefQualifier.IDENTITY_MI_REF.equals(getCvXrefQualifier().getIdentifier())) { if (CvDatabase.PSI_MI_MI_REF.equals(getCvDatabase().getIdentifier())) { parent.setIdentifier(getPrimaryId()); } else { if (parent.getIdentifier() == null) { parent.setIdentifier(getPrimaryId()); } } } }
public static <T extends CvObject> T createCvObject(Institution institution, Class<T> cvClass, String miIdentifier, String shortLabel) { T cv = ClassUtils.newInstance(cvClass); cv.setOwner(institution); cv.setShortLabel(shortLabel); cv.setIdentifier(miIdentifier); if (miIdentifier != null) { CvObjectXref idXref = XrefUtils.createIdentityXrefPsiMi(cv, miIdentifier); cv.addXref(idXref); idXref.prepareParentMi(); } return cv; }
public static <T extends CvObject> T createIntactCvObject(Institution institution, Class<T> cvClass, String intactId, String shortLabel) { T cv = ClassUtils.newInstance(cvClass); cv.setOwner(institution); cv.setShortLabel(shortLabel); cv.setIdentifier(intactId); if (intactId != null) { CvObjectXref idXref = XrefUtils.createIdentityXrefIntact(cv, intactId); cv.addXref(idXref); idXref.prepareParentMi(); } return cv; }
public static <T extends CvObject> T createCvObject(Institution institution, Class<T> cvClass, String miIdentifier, String shortLabel) { T cv = ClassUtils.newInstance(cvClass); cv.setOwner(institution); cv.setShortLabel(shortLabel); cv.setIdentifier(miIdentifier); if (miIdentifier != null) { CvObjectXref idXref = XrefUtils.createIdentityXrefPsiMi(cv, miIdentifier); cv.addXref(idXref); idXref.prepareParentMi(); } return cv; }
public static <T extends CvObject> T createIntactCvObject(Institution institution, Class<T> cvClass, String intactId, String shortLabel) { T cv = ClassUtils.newInstance(cvClass); cv.setOwner(institution); cv.setShortLabel(shortLabel); cv.setIdentifier(intactId); if (intactId != null) { CvObjectXref idXref = XrefUtils.createIdentityXrefIntact(cv, intactId); cv.addXref(idXref); idXref.prepareParentMi(); } return cv; }
clone.setIdentifier(cvObject.getIdentifier()); clone.setObjClass(cvObject.getObjClass());
cvObject.setIdentifier(identifier);
cvObject.setIdentifier(identifier);
clone.setIdentifier(cvObject.getIdentifier()); clone.setObjClass(cvObject.getObjClass());
cvObject.setIdentifier(oboObj.getID()); cvObject.setFullName( oboObj.getName() );