protected Key keyForComponent(Component component) { final String cacheKey = Component.class.getSimpleName() + ":" + System.identityHashCode(component); Key interactionKey = null; if (!keyCache.containsKey(cacheKey)) { if (component.getInteraction() == null) { throw new IllegalArgumentException("Cannot generate a key for a component without interaction: " + component); } interactionKey = keyForInteraction(component.getInteraction()); } if (keyCache.containsKey(cacheKey)) { return keyCache.get(cacheKey); } if (interactionKey != null) { Key compKey = new Key(interactionKey.getUniqueString() + ":" + component.getShortLabel() + "[" + component.hashCode() + "]"); keyCache.put(cacheKey, compKey); return compKey; } throw new IllegalStateException("This component should already have already a key, generated when the interaction key is generated: " + component); }
protected Key keyForComponent(Component component) { final String cacheKey = Component.class.getSimpleName() + ":" + System.identityHashCode(component); Key interactionKey = null; if (!keyCache.containsKey(cacheKey)) { if (component.getInteraction() == null) { throw new IllegalArgumentException("Cannot generate a key for a component without interaction: " + component); } interactionKey = keyForInteraction(component.getInteraction()); } if (keyCache.containsKey(cacheKey)) { return keyCache.get(cacheKey); } if (interactionKey != null) { Key compKey = new Key(interactionKey.getUniqueString() + ":" + component.getShortLabel() + "[" + component.hashCode() + "]"); keyCache.put(cacheKey, compKey); return compKey; } throw new IllegalStateException("This component should already have already a key, generated when the interaction key is generated: " + component); }
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; }
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; }
log.error("Participant without interactor : " + component.getShortLabel()); log.warn("Participant with " + participant.getExperimentalInteractors().size() + " experimental interactors : " + component.getShortLabel() + ". We do not export them in Intact");
log.error("Component without experimental roles : " + intactObject.getShortLabel()); log.error("Component with "+experimentalRoles.size()+" experimental roles : " + intactObject.getShortLabel()); log.error("Component without interactor " + intactObject.getShortLabel());