uk.ac.ebi.intact.model
Class Institution

java.lang.Object
  |
  +--uk.ac.ebi.intact.model.IntactObjectImpl
        |
        +--uk.ac.ebi.intact.model.Institution
All Implemented Interfaces:
IntactObject, java.io.Serializable

public class Institution
extends IntactObjectImpl
implements java.io.Serializable

Represents the contact details for an institution.

Version:
$Id: Institution.java,v 1.9 2004/01/31 11:33:13 skerrien Exp $
Author:
Henning Hermjakob
See Also:
Serialized Form

Field Summary
protected  java.lang.String fullName
          TODO comments
protected  java.lang.String postalAddress
          Postal address.
protected  java.lang.String shortLabel
          The name of the institution.
protected  java.lang.String url
          TODO comments
 
Fields inherited from class uk.ac.ebi.intact.model.IntactObjectImpl
ac, NEW_LINE
 
Constructor Summary
Institution(java.lang.String shortLabel)
          This constructor ensures creation of a valid Institution.
 
Method Summary
 boolean equals(java.lang.Object o)
          Equality for Institutions is currently based on equal shortLabels and fullNames.
 java.lang.String getFullName()
           
 java.lang.String getPostalAddress()
           
 java.lang.String getShortLabel()
           
 java.lang.String getUrl()
           
 int hashCode()
          This class overwrites equals.
 void setFullName(java.lang.String fullName)
           
 void setPostalAddress(java.lang.String postalAddress)
           
 void setShortLabel(java.lang.String shortLabel)
           
 void setUrl(java.lang.String url)
           
 java.lang.String toString()
           
 
Methods inherited from class uk.ac.ebi.intact.model.IntactObjectImpl
getAc, getCreated, getUpdated, setAc, setCreated, setUpdated
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

shortLabel

protected java.lang.String shortLabel
The name of the institution.


postalAddress

protected java.lang.String postalAddress
Postal address. Format: One string with line breaks.


fullName

protected java.lang.String fullName
TODO comments


url

protected java.lang.String url
TODO comments

Constructor Detail

Institution

public Institution(java.lang.String shortLabel)
This constructor ensures creation of a valid Institution. Specifically it must have at least a shortLabel defined since this is indexed in persistent store. Note that a side-effect of this constructor is to set the created and updated fields of the instance to the current time.

Parameters:
shortLabel - The short label used to refer to this Institution.
Throws:
java.lang.NullPointerException - if an attempt is made to create an Instiution without defining a shortLabel.
Method Detail

getShortLabel

public java.lang.String getShortLabel()

setShortLabel

public void setShortLabel(java.lang.String shortLabel)

getPostalAddress

public java.lang.String getPostalAddress()

setPostalAddress

public void setPostalAddress(java.lang.String postalAddress)

getFullName

public java.lang.String getFullName()

setFullName

public void setFullName(java.lang.String fullName)

getUrl

public java.lang.String getUrl()

setUrl

public void setUrl(java.lang.String url)

equals

public boolean equals(java.lang.Object o)
Equality for Institutions is currently based on equal shortLabels and fullNames.

Overrides:
equals in class java.lang.Object
Parameters:
o - The object to check
Returns:
true if the parameter equlas this object, false otherwise

hashCode

public int hashCode()
This class overwrites equals. To ensure proper functioning of HashTable, hashCode must be overwritten, too.

Overrides:
hashCode in class java.lang.Object
Returns:
hash code of the object.

toString

public java.lang.String toString()
Specified by:
toString in interface IntactObject
Overrides:
toString in class IntactObjectImpl


IntAct Project - EMBL-EBI 2004 - intact-help@ebi.ac.uk