public static InteractorType createInteractorType(String mi, String name) { InteractorType intType = createCvType(InteractorType.class, name); intType.setXref(createXrefPsiMi(mi)); return intType; }
@Override public boolean equals( Object o ) { if ( this == o ) return true; if ( o == null || getClass() != o.getClass() ) return false; Interactor that = ( Interactor ) o; if ( interactorType != null ? !interactorType.equals( that.interactorType ) : that.interactorType != null ) return false; if ( organism != null ? !organism.equals( that.organism ) : that.organism != null ) return false; //if (names != null ? !names.equals(that.names) : that.names != null) return false; if ( xref != null ? !xref.equals( that.xref ) : that.xref != null ) return false; if ( sequence != null ? !sequence.equals( that.sequence ) : that.sequence != null ) return false; return true; }
@Override public int hashCode() { int result = 31; //result = (names != null ? names.hashCode() : 0); result = 31 * result + ( xref != null ? xref.hashCode() : 0 ); result = 31 * result + ( interactorType != null ? interactorType.hashCode() : 0 ); result = 31 * result + ( organism != null ? organism.hashCode() : 0 ); result = 31 * result + ( sequence != null ? sequence.hashCode() : 0 ); return result; } }
interactorType = cvConverter.fromMitab(interactorTypes, InteractorType.class); if (!interactorType.hasNames() && interactorType.getXref() != null && interactorType.getXref().getPrimaryRef() != null) { String id = interactorType.getXref().getPrimaryRef().getId(); Names interactorTypeName = new Names(); interactorTypeName.setFullName(id); interactorType.setNames(interactorTypeName); interactorType = new InteractorType(); log.debug("Interactor type is unknown"); interactorType.setNames(interactorTypeName); interactorType.setXref(interactorTypeXref); xmlInteractor.setInteractorType(interactorType);
if (psiInteractorType.getXref() != null && psiInteractorType.getXref().getPrimaryRef() != null) { typeId = psiInteractorType.getXref().getPrimaryRef().getId(); String interactorTypeLabel = psiInteractorType.getNames().getShortLabel(); interactorTypeLabel = psiInteractorType.getNames().getFullName();
for(Participant p : interaction.getParticipants()) { if(p.hasInteractor()) { String type = getName(p.getInteractor().getInteractorType().getNames()); if(type==null) type = "protein"; //default type (if unspecified) participantTypes.add(type.toLowerCase()); + "; so we'll replace 'gene' with 'dna' (a quick fix)"); for(Participant p : interaction.getParticipants()) { if(p.hasInteractor() && p.getInteractor().getInteractorType().hasNames()) { String type = getName(p.getInteractor().getInteractorType().getNames()); if("gene".equalsIgnoreCase(type)) { p.getInteractor().getInteractorType().getNames().setShortLabel("dna");
String type = interactor.getInteractorType().getNames().getShortLabel();
final Names typeNames = itrType.getNames(); if(typeNames != null) { final String shortName = typeNames.getShortLabel();