/*************************/ public TreeComplexComponents(InteractionImpl c, ComplexSolrEnricher enricher) { complex = c ; complexSons = new ArrayList(); for ( Component component : complex.getComponents() ) { complexSons.add ( new TreeComponents ( component, enricher ) ); } }
@Override public String toString() { String result = "Interaction: " + getAc() + " Label: " + getShortLabel() + " [" + NEW_LINE; if ( null != this.getComponents() ) { for ( Iterator iter = this.getComponents().iterator(); iter.hasNext(); ) { result += ( ( Component ) iter.next() ).getInteractor(); } } return result + "] Interaction" + NEW_LINE; } } // end Interaction
@Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("Interaction: ").append(getAc()).append(" Label: ").append(getShortLabel()).append(" [").append(NEW_LINE); if (IntactCore.isInitialized(getComponents())) { if ( null != this.getComponents() ) { for ( Object o : this.getComponents() ) { sb.append(( ( Component ) o ).getInteractor()); } } } else { sb.append("Components not initialized"); } sb.append("] Interaction").append(NEW_LINE); return sb.toString(); } } // end Interaction
@Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("Interaction: ").append(getAc()).append(" Label: ").append(getShortLabel()).append(" [").append(NEW_LINE); if (IntactCore.isInitialized(getComponents())) { if ( null != this.getComponents() ) { for ( Object o : this.getComponents() ) { sb.append(( ( Component ) o ).getInteractor()); } } } else { sb.append("Components not initialized"); } sb.append("] Interaction").append(NEW_LINE); return sb.toString(); } } // end Interaction
/*******************************/ public TreeNode( Component component_param, ComplexSolrEnricher enricher) { component = component_param ; this.enricher = enricher; if ( component.getInteractor() instanceof InteractionImpl ) { sons = new ArrayList(); for ( Component comp : ((InteractionImpl) component.getInteractor()).getComponents() ) { TreeComponents tree = null ; if ( ! map.containsKey ( comp.getAc() ) ) { tree = new TreeComponents ( comp, enricher ) ; map.put ( comp.getAc(), tree ) ; } else { tree = map.get ( comp.getAc() ) ; } sons.add ( tree ) ; } } else { sons = null ; } }
i++; Collection components = interaction.getComponents();
return CollectionUtils.isEqualCollection( getComponents(), interaction.getComponents() );