Tabnine Logo
IntactCore.ensureInitializedAnnotations
Code IndexAdd Tabnine to your IDE (free)

How to use
ensureInitializedAnnotations
method
in
uk.ac.ebi.intact.core.persister.IntactCore

Best Java code snippets using uk.ac.ebi.intact.core.persister.IntactCore.ensureInitializedAnnotations (Showing top 18 results out of 315)

origin: uk.ac.ebi.intact.core/intact-core

public static boolean containSameAnnotations(AnnotatedObject ao1, AnnotatedObject ao2) {
  return areCollectionEqual(IntactCore.ensureInitializedAnnotations(ao1), IntactCore.ensureInitializedAnnotations(ao2));
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

public static boolean containSameAnnotations(AnnotatedObject ao1, AnnotatedObject ao2) {
  return areCollectionEqual(IntactCore.ensureInitializedAnnotations(ao1), IntactCore.ensureInitializedAnnotations(ao2));
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

public static Collection<Annotation> getPublicAnnotations(final AnnotatedObject<?, ?> annotatedObject) {
  final Collection<Annotation> publicAnnotations = new ArrayList<Annotation>(annotatedObject.getAnnotations().size());
  final Iterator<Annotation> i = IntactCore.ensureInitializedAnnotations(annotatedObject).iterator();
  while (i.hasNext()) {
    Annotation annotation = i.next();
    if (isCvTopicPublic(annotation.getCvTopic())) {
      publicAnnotations.add(annotation);
    }
  }
  return publicAnnotations;
}
origin: uk.ac.ebi.intact.core/intact-core

public static Collection<Annotation> getPublicAnnotations(final AnnotatedObject<?, ?> annotatedObject) {
  final Collection<Annotation> publicAnnotations = new ArrayList<Annotation>(annotatedObject.getAnnotations().size());
  final Iterator<Annotation> i = IntactCore.ensureInitializedAnnotations(annotatedObject).iterator();
  while (i.hasNext()) {
    Annotation annotation = i.next();
    if (isCvTopicPublic(annotation.getCvTopic())) {
      publicAnnotations.add(annotation);
    }
  }
  return publicAnnotations;
}
origin: uk.ac.ebi.intact.core/intact-core

/**
 * Find all annotations having any of the provided CvTopics.
 *
 * @param annotatedObject the object to serch on.
 * @param topics          the topics we are searching.
 * @return a non null collection of Annotation.
 */
public static Collection<Annotation> findAnnotationsByCvTopic(AnnotatedObject<?, ?> annotatedObject,
                               Collection<CvTopic> topics) {
  if (annotatedObject == null) {
    throw new NullPointerException("You must give a non null annotatedObject");
  }
  if (topics == null) {
    throw new NullPointerException("You must give a non null collection of CvTopic");
  }
  Collection<Annotation> annotations = new ArrayList<Annotation>();
  if (!topics.isEmpty()) {
    for (Annotation annotation : IntactCore.ensureInitializedAnnotations(annotatedObject)) {
      if (topics.contains(annotation.getCvTopic())) {
        annotations.add(annotation);
      }
    }
  }
  return annotations;
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

/**
 * Find all annotations having any of the provided CvTopics.
 *
 * @param annotatedObject the object to serch on.
 * @param topics          the topics we are searching.
 * @return a non null collection of Annotation.
 */
public static Collection<Annotation> findAnnotationsByCvTopic(AnnotatedObject<?, ?> annotatedObject,
                               Collection<CvTopic> topics) {
  if (annotatedObject == null) {
    throw new NullPointerException("You must give a non null annotatedObject");
  }
  if (topics == null) {
    throw new NullPointerException("You must give a non null collection of CvTopic");
  }
  Collection<Annotation> annotations = new ArrayList<Annotation>();
  if (!topics.isEmpty()) {
    for (Annotation annotation : IntactCore.ensureInitializedAnnotations(annotatedObject)) {
      if (topics.contains(annotation.getCvTopic())) {
        annotations.add(annotation);
      }
    }
  }
  return annotations;
}
origin: uk.ac.ebi.intact.core/intact-core

  /**
   * Checks if a Cv object contains the "hidden" annotation
   * @param cvObject the object that may be hidden
   * @return true if hidden
   *
   * @since 2.5.0
   */
  public static boolean isHidden(CvObject cvObject) {
    for (Annotation annotation : IntactCore.ensureInitializedAnnotations(cvObject)) {
      if (annotation.getCvTopic() != null && CvTopic.HIDDEN.equals(annotation.getCvTopic().getShortLabel())) {
        return true;
      }
    }
    return false;
  }
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

  /**
   * Checks if a Cv object contains the "hidden" annotation
   * @param cvObject the object that may be hidden
   * @return true if hidden
   *
   * @since 2.5.0
   */
  public static boolean isHidden(CvObject cvObject) {
    for (Annotation annotation : IntactCore.ensureInitializedAnnotations(cvObject)) {
      if (annotation.getCvTopic() != null && CvTopic.HIDDEN.equals(annotation.getCvTopic().getShortLabel())) {
        return true;
      }
    }
    return false;
  }
}
origin: uk.ac.ebi.intact.core/intact-core

public static boolean isCvTopicPublic(CvTopic cvTopic) {
  for (Annotation annotation : IntactCore.ensureInitializedAnnotations(cvTopic)) {
    if(annotation.getCvTopic() != null){
      if (annotation.getCvTopic().getShortLabel().equals(CvTopic.HIDDEN) || annotation.getCvTopic().getShortLabel().equals(CvTopic.NO_EXPORT)) {
        return false;
      }
    } else {
      return false;
    }
  }
  return true;
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

public static boolean isCvTopicPublic(CvTopic cvTopic) {
  for (Annotation annotation : IntactCore.ensureInitializedAnnotations(cvTopic)) {
    if(annotation.getCvTopic() != null){
      if (annotation.getCvTopic().getShortLabel().equals(CvTopic.HIDDEN) || annotation.getCvTopic().getShortLabel().equals(CvTopic.NO_EXPORT)) {
        return false;
      }
    } else {
      return false;
    }
  }
  return true;
}
origin: uk.ac.ebi.intact.dataexchange.psimi/intact-psixml-converters

private static void populateAttributes( AnnotatedObject<?, ?> annotatedObject, AttributeContainer attributeContainer ) {
  AnnotationConverter annotationConverter = new AnnotationConverter( annotatedObject.getOwner() );
  AnnotationConverterConfig configAnnotation = ConverterContext.getInstance().getAnnotationConfig();
  for ( Annotation annotation : IntactCore.ensureInitializedAnnotations(annotatedObject) ) {
    if (!configAnnotation.isExcluded(annotation.getCvTopic())) {
      Attribute attribute = annotationConverter.intactToPsi( annotation );
      if (!attributeContainer.getAttributes().contains( attribute )) {
        attributeContainer.getAttributes().add( attribute );
      }
    }
  }
}
origin: uk.ac.ebi.intact.dataexchange.psimi/intact-psixml-converters

public static void populateAttributes( AnnotatedObject<?, ?> annotatedObject, AttributeContainer attributeContainer, AnnotationConverter annotationConverter ) {
  AnnotationConverterConfig configAnnotation = ConverterContext.getInstance().getAnnotationConfig();
  Collection<Annotation> annotations;
  if (annotationConverter.isCheckInitializedCollections()){
    annotations = IntactCore.ensureInitializedAnnotations(annotatedObject);
  }
  else {
    annotations = annotatedObject.getAnnotations();
  }
  for ( Annotation annotation : annotations ) {
    if (!configAnnotation.isExcluded(annotation.getCvTopic())) {
      Attribute attribute = annotationConverter.intactToPsi( annotation );
      if (!attributeContainer.getAttributes().contains( attribute )) {
        attributeContainer.getAttributes().add( attribute );
      }
    }
  }
}
origin: uk.ac.ebi.intact.core/intact-core

annotations.addAll(IntactCore.ensureInitializedAnnotations(experiment));
experiment.getAnnotations().clear();
experiment.getAnnotations().addAll(annotations);
origin: uk.ac.ebi.intact.core/intact-core-readonly

annotations.addAll(IntactCore.ensureInitializedAnnotations(experiment));
experiment.getAnnotations().clear();
experiment.getAnnotations().addAll(annotations);
origin: uk.ac.ebi.intact.dataexchange.psimi/intact-psixml-converters

confidences = IntactCore.ensureInitializedConfidences(intactObject);
parameters = IntactCore.ensureInitializedInteractionParameters(intactObject);
annotations = IntactCore.ensureInitializedAnnotations(intactObject);
origin: uk.ac.ebi.intact.dataexchange.psimi/intact-psixml-converters

public T intactToPsi(C intactObject) {
  intactStartConversation(intactObject);
  T cvType = (T) ConversionCache.getElement(elementKey(intactObject));
  if (cvType != null) {
    return cvType;
  }
  cvType = newCvInstance(psiCvClass);
  // Set id, annotations, xrefs and aliases
  PsiConverterUtils.populateNames(intactObject, cvType, aliasConverter);
  PsiConverterUtils.populateXref(intactObject, cvType, xrefConverter);
  AnnotationConverterConfig configAnnotation = ConverterContext.getInstance().getAnnotationConfig();
  Collection<Annotation> annotations;
  if (annotationConverter.isCheckInitializedCollections()){
    annotations = IntactCore.ensureInitializedAnnotations(intactObject);
  }
  else {
    annotations = intactObject.getAnnotations();
  }
  for ( Annotation annotation : annotations ) {
    if (!configAnnotation.isExcluded(annotation.getCvTopic())) {
      Attribute attribute = annotationConverter.intactToPsi( annotation );
      if (!cvType.getAttributes().contains( attribute )) {
        cvType.getAttributes().add( attribute );
      }
    }
  }
  ConversionCache.putElement(elementKey(intactObject), cvType);
  intactEndConversion(intactObject);
  return cvType;
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

Collection<Annotation> annotations = IntactCore.ensureInitializedAnnotations(ao);
origin: uk.ac.ebi.intact.core/intact-core

Collection<Annotation> annotations = IntactCore.ensureInitializedAnnotations(ao);
uk.ac.ebi.intact.core.persisterIntactCoreensureInitializedAnnotations

Javadoc

Retrieves the annotations from an AnnotatedObject, initializing them if necessary.

Popular methods of IntactCore

  • ensureInitializedAliases
    Retrieves the aliases from an AnnotatedObject, initializing them if necessary.
  • ensureInitializedComponentConfidences
    Retrieves the confidences from a participant, initializing them if necessary. Do not set the initial
  • ensureInitializedComponentParameters
    Retrieves the parameters from a participant, initializing them if necessary. Do not set the initiali
  • ensureInitializedConfidences
    Retrieves the confidences from an interaction, initializing them if necessary. Do not set the initia
  • ensureInitializedExperimentalPreparations
    Retrieves the experimental preparations from a participant, initializing them if necessary. Do not s
  • ensureInitializedExperimentalRoles
    Retrieves the experimental roles from a participant, initializing them if necessary. Do not set the
  • ensureInitializedExperiments
    Retrieves the experiment from a publication, initializing them if necessary.
  • ensureInitializedFeatures
    Retrieves the features from a participant, initializing them if necessary. Do not set the initialize
  • ensureInitializedInteractionParameters
    Retrieves the parameters from an interaction, initializing them if necessary. Do not set the initial
  • ensureInitializedParticipantIdentificationMethods
    Retrieves the participant detection methods from a participant, initializing them if necessary. Do n
  • ensureInitializedParticipants
    Retrieves the components from an interaction, initializing them if necessary. Do not set the initial
  • ensureInitializedRanges
    Retrieves the ranges from a feature, initializing them if necessary.
  • ensureInitializedParticipants,
  • ensureInitializedRanges,
  • ensureInitializedXrefs,
  • ensureInitializedInteractions,
  • ensureInitializedLifecycleEvents,
  • ensureInitializedPreferences,
  • ensureInitializedRoles,
  • initialize,
  • initializeAnnotatedObject

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSharedPreferences (Context)
  • onRequestPermissionsResult (Fragment)
  • compareTo (BigDecimal)
  • Kernel (java.awt.image)
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now