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

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

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

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

public static boolean containSameAliases(AnnotatedObject ao1, AnnotatedObject ao2) {
  return areCollectionEqual(IntactCore.ensureInitializedAliases(ao1), IntactCore.ensureInitializedXrefs(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

Collection<Component> initializedComponents1 = IntactCore.ensureInitializedParticipants(this);
Collection<Component> initializedComponents2 = IntactCore.ensureInitializedParticipants(interaction);
Collection<Confidence> initializedConfidence1 = IntactCore.ensureInitializedConfidences(this);
Collection<Confidence> initializedConfidence2 = IntactCore.ensureInitializedConfidences(interaction);
Collection<InteractionParameter> initializedParameter1 = IntactCore.ensureInitializedInteractionParameters(this);
Collection<InteractionParameter> initializedParameter2 = IntactCore.ensureInitializedInteractionParameters(interaction);
if (!CollectionUtils.isEqualCollection( initializedParameter1, initializedParameter2)){
  return false;
origin: uk.ac.ebi.intact.core/intact-core-readonly

Collection<ComponentParameter> parameters = IntactCore.ensureInitializedComponentParameters(component);
Collection<Feature> features = IntactCore.ensureInitializedFeatures(component);
Collection<CvExperimentalPreparation> expPreps = IntactCore.ensureInitializedExperimentalPreparations(component);
Collection<CvIdentification> partDet = IntactCore.ensureInitializedParticipantIdentificationMethods(component);
Collection<CvExperimentalRole> roles = IntactCore.ensureInitializedExperimentalRoles(component);
Collection<ComponentConfidence> confidences = IntactCore.ensureInitializedComponentConfidences(component);
origin: uk.ac.ebi.intact.dataexchange.psimi/intact-psixml-converters

experiments = IntactCore.ensureInitializedExperiments(intactObject);
components = IntactCore.ensureInitializedParticipants(intactObject);
confidences = IntactCore.ensureInitializedConfidences(intactObject);
parameters = IntactCore.ensureInitializedInteractionParameters(intactObject);
annotations = IntactCore.ensureInitializedAnnotations(intactObject);
  features = IntactCore.ensureInitializedFeatures(comp);
origin: uk.ac.ebi.intact.core/intact-core

Collection<Component> components = IntactCore.ensureInitializedParticipants(interaction);
Collection<Experiment> experiments = IntactCore.ensureInitializedExperiments(interaction);
Collection<Confidence> confidences = IntactCore.ensureInitializedConfidences(interaction);
Collection<InteractionParameter> parameters = IntactCore.ensureInitializedInteractionParameters(interaction);
origin: uk.ac.ebi.intact.dataexchange.psimi/intact-psixml-converters

protected void failIfInconsistentConversion(Interaction intact, psidev.psi.mi.xml.model.Interaction psi, int numberOfAuthorConfAttributes) {
  Collection<Experiment> experiments;
  Collection<Component> participants;
  Collection<Confidence> confidences;
  if (isCheckInitializedCollections()){
    experiments = IntactCore.ensureInitializedExperiments(intact);
    participants = IntactCore.ensureInitializedParticipants(intact);
    confidences = IntactCore.ensureInitializedConfidences(intact);
  }
  else {
    experiments = intact.getExperiments();
    participants = intact.getComponents();
    confidences = intact.getConfidences();
  }
  failIfInconsistentCollectionSize("experiment", experiments, psi.getExperiments());
  failIfInconsistentCollectionSize("participant", participants, psi.getParticipants());
  Collection<Confidence> confs = confidences;
  if (confs.size() > 0 && psi.getConfidences().size() + numberOfAuthorConfAttributes > 0 && confs.size() != (psi.getConfidences().size() + numberOfAuthorConfAttributes)) {
    throw new InconsistentConversionException("Confidence", confs.size(), psi.getConfidences().size() + numberOfAuthorConfAttributes);
  }
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

Collection<Annotation> annotations = IntactCore.ensureInitializedAnnotations(ao);
Collection<? extends Alias> aliases = IntactCore.ensureInitializedAliases(ao);
Collection<? extends Xref> refs = IntactCore.ensureInitializedXrefs(ao);
origin: uk.ac.ebi.intact.core/intact-core

public Publication clonePublication(Publication publication) throws IntactClonerException {
  if (publication == null) return null;
  Publication clone = new Publication();
  clonerManager.addClone(publication, clone);
  if (isCollectionClonable(publication.getExperiments())) {
    Collection<Experiment> experiments = IntactCore.ensureInitializedExperiments(publication);
    for (Experiment e : experiments) {
      clone.addExperiment(clone(e));
    }
  }
  if (isCollectionClonable(publication.getLifecycleEvents())) {
    Collection<LifecycleEvent> events = IntactCore.ensureInitializedLifecycleEvents(publication);
    for (LifecycleEvent event : events) {
      clone.addLifecycleEvent(clone(event));
    }
  }
  clone.setStatus(clone(publication.getStatus()));
  clone.setCurrentOwner(clone(publication.getCurrentOwner()));
  clone.setCurrentReviewer(clone(publication.getCurrentReviewer()));
  return clone;
}
origin: uk.ac.ebi.intact.dataexchange.psimi/intact-psixml-converters

protected static void populateNames( AnnotatedObject<?, ?> annotatedObject, NamesContainer namesContainer ) {
  Names names = namesContainer.getNames();
  if ( names == null ) {
    names = new Names();
  }
  String shortLabel = annotatedObject.getShortLabel();
  String fullName = annotatedObject.getFullName();
  names.setShortLabel( shortLabel );
  names.setFullName( fullName );
  if ( !ConverterContext.getInstance().getInteractorConfig().isExcludeInteractorAliases() ) {
    AliasConverter aliasConverter = new AliasConverter( annotatedObject.getOwner(),
        AnnotatedObjectUtils.getAliasClassType( annotatedObject.getClass() ) );
    for ( Alias alias : IntactCore.ensureInitializedAliases(annotatedObject)) {
      names.getAliases().add( aliasConverter.intactToPsi( alias ) );
    }
  }
  namesContainer.setNames( names );
}
origin: uk.ac.ebi.intact.core/intact-core

/**
 * Convenience method to get the experiments - delegates the logic to the interactions
 *
 * @return Experiments
 */
public Collection<Experiment> getExperiments() {
  if (experiments != null) {
    return experiments.keySet();
  }
  else if (!experimentsList.isEmpty()){
    return experimentsList;
  }
  experiments = new IdentityMap();
  for (Interaction interaction : getInteractions()) {
    for (Experiment experiment : IntactCore.ensureInitializedExperiments(interaction)) {
      experiments.put(experiment, null);
    }
  }
  return experiments.keySet();
}
origin: uk.ac.ebi.intact.core/intact-core

Collection<ComponentParameter> parameters = IntactCore.ensureInitializedComponentParameters(component);
Collection<Feature> features = IntactCore.ensureInitializedFeatures(component);
Collection<CvExperimentalPreparation> expPreps = IntactCore.ensureInitializedExperimentalPreparations(component);
Collection<CvIdentification> partDet = IntactCore.ensureInitializedParticipantIdentificationMethods(component);
Collection<CvExperimentalRole> roles = IntactCore.ensureInitializedExperimentalRoles(component);
Collection<ComponentConfidence> confidences = IntactCore.ensureInitializedComponentConfidences(component);
origin: uk.ac.ebi.intact.core/intact-core-readonly

Collection<Component> components = IntactCore.ensureInitializedParticipants(interaction);
Collection<Experiment> experiments = IntactCore.ensureInitializedExperiments(interaction);
Collection<Confidence> confidences = IntactCore.ensureInitializedConfidences(interaction);
Collection<InteractionParameter> parameters = IntactCore.ensureInitializedInteractionParameters(interaction);
origin: uk.ac.ebi.intact.dataexchange.psimi/intact-psixml-converters

protected void failIfInconsistentPsiConversion(Interaction intact, psidev.psi.mi.xml.model.Interaction psi) {
  Collection<Experiment> experiments;
  Collection<Component> participants;
  Collection<Confidence> confidences;
  if (isCheckInitializedCollections()){
    experiments = IntactCore.ensureInitializedExperiments(intact);
    participants = IntactCore.ensureInitializedParticipants(intact);
    confidences = IntactCore.ensureInitializedConfidences(intact);
  }
  else {
    experiments = intact.getExperiments();
    participants = intact.getComponents();
    confidences = intact.getConfidences();
  }
  failIfInconsistentCollectionSize("experiment", experiments, psi.getExperiments());
  failIfInconsistentCollectionSize("participant", participants, psi.getParticipants());
  Collection<Confidence> confs = confidences;
  if (confs.size() > 0 && psi.getConfidences().size() > 0 && (confs.size()) != psi.getConfidences().size()) {
    throw new InconsistentConversionException("Confidence", confs.size(), psi.getConfidences().size());
  }
}
origin: uk.ac.ebi.intact.core/intact-core

Collection<Annotation> annotations = IntactCore.ensureInitializedAnnotations(ao);
Collection<? extends Alias> aliases = IntactCore.ensureInitializedAliases(ao);
Collection<? extends Xref> refs = IntactCore.ensureInitializedXrefs(ao);
origin: uk.ac.ebi.intact.core/intact-core-readonly

public Publication clonePublication(Publication publication) throws IntactClonerException {
  if (publication == null) return null;
  Publication clone = new Publication();
  clonerManager.addClone(publication, clone);
  if (isCollectionClonable(publication.getExperiments())) {
    Collection<Experiment> experiments = IntactCore.ensureInitializedExperiments(publication);
    for (Experiment e : experiments) {
      clone.addExperiment(clone(e));
    }
  }
  if (isCollectionClonable(publication.getLifecycleEvents())) {
    Collection<LifecycleEvent> events = IntactCore.ensureInitializedLifecycleEvents(publication);
    for (LifecycleEvent event : events) {
      clone.addLifecycleEvent(clone(event));
    }
  }
  clone.setStatus(clone(publication.getStatus()));
  clone.setCurrentOwner(clone(publication.getCurrentOwner()));
  clone.setCurrentReviewer(clone(publication.getCurrentReviewer()));
  return clone;
}
origin: uk.ac.ebi.intact.dataexchange.psimi/intact-psixml-converters

public static void populateNames( AnnotatedObject<?, ?> annotatedObject, NamesContainer namesContainer, AliasConverter aliasConverter ) {
  Names names = namesContainer.getNames();
  if ( names == null ) {
    names = new Names();
  }
  String shortLabel = annotatedObject.getShortLabel();
  String fullName = annotatedObject.getFullName();
  names.setShortLabel( shortLabel );
  names.setFullName( fullName );
  if ( !ConverterContext.getInstance().getInteractorConfig().isExcludeInteractorAliases() ) {
    Collection<? extends Alias> aliases;
    if (aliasConverter.isCheckInitializedCollections()){
      aliases = IntactCore.ensureInitializedAliases(annotatedObject);
    }
    else {
      aliases = annotatedObject.getAliases();
    }
    for ( Alias alias : aliases) {
      names.getAliases().add( aliasConverter.intactToPsi( alias ) );
    }
  }
  namesContainer.setNames( names );
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

/**
 * Convenience method to get the experiments - delegates the logic to the interactions
 *
 * @return Experiments
 */
public Collection<Experiment> getExperiments() {
  if (experiments != null) {
    return experiments.keySet();
  }
  else if (!experimentsList.isEmpty()){
    return experimentsList;
  }
  experiments = new IdentityMap();
  for (Interaction interaction : getInteractions()) {
    for (Experiment experiment : IntactCore.ensureInitializedExperiments(interaction)) {
      experiments.put(experiment, null);
    }
  }
  return experiments.keySet();
}
origin: uk.ac.ebi.intact.dataexchange.psimi/intact-psixml-converters

experimentalRoles = IntactCore.ensureInitializedExperimentalRoles(intactObject);
partIdentMethods = IntactCore.ensureInitializedParticipantIdentificationMethods(intactObject);
expPreparations = IntactCore.ensureInitializedExperimentalPreparations(intactObject);
features = IntactCore.ensureInitializedFeatures(intactObject);
confs = IntactCore.ensureInitializedComponentConfidences(intactObject);
params = IntactCore.ensureInitializedComponentParameters(intactObject);
origin: uk.ac.ebi.intact.dataexchange.psimi/intact-psixml-converters

protected void failIfInconsistentConversion(Interaction intact, psidev.psi.mi.xml.model.Interaction psi) {
  Collection<Experiment> experiments;
  Collection<Component> participants;
  Collection<Confidence> confidences;
  if (isCheckInitializedCollections()){
    experiments = IntactCore.ensureInitializedExperiments(intact);
    participants = IntactCore.ensureInitializedParticipants(intact);
    confidences = IntactCore.ensureInitializedConfidences(intact);
  }
  else {
    experiments = intact.getExperiments();
    participants = intact.getComponents();
    confidences = intact.getConfidences();
  }
  failIfInconsistentCollectionSize("experiment", experiments, psi.getExperiments());
  failIfInconsistentCollectionSize("participant", participants, psi.getParticipants());
  failIfInconsistentCollectionSize( "confidence", confidences, psi.getConfidences());
}
uk.ac.ebi.intact.core.persisterIntactCore

Javadoc

Global persistence utilities, based on the philosophy of the org.hibernate.Hibernate class.

Most used methods

  • ensureInitializedAliases
    Retrieves the aliases from an AnnotatedObject, initializing them if necessary.
  • ensureInitializedAnnotations
    Retrieves the annotations 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
  • ensureInitializedParticipantIdentificationMethods,
  • ensureInitializedParticipants,
  • ensureInitializedRanges,
  • ensureInitializedXrefs,
  • ensureInitializedInteractions,
  • ensureInitializedLifecycleEvents,
  • ensureInitializedPreferences,
  • ensureInitializedRoles,
  • initialize,
  • initializeAnnotatedObject

Popular in Java

  • Reactive rest calls using spring rest template
  • requestLocationUpdates (LocationManager)
  • getResourceAsStream (ClassLoader)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Kernel (java.awt.image)
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Top PhpStorm plugins
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