@Override public void visitAlias( Alias alias ) { final CvAliasType type = alias.getCvAliasType(); if( type != null ) { final String mi = type.getIdentifier(); if ( mi != null ) { final String key = createCvKey( type.getClass(), mi ); final CvAliasType oboTerm = ( CvAliasType ) mi2cv.get( key ); if ( oboTerm == null ) { log.warn( "Could not find alias " + type.getClass().getSimpleName() + "( " + type.getShortLabel() + " ) by MI: " + mi ); } else { alias.setCvAliasType( oboTerm ); } } } }
public static Collection<Alias> getAliasByType(AnnotatedObject<?, ?> annotatedObject, String miOrLabel) { Collection<Alias> matchingAliases = new ArrayList<Alias>(); for (Alias alias : annotatedObject.getAliases()) { if (alias.getCvAliasType() != null && ( alias.getCvAliasType().getIdentifier().equals(miOrLabel) || alias.getCvAliasType().getShortLabel().equals(miOrLabel)) ) { matchingAliases.add(alias); } } return matchingAliases; }
public psidev.psi.mi.xml.model.Alias intactToPsi(Alias intactObject) { intactStartConversation(intactObject); String name = intactObject.getName(); psidev.psi.mi.xml.model.Alias psiAlias = new psidev.psi.mi.xml.model.Alias(name); CvAliasType cvAliasType = intactObject.getCvAliasType(); if (cvAliasType != null) { String aliasType = cvAliasType.getShortLabel(); if (cvAliasType.getIdentifier() != null) { String upperId = cvAliasType.getIdentifier().toUpperCase(); Matcher typeMatcher = CvObjectConverter.MI_REGEXP.matcher(upperId); if (typeMatcher.find() && typeMatcher.group().equalsIgnoreCase(upperId)){ psiAlias.setTypeAc(cvAliasType.getIdentifier()); } } psiAlias.setType(aliasType); } intactEndConversion(intactObject); return psiAlias; }
public static List<String> getSynonyms(InteractionImpl complex) { List<String> synosyms = new ArrayList<String>(); for (Alias alias : complex.getAliases()) { if (alias.getName() != null && alias.getCvAliasType() != null && alias.getCvAliasType().getIdentifier().equals(CvAliasType.COMPLEX_SYNONYM_NAME_MI_REF)) { synosyms.add(alias.getName()); } } return synosyms; }
public static List<String> getSynonyms(InteractionImpl complex) { List<String> synosyms = new ArrayList<String>(); for (Alias alias : complex.getAliases()) { if (alias.getName() != null && alias.getCvAliasType() != null && alias.getCvAliasType().getIdentifier().equals(CvAliasType.COMPLEX_SYNONYM_NAME_MI_REF)) { synosyms.add(alias.getName()); } } return synosyms; }
public static Collection<Alias> getAliasByType(AnnotatedObject<?, ?> annotatedObject, String miOrLabel) { Collection<Alias> matchingAliases = new ArrayList<Alias>(); for (Alias alias : annotatedObject.getAliases()) { if (alias.getCvAliasType() != null && ( alias.getCvAliasType().getIdentifier().equals(miOrLabel) || alias.getCvAliasType().getShortLabel().equals(miOrLabel)) ) { matchingAliases.add(alias); } } return matchingAliases; }
private static String getAlias(InteractionImpl complex, String id) { for (Alias alias : complex.getAliases()) { if (alias.getName() != null && alias.getCvAliasType() != null && alias.getCvAliasType().getIdentifier().equals(id)) { return alias.getName(); } } return null; }
private static String getAlias(InteractionImpl complex, String id) { for (Alias alias : complex.getAliases()) { if (alias.getName() != null && alias.getCvAliasType() != null && alias.getCvAliasType().getIdentifier().equals(id)) { return alias.getName(); } } return null; }
CvAliasType aliasType = alias.getCvAliasType(); if (aliasType != null) { String aliasTypeIdentity = aliasType.getIdentifier();
CvAliasType aliasType = alias.getCvAliasType(); if (aliasType != null) { String aliasTypeIdentity = aliasType.getIdentifier();
/** * Creates unique strings for Annotations,Xrefs and aliases. * * @param io the object to use * @return a unique string for that object */ protected static String createUniqueString(IntactObject io) { if (io == null) throw new NullPointerException("IntactObject cannot be null to create a unique String"); if (io instanceof Annotation) { Annotation annot = (Annotation) io; String cvId = (annot.getCvTopic() != null) ? annot.getCvTopic().getIdentifier() : ""; return annot.getAnnotationText() + "__" + cvId; } else if (io instanceof Xref) { Xref xref = (Xref) io; String qualId = (xref.getCvXrefQualifier() != null) ? xref.getCvXrefQualifier().getIdentifier() : ""; return xref.getPrimaryId() + "__" + xref.getCvDatabase().getIdentifier() + "__" + qualId; } else if (io instanceof Alias) { Alias alias = (Alias) io; String typeId = (alias.getCvAliasType() != null) ? alias.getCvAliasType().getIdentifier() : ""; return alias.getName() + "__" + typeId; } return io.toString(); }
/** * Creates unique strings for Annotations,Xrefs and aliases. * * @param io the object to use * @return a unique string for that object */ protected static String createUniqueString(IntactObject io) { if (io == null) throw new NullPointerException("IntactObject cannot be null to create a unique String"); if (io instanceof Annotation) { Annotation annot = (Annotation) io; String cvId = (annot.getCvTopic() != null) ? annot.getCvTopic().getIdentifier() : ""; return annot.getAnnotationText() + "__" + cvId; } else if (io instanceof Xref) { Xref xref = (Xref) io; String qualId = (xref.getCvXrefQualifier() != null) ? xref.getCvXrefQualifier().getIdentifier() : ""; return xref.getPrimaryId() + "__" + xref.getCvDatabase().getIdentifier() + "__" + qualId; } else if (io instanceof Alias) { Alias alias = (Alias) io; String typeId = (alias.getCvAliasType() != null) ? alias.getCvAliasType().getIdentifier() : ""; return alias.getName() + "__" + typeId; } return io.toString(); }
if (firstRecommended == null && COMPLEX_RECOMMENDED_NAME_MI.equals(type.getIdentifier())){ firstRecommended = alias.getName(); else if (firstSystematic == null && COMPLEX_SYSTEMATIC_NAME_MI.equals(type.getIdentifier())){ firstSystematic = alias.getName(); else if (firstComplexSynonym == null && COMPLEX_SYNONYM.equals(type.getIdentifier())){ firstComplexSynonym = alias.getName();
String typeMI = intactAlias.getCvAliasType().getIdentifier();