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

x33g5p2x  于2022-01-21 转载在 其他  
字(9.3k)|赞(0)|评价(0)|浏览(91)

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

Interaction.getAnnotations介绍

暂无

代码示例

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

public static boolean isComplex(Interaction interaction) {
    for (Annotation annot : interaction.getAnnotations()) {
      if (annot.getCvTopic() != null && annot.getCvTopic().getShortLabel().equalsIgnoreCase(CvTopic.CURATED_COMPLEX)) {
        return true;
      }
    }
    return false;
  }
}

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

public static boolean isComplex(Interaction interaction) {
    for (Annotation annot : interaction.getAnnotations()) {
      if (annot.getCvTopic() != null && annot.getCvTopic().getShortLabel().equalsIgnoreCase(CvTopic.CURATED_COMPLEX)) {
        return true;
      }
    }
    return false;
  }
}

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

@PrePersist
@PreUpdate
protected void correctCategory() {
  if (this.interaction != null){
    if (Hibernate.isInitialized(this.interaction.getAnnotations())){
      if (ComplexUtils.isComplex(this.interaction)){
        if (this.category == null || !this.category.endsWith("_pool")){
          this.category = "modelled_participant";
        }
        else {
          this.category = "modelled_participant_pool";
        }
      }
      else if (this.category == null || !this.category.endsWith("_pool")){
        this.category = "participant_evidence";
      }
      else {
        this.category = "participant_evidence_pool";
      }
    }
    else if (this.category == null){
      this.category = "participant_evidence";
    }
  }
  else if (this.category == null){
    this.category = "participant_evidence";
  }
}

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

@PrePersist
@PreUpdate
protected void correctCategory() {
  if (this.interaction != null){
    if (Hibernate.isInitialized(this.interaction.getAnnotations())){
      if (ComplexUtils.isComplex(this.interaction)){
        if (this.category == null || !this.category.endsWith("_pool")){
          this.category = "modelled_participant";
        }
        else {
          this.category = "modelled_participant_pool";
        }
      }
      else if (this.category == null || !this.category.endsWith("_pool")){
        this.category = "participant_evidence";
      }
      else {
        this.category = "participant_evidence_pool";
      }
    }
    else if (this.category == null){
      this.category = "participant_evidence";
    }
  }
  else if (this.category == null){
    this.category = "participant_evidence";
  }
}

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

private static Collection<Annotation> fetchAnnotations(Interaction interaction) {
  Collection<Annotation> annotations;
  if (IntactCore.isInitialized(interaction.getAnnotations())) {
    annotations = interaction.getAnnotations();
  } else {
    annotations = IntactContext.getCurrentInstance().getDaoFactory().getAnnotationDao().getByParentAc(InteractionImpl.class, interaction.getAc());
  }
  return annotations;
}

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

private static Collection<Annotation> fetchAnnotations(Interaction interaction) {
  Collection<Annotation> annotations;
  if (IntactCore.isInitialized(interaction.getAnnotations())) {
    annotations = interaction.getAnnotations();
  } else {
    annotations = IntactContext.getCurrentInstance().getDaoFactory().getAnnotationDao().getByParentAc(InteractionImpl.class, interaction.getAc());
  }
  return annotations;
}

代码示例来源:origin: uk.ac.ebi.intact.app/data-conversion

Collection annotations = interaction.getAnnotations();
for ( Iterator iterator = annotations.iterator(); iterator.hasNext() && false == isNegative; ) {
  Annotation annotation = (Annotation) iterator.next();

代码示例来源:origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

Collection annotations = interaction.getAnnotations();
for ( Iterator iterator = annotations.iterator(); iterator.hasNext() && false == isNegative; ) {
  Annotation annotation = (Annotation) iterator.next();

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

/**
 * @param interaction
 *
 * @return
 */
protected Collection<String> getCCnote(Interaction interaction) {
  Collection<String> notes = null;
  final CvTopic ccNote = (CvTopic) getCvObject( CvTopic.class, null, CvTopic.CC_NOTE );
  for (Annotation annotation : interaction.getAnnotations()) {
    if (ccNote.equals(annotation.getCvTopic())) {
      if (notes == null) {
        notes = new ArrayList<String>(2); // should rarely have more than 2
      }
      notes.add(annotation.getAnnotationText());
    }
  }
  return notes;
}

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

Collection annotations = interaction.getAnnotations();
for ( Iterator iterator = annotations.iterator(); iterator.hasNext() && false == isNegative; ) {
  Annotation annotation = (Annotation) iterator.next();

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

/**
 * @param interaction
 *
 * @return
 */
protected Collection<String> getCCnote(Interaction interaction) {
  Collection<String> notes = null;
  for (Annotation annotation : interaction.getAnnotations()) {
    if (getCvContext().getByLabel(CvTopic.class, CvTopic.CC_NOTE).equals(annotation.getCvTopic())) {
      if (notes == null) {
        notes = new ArrayList<String>(2); // should rarely have more than 2
      }
      notes.add(annotation.getAnnotationText());
    }
  }
  return notes;
}

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

@PrePersist
@PreUpdate
protected void correctCategory() {
  if (this.component != null){
    if (this.component.getInteraction() != null){
      if (Hibernate.isInitialized(this.component.getInteraction().getAnnotations())){
        if (ComplexUtils.isComplex(this.component.getInteraction())){
          this.category = "modelled";
        }
        else {
          this.category = "evidence";
        }
      }
      else if (this.category == null){
        this.category = "evidence";
      }
    }
    else if (this.category == null){
      this.category = "evidence";
    }
  }
  else if (this.category == null){
    this.category = "evidence";
  }
}

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

@PrePersist
@PreUpdate
protected void correctCategory() {
  if (this.component != null){
    if (this.component.getInteraction() != null){
      if (Hibernate.isInitialized(this.component.getInteraction().getAnnotations())){
        if (ComplexUtils.isComplex(this.component.getInteraction())){
          this.category = "modelled";
        }
        else {
          this.category = "evidence";
        }
      }
      else if (this.category == null){
        this.category = "evidence";
      }
    }
    else if (this.category == null){
      this.category = "evidence";
    }
  }
  else if (this.category == null){
    this.category = "evidence";
  }
}

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

Collection annotations = interaction.getAnnotations();
boolean found = false;

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

Collection annotations = interaction.getAnnotations();
boolean annotationFound = false;

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

/**
  * This creates a stable (non-random) interaction
  */
 public Interaction createDeterministicInteraction() {
   Interaction interaction = createInteraction("fooprey-barbait",
                         createDeterministicProtein("A2", "barbait"),
                         createDeterministicProtein("A1", "fooprey"),
                         createDeterministicExperiment());
   interaction.getAnnotations().add(createAnnotation("This is an annotation", CvTopic.COMMENT_MI_REF, CvTopic.COMMENT));
   CvFeatureType featureType = createCvObject(CvFeatureType.class, CvFeatureType.EXPERIMENTAL_FEATURE_MI_REF, CvFeatureType.EXPERIMENTAL_FEATURE);
   Feature feature = createFeature("feature1", featureType);
   feature.setComponent(null);
   Range range = createRange(1, 1, 5, 5);
   feature.addRange(range);
   interaction.getComponents().iterator().next().addBindingDomain(feature);
//       interaction.getComponents().iterator().next().addComponentParameter(createDeterministicComponentParameter());
//       interaction.addXref(createPrimaryReferenceXref( interaction , "testreference"));
   interaction.addConfidence( createDeterministicConfidence());
   interaction.addParameter( createDeterministicInteractionParameter() );
   return interaction;
 }

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

/**
  * This creates a stable (non-random) interaction
  */
 public Interaction createDeterministicInteraction() {
   Interaction interaction = createInteraction("fooprey-barbait",
                         createDeterministicProtein("A2", "barbait"),
                         createDeterministicProtein("A1", "fooprey"),
                         createDeterministicExperiment());
   interaction.getAnnotations().add(createAnnotation("This is an annotation", CvTopic.COMMENT_MI_REF, CvTopic.COMMENT));
   CvFeatureType featureType = createCvObject(CvFeatureType.class, CvFeatureType.EXPERIMENTAL_FEATURE_MI_REF, CvFeatureType.EXPERIMENTAL_FEATURE);
   Feature feature = createFeature("feature1", featureType);
   feature.setComponent(null);
   Range range = createRange(1, 1, 5, 5);
   feature.addRange(range);
   interaction.getComponents().iterator().next().addBindingDomain(feature);
//       interaction.getComponents().iterator().next().addComponentParameter(createDeterministicComponentParameter());
//       interaction.addXref(createPrimaryReferenceXref( interaction , "testreference"));
   interaction.addConfidence( createDeterministicConfidence());
   interaction.addParameter( createDeterministicInteractionParameter() );
   return interaction;
 }

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

annotations.addAll(interaction.getAnnotations());

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

annotations.addAll(interaction.getAnnotations());

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

confidences = intactObject.getConfidences();
parameters = intactObject.getParameters();
annotations = intactObject.getAnnotations();

相关文章