protected ComponentConfidence cloneComponentConfidence(ComponentConfidence componentConfidence) throws IntactClonerException { if (componentConfidence == null) { throw new IllegalArgumentException("You must give a non null component confidence"); } ComponentConfidence clone = new ComponentConfidence(); clonerManager.addClone(componentConfidence, clone); clone.setValue(componentConfidence.getValue()); clone.setComponent(clone(componentConfidence.getComponent())); clone.setCvConfidenceType(clone(componentConfidence.getCvConfidenceType())); return clone; }
protected ComponentConfidence cloneComponentConfidence(ComponentConfidence componentConfidence) throws IntactClonerException { if (componentConfidence == null) { throw new IllegalArgumentException("You must give a non null component confidence"); } ComponentConfidence clone = new ComponentConfidence(); clonerManager.addClone(componentConfidence, clone); clone.setValue(componentConfidence.getValue()); clone.setComponent(clone(componentConfidence.getComponent())); clone.setCvConfidenceType(clone(componentConfidence.getCvConfidenceType())); return clone; }
private Collection<ComponentConfidence> synchronizeComponentConfidences( Collection<ComponentConfidence> confidencesToSynchronize, Component parentComponent ) { List<ComponentConfidence> confidences = new ArrayList<ComponentConfidence>(confidencesToSynchronize.size()); for ( ComponentConfidence confidence : confidencesToSynchronize ) { if (confidence.getAc() != null && IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getComponentConfidenceDao().isTransient(confidence)) { confidence = IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getComponentConfidenceDao().getByAc(confidence.getAc()); } confidence.setCvConfidenceType( synchronize (confidence.getCvConfidenceType())); confidence.setComponent(parentComponent); confidences.add(confidence); } return confidences; }
private Collection<ComponentConfidence> synchronizeComponentConfidences( Collection<ComponentConfidence> confidencesToSynchronize, Component parentComponent ) { List<ComponentConfidence> confidences = new ArrayList<ComponentConfidence>(confidencesToSynchronize.size()); for ( ComponentConfidence confidence : confidencesToSynchronize ) { if (confidence.getAc() != null && IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getComponentConfidenceDao().isTransient(confidence)) { confidence = IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getComponentConfidenceDao().getByAc(confidence.getAc()); } confidence.setCvConfidenceType( synchronize (confidence.getCvConfidenceType())); confidence.setComponent(parentComponent); confidences.add(confidence); } return confidences; }
cvConfType.setOwner(confConverter.getInstitution()); cvConfType.setShortLabel(AUTHOR_SCORE); confidence.setCvConfidenceType( cvConfType);