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

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

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

Alias.setCvAliasType介绍

暂无

代码示例

代码示例来源:origin: uk.ac.ebi.intact.dataexchange.psimi/intact-psixml-converters

private static <A extends Alias> A newAliasInstance(Class<A> aliasClass, CvAliasType aliasType, String name) {
    A alias = null;
    try {
      alias = aliasClass.newInstance();
      alias.setCvAliasType(aliasType);
      alias.setName(name);
    } catch (Exception e) {
      throw new PsiConversionException(e);
    }

    return alias;
  }
}

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

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

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

/**
 * Create a new Alias for the given Annotated object
 *
 * @param annotatedObject the object to which we'll add a new Alias
 * @param cvAliasType     the CvAliasType (may be null)
 * @param name            the name of the alias (namy be null)
 *
 * @see uk.ac.ebi.intact.model.CvAliasType
 * @see uk.ac.ebi.intact.model.AnnotatedObject
 */
public Alias( AnnotatedObject annotatedObject, CvAliasType cvAliasType, String name ) {
  super();
  setParentAc( annotatedObject.getAc() );
  setCvAliasType( cvAliasType );
  setName( name );
}

代码示例来源: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 <A extends Alias> A createAlias(AnnotatedObject<?, A> parent, String name, CvAliasType aliasType) {
  A alias = (A) newAliasInstanceFor(parent.getClass());
  alias.setOwner(parent.getOwner());
  alias.setParent(parent);
  alias.setCvAliasType(aliasType);
  alias.setName(name);
  return alias;
}

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

public static <A extends Alias> A createAlias(AnnotatedObject<?, A> parent, String name, CvAliasType aliasType) {
  A alias = (A) newAliasInstanceFor(parent.getClass());
  alias.setOwner(parent.getOwner());
  alias.setParent(parent);
  alias.setCvAliasType(aliasType);
  alias.setName(name);
  return alias;
}

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

public static <A extends Alias> A createAlias(AnnotatedObject<?,A> parent, String name, CvAliasType aliasType) {
  A alias = (A) newAliasInstanceFor(parent.getClass());
  alias.setOwner(parent.getOwner());
  alias.setParent(parent);
  alias.setCvAliasType(aliasType);
  alias.setName(name);
  return alias;
}

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

/**
 * Create a new Alias for the given Annotated object
 *
 * @param annotatedObject the object to which we'll add a new Alias
 * @param cvAliasType     the CvAliasType (may be null)
 * @param name            the name of the alias (namy be null)
 *
 * @see uk.ac.ebi.intact.model.CvAliasType
 * @see uk.ac.ebi.intact.model.AnnotatedObject
 */
public Alias( AnnotatedObject annotatedObject, CvAliasType cvAliasType, String name ) {
  super();
  setParentAc( annotatedObject.getAc() );
  setCvAliasType( cvAliasType );
  setName( name );
}

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

/**
 * Create a new Alias for the given Annotated object
 *
 * @param anOwner         The institution owning this Alias
 * @param annotatedObject the object to which we'll add a new Alias
 * @param cvAliasType     the CvAliasType (may be null)
 * @param name            the name of the alias (namy be null)
 *
 * @see uk.ac.ebi.intact.model.CvAliasType
 * @see uk.ac.ebi.intact.model.AnnotatedObject
 */
public Alias( Institution anOwner, AnnotatedObject annotatedObject, CvAliasType cvAliasType, String name ) {
  setOwner( anOwner );
  setParentAc( annotatedObject.getAc() );
  setCvAliasType( cvAliasType );
  setName( name );
}

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

private Alias synchronizeAlias( Alias alias, AnnotatedObject parent ) {
  if (alias.getAc() != null) {
    return IntactContext.getCurrentInstance().getDataContext().getDaoFactory()
        .getAliasDao().getByAc(alias.getAc());
  }
  alias.setCvAliasType( synchronize( alias.getCvAliasType() ) );
  alias.setParent(parent);
  if (alias.getAc() == null && parent.getAc() != null) {
    annotatedObjectsToPersist.put(keyBuilder.keyForAlias(alias), alias);
  }
  return alias;
}

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

private Alias synchronizeAlias( Alias alias, AnnotatedObject parent ) {
  if (alias.getAc() != null) {
    return IntactContext.getCurrentInstance().getDataContext().getDaoFactory()
        .getAliasDao().getByAc(alias.getAc());
  }
  alias.setCvAliasType( synchronize( alias.getCvAliasType() ) );
  alias.setParent(parent);
  if (alias.getAc() == null && parent.getAc() != null) {
    annotatedObjectsToPersist.put(keyBuilder.keyForAlias(alias), alias);
  }
  return alias;
}

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

alias.setCvAliasType(cvAliasType);

相关文章