public void calculateCrc() { CrcCalculator crcCalculator = new CrcCalculator(); Instant before = new Instant(); String newCrc = crcCalculator.crc64(this); if (crc == null){ crc = newCrc; } else if (!crc.equals(newCrc)){ crc = newCrc; } Instant after = new Instant(); if (log.isDebugEnabled()) log.debug("Calculated crc for interaction '" + getShortLabel() + "' in " + new Duration(before, after).getMillis() + "ms: " + crc); }
@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 void calculateCrc() { CrcCalculator crcCalculator = new CrcCalculator(); Instant before = new Instant(); String newCrc = crcCalculator.crc64(this); if (crc == null){ crc = newCrc; } else if (!crc.equals(newCrc)){ crc = newCrc; } Instant after = new Instant(); if (log.isDebugEnabled()) log.debug("Calculated crc for interaction '" + getShortLabel() + "' in " + new Duration(before, after).getMillis() + "ms: " + crc); }
public static String getName(InteractionImpl complex) { String name = getRecommendedName(complex); if (name != null) return name; name = getSystematicName(complex); if (name != null) return name; List<String> synonyms = getSynonyms(complex); if (! synonyms.isEmpty()) return synonyms.get(0); name = getFirstAlias(complex); if (name != null) return name; return complex.getShortLabel(); }
@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() { 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
public static String getName(InteractionImpl complex) { String name = getRecommendedName(complex); if (name != null) return name; name = getSystematicName(complex); if (name != null) return name; List<String> synonyms = getSynonyms(complex); if (! synonyms.isEmpty()) return synonyms.get(0); name = getFirstAlias(complex); if (name != null) return name; return complex.getShortLabel(); }
/** * Update the shortlabel based on the data available in the database. */ public void synchronizeShortLabel() { if( IntactContext.currentInstanceExists() ) { if( IntactContext.getCurrentInstance().getConfig().isAutoUpdateInteractionLabel() ) { String shortLabel = getShortLabel(); String newShortLabel = InteractionUtils.syncShortLabelWithDb(shortLabel); if (!shortLabel.equals(newShortLabel)) { if (log.isDebugEnabled()) log.debug("Interaction with label '"+shortLabel+"' renamed '"+newShortLabel+"'" ); setShortLabel(newShortLabel); } } } else { log.warn( "There is no IntAct Context initialized, skipping interaction shortlabel synchronization." ); } }
/** * Update the shortlabel based on the data available in the database. */ public void synchronizeShortLabel() { if( IntactContext.currentInstanceExists() ) { if( IntactContext.getCurrentInstance().getConfig().isAutoUpdateInteractionLabel() ) { String shortLabel = getShortLabel(); String newShortLabel = InteractionUtils.syncShortLabelWithDb(shortLabel); if (!shortLabel.equals(newShortLabel)) { if (log.isDebugEnabled()) log.debug("Interaction with label '"+shortLabel+"' renamed '"+newShortLabel+"'" ); setShortLabel(newShortLabel); } } } else { log.warn( "There is no IntAct Context initialized, skipping interaction shortlabel synchronization." ); } }
solrDocument.addField ( ComplexFieldNames.COMPLEX_ALIAS, complex.getShortLabel ( ) ) ; solrDocument.addField(ComplexFieldNames.COMPLEX_NAME, complex.getShortLabel());