@Override
	protected boolean semanticallyEquivalent(BioPAXElement element) {
		if(! (element instanceof Evidence) ) return false;
		Evidence that = (Evidence) element; // not null (guaranteed by here)
		boolean hasAllEquivEvidenceCodes = false;
		
		if(this.getEvidenceCode().isEmpty()) {
			if(that.getEvidenceCode().isEmpty()) {
				hasAllEquivEvidenceCodes = true;
			}
		} else {
			if(!that.getEvidenceCode().isEmpty()) {
				Set<EvidenceCodeVocabulary> shorter;
				Set<EvidenceCodeVocabulary> longer;
				if (this.getEvidenceCode().size() < that.getEvidenceCode().size())
				{
					shorter = this.getEvidenceCode();
					longer  = that.getEvidenceCode();
				} else {
					longer = this.getEvidenceCode();
					shorter  = that.getEvidenceCode();
				}
				
				/* each ECV in the 'shorter' set must find its equivalent
				 * in the 'longer' set; 
				 * otherwise two Evidence objects (this and that) are not equiv.
				 */
				hasAllEquivEvidenceCodes = true; // initial guess
				for(EvidenceCodeVocabulary secv : shorter) {
					boolean foundEquiv = false;
					for(EvidenceCodeVocabulary lecv : longer) {
						if(secv.isEquivalent(lecv)) {
							foundEquiv = true;
						}
					}
					if(!foundEquiv) {
						hasAllEquivEvidenceCodes = false;
						break;
					}
				}
			}
		}
		
		//consider publication xrefs!
		boolean hasCommonPublicationXref = hasEquivalentIntersection(
				new ClassFilterSet<Xref, PublicationXref>(getXref(), PublicationXref.class),
				new ClassFilterSet<Xref, PublicationXref>(that.getXref(), PublicationXref.class));
		
		return super.semanticallyEquivalent(element) && hasAllEquivEvidenceCodes && hasCommonPublicationXref;
	}
@ Override protected boolean semanticallyEquivalent ( BioPAXElement element ) { if ( ! ( element instanceof Evidence ) ) return false ; Evidence that = ( Evidence ) element ; boolean hasAllEquivEvidenceCodes = false ; if ( this . getEvidenceCode ( ) . isEmpty ( ) ) { if ( that . getEvidenceCode ( ) . isEmpty ( ) ) { hasAllEquivEvidenceCodes = true ; } } else { if ( ! that . getEvidenceCode ( ) . isEmpty ( ) ) { Set < EvidenceCodeVocabulary > shorter ; Set < EvidenceCodeVocabulary > longer ; if ( this . getEvidenceCode ( ) . size ( ) < that . getEvidenceCode ( ) . size ( ) ) { shorter = this . getEvidenceCode ( ) ; longer = that . getEvidenceCode ( ) ; } else { longer = this . getEvidenceCode ( ) ; shorter = that . getEvidenceCode ( ) ; } hasAllEquivEvidenceCodes = true ; for ( EvidenceCodeVocabulary secv : shorter ) { boolean foundEquiv = false ; for ( EvidenceCodeVocabulary lecv : longer ) { if ( secv . isEquivalent ( lecv ) ) { foundEquiv = true ; } } if ( ! foundEquiv ) { hasAllEquivEvidenceCodes = false ; break ; } } } } boolean hasCommonPublicationXref = hasEquivalentIntersection ( new ClassFilterSet < Xref , PublicationXref > ( getXref ( ) , PublicationXref . class ) , new ClassFilterSet < Xref , PublicationXref > ( that . getXref ( ) , PublicationXref . class ) ) ; return super . semanticallyEquivalent ( element ) && hasAllEquivEvidenceCodes && hasCommonPublicationXref ; }
Answers whether two Evidence objects are semantically equivalent.
(Currently, it considers only member UnificationXrefs and EvidenceCodeVocabularies
for comparison...)

TODO: review; compare ExperimentalForm and Confidence values; or - simply always return false!