/** * Returns a cloned version of the current object. * * @return a cloned version of the current Experiment with following exceptions. <ul> <li>Interactions are not * cloned. The interactions for the cloned experiment is empty</li> <li>New components but with the same * proteins. The new components has the cloned interaction as their interaction.</li> </ul> * * @throws CloneNotSupportedException */ @Override public Object clone() throws CloneNotSupportedException { Experiment copy = ( Experiment ) super.clone(); // Not copying any interactions. copy.interactions = new ArrayList<Interaction>(); return copy; }
public boolean equals(Object o) { if ( this == o ) { return true; } if ( !( o instanceof Institution ) ) { return false; } if ( !super.equals( o ) ) { return false; } Institution that = (Institution) o; return true; }
AnnotatedObjectImpl copy = ( AnnotatedObjectImpl ) super.clone(); Collection<T> xrefs = getXrefs(); Collection<A> aliases = getAliases(); for ( Xref xref : getXrefs() ) { Xref xrefClone = ( Xref ) xref.clone(); xrefClone.setParent( copy ); copiedXrefs.add( xrefClone ); copy.setXrefs( copiedXrefs ); for ( Alias alias : getAliases() ) { Alias aliasClone = ( Alias ) alias.clone(); aliasClone.setParent( copy ); copiedAliases.add( ( Alias ) alias.clone() ); copy.setAliases( copiedAliases );
if ( !shortLabel.equals( annotatedObject.getShortLabel() ) ) { return false; if ( annotatedObject.getShortLabel() != null ) { return false; if ( !fullName.equals( annotatedObject.getFullName() ) ) { return false; if ( annotatedObject.getFullName() != null ) { return false; if (IntactCore.isInitialized(getXrefs()) && IntactCore.isInitialized(annotatedObject.getXrefs()) && !CollectionUtils.isEqualCollection( getXrefs(), annotatedObject.getXrefs() )) { return false; if (IntactCore.isInitialized(getAnnotations()) && IntactCore.isInitialized(annotatedObject.getAnnotations()) && !CollectionUtils.isEqualCollection( getAnnotations(), annotatedObject.getAnnotations() )) { return false; if (IntactCore.isInitialized(getAliases()) && IntactCore.isInitialized(annotatedObject.getAliases()) && !CollectionUtils.isEqualCollection( getAliases(), annotatedObject.getAliases() )) { return false;
@OneToMany( mappedBy = "parent", cascade = {CascadeType.PERSIST, CascadeType.REMOVE} ) @Override public Collection<BioSourceXref> getXrefs() { return super.getXrefs(); }
@OneToMany( mappedBy = "parent", cascade = {CascadeType.PERSIST, CascadeType.REMOVE} ) @Override public Collection<BioSourceAlias> getAliases() { return super.getAliases(); }
@ManyToMany( cascade = {CascadeType.PERSIST, CascadeType.REMOVE, CascadeType.MERGE, CascadeType.REFRESH, CascadeType.DETACH}) @JoinTable( name = "ia_cvobject2annot", joinColumns = {@JoinColumn( name = "cvobject_ac" )}, inverseJoinColumns = {@JoinColumn( name = "annotation_ac" )} ) @Override public Collection<Annotation> getAnnotations() { return super.getAnnotations(); }
@Override public int hashCode() { return 29 * super.hashCode(); } }
@Deprecated protected AnnotatedObjectImpl( String shortLabel, Institution owner ) { this(shortLabel); setOwner(owner); }
@Override public String toString() { return this.getClass().getSimpleName()+"{ac="+this.getAc() + "; name=" + this.shortLabel + "; fullname=" + fullName+"}"; } }
AnnotatedObjectImpl copy = ( AnnotatedObjectImpl ) super.clone(); Collection<T> xrefs = getXrefs(); Collection<A> aliases = getAliases(); for ( Xref xref : getXrefs() ) { Xref xrefClone = ( Xref ) xref.clone(); xrefClone.setParent( copy ); copiedXrefs.add( xrefClone ); copy.setXrefs( copiedXrefs ); for ( Alias alias : getAliases() ) { Alias aliasClone = ( Alias ) alias.clone(); aliasClone.setParent( copy ); copiedAliases.add( ( Alias ) alias.clone() ); copy.setAliases( copiedAliases );
if ( !shortLabel.equals( annotatedObject.getShortLabel() ) ) { return false; if ( annotatedObject.getShortLabel() != null ) { return false; if ( !fullName.equals( annotatedObject.getFullName() ) ) { return false; if ( annotatedObject.getFullName() != null ) { return false; if (IntactCore.isInitialized(getXrefs()) && IntactCore.isInitialized(annotatedObject.getXrefs()) && !CollectionUtils.isEqualCollection( getXrefs(), annotatedObject.getXrefs() )) { return false; if (IntactCore.isInitialized(getAnnotations()) && IntactCore.isInitialized(annotatedObject.getAnnotations()) && !CollectionUtils.isEqualCollection( getAnnotations(), annotatedObject.getAnnotations() )) { return false; if (IntactCore.isInitialized(getAliases()) && IntactCore.isInitialized(annotatedObject.getAliases()) && !CollectionUtils.isEqualCollection( getAliases(), annotatedObject.getAliases() )) { return false;
@OneToMany( mappedBy = "parent", cascade = {CascadeType.ALL}, orphanRemoval = true ) public Collection<InstitutionXref> getXrefs() { return super.getXrefs(); }
@OneToMany( mappedBy = "parent", cascade = {CascadeType.ALL}, orphanRemoval = true) public Collection<InstitutionAlias> getAliases() { return super.getAliases(); }
@ManyToMany( cascade = {CascadeType.PERSIST} ) @JoinTable( name = "ia_pub2annot", joinColumns = {@JoinColumn( name = "publication_ac" )}, inverseJoinColumns = {@JoinColumn( name = "annotation_ac" )} ) @Override public Collection<Annotation> getAnnotations() { return super.getAnnotations(); }
public int hashCode() { return 31*super.hashCode(); }
@Deprecated protected AnnotatedObjectImpl( String shortLabel, Institution owner ) { this(shortLabel); setOwner(owner); }
@Override public String toString() { return this.getClass().getSimpleName()+"{ac="+this.getAc() + "; name=" + this.shortLabel + "; fullname=" + fullName+"}"; } }
AnnotatedObjectImpl copy = ( AnnotatedObjectImpl ) super.clone(); Collection<T> xrefs = getXrefs(); Collection<A> aliases = getAliases(); for ( Xref xref : getXrefs() ) { Xref xrefClone = ( Xref ) xref.clone(); xrefClone.setParent( copy ); copiedXrefs.add( xrefClone ); copy.setXrefs( copiedXrefs ); for ( Alias alias : getAliases() ) { Alias aliasClone = ( Alias ) alias.clone(); aliasClone.setParent( copy ); copiedAliases.add( ( Alias ) alias.clone() ); copy.setAliases( copiedAliases );