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; }
@Override public boolean equals( Object o ) { return equals(o, false); }
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; }
if (conf.getCvConfidenceType() != null && IntactConverterUtils.AUTHOR_SCORE_MI.equalsIgnoreCase(conf.getCvConfidenceType().getIdentifier())){ Attribute authConf = new Attribute(IntactConverterUtils.AUTH_CONF_MI, IntactConverterUtils.AUTH_CONF, conf.getValue());
ComponentConfidence copyConfidence = ( ComponentConfidence ) confidence.clone(); copyConfidence.setComponent( copy );
@Override public ComponentConfidence newConfidenceInstance(String value) { return new ComponentConfidence(value); }
cvConfType.setOwner(confConverter.getInstitution()); cvConfType.setShortLabel(AUTHOR_SCORE); confidence.setCvConfidenceType( cvConfType);
public void addConfidence( ComponentConfidence confidence ) { if ( !this.confidences.contains( confidence ) ) { this.confidences.add( confidence ); confidence.setComponent( this); } }
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; }
ComponentConfidence copyConfidence = ( ComponentConfidence ) confidence.clone(); copyConfidence.setComponent( copy );
public void addConfidence( ComponentConfidence confidence ) { if ( !this.confidences.contains( confidence ) ) { this.confidences.add( confidence ); confidence.setComponent( this); } }
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; }
@Override public boolean equals( Object o ) { return equals(o, false); }