uk.ac.ebi.intenz.domain.enzyme
Class EnzymeLink

java.lang.Object
  extended by uk.ac.ebi.intenz.domain.enzyme.EnzymeLink
All Implemented Interfaces:
Comparable<EnzymeLink>, Commented, Viewable

public class EnzymeLink
extends Object
implements Comparable<EnzymeLink>, Commented, Viewable

An enzyme link is used to store cross-reference information.

Most of the links use a static URL which differs only in the EC number used to identify the enzyme. These links can be obtained by accessing the class constants.
Other cross-references contain a static URL but need a different identifier. For example, a SwissProt cross-reference needs a protein accession number. These links are provided via the according factory methods. In case of SwissProt and MIM links it is also possible to provide a name for the protein or disease respectively.

The terms link and cross-reference are used synonymously.

Instances of this class are immutable.

Version:
$Revision: 1.2 $ $Date: 2008/01/28 12:33:00 $
Author:
Michael Darsow

Field Summary
static EnzymeLink BRENDA
          Static link to the BRENDA database.
static EnzymeLink CSA
          Static link to the CSA database.
static EnzymeLink ERGO
          Static link to the ERGO database.
static EnzymeLink EXPASY
          Static link to the ENZYME database at expasy.org.
static EnzymeLink GO
          Static link to the Gene Ontology database.
static EnzymeLink KEGG
          Static link to the KEGG database.
static EnzymeLink METACYC
          Link to MetaCyc.
static EnzymeLink NC_IUBMB
          Static link to the GM pages (NC-IUBMB).
static EnzymeLink NIST74
          Static link to the NIST 74 database.
static EnzymeLink PDB
          Static link to the PDB database.
static EnzymeLink UMBBD
          Static link to the UM-BBD database.
static EnzymeLink WIT
          Static link to the ERGO (formerly WIT) database.
 
Method Summary
 int compareTo(EnzymeLink link)
          Used for ordering links in a collection.
 boolean equals(Object o)
          Checks for equality.
 String getAccession()
           
 String getDataComment()
           
 String getFullUrl(String ec)
          Links with the EC number as identifier need to call this method to get the correct URL.
 String getListOrderCriterion()
          Creates a unique name for this link.
 String getName()
           
 EnzymeSourceConstant getSource()
           
 String getSpecificUrl()
           
static EnzymeLink getStaticLink(XrefDatabaseConstant databaseConstant)
           
 EnzymeViewConstant getView()
           
 XrefDatabaseConstant getXrefDatabaseConstant()
           
 int hashCode()
          Generates a hash code for this object.
static boolean isStaticLink(XrefDatabaseConstant databaseConstant)
          Checks if the given link is a static link.
 void setDataComment(String comment)
           
 String toString()
          Provides a string representation of an EnzymeLink.
static EnzymeLink valueOf(XrefDatabaseConstant xrefDatabaseConstant, String specificUrl, String accession, String name, EnzymeSourceConstant source, EnzymeViewConstant view)
          Returns an EnzymeLink instance.
static EnzymeLink valueOf(XrefDatabaseConstant xrefDatabaseConstant, String specificUrl, String accession, String name, EnzymeSourceConstant source, EnzymeViewConstant view, String dataComment)
          Returns a commented EnzymeLink instance.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

BRENDA

public static final EnzymeLink BRENDA
Static link to the BRENDA database.


METACYC

public static final EnzymeLink METACYC
Link to MetaCyc.


KEGG

public static final EnzymeLink KEGG
Static link to the KEGG database.


EXPASY

public static final EnzymeLink EXPASY
Static link to the ENZYME database at expasy.org.


NC_IUBMB

public static final EnzymeLink NC_IUBMB
Static link to the GM pages (NC-IUBMB).


ERGO

public static final EnzymeLink ERGO
Static link to the ERGO database.


WIT

public static final EnzymeLink WIT
Static link to the ERGO (formerly WIT) database.


GO

public static final EnzymeLink GO
Static link to the Gene Ontology database.


NIST74

public static final EnzymeLink NIST74
Static link to the NIST 74 database.


UMBBD

public static final EnzymeLink UMBBD
Static link to the UM-BBD database.


PDB

public static final EnzymeLink PDB
Static link to the PDB database.


CSA

public static final EnzymeLink CSA
Static link to the CSA database.

Method Detail

valueOf

public static EnzymeLink valueOf(XrefDatabaseConstant xrefDatabaseConstant,
                                 String specificUrl,
                                 String accession,
                                 String name,
                                 EnzymeSourceConstant source,
                                 EnzymeViewConstant view)
Returns an EnzymeLink instance.

Parameters:
xrefDatabaseConstant - The link's xrefDatabaseConstant.
specificUrl - The link's URL.
accession - The accession of this link.
name - The name of this link.
Returns:
the EnzymeLink instance.
Throws:
NullPointerException - if xrefDatabaseConstant is null.
IllegalArgumentException - if the arguments are not sufficient to create a link.

valueOf

public static EnzymeLink valueOf(XrefDatabaseConstant xrefDatabaseConstant,
                                 String specificUrl,
                                 String accession,
                                 String name,
                                 EnzymeSourceConstant source,
                                 EnzymeViewConstant view,
                                 String dataComment)
Returns a commented EnzymeLink instance.

Parameters:
xrefDatabaseConstant -
specificUrl -
accession -
name -
source -
view -
dataComment -
Returns:

isStaticLink

public static boolean isStaticLink(XrefDatabaseConstant databaseConstant)
Checks if the given link is a static link.

Parameters:
databaseConstant - The database constant to be checked.
Returns:
true if the link is a static link.
Throws:
NullPointerException - if link is null.

getStaticLink

public static EnzymeLink getStaticLink(XrefDatabaseConstant databaseConstant)

compareTo

public int compareTo(EnzymeLink link)
Used for ordering links in a collection.

Static and other links are ordered by their xrefDatabaseConstant name, SwissProt and MIM cross-references by their name and PROSITE links by their accession. Other links are ordered by their specific URL if the xrefDatabaseConstant name is the same. Noted: Changed so that only SwissProt compares on the basis of name and OMIM compares on the basis of accession like PROSITE.

Specified by:
compareTo in interface Comparable<EnzymeLink>
Parameters:
link - The object to be compared to this.
Returns:
neg, 0 or pos. value to indicate the order of these two objects.
Throws:
NullPointerException - if o is null.

equals

public boolean equals(Object o)
Checks for equality.

Overrides:
equals in class Object
Parameters:
o - The object to be compared to this.
Returns:
true if o is equal this object.

hashCode

public int hashCode()
Generates a hash code for this object.

Overrides:
hashCode in class Object
Returns:
the hash code.

toString

public String toString()
Provides a string representation of an EnzymeLink.

Overrides:
toString in class Object
Returns:
the string representation.

getListOrderCriterion

public String getListOrderCriterion()
Creates a unique name for this link.

This method will be used to populate lists (esp. combo box content).

Returns:
the unique name.

getFullUrl

public String getFullUrl(String ec)
Links with the EC number as identifier need to call this method to get the correct URL.

Parameters:
ec - The EC number.
Returns:
the full URL.
Throws:
NullPointerException - if ec is null.

getXrefDatabaseConstant

public XrefDatabaseConstant getXrefDatabaseConstant()

getSpecificUrl

public String getSpecificUrl()

getAccession

public String getAccession()

getName

public String getName()

getView

public EnzymeViewConstant getView()
Specified by:
getView in interface Viewable

getSource

public EnzymeSourceConstant getSource()

getDataComment

public String getDataComment()
Specified by:
getDataComment in interface Commented

setDataComment

public void setDataComment(String comment)
Specified by:
setDataComment in interface Commented


Copyright © 2013 EMBL-EBI. All Rights Reserved.