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

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

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

Alias.setOwner介绍

暂无

代码示例

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

public Alias( Institution anOwner, AnnotatedObject annotatedObject, CvAliasType cvAliasType, String name ) {
  this(annotatedObject, cvAliasType, name);
  setOwner(anOwner);
}

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

public Alias( Institution anOwner, AnnotatedObject annotatedObject, CvAliasType cvAliasType, String name ) {
  this(annotatedObject, cvAliasType, name);
  setOwner(anOwner);
}

代码示例来源: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

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.dataexchange.psimi/intact-psixml-converters

public static <A extends Alias> void populateAliases(Collection<psidev.psi.mi.xml.model.Alias> psiAliases, AnnotatedObject<?, A> annotatedObject, AliasConverter<A> aliasConverter) {
  if (psiAliases == null) {
    return;
  }
  for (psidev.psi.mi.xml.model.Alias psiAlias : psiAliases) {
    if (psiAlias.hasValue()) {
      A alias = aliasConverter.psiToIntact(psiAlias);
      annotatedObject.addAlias(alias);
      if (annotatedObject instanceof Institution) {
        alias.setOwner((Institution) annotatedObject);
      }
    } else {
      if (log.isWarnEnabled()) log.warn("Alias without value in location: "+ ConverterContext.getInstance().getLocation().getCurrentLocation().pathFromRootAsString());
    }
  }
}

代码示例来源: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.dataexchange.psimi/intact-psixml-converters

public A psiToIntact(psidev.psi.mi.xml.model.Alias psiObject) {
  psiStartConversion(psiObject);
  String name = psiObject.getValue();
  String aliasType = psiObject.getType();
  String aliasTypeAc = psiObject.getTypeAc();
  if (name.length() == 0) {
    throw new PsiConversionException("Value in Alias is empty: "+psiObject);
  }
  CvAliasType cvAliasType = null;
  // a type ac must always be a mi term
  if (aliasType != null) {
    cvAliasType = new CvAliasType(getInstitution(), aliasType);
    if( aliasTypeAc != null ) {
      cvAliasType.setIdentifier(aliasTypeAc);
      psiMiPopulator.populateWithPsiMi(cvAliasType, aliasTypeAc);
    } else {
      if ( log.isWarnEnabled() ) log.warn( "Attempting to build an Alias ("+ aliasType +
          ") without nameAc, this will result in a CvTopic without Xref" );
    }
  }
  A alias = newAliasInstance(aliasClass, cvAliasType, name);
  alias.setOwner(getInstitution());
  psiEndConversion(psiObject);
  return alias;
}

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

alias.setOwner(institutionPersister.syncIfTransient(alias.getOwner()));

相关文章