本文整理了Java中uk.ac.ebi.intact.model.Interaction.getConfidences()
方法的一些代码示例,展示了Interaction.getConfidences()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Interaction.getConfidences()
方法的具体详情如下:
包路径:uk.ac.ebi.intact.model.Interaction
类名称:Interaction
方法名:getConfidences
暂无
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core
/**
* Retrieves the confidences from an interaction, initializing them if necessary.
* Do not set the initialized collection of confidences because confidences cannot be orphan
* @param interaction the interaction
* @return The returned confidences are ensured to be initialized
* @since 2.4.0
*/
public static Collection<Confidence> ensureInitializedConfidences(Interaction interaction) {
Collection<Confidence> confidences;
if (IntactCore.isInitialized(interaction.getConfidences())) {
confidences = interaction.getConfidences();
} else {
confidences = IntactContext.getCurrentInstance().getDaoFactory().getConfidenceDao().getByInteractionAc(interaction.getAc());
}
return confidences;
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core-readonly
/**
* Retrieves the confidences from an interaction, initializing them if necessary.
* Do not set the initialized collection of confidences because confidences cannot be orphan
* @param interaction the interaction
* @return The returned confidences are ensured to be initialized
* @since 2.4.0
*/
public static Collection<Confidence> ensureInitializedConfidences(Interaction interaction) {
Collection<Confidence> confidences;
if (IntactCore.isInitialized(interaction.getConfidences())) {
confidences = interaction.getConfidences();
} else {
confidences = IntactContext.getCurrentInstance().getDaoFactory().getConfidenceDao().getByInteractionAc(interaction.getAc());
}
return confidences;
}
代码示例来源:origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion
confidences = ((Interaction)annotatedObject).getConfidences();
代码示例来源: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.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-readonly
private void synchronizeInteraction( Interaction interaction, boolean synchronizeAnnotatedAttributes ) {
interaction.setCvInteractionType( synchronize( interaction.getCvInteractionType() ) );
interaction.setCvInteractorType( synchronize( interaction.getCvInteractorType() ) );
if (IntactCore.isInitializedAndDirty(interaction.getComponents())){
Collection<Component> components = synchronizeCollection(interaction.getComponents());
interaction.getComponents().clear();
interaction.getComponents().addAll(components);
}
interaction.setBioSource( synchronize( interaction.getBioSource() ) );
if (IntactCore.isInitializedAndDirty(interaction.getExperiments())){
Collection<Experiment> experiment = synchronizeCollection(interaction.getExperiments());
interaction.getExperiments().clear();
interaction.getExperiments().addAll(experiment);
}
// cannot call setConfidences in interaction because of orphan relationship limitation
if (IntactCore.isInitializedAndDirty(interaction.getConfidences())){
Collection<Confidence> confidences = synchronizeConfidences(interaction.getConfidences(), interaction);
interaction.getConfidences().clear();
interaction.getConfidences().addAll(confidences);
}
// cannot call setParameters in interaction because of orphan relationship limitation
if (IntactCore.isInitializedAndDirty(interaction.getParameters())){
Collection<InteractionParameter> interactionParameters = synchronizeInteractionParameters(interaction.getParameters(), interaction);
interaction.getParameters().clear();
interaction.getParameters().addAll(interactionParameters);
}
if (synchronizeAnnotatedAttributes){
synchronizeAnnotatedObjectCommons( interaction );
}
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core
private void synchronizeInteraction( Interaction interaction, boolean synchronizeAnnotatedAttributes ) {
interaction.setCvInteractionType( synchronize( interaction.getCvInteractionType() ) );
interaction.setCvInteractorType( synchronize( interaction.getCvInteractorType() ) );
if (IntactCore.isInitializedAndDirty(interaction.getComponents())){
Collection<Component> components = synchronizeCollection(interaction.getComponents());
interaction.getComponents().clear();
interaction.getComponents().addAll(components);
}
interaction.setBioSource( synchronize( interaction.getBioSource() ) );
if (IntactCore.isInitializedAndDirty(interaction.getExperiments())){
Collection<Experiment> experiment = synchronizeCollection(interaction.getExperiments());
interaction.getExperiments().clear();
interaction.getExperiments().addAll(experiment);
}
// cannot call setConfidences in interaction because of orphan relationship limitation
if (IntactCore.isInitializedAndDirty(interaction.getConfidences())){
Collection<Confidence> confidences = synchronizeConfidences(interaction.getConfidences(), interaction);
interaction.getConfidences().clear();
interaction.getConfidences().addAll(confidences);
}
// cannot call setParameters in interaction because of orphan relationship limitation
if (IntactCore.isInitializedAndDirty(interaction.getParameters())){
Collection<InteractionParameter> interactionParameters = synchronizeInteractionParameters(interaction.getParameters(), interaction);
interaction.getParameters().clear();
interaction.getParameters().addAll(interactionParameters);
}
if (synchronizeAnnotatedAttributes){
synchronizeAnnotatedObjectCommons( interaction );
}
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core-readonly
protected void copyInteraction( Interaction source, Interaction target ) {
copyProperty(source, "KD", target);
copyProperty(source, "crc", target);
copyProperty(source, "cvInteractionType", target);
copyCollection( source.getComponents(), target.getComponents() );
copyCollection( source.getExperiments(), target.getExperiments() );
copyCollection( source.getConfidences(), target.getConfidences() );
copyCollection( source.getParameters(), target.getParameters() );
copyInteractorCommons( source, target );
// we have ommited CRC on purpose
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core
protected void copyInteraction( Interaction source, Interaction target ) {
copyProperty(source, "KD", target);
copyProperty(source, "crc", target);
copyProperty(source, "cvInteractionType", target);
copyCollection( source.getComponents(), target.getComponents() );
copyCollection( source.getExperiments(), target.getExperiments() );
copyCollection( source.getConfidences(), target.getConfidences() );
copyCollection( source.getParameters(), target.getParameters() );
copyInteractorCommons( source, target );
// we have ommited CRC on purpose
}
代码示例来源:origin: uk.ac.ebi.intact.dataexchange.psimi/intact-psimitab-converters
if (!interaction.getConfidences().isEmpty()){
for (uk.ac.ebi.intact.model.Confidence conf : interaction.getConfidences()){
Confidence confField = confidenceConverter.intactToCalimocho(conf);
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core
protected void traverseInteraction(Interaction interaction, IntactVisitor ... visitors) {
if (interaction == null) return;
for (IntactVisitor visitor : visitors) {
visitor.visitInteraction(interaction);
}
// check if this element has been traversed already, to avoid cyclic recursion
if (recursionChecker.isAlreadyTraversed(interaction)) {
return;
}
traverse(interaction.getCvInteractionType(), visitors);
traverse(interaction.getExperiments(), visitors);
traverse(interaction.getComponents(), visitors);
traverse(interaction.getConfidences(), visitors);
traverse(interaction.getParameters(), visitors);
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core-readonly
protected void traverseInteraction(Interaction interaction, IntactVisitor ... visitors) {
if (interaction == null) return;
for (IntactVisitor visitor : visitors) {
visitor.visitInteraction(interaction);
}
// check if this element has been traversed already, to avoid cyclic recursion
if (recursionChecker.isAlreadyTraversed(interaction)) {
return;
}
traverse(interaction.getCvInteractionType(), visitors);
traverse(interaction.getExperiments(), visitors);
traverse(interaction.getComponents(), visitors);
traverse(interaction.getConfidences(), visitors);
traverse(interaction.getParameters(), visitors);
}
代码示例来源:origin: uk.ac.ebi.intact.dataexchange.psimi/intact-psixml-converters
experiments = intactObject.getExperiments();
components = intactObject.getComponents();
confidences = intactObject.getConfidences();
parameters = intactObject.getParameters();
annotations = intactObject.getAnnotations();
代码示例来源: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());
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core
clone.setCrc(interaction.getCrc());
if (isCollectionClonable(interaction.getConfidences())) {
Collection<Confidence> confidences = IntactCore.ensureInitializedConfidences(interaction);
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core-readonly
clone.setCrc(interaction.getCrc());
if (isCollectionClonable(interaction.getConfidences())) {
Collection<Confidence> confidences = IntactCore.ensureInitializedConfidences(interaction);
内容来源于网络,如有侵权,请联系作者删除!