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

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

public class EnzymeName
extends Object
implements Comparable<EnzymeName>, Viewable

This class stores a name related to an enzyme.

Currently three different types of names are supported:

  1. common (recommended) name
  2. systematic name
  3. synonym

Synonyms can be qualified and ordered.

Instances of this class are immutable.

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

Field Summary
static EnzymeName UNDEF
           
 
Method Summary
 int compareTo(EnzymeName name)
           
 boolean equals(Object o)
          Standard equals method omitting 'orderIn' attribute, which is irrelevant for this check.
static EnzymeName getCommonNameInstance(String name, EnzymeSourceConstant source, EnzymeViewConstant view)
          Returns an EnzymeName instance representing an enzyme's common (recommended) name.
 String getName()
          Returns the name.
 EnzymeNameQualifierConstant getQualifier()
          Returns the name's qualifier.
 EnzymeSourceConstant getSource()
          Returns the name's source.
static EnzymeName getSynonymInstance(String name, EnzymeNameQualifierConstant qualifier, EnzymeSourceConstant source, EnzymeViewConstant view)
          Returns an EnzymeName instance representing an enzyme's synonym.
static EnzymeName getSystematicNameInstance(String name, EnzymeSourceConstant source, EnzymeViewConstant view)
          Returns an EnzymeName instance representing an enzyme's systematic name.
 EnzymeNameTypeConstant getType()
          Returns the name's type.
 EnzymeViewConstant getView()
          Returns the name's view code.
 int hashCode()
          Returns the hash code of this object.
static EnzymeName valueOf(String name, EnzymeNameTypeConstant type, EnzymeNameQualifierConstant qualifier, EnzymeSourceConstant source, EnzymeViewConstant view)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNDEF

public static EnzymeName UNDEF
Method Detail

valueOf

public static EnzymeName valueOf(String name,
                                 EnzymeNameTypeConstant type,
                                 EnzymeNameQualifierConstant qualifier,
                                 EnzymeSourceConstant source,
                                 EnzymeViewConstant view)

getCommonNameInstance

public static EnzymeName getCommonNameInstance(String name,
                                               EnzymeSourceConstant source,
                                               EnzymeViewConstant view)
Returns an EnzymeName instance representing an enzyme's common (recommended) name.

Parameters:
name - The common name.
Returns:
The EnzymeName instance representing the common name.
Throws:
NullPointerException - if name is null.
IllegalArgumentException - if name is empty.

getSystematicNameInstance

public static EnzymeName getSystematicNameInstance(String name,
                                                   EnzymeSourceConstant source,
                                                   EnzymeViewConstant view)
Returns an EnzymeName instance representing an enzyme's systematic name.

Parameters:
name - The systematic name.
Returns:
The EnzymeName instance representing the systematic name.
Throws:
NullPointerException - if name is null.
IllegalArgumentException - if name is empty.

getSynonymInstance

public static EnzymeName getSynonymInstance(String name,
                                            EnzymeNameQualifierConstant qualifier,
                                            EnzymeSourceConstant source,
                                            EnzymeViewConstant view)
Returns an EnzymeName instance representing an enzyme's synonym.

Parameters:
name - The systematic name.
qualifier - A qualifier used for synonyms (see EnzymeNameQualifierConstant).
Returns:
The EnzymeName instance representing the synonym.
Throws:
NullPointerException - if name or qualifier are null.
IllegalArgumentException - if name is empty or orderIn is < 1.

compareTo

public int compareTo(EnzymeName name)
Specified by:
compareTo in interface Comparable<EnzymeName>
Parameters:
name - The specified enzyme name.
Returns:
a neg. integer if this instance is smaller than the specified name 0 if they are equal and a pos. integer otherwise.

equals

public boolean equals(Object o)
Standard equals method omitting 'orderIn' attribute, which is irrelevant for this check.

Overrides:
equals in class Object
Parameters:
o - Object to be compared to this one.
Returns:
true if the objects are equal.

hashCode

public int hashCode()
Returns the hash code of this object.

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

getName

public String getName()
Returns the name.

Returns:
the name.

getType

public EnzymeNameTypeConstant getType()
Returns the name's type.

Returns:
the name's type.
See Also:
EnzymeNameTypeConstant

getQualifier

public EnzymeNameQualifierConstant getQualifier()
Returns the name's qualifier.

Returns:
the name's qualifier.
See Also:
EnzymeNameQualifierConstant

getSource

public EnzymeSourceConstant getSource()
Returns the name's source.

Returns:
the name's source.
See Also:
EnzymeSourceConstant

getView

public EnzymeViewConstant getView()
Returns the name's view code.

The code defines in which view this name will be displayed.

Specified by:
getView in interface Viewable
Returns:
the name's view code.
See Also:
EnzymeViewConstant


Copyright © 2013 EMBL-EBI. All Rights Reserved.