uk.ac.ebi.intact.model.Alias.getName()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(6.7k)|赞(0)|评价(0)|浏览(152)

本文整理了Java中uk.ac.ebi.intact.model.Alias.getName()方法的一些代码示例,展示了Alias.getName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Alias.getName()方法的具体详情如下:
包路径:uk.ac.ebi.intact.model.Alias
类名称:Alias
方法名:getName

Alias.getName介绍

暂无

代码示例

代码示例来源:origin: uk.ac.ebi.intact.dataexchange.uniprotexport/intact-uniprot-export

public int compare(Alias alias1, Alias alias2) {
    String s1 = alias1.getName();
    String s2 = alias2.getName();
    if( s1 == null && s2 == null ) return 0;
    if( s1 == null ) return Integer.MIN_VALUE;
    if( s2 == null ) return Integer.MAX_VALUE;
    return s1.compareTo( s2 );
  }
};

代码示例来源:origin: uk.ac.ebi.intact.util/intact-uniprot-export

public int compare(Alias alias1, Alias alias2) {
    return alias1.getName().compareTo(alias2.getName());
  }
};

代码示例来源:origin: uk.ac.ebi.intact.core/intact-core-readonly

public static String getFirstAlias(InteractionImpl complex) {
  for (Alias alias : complex.getAliases()) {
    if (alias.getName() != null) {
      return alias.getName();
    }
  }
  return null;
}

代码示例来源:origin: uk.ac.ebi.intact.core/intact-core

public static String getFirstAlias(InteractionImpl complex) {
  for (Alias alias : complex.getAliases()) {
    if (alias.getName() != null) {
      return alias.getName();
    }
  }
  return null;
}

代码示例来源:origin: uk.ac.ebi.intact.core/intact-core

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;
}

代码示例来源:origin: uk.ac.ebi.intact.core/intact-core-readonly

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;
}

代码示例来源:origin: uk.ac.ebi.intact.core/intact-core-readonly

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;
}

代码示例来源:origin: uk.ac.ebi.intact.core/intact-core

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;
}

代码示例来源:origin: uk.ac.ebi.intact.core/intact-core

@Override
public void visitAlias(Alias alias) {
  currentNode.setUserObject("Alias: "+alias.getName()+" / Type="+DebugUtil.cvObjectToSimpleString(alias.getCvAliasType()));
}

代码示例来源:origin: uk.ac.ebi.intact/intact-core

private static SearchItem searchItemForAlias( Alias alias ) {
  return new SearchItem( alias.getParentAc(), alias.getName(),
              alias.getParent().getClass().getName(), alias.getCvAliasType().getShortLabel() );
}

代码示例来源:origin: uk.ac.ebi.intact.core/intact-core-readonly

@Override
public void visitAlias(Alias alias) {
  currentNode.setUserObject("Alias: "+alias.getName()+" / Type="+DebugUtil.cvObjectToSimpleString(alias.getCvAliasType()));
}

代码示例来源:origin: uk.ac.ebi.intact.dbupdate/intact-update-model

public UpdatedAlias(Alias alias, UpdateStatus status){
  super();
  if (alias != null){
    type = alias.getCvAliasType() != null ? alias.getCvAliasType().getAc() : null;
    this.name = alias.getName();
  }
  else {
    this.type = null;
    this.name = null;
  }
  this.status = status != null ? status : UpdateStatus.none;
  this.parent = null;
}

代码示例来源:origin: uk.ac.ebi.intact.core/intact-core-readonly

public static boolean sameAlias( Alias a1, Alias a2 ) {
  if (a1.getAc() != null && a2.getAc() != null) {
    return a1.getAc().equals(a2.getAc());
  }
  if ( !same( a1.getName(), a2.getName() ) ) {
    return false;
  }
  if ( !CvObjectUtils.areEqual( a1.getCvAliasType(), a2.getCvAliasType() ) ) {
    return false;
  }
  return true;
}

代码示例来源:origin: uk.ac.ebi.intact.core/intact-core

protected Alias cloneAlias(Alias alias) throws IntactClonerException {
  if (alias == null) return null;
  Class clazz = CgLibUtil.removeCglibEnhanced(alias.getClass());
  Alias clone = null;
  try {
    final Constructor constructor = clazz.getConstructor();
    clone = (Alias) constructor.newInstance();
    clonerManager.addClone(alias, clone);
    clone.setCvAliasType(clone(alias.getCvAliasType()));
    clone.setName(alias.getName());
  } catch (Exception e) {
    throw new IntactClonerException("An error occured upon building a " + clazz.getSimpleName(), e);
  }
  return clone;
}

代码示例来源:origin: uk.ac.ebi.intact.core/intact-core-readonly

protected Alias cloneAlias(Alias alias) throws IntactClonerException {
  if (alias == null) return null;
  Class clazz = CgLibUtil.removeCglibEnhanced(alias.getClass());
  Alias clone = null;
  try {
    final Constructor constructor = clazz.getConstructor();
    clone = (Alias) constructor.newInstance();
    clonerManager.addClone(alias, clone);
    clone.setCvAliasType(clone(alias.getCvAliasType()));
    clone.setName(alias.getName());
  } catch (Exception e) {
    throw new IntactClonerException("An error occured upon building a " + clazz.getSimpleName(), e);
  }
  return clone;
}

代码示例来源:origin: uk.ac.ebi.intact.core/intact-core

public static boolean sameAlias( Alias a1, Alias a2 ) {
  if (a1.getAc() != null && a2.getAc() != null) {
    return a1.getAc().equals(a2.getAc());
  }
  if ( !same( a1.getName(), a2.getName() ) ) {
    return false;
  }
  if ( !CvObjectUtils.areEqual( a1.getCvAliasType(), a2.getCvAliasType() ) ) {
    return false;
  }
  return true;
}

代码示例来源:origin: uk.ac.ebi.intact/intact-core

private void insertSearchItemForAlias( Alias alias ) {
  if ( log.isDebugEnabled() ) {
    log.debug( "Inserting SearchItems for Alias: " + alias.getName() + " (" + alias.getAc() + "); Parent AC: " + alias.getParentAc() );
  }
  if ( !isAliasSearchable( alias ) ) {
    return;
  }
  SearchItem searchItem = searchItemForAlias( alias );
  if ( log.isDebugEnabled() ) {
    log.debug( "\t" + searchItem );
  }
  IntactContext.getCurrentInstance().getDataContext().getDaoFactory()
      .getSearchItemDao().persist( searchItem );
}

代码示例来源:origin: uk.ac.ebi.intact.core/intact-core

public Key keyForAlias(Alias alias) {
  return new Key(keyFor(alias.getParent()).getUniqueString() + "::" + alias.getName());
}

代码示例来源:origin: uk.ac.ebi.intact.core/intact-core-readonly

public Key keyForAlias(Alias alias) {
  return new Key(keyFor(alias.getParent()).getUniqueString() + "::" + alias.getName());
}

代码示例来源:origin: uk.ac.ebi.intact/intact-core

private void deleteSearchItemForAlias( Alias alias ) {
  if ( log.isDebugEnabled() ) {
    log.debug( "Deleting SearchItems for Alias: " + alias.getName() + " (" + alias.getAc() + "); Parent AC: " + alias.getParentAc() );
  }
  if ( !isAliasSearchable( alias ) ) {
    return;
  }
  SearchItem searchItem = searchItemForAlias( alias );
  IntactContext.getCurrentInstance().getDataContext().getDaoFactory()
      .getSearchItemDao().delete( searchItem );
}

相关文章