本文整理了Java中uk.ac.ebi.intact.model.Interaction.getComponents()
方法的一些代码示例,展示了Interaction.getComponents()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Interaction.getComponents()
方法的具体详情如下:
包路径:uk.ac.ebi.intact.model.Interaction
类名称:Interaction
方法名:getComponents
暂无
代码示例来源:origin: uk.ac.ebi.intact.dataexchange.psimi/intact-psimitab-converters
protected boolean isExpandableBasic(Interaction interaction) {
if (interaction.getComponents().isEmpty()) {
return false;
}
return true;
}
代码示例来源:origin: uk.ac.ebi.intact.dataexchange.psimi/intact-psimitab-converters
public boolean isExpandable(Interaction interaction) {
if ( interaction.getComponents().size() > 2 || interaction.getComponents().size() == 0 ) {
return false;
}
return true;
}
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core
/**
* Collect a distinct set of Interactor associated to the given Interaction.
*
* @param interaction the interaction
* @return a non null Set of Interactor.
*/
public static Set<Interactor> selectDistinctInteractors(Interaction interaction) {
Set<Interactor> interactors = new HashSet<Interactor>(interaction.getComponents().size());
for (Component component : interaction.getComponents()) {
interactors.add(component.getInteractor());
}
return interactors;
}
代码示例来源:origin: uk.ac.ebi.intact/intact-core
/**
* Collect a distinct set of Interactor associated to the given Interaction.
*
* @param interaction the interaction
* @return a non null Set of Interactor.
*/
public static Set<Interactor> selectDistinctInteractors( Interaction interaction ) {
Set<Interactor> interactors = new HashSet<Interactor>( interaction.getComponents().size() );
for ( Component component : interaction.getComponents() ) {
interactors.add( component.getInteractor() );
}
return interactors;
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core-readonly
/**
* Collect a distinct set of Interactor associated to the given Interaction.
*
* @param interaction the interaction
* @return a non null Set of Interactor.
*/
public static Set<Interactor> selectDistinctInteractors(Interaction interaction) {
Set<Interactor> interactors = new HashSet<Interactor>(interaction.getComponents().size());
for (Component component : interaction.getComponents()) {
interactors.add(component.getInteractor());
}
return interactors;
}
代码示例来源:origin: uk.ac.ebi.intact.sanity/intact-sanity-rules
public Collection<GeneralMessage> check(Interaction interaction) throws SanityRuleException {
Collection<GeneralMessage> messages = new ArrayList<GeneralMessage>();
Collection<Component> components = interaction.getComponents();
if(components.size() == 0){
messages.add(new GeneralMessage(MessageDefinition.INTERACTION_WITHOUT_COMPONENT, interaction));
}
return messages;
}
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core
public Component createComponentRandom() {
return createInteractionRandomBinary().getComponents().iterator().next();
}
代码示例来源:origin: uk.ac.ebi.intact/intact-core
public Component createComponentRandom() {
return createInteractionRandomBinary().getComponents().iterator().next();
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core-readonly
public Component createComponentRandom() {
return createInteractionRandomBinary().getComponents().iterator().next();
}
代码示例来源:origin: uk.ac.ebi.intact/intact-core
/**
* Checks if an interaction contain other interactor types than Protein
*
* @param interaction
* @return
*/
public static boolean containsNonProteinInteractors( Interaction interaction ) {
for ( Component component : interaction.getComponents() ) {
Interactor interactor = component.getInteractor();
if ( !( interactor instanceof ProteinImpl ) ) {
return true;
}
}
return false;
}
代码示例来源:origin: uk.ac.ebi.intact/intact-core
public Feature createFeature(String shortLabel, CvFeatureType featureType) {
Interaction interaction = createInteractionRandomBinary();
Component component = interaction.getComponents().iterator().next();
Feature feature = new Feature(getInstitution(), shortLabel, component, featureType);
return feature;
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core
public Feature createFeature(String shortLabel, CvFeatureType featureType) {
Interaction interaction = createInteractionRandomBinary();
Component component = interaction.getComponents().iterator().next();
Feature feature = new Feature(getInstitution(), shortLabel, component, featureType);
return feature;
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core-readonly
public Feature createFeature(String shortLabel, CvFeatureType featureType) {
Interaction interaction = createInteractionRandomBinary();
Component component = interaction.getComponents().iterator().next();
Feature feature = new Feature(getInstitution(), shortLabel, component, featureType);
return feature;
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-persister
protected void saveOrUpdateComponents(Interaction intactObject) throws PersisterException {
for (Component component : intactObject.getComponents()) {
ComponentPersister.getInstance().saveOrUpdate(component);
}
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-persister
protected void syncComponents(Interaction intactObject) {
ComponentPersister compPersister = ComponentPersister.getInstance();
List<Component> components = new ArrayList<Component>(intactObject.getComponents().size());
for (Component component : intactObject.getComponents()) {
Component c = compPersister.syncIfTransient(component);
c.setInteraction(intactObject);
c.setInteractor( component.getInteractor() );
components.add(c);
}
// for (Component c : components) {
// c.setInteraction(intactObject);
// }
intactObject.setComponents(components);
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core
protected Key keyForInteraction(Interaction interaction) {
final Key key = new Key(new CrcCalculator().crc64(interaction));
// pre-calculate the keys for the components here and put them in a map
int n = 0;
for (Component component : interaction.getComponents()) {
Key compKey = new Key(key.getUniqueString() + ":" + component.getShortLabel() + "[" + n + "]");
keyCache.put(Component.class.getSimpleName() + ":" + System.identityHashCode(component), compKey);
n++;
}
return key;
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core-readonly
protected Key keyForInteraction(Interaction interaction) {
final Key key = new Key(new CrcCalculator().crc64(interaction));
// pre-calculate the keys for the components here and put them in a map
int n = 0;
for (Component component : interaction.getComponents()) {
Key compKey = new Key(key.getUniqueString() + ":" + component.getShortLabel() + "[" + n + "]");
keyCache.put(Component.class.getSimpleName() + ":" + System.identityHashCode(component), compKey);
n++;
}
return key;
}
代码示例来源: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.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 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);
}
内容来源于网络,如有侵权,请联系作者删除!